提交merge1.3
This commit is contained in:
@@ -41,6 +41,15 @@
|
||||
@change="handleDateQuery"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button
|
||||
class="table-header-button"
|
||||
type="primary"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
<el-button
|
||||
class="table-header-button"
|
||||
icon="Refresh"
|
||||
@@ -140,6 +149,8 @@
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<ChkstockDetailsDialog ref="detailsDialogRef" :isApply="isApply" />
|
||||
<TransferDetailsDialog ref="tranDetailsDialogRef" :isApply="isApply" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -155,11 +166,20 @@ import {
|
||||
reject,
|
||||
init,
|
||||
getpurchaseInventoryDetail,
|
||||
<<<<<<< HEAD
|
||||
getpurchaseInventoryDetailReturn
|
||||
} from "./components/api";
|
||||
import { purchaseInventoryApproved as purchaseReturnApproved } from '../returnedPurchase/components/api';
|
||||
import { useStore } from '@/store/store';
|
||||
import { formatDate } from '@/utils/index';
|
||||
=======
|
||||
getpurchaseInventoryDetailReturn,
|
||||
} from './components/api';
|
||||
import { useStore } from '@/store/store';
|
||||
import { formatDate } from '@/utils/index';
|
||||
import ChkstockDetailsDialog from '@/views/medicationmanagement/chkstock/components/chkstockDetailsDialog.vue';
|
||||
import TransferDetailsDialog from '@/views/medicationmanagement/transferManagent/components/transferDetailsDialog.vue';
|
||||
>>>>>>> v1.3
|
||||
import useTagsViewStore from '@/store/modules/tagsView';
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@@ -167,6 +187,7 @@ const store = useStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emit = defineEmits(['selectAdviceBase']);
|
||||
const total = ref(0);
|
||||
const isApply = ref(false);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -236,6 +257,7 @@ function handelApply(row) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
})
|
||||
}else if(row.typeEnum == 5){ // 采购退货审批通过
|
||||
console.log("采购退货审批通过,typeEnum:", row.typeEnum);
|
||||
@@ -253,6 +275,10 @@ function handelApply(row) {
|
||||
proxy.$modal.msgError("操作异常: " + error.message);
|
||||
});
|
||||
}else{
|
||||
=======
|
||||
});
|
||||
} else {
|
||||
>>>>>>> v1.3
|
||||
purchaseInventoryApproved(row.supplyBusNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
@@ -264,19 +290,30 @@ function handelApply(row) {
|
||||
|
||||
// 审批,查看
|
||||
function handelApplys(row, view) {
|
||||
<<<<<<< HEAD
|
||||
if (row.typeEnum == 2) {
|
||||
=======
|
||||
if (row.typeEnum == 100086) {
|
||||
>>>>>>> v1.3
|
||||
//商品调拨
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/medicationmanagement/transferManagement/transferManagent',
|
||||
query: { supplyBusNo: row.supplyBusNo, view: view },
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
} else if (row.typeEnum == 8) {
|
||||
//8 批量
|
||||
router.replace({
|
||||
path: '/medicationmanagement/transferManagement/batchTransfer',
|
||||
query: { supplyBusNo: row.supplyBusNo, view: view },
|
||||
});
|
||||
=======
|
||||
} else if (row.typeEnum == 8 || row.typeEnum == 2) {
|
||||
//8 批量
|
||||
isApply.value = true;
|
||||
proxy.$refs['tranDetailsDialogRef'].open(row.supplyBusNo);
|
||||
>>>>>>> v1.3
|
||||
} else if (row.typeEnum == 7) {
|
||||
//领用出库审批通过
|
||||
router.replace({
|
||||
@@ -290,11 +327,17 @@ function handelApplys(row, view) {
|
||||
query: { supplyBusNo: row.supplyBusNo, view: view },
|
||||
});
|
||||
} else if (row.typeEnum == 4) {
|
||||
<<<<<<< HEAD
|
||||
//盘点审批
|
||||
router.replace({
|
||||
path: '/medicationmanagement/chkstock/chkstockPart',
|
||||
query: { supplyBusNo: row.supplyBusNo, view: view },
|
||||
});
|
||||
=======
|
||||
isApply.value = true;
|
||||
//盘点审批
|
||||
proxy.$refs['detailsDialogRef'].open(row.supplyBusNo);
|
||||
>>>>>>> v1.3
|
||||
} else if (row.typeEnum == 10) {
|
||||
// 批量盘点
|
||||
router.replace({
|
||||
@@ -336,7 +379,15 @@ function handleDateQuery(value) {
|
||||
queryParams.value.applyTimeETime = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'inventory-manage/receipt/export-excel',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`库存审批单_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
optionInit();
|
||||
function optionInit() {
|
||||
init().then((res) => {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -37,6 +37,11 @@
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">导出</el-button>
|
||||
>>>>>>> v1.3
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
@@ -571,17 +576,21 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="260"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
>
|
||||
<<<<<<< HEAD
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
=======
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
>>>>>>> v1.3
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -701,6 +710,7 @@ import {
|
||||
addBatch, //保存批量盘点
|
||||
productStocktakingApproved,
|
||||
reject,
|
||||
<<<<<<< HEAD
|
||||
getpharmacyCabinetList
|
||||
} from "../components/api";
|
||||
import PopoverList from "@/components/OpenHis/popoverList/index.vue";
|
||||
@@ -708,6 +718,14 @@ import MedicineList from "../components/medicineList.vue";
|
||||
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue'
|
||||
import { formatDate,formatDateymd } from "@/utils/index";
|
||||
import { ref } from "vue";
|
||||
=======
|
||||
} from '../components/api';
|
||||
import PopoverList from '@/components/OpenHis/popoverList/index.vue';
|
||||
import MedicineList from '../components/medicineList.vue';
|
||||
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
|
||||
import { formatDate, formatDateymd } from '@/utils/index';
|
||||
import { ref } from 'vue';
|
||||
>>>>>>> v1.3
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@@ -1041,7 +1059,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber;
|
||||
@@ -1079,7 +1097,7 @@ function selectRow(rowValue, index) {
|
||||
// form.purchaseinventoryList[index].itemQuantity = '';
|
||||
// form.purchaseinventoryList[index].reasonCode = '';
|
||||
// form.purchaseinventoryList[index].reason = '';
|
||||
// form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
// form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
// form.purchaseinventoryList[index].unitCodeList = [
|
||||
// {id:1,name:rowValue.unitCode_dictText,unitName:rowValue.unitCode_dictText,code:rowValue.unitCode},
|
||||
// {id:2,name:rowValue.minUnitCode_dictText,unitName:rowValue.minUnitCode_dictText,code:rowValue.minUnitCode}];
|
||||
@@ -1558,7 +1576,11 @@ function getDetailAll() {
|
||||
// form.purchaseinventoryList[index].statusMaxvalue = false
|
||||
e.volume = e.totalVolume;
|
||||
e.name = e.itemName;
|
||||
<<<<<<< HEAD
|
||||
e.manufacturer = e.manufacturerText;
|
||||
=======
|
||||
e.manufacturerText = e.manufacturerText;
|
||||
>>>>>>> v1.3
|
||||
if (e.purposeTypeEnum) {
|
||||
warehous_type.value.map((item) => {
|
||||
if (item.value == e.purposeTypeEnum) {
|
||||
@@ -1688,7 +1710,11 @@ function getDetail(type) {
|
||||
form.purchaseinventoryList[index].statusMaxvalue = false;
|
||||
e.volume = e.totalVolume;
|
||||
e.name = e.itemName;
|
||||
<<<<<<< HEAD
|
||||
e.manufacturer = e.manufacturerText;
|
||||
=======
|
||||
e.manufacturerText = e.manufacturerText;
|
||||
>>>>>>> v1.3
|
||||
if (e.purposeTypeEnum) {
|
||||
warehous_type.value.map((item) => {
|
||||
if (item.value == e.purposeTypeEnum) {
|
||||
@@ -2071,7 +2097,11 @@ function handleReject() {
|
||||
store.clearCurrentDataPLPDALL();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
<<<<<<< HEAD
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
=======
|
||||
path: '/aaaa/billapproval',
|
||||
>>>>>>> v1.3
|
||||
query: { type: 'chkstockBatch' },
|
||||
});
|
||||
}
|
||||
@@ -2088,7 +2118,11 @@ function handelApply() {
|
||||
store.clearCurrentDataPLPDALL();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
<<<<<<< HEAD
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
=======
|
||||
path: '/aaaa/billapproval',
|
||||
>>>>>>> v1.3
|
||||
query: { type: 'chkstockBatch' },
|
||||
});
|
||||
}
|
||||
@@ -2165,7 +2199,13 @@ function getStockReceiptTypeList() {
|
||||
console.log('详情页查询下拉树response1111111', response);
|
||||
|
||||
// categoryListOptions.value = response.data.categoryListOptions; // 药品类型
|
||||
<<<<<<< HEAD
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏原因
|
||||
=======
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏原因
|
||||
// receiptHeaderForm.purposeTypeEnum = warehous_type.value[0].value // 仓库类型默认值
|
||||
// handleChangePurposeTypeEnum(receiptHeaderForm.purposeTypeEnum)
|
||||
>>>>>>> v1.3
|
||||
// cabinetListOptionsBk.value = response.data.purposeTypeListOptions; // 盘点仓库列表(未过滤)
|
||||
|
||||
// purposeTypeListOptions.value = cabinetListOptionsBk.value.filter(item => item.formEnum === receiptHeaderForm.purposeTypeEnum) // 盘点仓库列表
|
||||
@@ -2276,6 +2316,7 @@ function totalQuantityChange(rowData, index, value) {
|
||||
editBatchTransfer(index);
|
||||
}
|
||||
// 切换仓库类型获取药房/药库列表 目的仓库切换
|
||||
<<<<<<< HEAD
|
||||
function handleChangePurposeTypeEnum(value,type) {
|
||||
// 确保value是数字类型
|
||||
const numValue = Number(value);
|
||||
@@ -2299,6 +2340,26 @@ function handleChangePurposeTypeEnum(value,type) {
|
||||
console.error('获取仓库列表失败:', error);
|
||||
purposeTypeListOptions.value = [];
|
||||
freightListOptions.value = [];
|
||||
=======
|
||||
function handleChangePurposeTypeEnum(value, type) {
|
||||
if (value == 16) {
|
||||
getPharmacyList().then((res) => {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
if (!route.query.supplyBusNo && !type) {
|
||||
receiptHeaderForm.purposeLocationId = '';
|
||||
receiptHeaderForm.purposeLocationId1 = '';
|
||||
}
|
||||
// getinitValue()
|
||||
});
|
||||
} else if (value == 11) {
|
||||
getDispensaryList().then((res) => {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
if (!route.query.supplyBusNo && !type) {
|
||||
receiptHeaderForm.purposeLocationId = '';
|
||||
receiptHeaderForm.purposeLocationId1 = '';
|
||||
}
|
||||
// getinitValue()
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
} else if (numValue === 17) {
|
||||
// 处理耗材库类型
|
||||
@@ -2382,6 +2443,25 @@ function handleTraceNo(value, row, index) {
|
||||
}
|
||||
getStockReceiptTypeList(); // 详情页查询下拉树结构
|
||||
getbusNo(); // 单据号取得
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/stocktaking/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`批量盘点单明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"paperType": "自定义",
|
||||
"height": 130,
|
||||
"width": 210,
|
||||
<<<<<<< HEAD
|
||||
"paperHeader": 0,
|
||||
"paperFooter": 365.6692913385827,
|
||||
"paperNumberDisabled": true,
|
||||
@@ -26,6 +27,15 @@
|
||||
"timestamp": false,
|
||||
"format": "YYYY-MM-DD HH:mm"
|
||||
},
|
||||
=======
|
||||
"paperHeader": 73.5,
|
||||
"paperFooter": 337.5,
|
||||
"paperNumberDisabled": true,
|
||||
"paperNumberContinue": true,
|
||||
"expandCss": "",
|
||||
"overPrintOptions": {},
|
||||
"watermarkOptions": {},
|
||||
>>>>>>> v1.3
|
||||
"panelLayoutOptions": {},
|
||||
"printElements": [
|
||||
{
|
||||
@@ -34,7 +44,11 @@
|
||||
"top": 12,
|
||||
"height": 12,
|
||||
"width": 115.5,
|
||||
<<<<<<< HEAD
|
||||
"title": "长春大学医院盘点单",
|
||||
=======
|
||||
"title": "长春市朝阳区中医院医院盘点单",
|
||||
>>>>>>> v1.3
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 12,
|
||||
@@ -85,7 +99,11 @@
|
||||
"top": 33,
|
||||
"height": 9.75,
|
||||
"width": 120,
|
||||
<<<<<<< HEAD
|
||||
"title": "机构:长春大学医院",
|
||||
=======
|
||||
"title": "机构:长春市朝阳区中医院医院",
|
||||
>>>>>>> v1.3
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
@@ -131,7 +149,11 @@
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
<<<<<<< HEAD
|
||||
"width": 50.418660151829066,
|
||||
=======
|
||||
"width": 59.68821015182906,
|
||||
>>>>>>> v1.3
|
||||
"field": "name",
|
||||
"checked": true,
|
||||
"columnId": "name",
|
||||
@@ -146,7 +168,11 @@
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
<<<<<<< HEAD
|
||||
"width": 47.38277249096388,
|
||||
=======
|
||||
"width": 46.07372249096389,
|
||||
>>>>>>> v1.3
|
||||
"field": "volume",
|
||||
"checked": true,
|
||||
"columnId": "volume",
|
||||
@@ -161,10 +187,17 @@
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
<<<<<<< HEAD
|
||||
"width": 70.82692033621548,
|
||||
"field": "manufacturer",
|
||||
"checked": true,
|
||||
"columnId": "manufacturer",
|
||||
=======
|
||||
"width": 62.86642033621548,
|
||||
"field": "manufacturerText",
|
||||
"checked": true,
|
||||
"columnId": "manufacturerText",
|
||||
>>>>>>> v1.3
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
@@ -280,6 +313,24 @@
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"title": "厂家/产地",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 70.82692033621548,
|
||||
"field": "manufacturerText",
|
||||
"checked": false,
|
||||
"columnId": "manufacturerText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
>>>>>>> v1.3
|
||||
"title": "盘前库存",
|
||||
"titleSync": false,
|
||||
"align": "center",
|
||||
@@ -410,6 +461,7 @@
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
<<<<<<< HEAD
|
||||
"left": 480,
|
||||
"top": 130.5,
|
||||
"height": 12,
|
||||
@@ -430,6 +482,10 @@
|
||||
"options": {
|
||||
"left": 261.24609375,
|
||||
"top": 130.74609375,
|
||||
=======
|
||||
"left": 456,
|
||||
"top": 343.5,
|
||||
>>>>>>> v1.3
|
||||
"height": 12,
|
||||
"width": 109.5,
|
||||
"title": "制单人",
|
||||
@@ -446,4 +502,8 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
=======
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,12 +4,17 @@ import {parseStrEmpty} from '@/utils/openhis';
|
||||
// 查询盘点列表
|
||||
export function getStockTakeList (query) {
|
||||
return request ({
|
||||
<<<<<<< HEAD
|
||||
url: '/nurse-station/orgdevice-stocktake/summary-from',
|
||||
=======
|
||||
url: '/nurse-station/org-device-stockTake/summary-from',
|
||||
>>>>>>> v1.3
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail (busNo) {
|
||||
return request ({
|
||||
@@ -105,6 +110,8 @@ export function getCount (queryParams) {
|
||||
});
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
// 获取药房列表
|
||||
export function getPharmacyList () {
|
||||
return request ({
|
||||
@@ -120,10 +127,27 @@ export function getDispensaryList () {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
export function stocktakingReceiptAuto () {
|
||||
return request ({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-auto',
|
||||
method: 'get',
|
||||
=======
|
||||
// 获取药品目录
|
||||
export function getMedicineList (queryParams) {
|
||||
return request ({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
// 科室耗材汇总
|
||||
export function saveOrgDeviceSummary (data) {
|
||||
return request ({
|
||||
url: '/nurse-station/org-device-stockTake/org-device-summary',
|
||||
method: 'put',
|
||||
data,
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
}
|
||||
|
||||
@@ -35,7 +35,11 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<<<<<<< HEAD
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
=======
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
>>>>>>> v1.3
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<<<<<<< HEAD
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
=======
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" :rules="rules">
|
||||
>>>>>>> v1.3
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
@@ -10,7 +14,11 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="仓库类型" prop="purposeTypeEnum">
|
||||
=======
|
||||
<el-form-item label="仓库" prop="purposeTypeEnum">
|
||||
>>>>>>> v1.3
|
||||
<el-select
|
||||
v-model="queryParams.purposeTypeEnum"
|
||||
placeholder="请选择"
|
||||
@@ -18,6 +26,10 @@
|
||||
filterable
|
||||
style="width: 200px"
|
||||
@change="handleChangePurposeTypeEnum"
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
@keyup.enter="handleQuery"
|
||||
>>>>>>> v1.3
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehous_type"
|
||||
@@ -27,13 +39,20 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="盘点仓库" prop="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
=======
|
||||
<el-form-item label="盘点仓库" prop="sourceLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
>>>>>>> v1.3
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 200px"
|
||||
<<<<<<< HEAD
|
||||
@change="handleCabinetChange(receiptHeaderForm.purposeLocationId)"
|
||||
>
|
||||
<el-option
|
||||
@@ -41,6 +60,13 @@
|
||||
{ id: 1, name: '仓库1' },
|
||||
{ id: 2, name: '仓库2' },
|
||||
]"
|
||||
=======
|
||||
:disabled="!queryParams.purposeTypeEnum"
|
||||
@keyup.enter="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in purposeTypeListOptions"
|
||||
>>>>>>> v1.3
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
@@ -55,6 +81,7 @@
|
||||
filterable
|
||||
style="width: 200px"
|
||||
>
|
||||
<<<<<<< HEAD
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ id: 1, name: '货位1' },
|
||||
@@ -66,17 +93,53 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
=======
|
||||
<el-option v-for="item in []" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="请求日期" prop="applyTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.applyTime"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
>>>>>>> v1.3
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
size="small"
|
||||
@click="handleSave()"
|
||||
:disabled="multiple"
|
||||
>批量保存</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
>>>>>>> v1.3
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 250px)"
|
||||
>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<el-table-column type="selection" width="55" align="center" fixed></el-table-column>
|
||||
>>>>>>> v1.3
|
||||
<el-table-column
|
||||
label="项目"
|
||||
align="center"
|
||||
@@ -86,6 +149,7 @@
|
||||
fixed
|
||||
></el-table-column>
|
||||
<el-table-column label="规格" align="center" prop="totalVolume" />
|
||||
<<<<<<< HEAD
|
||||
<el-table-column label="厂家/产地" align="center" prop="manufacturer" show-overflow-tooltip />
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价" align="center" key="unit" prop="unitPrice" />
|
||||
@@ -94,6 +158,37 @@
|
||||
<el-table-column label="盈亏数量" align="center" prop="itemQuantity">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.itemQuantity" :input-style="{ textAlign: 'center' }" type="number" />
|
||||
=======
|
||||
<el-table-column label="厂家/产地" align="center" prop="manufacturerText" show-overflow-tooltip />
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价(元)" align="center" key="unit" prop="unitPrice" />
|
||||
<el-table-column label="发放数量" align="center" prop="dispenseQuantity">
|
||||
<template #default="scope">
|
||||
{{ formatQuantityWithUnit(scope.row.dispenseQuantity, scope.row.minUnitCode_dictText) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存数量" align="center" prop="quantity">
|
||||
<template #default="scope">
|
||||
{{ formatQuantityWithUnit(scope.row.quantity, scope.row.minUnitCode_dictText) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实盘数量" align="center" prop="stockTakeQuantity">
|
||||
<template #default="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.stockTakeQuantity"
|
||||
:precision="0"
|
||||
:min="0"
|
||||
:input-style="{ textAlign: 'center' }"
|
||||
:controls="false"
|
||||
style="width: 100%"
|
||||
@keyup.enter="handleSave(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盈亏数量" align="center" prop="profitLoss">
|
||||
<template #default="scope">
|
||||
{{ calcProfitLoss(scope.row) }}
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" prop="unitCode_dictText" />
|
||||
@@ -102,8 +197,14 @@
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
<<<<<<< HEAD
|
||||
size="mini"
|
||||
type="text"
|
||||
=======
|
||||
size="small"
|
||||
type="primary"
|
||||
link
|
||||
>>>>>>> v1.3
|
||||
icon="Check"
|
||||
@click="handleSave(scope.row)"
|
||||
v-hasPermi="['chkstock:partDeptDevice:edit']"
|
||||
@@ -115,6 +216,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
<<<<<<< HEAD
|
||||
import { ref, reactive, toRaw, computed, watch, onMounted } from 'vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { getStockTakeList } from './components/api.js';
|
||||
@@ -134,12 +236,49 @@ const getList = () => {
|
||||
loading.value = false;
|
||||
dataList.value = res.data;
|
||||
total.value = res.data.length;
|
||||
=======
|
||||
import { ref, reactive, getCurrentInstance, onMounted } from 'vue';
|
||||
import {
|
||||
getStockTakeList,
|
||||
getPharmacyList,
|
||||
getDispensaryList,
|
||||
saveOrgDeviceSummary,
|
||||
} from './components/api.js';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { warehous_type } = proxy.useDict('warehous_type');
|
||||
const dataList = ref([]);
|
||||
const queryParams = reactive({
|
||||
name: undefined,
|
||||
purposeTypeEnum: undefined,
|
||||
sourceLocationId: undefined,
|
||||
applyTime: [],
|
||||
applyTimeSTime: undefined,
|
||||
applyTimeETime: undefined,
|
||||
});
|
||||
const loading = ref(false);
|
||||
const rules = ref({});
|
||||
// 获取列表
|
||||
const getList = () => {
|
||||
loading.value = true;
|
||||
const params = {
|
||||
...queryParams,
|
||||
pageNo: queryParams.pageNo || 1,
|
||||
pageSize: queryParams.pageSize || 10,
|
||||
applyTime: undefined,
|
||||
applyTimeSTime: queryParams.applyTime[0] ? `${queryParams.applyTime[0]} 00:00:00` : undefined,
|
||||
applyTimeETime: queryParams.applyTime[1] ? `${queryParams.applyTime[1]} 23:59:59` : undefined,
|
||||
};
|
||||
getStockTakeList(params).then((res) => {
|
||||
loading.value = false;
|
||||
dataList.value = res.data;
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
};
|
||||
// 搜索
|
||||
const handleQuery = () => {
|
||||
getList();
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
queryParams.value = {};
|
||||
@@ -158,6 +297,77 @@ const handleSave = (row) => {
|
||||
proxy.$modal.msgWarning('盈亏数量不能为空');
|
||||
return;
|
||||
}
|
||||
=======
|
||||
|
||||
// 重置
|
||||
const resetQuery = () => {
|
||||
Object.assign(queryParams, {
|
||||
name: undefined,
|
||||
purposeTypeEnum: undefined,
|
||||
sourceLocationId: undefined,
|
||||
applyTime: [],
|
||||
});
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
// 多选
|
||||
const handleSelectionChange = (selection) => {
|
||||
ids.value = selection.map((item) => item);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
const toNumber = (value) => {
|
||||
if (value === '' || value === null || value === undefined) return null;
|
||||
const num = Number(value);
|
||||
return Number.isNaN(num) ? null : num;
|
||||
};
|
||||
const formatQuantityWithUnit = (quantity, unitText) => {
|
||||
const num = toNumber(quantity);
|
||||
if (num === null) return '';
|
||||
return unitText ? `${num} ${unitText}` : `${num}`;
|
||||
};
|
||||
const calcProfitLoss = (row) => {
|
||||
const stockTakeQuantity = toNumber(row.stockTakeQuantity);
|
||||
const dispenseQuantity = toNumber(row.dispenseQuantity);
|
||||
if (stockTakeQuantity === null || dispenseQuantity === null) return '';
|
||||
const profitLoss = stockTakeQuantity - dispenseQuantity;
|
||||
return `${profitLoss} ${row.minUnitCode_dictText ?? ''}`;
|
||||
};
|
||||
|
||||
const buildSummaryPayload = (rows) =>
|
||||
rows.map((item) => ({
|
||||
id: item.id,
|
||||
stockTakeQuantity: Number(item.stockTakeQuantity),
|
||||
useUnitCode: item.minUnitCode,
|
||||
...item,
|
||||
}));
|
||||
|
||||
// 保存(单条/批量)
|
||||
const handleSave = (row) => {
|
||||
const targetRows = row ? [row] : ids.value;
|
||||
|
||||
if (!targetRows.length) {
|
||||
proxy.$modal.msgWarning('请选择需要保存的数据');
|
||||
return;
|
||||
}
|
||||
|
||||
const invalidRow = targetRows.find(
|
||||
(item) =>
|
||||
item.stockTakeQuantity === '' ||
|
||||
item.stockTakeQuantity === null ||
|
||||
item.stockTakeQuantity === undefined
|
||||
);
|
||||
if (invalidRow) {
|
||||
proxy.$modal.msgWarning('实盘数量不能为空');
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = buildSummaryPayload(targetRows);
|
||||
>>>>>>> v1.3
|
||||
proxy.$modal
|
||||
.confirm('确定保存吗?', '保存', {
|
||||
confirmButtonText: '保存',
|
||||
@@ -165,6 +375,7 @@ const handleSave = (row) => {
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
<<<<<<< HEAD
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getList();
|
||||
})
|
||||
@@ -172,6 +383,31 @@ const handleSave = (row) => {
|
||||
};
|
||||
const handleChangePurposeTypeEnum = (val) => {};
|
||||
const handleCabinetChange = (val) => {};
|
||||
=======
|
||||
saveOrgDeviceSummary(payload).then(() => {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getList();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
const purposeTypeListOptions = ref([]);
|
||||
// 仓库类型切换
|
||||
const handleChangePurposeTypeEnum = (val) => {
|
||||
// 药房
|
||||
if (val == '16') {
|
||||
getPharmacyList().then((res) => {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
});
|
||||
} else if (val == '11') {
|
||||
getDispensaryList().then((res) => {
|
||||
purposeTypeListOptions.value = res.data;
|
||||
});
|
||||
}
|
||||
getList();
|
||||
};
|
||||
|
||||
>>>>>>> v1.3
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,255 +1,225 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum" label-width="100px">
|
||||
<el-select v-model="queryParams.statusEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单人:" prop="applicantId" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.applicantId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="practitioner in applicantListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddStockPart"
|
||||
|
||||
>新增盘点单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddStockBatch"
|
||||
|
||||
>新增批量盘点单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<!-- 查询 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
</el-col>
|
||||
<!-- 重置 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stockinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单人:" prop="applicantId" label-width="120px">
|
||||
<el-select v-model="queryParams.applicantId" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="practitioner in applicantListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddStockPart">新增盘点单</el-button>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddStockBatch"
|
||||
>新增批量盘点单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<!-- 查询 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
</el-col>
|
||||
<!-- 重置 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stockinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点仓库"
|
||||
align="center"
|
||||
key="purposeLocationId_dictText"
|
||||
prop="purposeLocationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盈亏金额"
|
||||
align="center"
|
||||
key="breakevenPrice"
|
||||
prop="breakevenPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点仓库"
|
||||
align="center"
|
||||
key="purposeLocationId_dictText"
|
||||
prop="purposeLocationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盈亏金额"
|
||||
align="center"
|
||||
key="breakevenPrice"
|
||||
prop="breakevenPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核日期 "
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核日期 "
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="remake"
|
||||
prop="remake"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleUpdate(scope.row,'view')"
|
||||
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
disabled
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- :disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'" -->
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- <stock-receipt-dialog
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="
|
||||
() => {
|
||||
proxy.$refs['detailsDialogRef'].open(scope.row.supplyBusNo);
|
||||
}
|
||||
"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
:disabled="
|
||||
scope.row.statusEnum != '1' &&
|
||||
scope.row.statusEnum != '9' &&
|
||||
scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- :disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'" -->
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<ChkstockDetailsDialog ref="detailsDialogRef" />
|
||||
<!-- <stock-receipt-dialog
|
||||
ref="stockReceiptRef"
|
||||
:cabinetListOptions="cabinetListOptions"
|
||||
:categoryListOptions ="categoryListOptions"
|
||||
@@ -259,195 +229,200 @@
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ChkstockRecord">
|
||||
// 导入onActivated钩子
|
||||
import { onMounted, onActivated } from 'vue';
|
||||
import {
|
||||
getStockinventoryList,
|
||||
getstocktakingDetail,
|
||||
getInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
getDetailInit,
|
||||
} from "../components/api";
|
||||
|
||||
// import stockReceiptDialog from "./components/stockReceiptDialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const stockinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const applicantListOptions = ref(undefined); // 制单人列表
|
||||
const cabinetListOptions = ref(undefined); // 仓库列表
|
||||
const categoryListOptions = ref(undefined); // 药品类型
|
||||
const pharmacyListOptions = ref(undefined); // 药房列表
|
||||
const supplyStatusOptions = ref(undefined); // 审批状态
|
||||
const profitReasonOptions = ref(undefined); // 盈亏原因
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
supplyBusNo: undefined, // 编码
|
||||
statusEnum: undefined, // 审批状态
|
||||
applicantId: undefined, // 制单人
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
pageNo:1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
},
|
||||
rules: {},
|
||||
// 导入onActivated钩子
|
||||
import { onMounted, onActivated } from 'vue';
|
||||
import {
|
||||
getStockinventoryList,
|
||||
getstocktakingDetail,
|
||||
getInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
getDetailInit,
|
||||
} from '../components/api';
|
||||
import ChkstockDetailsDialog from '../components/chkstockDetailsDialog.vue';
|
||||
// import stockReceiptDialog from "./components/stockReceiptDialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const stockinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(''); // 单据号新增
|
||||
const applicantListOptions = ref(undefined); // 制单人列表
|
||||
const cabinetListOptions = ref(undefined); // 仓库列表
|
||||
const categoryListOptions = ref(undefined); // 药品类型
|
||||
const pharmacyListOptions = ref(undefined); // 药房列表
|
||||
const supplyStatusOptions = ref(undefined); // 审批状态
|
||||
const profitReasonOptions = ref(undefined); // 盈亏原因
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
supplyBusNo: undefined, // 编码
|
||||
statusEnum: undefined, // 审批状态
|
||||
applicantId: undefined, // 制单人
|
||||
createTimeSTime: undefined,
|
||||
createTimeETime: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 列表页查询下拉树结构 */
|
||||
function getStockinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log('列表页下拉树response1111111', response);
|
||||
busNoAdd.value = response.data.busNo; // 单据号新增
|
||||
applicantListOptions.value = response.data.applicantListOptions; // 制单人列表
|
||||
|
||||
cabinetListOptions.value = response.data.cabinetListOptions; // 仓库列表
|
||||
categoryListOptions.value = response.data.categoryListOptions; // 药品类型列表
|
||||
pharmacyListOptions.value = response.data.pharmacyListOptions; // 药房列表
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏类型列表
|
||||
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 审批状态
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 列表页查询下拉树结构 */
|
||||
function getStockinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log('列表页下拉树response1111111',response)
|
||||
busNoAdd.value = response.data.busNo; // 单据号新增
|
||||
applicantListOptions.value = response.data.applicantListOptions; // 制单人列表
|
||||
}
|
||||
/** 详情页查询下拉树结构 */
|
||||
|
||||
cabinetListOptions.value = response.data.cabinetListOptions; // 仓库列表
|
||||
categoryListOptions.value = response.data.categoryListOptions; // 药品类型列表
|
||||
pharmacyListOptions.value = response.data.pharmacyListOptions; // 药房列表
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏类型列表
|
||||
/** 查询盘点列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getStockinventoryList(queryParams.value).then((res) => {
|
||||
console.log('查询盘点列表response1111111', res);
|
||||
loading.value = false;
|
||||
stockinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 审批状态
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = '';
|
||||
queryParams.value.createTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开商品盘点 */
|
||||
function openAddStockPart() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart' });
|
||||
}
|
||||
/** 打开批量商品盘点 */
|
||||
function openAddStockBatch() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch' });
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row, view) {
|
||||
editRow.value = row;
|
||||
if (row.typeEnum == 4) {
|
||||
// 盘点
|
||||
router.push({
|
||||
path: '/medicationmanagement/chkstock/chkstockPart',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
});
|
||||
}
|
||||
/** 详情页查询下拉树结构 */
|
||||
|
||||
/** 查询盘点列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getStockinventoryList(queryParams.value).then((res) => {
|
||||
console.log('查询盘点列表response1111111',res)
|
||||
loading.value = false;
|
||||
stockinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开商品盘点 */
|
||||
function openAddStockPart() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
|
||||
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart' })
|
||||
}
|
||||
/** 打开批量商品盘点 */
|
||||
function openAddStockBatch() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch' })
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row,view) {
|
||||
editRow.value = row;
|
||||
if(row.typeEnum==4){ // 盘点
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/chkstock/chkstockPart',query:{supplyBusNo:row.supplyBusNo,view:view} })
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart',query:{supplyBusNo:editRow.value.supplyBusNo} })
|
||||
}
|
||||
}else{
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/chkstock/chkstockBatch',query:{supplyBusNo:row.supplyBusNo,view:view} })
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch',query:{supplyBusNo:editRow.value.supplyBusNo} })
|
||||
}
|
||||
} else {
|
||||
if (view) {
|
||||
router.replace({
|
||||
path: '/medicationmanagement/chkstock/chkstockBatch',
|
||||
query: { supplyBusNo: row.supplyBusNo, view: view },
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
path: '/medicationmanagement/chkstock/chkstockBatch',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo },
|
||||
});
|
||||
}
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getStockinventoryTypeList();
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('提交审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
// 添加组件被激活时的处理逻辑
|
||||
onActivated(() => {
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('撤销审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getStockinventoryTypeList();
|
||||
getList();
|
||||
});
|
||||
|
||||
// 添加组件被激活时的处理逻辑
|
||||
onActivated(() => {
|
||||
// 重新加载数据
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="盘点单明细"
|
||||
width="90%"
|
||||
:destroy-on-close="true"
|
||||
v-loading="loading"
|
||||
@close="close"
|
||||
>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<template v-if="props.isApply">
|
||||
<el-button plain type="primary" icon="Edit" @click="handelApply"> 审批通过 </el-button>
|
||||
<el-button type="primary" plain icon="Edit" @click="handleReject"> 驳回 </el-button>
|
||||
</template>
|
||||
<el-button type="warning" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport"> 导出 </el-button>
|
||||
</el-row>
|
||||
<el-descriptions :column="4" style="margin-bottom: 10px">
|
||||
<el-descriptions-item label="单据号:">
|
||||
{{ detailsList[0]?.busNo || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="盘点仓库:">
|
||||
{{ detailsList[0]?.purposeLocationName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目类型:">
|
||||
{{ detailsList[0]?.itemType_dictText || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="盘点日期:">
|
||||
{{ proxy.formatDateStr(detailsList[0]?.occurrenceTime, 'YYYY-MM-DD HH:mm:ss') || '-' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table :data="detailsList" border max-height="600">
|
||||
<el-table-column label="序号" width="60" type="index" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="itemName" />
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
prop="manufacturerText"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价" align="right" header-align="center" prop="price" width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.price.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="盘点单位"
|
||||
align="center"
|
||||
prop="measurementUnitCode_dictText"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘前库存"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemName"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatQuantity(
|
||||
Number(scope.row.totalQuantity) - Number(scope.row.itemQuantity),
|
||||
scope.row
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实盘数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalQuantity"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(scope.row.totalQuantity, scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实盘金额"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalPrice"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="盈亏数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemQuantity"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(scope.row.itemQuantity, scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盈亏金额" align="right" header-align="center" prop="">
|
||||
<template #default="scope">
|
||||
{{
|
||||
((scope.row.itemQuantity * scope.row.price) / scope.row.partPercent).toFixed(2) + '元'
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盈亏类型" align="center" prop="reasonCode_dictText" />
|
||||
<el-table-column label="盈亏原因" align="center" prop="reason" />
|
||||
</el-table>
|
||||
<div>
|
||||
<span>合计盈亏金额:{{ totalAmount ? totalAmount.toFixed(4) : 0 }}</span>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getstocktakingDetail, productStocktakingApproved, reject } from './api';
|
||||
import templateJson from '@/views/medicationmanagement/chkstock/chkstockPart/components/template.json';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const detailsList = ref([]);
|
||||
const dialogVisible = ref(false);
|
||||
const loading = ref(false);
|
||||
const totalAmount = ref(0);
|
||||
const supplyBusNo = ref('');
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
isApply: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
function open(busNo) {
|
||||
dialogVisible.value = true;
|
||||
supplyBusNo.value = busNo;
|
||||
getstocktakingDetail({ busNo: busNo, pageSize: 1000, pageNo: 1 }).then((res) => {
|
||||
detailsList.value = res.data.records;
|
||||
totalAmount.value = res.data.records.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (Number(((currentRow.itemQuantity * currentRow.price) / currentRow.partPercent).toFixed(2)) || 0);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function formatQuantity(quantity, row) {
|
||||
if (row.measurementUnitCode == row.unitCode) {
|
||||
return formatInventory(
|
||||
quantity,
|
||||
row.partPercent,
|
||||
row.unitCode_dictText,
|
||||
row.minUnitCode_dictText
|
||||
);
|
||||
} else {
|
||||
return quantity + row.minUnitCode_dictText;
|
||||
}
|
||||
}
|
||||
|
||||
function handelApply() {
|
||||
loading.value = true;
|
||||
productStocktakingApproved(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleReject() {
|
||||
reject(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化库存数量显示(大单位情况)
|
||||
* @param quantity 小单位库存数量
|
||||
* @param partPercent 拆零比
|
||||
* @param unitCode 大单位
|
||||
* @param minUnitCode 小单位
|
||||
*/
|
||||
function formatInventory(quantity, partPercent, unitCode, minUnitCode) {
|
||||
// 处理负数情况
|
||||
const isNegative = quantity < 0;
|
||||
const absQuantity = Math.abs(quantity);
|
||||
|
||||
if (absQuantity % partPercent !== 0) {
|
||||
const integerPart = Math.floor(absQuantity / partPercent);
|
||||
const decimalPart = absQuantity % partPercent;
|
||||
|
||||
let result = integerPart.toString() + ' ' + unitCode;
|
||||
if (decimalPart > 0) {
|
||||
result += decimalPart.toString() + ' ' + minUnitCode;
|
||||
}
|
||||
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 整除情况
|
||||
const result = absQuantity / partPercent + ' ' + unitCode;
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 打印盘点单
|
||||
function handlePrint() {
|
||||
const result = [];
|
||||
const printList = detailsList.value.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.totalVolume,
|
||||
price: Number(item.price).toFixed(2),
|
||||
itemQuantity: formatQuantity(item.itemQuantity, item),
|
||||
profitAmount: ((item.itemQuantity * item.price) / item.partPercent).toFixed(2),
|
||||
};
|
||||
});
|
||||
result.push({
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
name: userStore.name,
|
||||
// totalAmount: totalAmount.value.toFixed(2),
|
||||
occurrenceTime: proxy.formatDateStr(printList[0].occurrenceTime, 'YYYY-MM-DD HH:mm:ss'),
|
||||
busNo: printList[0].busNo,
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
purchaseinventoryList: printList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
// printer: 'EPSON LQ-80KFII',
|
||||
title: '打印标题',
|
||||
}); //开始打印
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/stocktaking/excel-out',
|
||||
{
|
||||
busNo: supplyBusNo.value,
|
||||
},
|
||||
`盘点单明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
});
|
||||
</script>
|
||||
@@ -40,12 +40,6 @@
|
||||
label="产品批号"
|
||||
align="center"
|
||||
prop="lotNumber"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
@@ -54,7 +48,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<el-button type="primary" plain icon="Plus" @click="handleSave">批量保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">导出</el-button>
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
@@ -229,17 +229,17 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
>
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -751,7 +751,7 @@ function addNewRow() {
|
||||
itemType: '',
|
||||
itemType_enumText: '',
|
||||
lotNumber: '',
|
||||
manufacturer: '',
|
||||
manufacturerText: '',
|
||||
minUnitCode: '',
|
||||
minUnitCode_dictText: '',
|
||||
name: '',
|
||||
@@ -878,7 +878,7 @@ function getTransferProductDetails() {
|
||||
form.purchaseinventoryList[index].statusMaxvalue = false;
|
||||
e.volume = e.totalVolume;
|
||||
e.name = e.itemName;
|
||||
e.manufacturer = e.manufacturerText;
|
||||
e.manufacturerText = e.manufacturerText;
|
||||
e.lossReason = e.reason;
|
||||
if (e.purposeTypeEnum) {
|
||||
warehous_type.value.map((item) => {
|
||||
@@ -1023,7 +1023,7 @@ function handleReject() {
|
||||
store.clearCurrentDataBS();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
path: '/aaaa/billapproval',
|
||||
query: { type: 'lossReporting' },
|
||||
});
|
||||
}
|
||||
@@ -1039,7 +1039,7 @@ function handelApply() {
|
||||
store.clearCurrentDataBS();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
path: '/aaaa/billapproval',
|
||||
query: { type: 'lossReporting' },
|
||||
});
|
||||
}
|
||||
@@ -1095,7 +1095,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber;
|
||||
@@ -1552,7 +1552,7 @@ function edit() {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.volume,
|
||||
manufacturer: item.supplierName,
|
||||
manufacturerText: item.supplierName,
|
||||
totalQuantity: item.totalQuantity,
|
||||
totalPurposeQuantity: item.totalPurposeQuantity,
|
||||
startTime: formatDateymd(item.startTime),
|
||||
@@ -1655,6 +1655,22 @@ getTransferProductDetails();
|
||||
// show,
|
||||
// edit,
|
||||
// });
|
||||
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/loss/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`报损单据明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -0,0 +1,340 @@
|
||||
// 医保目录各类型字段配置
|
||||
export const catalogFieldConfigs = {
|
||||
// 西药中成药目录 (1301)
|
||||
1301: {
|
||||
columns: [
|
||||
{ prop: 'medicalCatalogCode', label: '医疗目录编码' },
|
||||
{ prop: 'drugTradeName', label: '药品商品名' },
|
||||
{ prop: 'genericNameId', label: '通用名编号' },
|
||||
{ prop: 'drugGenericName', label: '药品通用名' },
|
||||
{ prop: 'chemicalName', label: '化学名称' },
|
||||
{ prop: 'alias', label: '别名' },
|
||||
{ prop: 'englishName', label: '英文名称' },
|
||||
{ prop: 'registeredName', label: '注册名称' },
|
||||
{ prop: 'drugSupervisionCode', label: '药监本位码' },
|
||||
{ prop: 'drugForm', label: '药品剂型' },
|
||||
{ prop: 'drugFormName', label: '药品剂型名称' },
|
||||
{ prop: 'drugCategory', label: '药品类别' },
|
||||
{ prop: 'drugCategoryName', label: '药品类别名称' },
|
||||
{ prop: 'drugSpecification', label: '药品规格' },
|
||||
{ prop: 'drugSpecCode', label: '药品规格代码' },
|
||||
{ prop: 'registeredForm', label: '注册剂型' },
|
||||
{ prop: 'registeredSpec', label: '注册规格' },
|
||||
{ prop: 'registeredSpecCode', label: '注册规格代码' },
|
||||
{ prop: 'dosage', label: '每次用量' },
|
||||
{ prop: 'frequency', label: '使用频次' },
|
||||
{ prop: 'acidBase', label: '酸根盐基' },
|
||||
{ prop: 'nationalDrugCode', label: '国家药品编号' },
|
||||
{ prop: 'usage', label: '用法' },
|
||||
{ prop: 'tcmFlag', label: '中成药标志' },
|
||||
{ prop: 'productionAreaType', label: '生产地类别' },
|
||||
{ prop: 'productionAreaName', label: '生产地类别名称' },
|
||||
{ prop: 'pricingUnitType', label: '计价单位类型' },
|
||||
{ prop: 'otcFlag', label: '非处方药标志' },
|
||||
{ prop: 'otcFlagName', label: '非处方药标志名称' },
|
||||
{ prop: 'packagingMaterial', label: '包装材质' },
|
||||
{ prop: 'packagingMaterialName', label: '包装材质名称' },
|
||||
{ prop: 'packagingSpec', label: '包装规格' },
|
||||
{ prop: 'packagingQuantity', label: '包装数量' },
|
||||
{ prop: 'functionIndication', label: '功能主治' },
|
||||
{ prop: 'administrationRoute', label: '给药途径' },
|
||||
{ prop: 'instructions', label: '说明书' },
|
||||
{ prop: 'startDate', label: '开始日期' },
|
||||
{ prop: 'endDate', label: '结束日期' },
|
||||
{ prop: 'minUseUnit', label: '最小使用单位' },
|
||||
{ prop: 'minSaleUnit', label: '最小销售单位' },
|
||||
{ prop: 'minMeasurementUnit', label: '最小计量单位' },
|
||||
{ prop: 'minPackageQuantity', label: '最小包装数量' },
|
||||
{ prop: 'minPackageUnit', label: '最小包装单位' },
|
||||
{ prop: 'minPreparationUnit', label: '最小制剂单位' },
|
||||
{ prop: 'minPackageUnitName', label: '最小包装单位名称' },
|
||||
{ prop: 'minPreparationUnitName', label: '最小制剂单位名称' },
|
||||
{ prop: 'conversionRatio', label: '转换比' },
|
||||
{ prop: 'shelfLife', label: '药品有效期' },
|
||||
{ prop: 'minPricingUnit', label: '最小计价单位' },
|
||||
{ prop: 'wubiCode', label: '五笔助记码' },
|
||||
{ prop: 'pinyinCode', label: '拼音助记码' },
|
||||
{ prop: 'repackager', label: '分包装厂家' },
|
||||
{ prop: 'manufacturerCode', label: '生产企业编号' },
|
||||
{ prop: 'manufacturerName', label: '生产企业名称' },
|
||||
{ prop: 'specialPriceLimitFlag', label: '特殊限价药品标志' },
|
||||
{ prop: 'specialDrugFlag', label: '特殊药品标志' },
|
||||
{ prop: 'useRestriction', label: '限制使用范围' },
|
||||
{ prop: 'useRestrictionFlag', label: '限制使用标志' },
|
||||
{ prop: 'registrationCertNo', label: '药品注册证号' },
|
||||
{ prop: 'regCertStartDate', label: '药品注册证号开始日期' },
|
||||
{ prop: 'regCertEndDate', label: '药品注册证号结束日期' },
|
||||
{ prop: 'approvalNo', label: '批准文号' },
|
||||
{ prop: 'approvalNoStartDate', label: '批准文号开始日期' },
|
||||
{ prop: 'approvalNoEndDate', label: '批准文号结束日期' },
|
||||
{ prop: 'marketStatus', label: '市场状态' },
|
||||
{ prop: 'marketStatusName', label: '市场状态名称' },
|
||||
{ prop: 'regDocumentArchive', label: '药品注册批件电子档案' },
|
||||
{ prop: 'suppApplicationArchive', label: '药品补充申请批件电子档案' },
|
||||
{ prop: 'nationalInsuranceNotes', label: '国家医保药品目录备注' },
|
||||
{ prop: 'essentialDrugFlagName', label: '基本药物标志名称' },
|
||||
{ prop: 'essentialDrugFlag', label: '基本药物标志' },
|
||||
{ prop: 'vatAdjustmentFlag', label: '增值税调整药品标志' },
|
||||
{ prop: 'vatAdjustmentName', label: '增值税调整药品名称' },
|
||||
{ prop: 'listedDrugFlag', label: '上市药品目录集药品' },
|
||||
{ prop: 'negotiationDrugFlag', label: '医保谈判药品标志' },
|
||||
{ prop: 'negotiationDrugName', label: '医保谈判药品名称' },
|
||||
{ prop: 'nhcDrugCode', label: '卫健委药品编码' },
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'validFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'createdAt', label: '数据创建时间' },
|
||||
{ prop: 'updatedAt', label: '数据更新时间' },
|
||||
{ prop: 'version', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
{ prop: 'pediatricUse', label: '儿童用药' },
|
||||
{ prop: 'companyName', label: '公司名称' },
|
||||
{ prop: 'genericEvaluationFlag', label: '仿制药一致性评价药品' },
|
||||
{ prop: 'distributionCompany', label: '经销企业' },
|
||||
{ prop: 'distributionContact', label: '经销企业联系人' },
|
||||
{ prop: 'distributionAuthArchive', label: '经销企业授权书电子档案' },
|
||||
{ prop: 'insuranceForm', label: '国家医保药品目录剂型' },
|
||||
{ prop: 'insuranceClass', label: '国家医保药品目录甲乙类标识' },
|
||||
{ prop: 'marketingAuthorizationHolder', label: '上市许可证持有人' },
|
||||
{ prop: 'releaseFlag', label: '下发标志' },
|
||||
{ prop: 'transmissionDataId', label: '传输数据ID' },
|
||||
{ prop: 'validFrom', label: '生效时间' },
|
||||
{ prop: 'validTo', label: '失效时间' },
|
||||
],
|
||||
},
|
||||
// 中药饮片目录 (1302)
|
||||
1302: {
|
||||
columns: [
|
||||
{ prop: 'medicalCatalogCode', label: '医疗目录编码' },
|
||||
{ prop: 'singleDrugName', label: '单味药名称' },
|
||||
{ prop: 'singleCompoundFlag', label: '单复方标志' }, //单复方标志(true:复方 false:单方)
|
||||
{ prop: 'qualityGrade', label: '质量等级' },
|
||||
{ prop: 'herbalYear', label: '中草药年份' },
|
||||
{ prop: 'medicinalPart', label: '药用部位' },
|
||||
{ prop: 'safeDosage', label: '安全剂量' },
|
||||
{ prop: 'conventionalUsage', label: '常规用法' },
|
||||
{ prop: 'propertiesTaste', label: '性味' },
|
||||
{ prop: 'meridianAttribution', label: '归经' },
|
||||
{ prop: 'species', label: '品种' },
|
||||
{ prop: 'startDate', label: '开始日期' },
|
||||
{ prop: 'endDate', label: '结束日期' },
|
||||
{ prop: 'validFlag', label: '有效标志' }, //有效标志(true:有效 false:无效)
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'createTime', label: '数据创建时间' },
|
||||
{ prop: 'updateTime', label: '数据更新时间' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
{ prop: 'herbName', label: '药材名称' },
|
||||
{ prop: 'indications', label: '功能主治' },
|
||||
{ prop: 'processingMethod', label: '炮制方法' },
|
||||
{ prop: 'efficacyClassification', label: '功效分类' },
|
||||
{ prop: 'herbSource', label: '药材来源' },
|
||||
{ prop: 'nationalInsurancePolicy', label: '国家医保支付政策' },
|
||||
{ prop: 'provincialInsurancePolicy', label: '省级医保支付政策' },
|
||||
{ prop: 'standardName', label: '标准名称' },
|
||||
{ prop: 'standardPage', label: '标准页码' },
|
||||
{ prop: 'electronicRecord', label: '标准电子档案' },
|
||||
{ prop: 'issuanceFlag', label: '下发标志' },
|
||||
{ prop: 'transferDataId', label: '传输数据ID' },
|
||||
{ prop: 'effectiveTime', label: '生效时间' },
|
||||
{ prop: 'expiryTime', label: '失效时间' },
|
||||
],
|
||||
},
|
||||
// 医疗服务项目目录 (1305)
|
||||
1305: {
|
||||
columns: [
|
||||
{ prop: 'medicalCatalogCode', label: '医疗目录编码' },
|
||||
{ prop: 'billingUnit', label: '计价单位' },
|
||||
{ prop: 'billingUnitName', label: '计价单位名称' },
|
||||
{ prop: 'medicalItemDesc', label: '诊疗项目说明' },
|
||||
{ prop: 'exclusionContent', label: '诊疗除外内容' },
|
||||
{ prop: 'medicalItemConnotation', label: '诊疗项目内涵' },
|
||||
{ prop: 'validFlag', label: '有效标志' }, //有效标志(true:有效 false:无效)
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'serviceCategory', label: '服务项目类别' },
|
||||
{ prop: 'medicalServiceName', label: '医疗服务项目名称' },
|
||||
{ prop: 'projectDescription', label: '项目说明' },
|
||||
{ prop: 'startDate', label: '开始日期' },
|
||||
{ prop: 'endDate', label: '结束日期' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' }, //uuid
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
{ prop: 'issuanceFlag', label: '下发标志' },
|
||||
{ prop: 'transferDataId', label: '传输数据ID' },
|
||||
{ prop: 'effectiveTime', label: '生效时间' },
|
||||
{ prop: 'expiryTime', label: '失效时间' },
|
||||
],
|
||||
},
|
||||
// 医用耗材目录 (1306)
|
||||
1306: {
|
||||
columns: [
|
||||
{ prop: 'medicalCatalogCode', label: '医疗目录编码' },
|
||||
{ prop: 'consumableName', label: '耗材名称' },
|
||||
{ prop: 'deviceUniqueId', label: '医疗器械唯一标识' },
|
||||
{ prop: 'insuranceGenericCode', label: '医保通用代码' },
|
||||
{ prop: 'insuranceGenericName', label: '医保通用名称' },
|
||||
{ prop: 'productModel', label: '产品型号' },
|
||||
{ prop: 'specCode', label: '规格代码' },
|
||||
{ prop: 'specification', label: '规格' },
|
||||
{ prop: 'consumableCategory', label: '耗材分类' },
|
||||
{ prop: 'specModel', label: '规格型号' },
|
||||
{ prop: 'materialCode', label: '材质代码' },
|
||||
{ prop: 'materialType', label: '耗材材质' },
|
||||
{ prop: 'packageSpec', label: '包装规格' },
|
||||
{ prop: 'packageQuantity', label: '包装数量' },
|
||||
{ prop: 'packageMaterial', label: '产品包装材质' },
|
||||
{ prop: 'packageUnit', label: '包装单位' },
|
||||
{ prop: 'conversionRatio', label: '产品转换比' },
|
||||
{ prop: 'minUsageUnit', label: '最小使用单位' },
|
||||
{ prop: 'productionAreaType', label: '生产地类别' },
|
||||
{ prop: 'productionAreaName', label: '生产地类别名称' },
|
||||
{ prop: 'productStandard', label: '产品标准' },
|
||||
{ prop: 'expiryDate', label: '产品有效期' },
|
||||
{ prop: 'structureComposition', label: '性能结构与组成' },
|
||||
{ prop: 'applicableScope', label: '适用范围' },
|
||||
{ prop: 'usageMethod', label: '产品使用方法' },
|
||||
{ prop: 'imageCode', label: '产品图片编号' },
|
||||
{ prop: 'qualityStandard', label: '产品质量标准' },
|
||||
{ prop: 'instructions', label: '说明书' },
|
||||
{ prop: 'proofMaterials', label: '其他证明材料' },
|
||||
{ prop: 'specialDeviceFlag', label: '专机专用标志' },
|
||||
{ prop: 'specialDeviceName', label: '专机名称' },
|
||||
{ prop: 'kitName', label: '组套名称' },
|
||||
{ prop: 'kitFlag', label: '组套标志' },
|
||||
{ prop: 'usageRestrictionFlag', label: '限制使用标志' },
|
||||
{ prop: 'insuranceRestriction', label: '医保限用范围' },
|
||||
{ prop: 'minSaleUnit', label: '最小销售单位' },
|
||||
{ prop: 'highValueFlag', label: '高值耗材标志' }, //高值耗材标志(true:是 false:否)
|
||||
{ prop: 'medicalMaterialCode', label: '医用材料分类代码' },
|
||||
{ prop: 'implantFlag', label: '植入材料和人体器官标志' },
|
||||
{ prop: 'sterilizationFlag', label: '灭菌标志' },
|
||||
{ prop: 'sterilizationName', label: '灭菌标志名称' },
|
||||
{ prop: 'implantInterventionFlag', label: '植入或介入类标志' },
|
||||
{ prop: 'implantInterventionName', label: '植入或介入类名称' },
|
||||
{ prop: 'disposableFlag', label: '一次性使用标志' },
|
||||
{ prop: 'disposableFlagName', label: '一次性使用标志名称' },
|
||||
{ prop: 'registrantName', label: '注册备案人名称' },
|
||||
{ prop: 'startDate', label: '开始日期' },
|
||||
{ prop: 'endDate', label: '结束日期' },
|
||||
{ prop: 'deviceManagementCategory', label: '医疗器械管理类别' },
|
||||
{ prop: 'deviceCategoryName', label: '医疗器械管理类别名称' },
|
||||
{ prop: 'registrationNo', label: '注册备案号' },
|
||||
{ prop: 'registeredProductName', label: '注册备案产品名称' },
|
||||
{ prop: 'structureDetails', label: '结构及组成' },
|
||||
{ prop: 'otherContent', label: '其他内容' },
|
||||
{ prop: 'approvalDate', label: '批准日期' },
|
||||
{ prop: 'registrantAddress', label: '注册备案人住所' },
|
||||
{ prop: 'certEffectiveStart', label: '注册证有效期开始时间' },
|
||||
{ prop: 'certEffectiveEnd', label: '注册证有效期结束时间' },
|
||||
{ prop: 'manufacturerCode', label: '生产企业编号' },
|
||||
{ prop: 'manufacturerName', label: '生产企业名称' },
|
||||
{ prop: 'productionAddress', label: '生产地址' },
|
||||
{ prop: 'agentCompany', label: '代理人企业' },
|
||||
{ prop: 'agentAddress', label: '代理人企业地址' },
|
||||
{ prop: 'productionCountry', label: '生产国或地区' },
|
||||
{ prop: 'serviceAgency', label: '售后服务机构' },
|
||||
{ prop: 'certArchivePath', label: '注册或备案证电子档案' },
|
||||
{ prop: 'productImages', label: '产品影像' },
|
||||
{ prop: 'validFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
// 疾病与诊断目录 (1307)
|
||||
1307: {
|
||||
columns: [
|
||||
{ prop: 'diseaseId', label: '西医疾病诊断' },
|
||||
{ prop: 'chapter', label: '章' },
|
||||
{ prop: 'chapterCodeRange', label: '章代码范围' },
|
||||
{ prop: 'chapterName', label: '章名称' },
|
||||
{ prop: 'sectionCodeRange', label: '节代码范围' },
|
||||
{ prop: 'sectionName', label: '节名称' },
|
||||
{ prop: 'categoryCode', label: '类目代码' },
|
||||
{ prop: 'categoryName', label: '类目名称' },
|
||||
{ prop: 'subcategoryCode', label: '亚目代码' },
|
||||
{ prop: 'subcategoryName', label: '亚目名称' },
|
||||
{ prop: 'diagnosisCode', label: '诊断代码' },
|
||||
{ prop: 'diagnosisName', label: '诊断名称' },
|
||||
{ prop: 'usageFlag', label: '使用标记' }, //使用标记(true:启用 false:停用)
|
||||
{ prop: 'gbDiagnosisCode', label: '国标版诊断代码' },
|
||||
{ prop: 'gbDiagnosisName', label: '国标版诊断名称' },
|
||||
{ prop: 'clinicalCode', label: '临床版诊断代码' },
|
||||
{ prop: 'clinicalName', label: '临床版诊断名称' },
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'validFlag', label: '有效标志' }, //有效标志(true:有效 false:无效)
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
// { prop: 'createTime', label: '数据创建时间' },
|
||||
// { prop: 'updateTime', label: '数据更新时间' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
// 手术操作目录 (1308)
|
||||
1308: {
|
||||
columns: [
|
||||
{ prop: 'id', label: '手术标准目录ID' },
|
||||
{ prop: 'chapter', label: '章' },
|
||||
{ prop: 'chapterCodeRange', label: '章代码范围' },
|
||||
{ prop: 'chapterName', label: '章名称' },
|
||||
{ prop: 'categoryCode', label: '类目代码' },
|
||||
{ prop: 'categoryName', label: '类目名称' },
|
||||
{ prop: 'subcategoryCode', label: '亚目代码' },
|
||||
{ prop: 'subcategoryName', label: '亚目名称' },
|
||||
{ prop: 'itemCode', label: '项目代码' },
|
||||
{ prop: 'itemName', label: '项目名称' },
|
||||
{ prop: 'operationCode', label: '手术操作代码' },
|
||||
{ prop: 'operationName', label: '手术操作名称' },
|
||||
{ prop: 'usageFlag', label: '使用标记' },
|
||||
{ prop: 'groupStandardOperationCode', label: '团标版手术操作代码' },
|
||||
{ prop: 'groupStandardOperationName', label: '团标版手术操作名称' },
|
||||
{ prop: 'clinicalVersionOperationCode', label: '临床版手术操作代码' },
|
||||
{ prop: 'clinicalVersionOperationName', label: '临床版手术操作名称' },
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'validFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'createTime', label: '数据创建时间' },
|
||||
{ prop: 'updateTime', label: '数据更新时间' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
// 中医疾病目录 (1314)
|
||||
1314: {
|
||||
columns: [
|
||||
{ prop: 'id', label: '中医疾病诊断' },
|
||||
{ prop: 'categoryCode', label: '科别类目编码' },
|
||||
{ prop: 'categoryName', label: '科别类目名称' },
|
||||
{ prop: 'specialtySystemCategoryCode', label: '专科系统分类目编码' },
|
||||
{ prop: 'specialtySystemCategoryName', label: '专科系统分类目名称' },
|
||||
{ prop: 'diseaseCategoryCode', label: '疾病分类编码' },
|
||||
{ prop: 'diseaseCategoryName', label: '疾病分类名称' },
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'validFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
// { prop: 'createTime', label: '数据创建时间' },
|
||||
// { prop: 'updateTime', label: '数据更新时间' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
// 中医证候目录 (1315)
|
||||
1315: {
|
||||
columns: [
|
||||
{ prop: 'tcmSyndromeId', label: '中医证候ID' },
|
||||
{ prop: 'syndromeClassCode', label: '证候类目编码' },
|
||||
{ prop: 'syndromeClassName', label: '证候分类名称' },
|
||||
{ prop: 'syndromePropertyCode', label: '证候属性代码' },
|
||||
{ prop: 'syndromeProperty', label: '证候属性' },
|
||||
{ prop: 'syndromeTypeCode', label: '证候分类代码' },
|
||||
{ prop: 'syndromeTypeName', label: '证候分类名称' },
|
||||
{ prop: 'remark', label: '备注' },
|
||||
{ prop: 'activeFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'craetTime', label: '创建时间' },
|
||||
{ prop: 'updateTime', label: '更新时间' },
|
||||
{ prop: 'version', label: '版本' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询
|
||||
export function getYbCatalogResult(params) {
|
||||
return request({
|
||||
url: '/catalog/page',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
//更新查询
|
||||
export function getYbCatalog(address, v) {
|
||||
return request({
|
||||
url: `/yb-request/query-catalog?address=${address}&v=${v}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,358 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--药品目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<div class="head-title">医保目录</div>
|
||||
<el-tree
|
||||
:data="medicationOptions"
|
||||
:props="{
|
||||
label: 'info',
|
||||
children: 'children',
|
||||
}"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="medicationTreeRef"
|
||||
node-key="value"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
current-node-key="1301"
|
||||
:default-expand-all="true"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span :class="{ 'text-light-gray': !data.available }">
|
||||
{{ data.info }}
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--药品目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-row :gutter="10" class="mb8" style="margin-bottom: 20px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
style="display: flex; align-items: center; margin: 0"
|
||||
>
|
||||
<el-form-item
|
||||
label="搜索"
|
||||
prop="searchKey"
|
||||
label-width="40"
|
||||
style="margin: 0; margin-right: 10px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
:placeholder="searchPlaceholder"
|
||||
clearable
|
||||
style="width: 400px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="版本号"
|
||||
prop="versionNumber"
|
||||
label-width="80"
|
||||
style="margin: 0; margin-right: 10px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.v"
|
||||
placeholder="版本号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="margin: 0 10px">
|
||||
<el-button type="primary" plain icon="Search" @click="getList">查询</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="margin: 0 10px">
|
||||
<el-button type="primary" plain icon="Search" @click="handleUpdateCatalog"
|
||||
>更新目录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="medicationList" style="width: 100%" height="70vh">
|
||||
<template v-for="(column, index) in currentColumns" :key="index">
|
||||
<el-table-column
|
||||
:prop="column.prop"
|
||||
:label="column.label"
|
||||
:min-width="calculateColumnWidth(column)"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if="column.type === 'tag'">
|
||||
<el-tag v-if="scope.row[column.prop.split('_')[0]] == 2" type="success">
|
||||
{{ scope.row[column.prop] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="error">{{ scope.row[column.prop] }}</el-tag>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{
|
||||
scope.row[column.prop] === null ||
|
||||
scope.row[column.prop] === '' ||
|
||||
scope.row[column.prop] === undefined ||
|
||||
scope.row[column.prop] === 'null'
|
||||
? '--'
|
||||
: scope.row[column.prop]
|
||||
}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Medication">
|
||||
import { getYbCatalogResult, getYbCatalog } from './components/medicine';
|
||||
//字段配置文件
|
||||
import { catalogFieldConfigs } from './components/catalogFields';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const medicationList = ref([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const total = ref(0);
|
||||
const medicationOptions = ref(undefined);
|
||||
const currentCategoryEnum = ref('1301'); // 默认选中1301
|
||||
const medicationTreeRef = ref(null); // 医保目录树引用
|
||||
const currentColumns = ref([]); // 表格列配置
|
||||
const searchPlaceholder = ref('医疗目录编码/注册名称/批准文号/唯一记录号'); // 默认搜索提示
|
||||
// 定义有数据的catalogType值
|
||||
const availableCatalogTypes = ['1301', '1302', '1305', '1306', '1307', '1308', '1314', '1315'];
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
searchKey: undefined, // 搜索关键词(医疗目录编码/注册名称/批准文号/唯一记录号)
|
||||
catalogType: '1301', // 默认使用有数据的目录类型1301
|
||||
v: '0', // 版本号
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.info.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
/** 病种目录分类查询下拉树结构 - 使用前端写死的数据 */
|
||||
function getMedicationCategoryList() {
|
||||
// 直接使用CatalogType枚举值,并为每个选项添加available属性
|
||||
const catalogTypeOptions = [
|
||||
{ info: '西药中成药目录', value: '1301', available: true },
|
||||
{ info: '中药饮片目录', value: '1302', available: true },
|
||||
{ info: '医疗机构制剂目录', value: '1303', available: false },
|
||||
{ info: '民族药品目录', value: '1304', available: false },
|
||||
{ info: '医疗服务项目目录', value: '1305', available: true },
|
||||
{ info: '医用耗材目录', value: '1306', available: true },
|
||||
{ info: '疾病与诊断目录', value: '1307', available: true },
|
||||
{ info: '手术操作目录', value: '1308', available: true },
|
||||
{ info: '门诊慢特病种目录', value: '1309', available: false },
|
||||
{ info: '按病种付费病种目录', value: '1310', available: false },
|
||||
{ info: '日间手术治疗病种', value: '1311', available: false },
|
||||
{ info: '医保目录信息查询', value: '1312', available: false },
|
||||
{ info: '肿瘤形态学目录', value: '1313', available: false },
|
||||
{ info: '中医疾病目录', value: '1314', available: true },
|
||||
{ info: '中医证候目录', value: '1315', available: true },
|
||||
{ info: '医疗目录与医保目录匹配信息', value: '1316', available: false },
|
||||
{ info: '医药机构目录匹配信息', value: '1317', available: false },
|
||||
{ info: '医保目录限价信息', value: '1318', available: false },
|
||||
{ info: '医保目录先自付比例信息', value: '1319', available: false },
|
||||
{ info: '中药配方颗粒目录', value: '1320', available: false },
|
||||
{ info: '医疗服务项目(新)目录', value: '1321', available: false },
|
||||
];
|
||||
|
||||
medicationOptions.value = catalogTypeOptions;
|
||||
// 添加全部选项,但设为不可用
|
||||
medicationOptions.value.unshift({ info: '全部', value: '', available: false });
|
||||
|
||||
// 确保默认选中1301
|
||||
setTimeout(() => {
|
||||
if (medicationTreeRef.value) {
|
||||
medicationTreeRef.value.setCurrentKey('1301');
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
function handleUpdateCatalog() {
|
||||
// proxy.$message.success('暂未实现目录更新功能');
|
||||
// loading.value = true;
|
||||
// 版本号默认传0
|
||||
getYbCatalog(queryParams.value.catalogType, '0').then((res) => {
|
||||
// loading.value = false;
|
||||
if (res && res.data) {
|
||||
proxy.$message.success('目录更新成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getYbCatalogResult(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
if (res && res.data.data && res.data.data.records) {
|
||||
medicationList.value = res.data.data.records;
|
||||
total.value = res.data.data.total || res.data.total || medicationList.value.length;
|
||||
}
|
||||
// 默认空数据
|
||||
else {
|
||||
medicationList.value = [];
|
||||
total.value = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 医保目录节点点击事件
|
||||
function handleNodeClick(data) {
|
||||
if (data.available) {
|
||||
queryParams.value.catalogType = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
// 切换目录类型时清空搜索框的值
|
||||
queryParams.value.searchKey = undefined;
|
||||
// 动态设置表格列配置
|
||||
if (catalogFieldConfigs[data.value]) {
|
||||
console.log('catalogFieldConfigs[data.value]', catalogFieldConfigs[data.value]);
|
||||
currentColumns.value = catalogFieldConfigs[data.value].columns;
|
||||
} else {
|
||||
currentColumns.value = []; // 无配置时显示空列
|
||||
}
|
||||
// 根据当前目录类型设置搜索提示
|
||||
setSearchPlaceholder(data.value);
|
||||
|
||||
handleQuery();
|
||||
}
|
||||
}
|
||||
|
||||
/** 根据目录类型设置搜索提示 */
|
||||
function setSearchPlaceholder(catalogType) {
|
||||
switch (catalogType) {
|
||||
case '1301': // 西药中成药目录
|
||||
searchPlaceholder.value = '医疗目录编码/注册名称/批准文号/唯一记录号';
|
||||
break;
|
||||
case '1302': // 中药饮片目录
|
||||
searchPlaceholder.value = '医疗服务名称/唯一记录号';
|
||||
break;
|
||||
case '1305': // 医疗服务目录
|
||||
searchPlaceholder.value = '医疗目录编码/医疗服务名称/唯一记录号';
|
||||
break;
|
||||
case '1306': // 医用耗材目录
|
||||
searchPlaceholder.value = '医疗目录编码/耗材名称/耗材类别/材质类型/规格';
|
||||
break;
|
||||
case '1307': // 疾病与诊断目录
|
||||
searchPlaceholder.value = '分类名称/子分类名称/章名称/节名称';
|
||||
break;
|
||||
case '1308': // 手术标准目录
|
||||
searchPlaceholder.value = '分类名称/子分类名称/项目名称/手术名称/手术代码';
|
||||
break;
|
||||
case '1314': // 中医疾病目录
|
||||
searchPlaceholder.value = '疾病分类名称/疾病分类代码/唯一记录号';
|
||||
break;
|
||||
case '1315': // 中医证候目录
|
||||
searchPlaceholder.value = '证候类型代码/证候类型名称/唯一记录号';
|
||||
break;
|
||||
default:
|
||||
searchPlaceholder.value = '请输入搜索关键词';
|
||||
}
|
||||
}
|
||||
// 初始化时设置默认列配置和搜索提示
|
||||
function initColumns() {
|
||||
const defaultType = '1301'; // 默认目录类型
|
||||
if (catalogFieldConfigs[defaultType]) {
|
||||
currentColumns.value = catalogFieldConfigs[defaultType].columns;
|
||||
}
|
||||
// 设置默认搜索提示
|
||||
setSearchPlaceholder(defaultType);
|
||||
}
|
||||
|
||||
// 计算列宽度函数
|
||||
function calculateColumnWidth(column) {
|
||||
const baseWidth = 40; // 增加基础边距宽度
|
||||
const charWidth = 16; // 增加每个字符的平均宽度,确保中文能更好地显示
|
||||
const textLength = column.label ? column.label.length : 0;
|
||||
const calculatedWidth = baseWidth + textLength * charWidth;
|
||||
|
||||
// 设置最小宽度,确保即使短文本也有良好的显示效果
|
||||
const minWidth = 120;
|
||||
|
||||
return Math.max(calculatedWidth, minWidth);
|
||||
}
|
||||
|
||||
// 在组件挂载时初始化
|
||||
initColumns();
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
getMedicationCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.el-select {
|
||||
width: 150px !important;
|
||||
}
|
||||
|
||||
/* 确保表格内容完整显示 */
|
||||
.el-table {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* 调整表格列样式,允许内容更好地显示 */
|
||||
.el-table__cell {
|
||||
padding: 12px 8px;
|
||||
}
|
||||
|
||||
/* 确保分页组件完整显示 */
|
||||
.pagination-container {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* 自定义样式:使不可用的目录类型文字颜色变浅 */
|
||||
.text-light-gray {
|
||||
color: #c0c4cc !important;
|
||||
}
|
||||
|
||||
/* 确保样式能正确应用到树节点 */
|
||||
:deep(.el-tree-node__label) {
|
||||
transition: color 0.3s;
|
||||
}
|
||||
</style>
|
||||
@@ -46,7 +46,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -33,7 +33,11 @@
|
||||
"top": 13.5,
|
||||
"height": 12,
|
||||
"width": 75,
|
||||
<<<<<<< HEAD
|
||||
"title": "长春大学医院",
|
||||
=======
|
||||
"title": "长春市朝阳区中医院医院",
|
||||
>>>>>>> v1.3
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 12,
|
||||
@@ -84,7 +88,11 @@
|
||||
"top": 33,
|
||||
"height": 9.75,
|
||||
"width": 120,
|
||||
<<<<<<< HEAD
|
||||
"title": "机构:长春大学医院",
|
||||
=======
|
||||
"title": "机构:长春市朝阳区中医院医院",
|
||||
>>>>>>> v1.3
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
@@ -161,9 +169,9 @@
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 84.09807741407441,
|
||||
"field": "manufacturer",
|
||||
"field": "manufacturerText",
|
||||
"checked": true,
|
||||
"columnId": "manufacturer",
|
||||
"columnId": "manufacturerText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
@@ -336,4 +344,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,11 +39,17 @@
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<<<<<<< HEAD
|
||||
<el-button type="primary" icon="View" @click="handlePrintPreview">
|
||||
预览单据
|
||||
</el-button>
|
||||
<el-button type="success" plain icon="Printer" @click="handlePrint">
|
||||
打印单据
|
||||
=======
|
||||
<el-button type="primary" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">
|
||||
导出
|
||||
>>>>>>> v1.3
|
||||
</el-button>
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
@@ -254,11 +260,15 @@
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
>
|
||||
<<<<<<< HEAD
|
||||
<el-input
|
||||
v-model="scope.row.manufacturerText"
|
||||
placeholder=""
|
||||
disabled
|
||||
/>
|
||||
=======
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
>>>>>>> v1.3
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -782,6 +792,7 @@ const data = reactive({
|
||||
medicationType: [{ required: true, message: "请选择药品类型", trigger: "change" }],
|
||||
},
|
||||
tableRules: {
|
||||
<<<<<<< HEAD
|
||||
itemId: [{ required: true, message: "项目不能为空", trigger: "blur" }],
|
||||
statusEnum_enumText: [{ required: true, message: "规格不能为空", trigger: "blur" }],
|
||||
unitCode: [{ required: true, message: "计量单位不能为空", trigger: "blur" }],
|
||||
@@ -792,6 +803,18 @@ const data = reactive({
|
||||
price: [{ required: true, message: "单价不能为空", trigger: "blur" }],
|
||||
invoiceNo: [{ required: true, message: "发票号不能为空", trigger: "blur" }],
|
||||
totalPrice: [{ required: true, message: "总价不能为空", trigger: "blur" }],
|
||||
=======
|
||||
itemId: [{ required: true, message: '项目不能为空', trigger: 'blur' }],
|
||||
statusEnum_enumText: [{ required: true, message: '规格不能为空', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '计量单位不能为空', trigger: 'blur' }],
|
||||
purposeLocationId: [{ required: true, message: '目的仓库不能为空', trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: '产品批号不能为空', trigger: 'change' }],
|
||||
startTime: [{ required: true, message: '开始时间不能为空', trigger: 'blur' }],
|
||||
endTime: [{ required: true, message: '结束时间不能为空', trigger: 'blur' }],
|
||||
price: [{ required: true, message: '单价不能为空', trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: '发票号不能为空', trigger: 'blur' }],
|
||||
totalPrice: [{ required: true, message: '总价不能为空', trigger: 'blur' }],
|
||||
>>>>>>> v1.3
|
||||
},
|
||||
});
|
||||
|
||||
@@ -882,16 +905,26 @@ onUnmounted(() => {
|
||||
|
||||
function addNewRow() {
|
||||
// 先校验表头表单
|
||||
<<<<<<< HEAD
|
||||
proxy.$refs["receiptHeaderRef"].validate((valid) => {
|
||||
=======
|
||||
proxy.$refs['receiptHeaderRef'].validate((valid) => {
|
||||
>>>>>>> v1.3
|
||||
if (valid) {
|
||||
// 检查表格中是否有未保存的行
|
||||
const unsavedRows = form.purchaseinventoryList.filter((row) => !row.isSave);
|
||||
|
||||
if (unsavedRows.length > 0) {
|
||||
// 校验表格中未保存的行
|
||||
<<<<<<< HEAD
|
||||
proxy.$refs["formRef"].validate((tableValid) => {
|
||||
if (!tableValid) {
|
||||
proxy.$message.warning("请先完善当前行的必填信息后再添加新行");
|
||||
=======
|
||||
proxy.$refs['formRef'].validate((tableValid) => {
|
||||
if (!tableValid) {
|
||||
proxy.$message.warning('请先完善当前行的必填信息后再添加新行');
|
||||
>>>>>>> v1.3
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -903,6 +936,7 @@ function addNewRow() {
|
||||
|
||||
// 检查必填字段
|
||||
if (!row.itemId || !row.name) {
|
||||
<<<<<<< HEAD
|
||||
errors.push("项目");
|
||||
}
|
||||
if (!row.volume) {
|
||||
@@ -934,12 +968,49 @@ function addNewRow() {
|
||||
}
|
||||
if (!row.totalPrice || row.totalPrice === "" || row.totalPrice === 0) {
|
||||
errors.push("合计金额");
|
||||
=======
|
||||
errors.push('项目');
|
||||
}
|
||||
if (!row.volume) {
|
||||
errors.push('规格');
|
||||
}
|
||||
if (!row.unitCode) {
|
||||
errors.push('计量单位');
|
||||
}
|
||||
if (!row.purposeLocationId) {
|
||||
errors.push('仓库');
|
||||
}
|
||||
if (!row.itemQuantity || row.itemQuantity === '' || row.itemQuantity === 0) {
|
||||
errors.push('采购数量');
|
||||
}
|
||||
if (!row.lotNumber) {
|
||||
errors.push('产品批号');
|
||||
}
|
||||
if (!row.startTime) {
|
||||
errors.push('生产日期');
|
||||
}
|
||||
if (!row.endTime) {
|
||||
errors.push('有效期至');
|
||||
}
|
||||
if (!row.price || row.price === '' || row.price === 0) {
|
||||
errors.push('采购单价');
|
||||
}
|
||||
if (!row.invoiceNo || row.invoiceNo === '') {
|
||||
errors.push('发票号');
|
||||
}
|
||||
if (!row.totalPrice || row.totalPrice === '' || row.totalPrice === 0) {
|
||||
errors.push('合计金额');
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
if (errors.length > 0) {
|
||||
invalidRows.push({
|
||||
rowIndex: rowIndex + 1,
|
||||
<<<<<<< HEAD
|
||||
errors: errors.join("、"),
|
||||
=======
|
||||
errors: errors.join('、'),
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -947,14 +1018,20 @@ function addNewRow() {
|
||||
if (invalidRows.length > 0) {
|
||||
const errorMsg = invalidRows
|
||||
.map((item) => `第${item.rowIndex}行缺少:${item.errors}`)
|
||||
<<<<<<< HEAD
|
||||
.join(";");
|
||||
proxy.$message.warning(errorMsg + ",请完善后再添加新行");
|
||||
=======
|
||||
.join(';');
|
||||
proxy.$message.warning(errorMsg + ',请完善后再添加新行');
|
||||
>>>>>>> v1.3
|
||||
return;
|
||||
}
|
||||
|
||||
// 所有校验通过,允许新增
|
||||
const newRow = {
|
||||
rowKey: Date.now(),
|
||||
<<<<<<< HEAD
|
||||
id: "",
|
||||
itemTable: "",
|
||||
itemQuantity: "",
|
||||
@@ -974,6 +1051,27 @@ function addNewRow() {
|
||||
totalPrice: "",
|
||||
sellPrice: "",
|
||||
minSellPrice: "",
|
||||
=======
|
||||
id: '',
|
||||
itemTable: '',
|
||||
itemQuantity: '',
|
||||
itemId: '',
|
||||
unitCode: '',
|
||||
remake: '',
|
||||
supplierId: '',
|
||||
purposeTypeEnum: '',
|
||||
purposeLocationId: null,
|
||||
purposeLocationStoreId: null,
|
||||
practitionerId: '',
|
||||
traceNo: '',
|
||||
invoiceNo: '-',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
price: '',
|
||||
totalPrice: '',
|
||||
sellPrice: '',
|
||||
minSellPrice: '',
|
||||
>>>>>>> v1.3
|
||||
unitList: {}, // 单位列表
|
||||
isEditing: true, // 标记当前行是否正在编辑
|
||||
error: false, // 新增 error 字段
|
||||
@@ -986,6 +1084,7 @@ function addNewRow() {
|
||||
// 没有未保存的行,直接新增
|
||||
const newRow = {
|
||||
rowKey: Date.now(),
|
||||
<<<<<<< HEAD
|
||||
id: "",
|
||||
itemTable: "",
|
||||
itemQuantity: "",
|
||||
@@ -1005,6 +1104,27 @@ function addNewRow() {
|
||||
totalPrice: "",
|
||||
sellPrice: "",
|
||||
minSellPrice: "",
|
||||
=======
|
||||
id: '',
|
||||
itemTable: '',
|
||||
itemQuantity: '',
|
||||
itemId: '',
|
||||
unitCode: '',
|
||||
remake: '',
|
||||
supplierId: '',
|
||||
purposeTypeEnum: '',
|
||||
purposeLocationId: null,
|
||||
purposeLocationStoreId: null,
|
||||
practitionerId: '',
|
||||
traceNo: '',
|
||||
invoiceNo: '-',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
price: '',
|
||||
totalPrice: '',
|
||||
sellPrice: '',
|
||||
minSellPrice: '',
|
||||
>>>>>>> v1.3
|
||||
unitList: {}, // 单位列表
|
||||
isEditing: true, // 标记当前行是否正在编辑
|
||||
error: false, // 新增 error 字段
|
||||
@@ -1113,6 +1233,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
<<<<<<< HEAD
|
||||
form.purchaseinventoryList[index].invoiceNo = "-";
|
||||
form.purchaseinventoryList[index].price = (rowValue.purchaseAmount || 0).toFixed(2);
|
||||
price.value = (rowValue.purchaseAmount || 0).toFixed(2);
|
||||
@@ -1120,6 +1241,15 @@ function selectRow(rowValue, index) {
|
||||
unitMap.value["unitCode"] = rowValue.unitCode;
|
||||
unitMap.value["minUnitCode"] = rowValue.minUnitCode;
|
||||
unitMap.value["currentCode"] = rowValue.unitCode;
|
||||
=======
|
||||
form.purchaseinventoryList[index].invoiceNo = '-';
|
||||
form.purchaseinventoryList[index].price = rowValue.purchaseAmount || 0;
|
||||
price.value = rowValue.purchaseAmount || 0;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
unitMap.value['unitCode'] = rowValue.unitCode;
|
||||
unitMap.value['minUnitCode'] = rowValue.minUnitCode;
|
||||
unitMap.value['currentCode'] = rowValue.unitCode;
|
||||
>>>>>>> v1.3
|
||||
form.purchaseinventoryList[index].itemQuantity = 0;
|
||||
form.purchaseinventoryList[index].totalPrice = 0;
|
||||
}
|
||||
@@ -1144,11 +1274,17 @@ function handleLocationClick(item, row, index) {
|
||||
row.unitList.minUnitCode_dictText
|
||||
) || 0;
|
||||
|
||||
<<<<<<< HEAD
|
||||
form.purchaseinventoryList[index].itemTable = res.data[0].itemTable || "";
|
||||
form.purchaseinventoryList[index].startTime =
|
||||
formatDateymd(res.data[0].productionDate) || "";
|
||||
form.purchaseinventoryList[index].endTime =
|
||||
formatDateymd(res.data[0].expirationDate) || "";
|
||||
=======
|
||||
form.purchaseinventoryList[index].itemTable = res.data[0].itemTable || '';
|
||||
form.purchaseinventoryList[index].startTime = formatDateymd(res.data[0].productionDate) || '';
|
||||
form.purchaseinventoryList[index].endTime = formatDateymd(res.data[0].expirationDate) || '';
|
||||
>>>>>>> v1.3
|
||||
startTimeOld.value = form.purchaseinventoryList[index].startTime
|
||||
? form.purchaseinventoryList[index].startTime
|
||||
: "";
|
||||
@@ -1374,7 +1510,11 @@ function addPurchaseinventorys(rowList) {
|
||||
}
|
||||
|
||||
function handleTraceNoInput(value, row) {
|
||||
<<<<<<< HEAD
|
||||
row.traceNo = value.concat(",");
|
||||
=======
|
||||
row.traceNo = value.concat(',');
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
@@ -1654,6 +1794,7 @@ function formatPrintData() {
|
||||
),
|
||||
printDate: new Date().toLocaleString("zh-CN"),
|
||||
...receiptHeaderForm,
|
||||
<<<<<<< HEAD
|
||||
purchaseinventoryList: form.purchaseinventoryList.map((item, index) => ({
|
||||
...item,
|
||||
rowNumber: index + 1,
|
||||
@@ -1662,6 +1803,16 @@ function formatPrintData() {
|
||||
totalPrice: Number(item.totalPrice).toFixed(2),
|
||||
})),
|
||||
};
|
||||
=======
|
||||
purchaseinventoryList: form.purchaseinventoryList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
printer: 'EPSON LQ-80KFII',
|
||||
title: '打印标题',
|
||||
}); //开始打印
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
function deleteSelectedRows() {
|
||||
@@ -1703,7 +1854,11 @@ function handleTotalAmount() {
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
<<<<<<< HEAD
|
||||
proxy.resetForm("receiptHeaderRef");
|
||||
=======
|
||||
proxy.resetForm('receiptHeaderRef');
|
||||
>>>>>>> v1.3
|
||||
form.purchaseinventoryList = [];
|
||||
// 完全重置所有表单字段
|
||||
Object.assign(receiptHeaderForm, {
|
||||
@@ -1812,8 +1967,13 @@ function handleReject() {
|
||||
store.clearCurrentData();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
<<<<<<< HEAD
|
||||
path: "/aaaa/medicationmanagement/billapproval",
|
||||
query: { type: "purchaseDocument" },
|
||||
=======
|
||||
path: '/aaaa/billapproval',
|
||||
query: { type: 'purchaseDocument' },
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -1829,8 +1989,13 @@ function handelApply() {
|
||||
store.clearCurrentData();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
<<<<<<< HEAD
|
||||
path: "/aaaa/medicationmanagement/billapproval",
|
||||
query: { type: "purchaseDocument" },
|
||||
=======
|
||||
path: '/aaaa/billapproval',
|
||||
query: { type: 'purchaseDocument' },
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -1874,6 +2039,22 @@ defineExpose({
|
||||
edit,
|
||||
});
|
||||
getPurchaseinventoryTypeList();
|
||||
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo,
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/purchase/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`入库单据明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -175,17 +175,17 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="160"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
>
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -777,7 +777,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].locationInventoryList = locationList.value;
|
||||
@@ -985,7 +985,7 @@ function edit() {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.totalVolume,
|
||||
manufacturer: item.supplierName,
|
||||
manufacturerText: item.supplierName,
|
||||
quantity: item.totalQuantity,
|
||||
locationInventoryList: locationList.value,
|
||||
startTime: formatDate(item.startTime),
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -653,7 +653,11 @@ function handleDelete(row) {
|
||||
return item.id;
|
||||
});
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
console.log(ids, 'ids');
|
||||
=======
|
||||
const deleteIds = selectedRows.value.map((item) => item.supplierId).join(',');
|
||||
>>>>>>> v1.3
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据?')
|
||||
.then(function () {
|
||||
@@ -696,4 +700,4 @@ getList();
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="编码" align="center" prop="ybNo" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">导出</el-button>
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
@@ -210,17 +211,17 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
>
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -910,7 +911,7 @@ function handleReject() {
|
||||
store.clearCurrentDataLYCK();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
path: '/aaaa/billapproval',
|
||||
query: { type: 'requisitionManagement' },
|
||||
});
|
||||
}
|
||||
@@ -926,7 +927,7 @@ function handelApply() {
|
||||
store.clearCurrentDataLYCK();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
path: '/aaaa/billapproval',
|
||||
query: { type: 'requisitionManagement' },
|
||||
});
|
||||
}
|
||||
@@ -981,7 +982,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber;
|
||||
@@ -1459,7 +1460,7 @@ function edit() {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.volume,
|
||||
manufacturer: item.supplierName,
|
||||
manufacturerText: item.supplierName,
|
||||
totalQuantity: item.totalQuantity,
|
||||
// totalQuantity: item.totalQuantity,
|
||||
startTime: formatDate(item.startTime),
|
||||
@@ -1579,6 +1580,21 @@ getTransferProductDetails();
|
||||
// show,
|
||||
// edit,
|
||||
// });
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/issue-manage/requisition/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`领用单据明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
<el-button type="primary" plain icon="Plus" @click="handleSave">批量保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">导出</el-button>
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
@@ -225,17 +226,17 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
>
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -981,7 +982,7 @@ function handleReject() {
|
||||
store.clearCurrentDataLYTK();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
path: '/aaaa/billapproval',
|
||||
query: { type: 'returningInventory' },
|
||||
});
|
||||
}
|
||||
@@ -997,7 +998,7 @@ function handelApply() {
|
||||
store.clearCurrentDataLYTK();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
path: '/aaaa/billapproval',
|
||||
query: { type: 'returningInventory' },
|
||||
});
|
||||
}
|
||||
@@ -1053,7 +1054,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber;
|
||||
@@ -1518,7 +1519,7 @@ function edit() {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.totalVolume,
|
||||
manufacturer: item.supplierName,
|
||||
manufacturerText: item.supplierName,
|
||||
totalSourceQuantity: item.itemQuantity,
|
||||
totalPurposeQuantity: item.totalPurposeQuantity,
|
||||
startTime: formatDate(item.startTime),
|
||||
@@ -1614,6 +1615,22 @@ getTransferProductDetails();
|
||||
// show,
|
||||
// edit,
|
||||
// });
|
||||
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/issue-manage/return/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`退库单据明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<<<<<<< HEAD
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@@ -25,11 +26,45 @@
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
=======
|
||||
<el-form-item label="药品类别:" prop="itemTypeCode">
|
||||
<el-select multiple v-model="queryParams.itemTypeCode" clearable style="width: 200px">
|
||||
<el-option v-for="category in itemList" :key="category.value" :label="category.label"
|
||||
:value="category.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择年份:">
|
||||
<el-date-picker v-model="queryParams.occurrenceTime" type="year" value-format="YYYY" placeholder="选择日期"
|
||||
style="width: 200px" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" style="margin-left: 20px; margin-right: 0px; margin-bottom: 5px">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="basicInformationDetailsList" @selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" key="no" prop="no" width="200" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="数据上报日期" align="center" key="dataReportingDate" prop="dataReportingDate" width="200"
|
||||
:show-overflow-tooltip="true">
|
||||
>>>>>>> v1.3
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- itemTable -->
|
||||
<<<<<<< HEAD
|
||||
<el-table-column
|
||||
label="省级行政区划代码"
|
||||
align="center"
|
||||
@@ -84,16 +119,44 @@
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
=======
|
||||
<el-table-column label="省级行政区划代码" align="center" key="provinceCodes" prop="provinceCodes" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="组织机构代码" align="center" key="organizationCode" prop="organizationCode" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="医疗机构代码" align="center" key="medicalCode" prop="medicalCode" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="组织机构名称" align="center" key="organizationName" prop="organizationName" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="年度药品总收入(元)" align="center" key="yearMedicineTotalRevenue" prop="yearMedicineTotalRevenue"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="实有床位数" align="center" key="actualBedsNo" prop="actualBedsNo"
|
||||
:show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
>>>>>>> v1.3
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="basicInformationDetails">
|
||||
<<<<<<< HEAD
|
||||
import {
|
||||
getReportBasicInformationDetails,
|
||||
} from './statisticalManagent';
|
||||
|
||||
const basicInformationDetailsList = ref([]);
|
||||
const loading = ref(true);
|
||||
=======
|
||||
import { ElMessage } from 'element-plus';
|
||||
import {
|
||||
getReportBasicInformationDetails,
|
||||
} from './statisticalManagent';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
const basicInformationDetailsList = ref([]);
|
||||
const loading = ref(false);
|
||||
>>>>>>> v1.3
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
@@ -101,7 +164,11 @@ const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
const occurrenceTime = ref([]);
|
||||
>>>>>>> v1.3
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
@@ -110,22 +177,88 @@ const data = reactive({
|
||||
searchKey: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
occurrenceTime,
|
||||
itemTypeCode:[]
|
||||
>>>>>>> v1.3
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { fin_type_code } = proxy.useDict(
|
||||
'fin_type_code'
|
||||
);
|
||||
const itemList = ref([])
|
||||
watch(
|
||||
() => fin_type_code.value, // 监听 fin_type_code 的值变化
|
||||
(newDict) => {
|
||||
// 确保 newDict 是数组(避免初始值为 undefined)
|
||||
if (Array.isArray(newDict) && newDict.length > 0) {
|
||||
itemList.value = newDict.filter(item =>
|
||||
item.label === "西药" || item.label === "中成药" || item.label === "中草药"|| item.label === "外购药品"
|
||||
);
|
||||
}
|
||||
},
|
||||
{ immediate: true } // 组件挂载时立即执行一次(处理字典已缓存的情况)
|
||||
);
|
||||
onMounted(() => {
|
||||
console.log("fin_type_code:",fin_type_code);
|
||||
|
||||
})
|
||||
>>>>>>> v1.3
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportBasicInformationDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
<<<<<<< HEAD
|
||||
basicInformationDetailsList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
getList();
|
||||
=======
|
||||
basicInformationDetailsList.value = res.data
|
||||
});
|
||||
}
|
||||
|
||||
// getList();
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
if(!queryParams.value.itemTypeCode?.length){
|
||||
ElMessage.warning("请选择药品类型")
|
||||
}else if(queryParams.value.occurrenceTime == null){
|
||||
ElMessage.warning("请选择时间")
|
||||
}else {
|
||||
queryParams.value.occurrenceTime = occurrenceTime.value;
|
||||
// queryParams.value.searchKey = row.
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTime = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/report-manage/report/excel-out/1',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`年度药品总收入_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="姓名:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="序号/姓名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊日期:">
|
||||
<el-date-picker
|
||||
v-model="approvalTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="diseaseList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="性别"
|
||||
align="center"
|
||||
key="genderEnum"
|
||||
prop="genderEnum"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="年龄"
|
||||
align="center"
|
||||
key="age"
|
||||
prop="age"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="locationId"
|
||||
prop="locationId"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊时间"
|
||||
align="center"
|
||||
key="encounterStartTime"
|
||||
prop="encounterStartTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="身份证号"
|
||||
align="center"
|
||||
key="idCard"
|
||||
prop="idCard"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="电话"
|
||||
align="center"
|
||||
key="phone"
|
||||
prop="phone"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="诊断"
|
||||
align="center"
|
||||
key="conditionId"
|
||||
prop="conditionId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="diseaseDetails">
|
||||
import {
|
||||
getDiseaseDetails,
|
||||
} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDiseaseDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
diseaseList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-form-item label="药品名称" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="药品编码/药品名称/名称拼音"
|
||||
@@ -10,16 +10,8 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.medicationDefId"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="剩余过期天数:" prop="remainingDays" label-width="110px">
|
||||
|
||||
<el-form-item label="剩余过期天数" prop="remainingDays" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="查询 ≤ X 天的记录"
|
||||
@@ -28,12 +20,12 @@
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="药品类别:" prop="categoryCode">
|
||||
<el-form-item label="药品类型" prop="medCategoryCodes">
|
||||
<el-select
|
||||
v-model="queryParams.categoryCode"
|
||||
v-model="queryParams.medCategoryCodes"
|
||||
placeholder="请选择药品类别"
|
||||
clearable
|
||||
<<<<<<< HEAD
|
||||
style="width: 150px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
@@ -42,10 +34,45 @@
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
=======
|
||||
multiple
|
||||
filterable
|
||||
style="width: 260px"
|
||||
:collapse-tags="true"
|
||||
:max-collapse-tags="2"
|
||||
@change="handleChangeMedCategoryCode"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in medCategoryCodeOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
>>>>>>> v1.3
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="停供状态:" prop="categoryCode">
|
||||
<el-form-item label="耗材类型" prop="devCategoryCodes">
|
||||
<el-select
|
||||
v-model="queryParams.devCategoryCodes"
|
||||
placeholder="请选择耗材类别"
|
||||
clearable
|
||||
multiple
|
||||
filterable
|
||||
style="width: 260px"
|
||||
:collapse-tags="true"
|
||||
:max-collapse-tags="2"
|
||||
@change="handleChangeDeviceCategoryCode"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in deviceCategoryCodeOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="停供状态" prop="categoryCode">
|
||||
<el-select
|
||||
v-model="queryParams.inventoryStatusEnum"
|
||||
placeholder="请选择药品类别"
|
||||
@@ -57,7 +84,7 @@
|
||||
<el-option label="已停供" :value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医保等级:" prop="chrgitmLv">
|
||||
<el-form-item label="医保等级" prop="chrgitmLv">
|
||||
<el-select
|
||||
v-model="queryParams.chrgitmLv"
|
||||
placeholder="请选择医保等级"
|
||||
@@ -73,7 +100,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="库存范围:" prop="zeroFlag">
|
||||
=======
|
||||
<el-form-item label="库存范围" prop="zeroFlag">
|
||||
>>>>>>> v1.3
|
||||
<el-select
|
||||
v-model="queryParams.zeroFlag"
|
||||
placeholder="请选择库存范围"
|
||||
@@ -89,7 +120,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="仓库药房:" prop="locationId">
|
||||
=======
|
||||
<el-form-item label="仓库药房" prop="locationId">
|
||||
>>>>>>> v1.3
|
||||
<el-select
|
||||
v-model="locationId"
|
||||
placeholder="请选择仓库药房"
|
||||
@@ -106,7 +141,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
=======
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
>>>>>>> v1.3
|
||||
<el-select
|
||||
v-model="supplierId"
|
||||
placeholder="请选择供应商"
|
||||
@@ -123,6 +162,19 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<el-form-item label="备份日期" prop="backUpDate">
|
||||
<el-date-picker
|
||||
v-model="queryParams.backUpDate"
|
||||
type="date"
|
||||
placeholder="请选择备份日期"
|
||||
clearable
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
>>>>>>> v1.3
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@@ -251,7 +303,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<span>{{ scope.row.purchasePrice?.toFixed(2) + ' 元' }}</span>
|
||||
=======
|
||||
<span>{{ scope.row.purchasePrice?.toFixed(3) + ' 元' }}</span>
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -264,7 +320,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<span>{{ scope.row.salePrice?.toFixed(2) + ' 元' }}</span>
|
||||
=======
|
||||
<span>{{ scope.row.salePrice?.toFixed(3) + ' 元' }}</span>
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -277,7 +337,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<span>{{ scope.row.totalPurchasePrice?.toFixed(2) + ' 元' }}</span>
|
||||
=======
|
||||
<span>{{ scope.row.totalPurchasePrice?.toFixed(3) + ' 元' }}</span>
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -290,7 +354,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<<<<<<< HEAD
|
||||
<span>{{ scope.row.totalSalePrice?.toFixed(2) + ' 元' }}</span>
|
||||
=======
|
||||
<span>{{ scope.row.totalSalePrice?.toFixed(3) + ' 元' }}</span>
|
||||
>>>>>>> v1.3
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -385,7 +453,6 @@
|
||||
>
|
||||
<!-- 停供/停用3,取消停供/启用2 -->
|
||||
<template #default="scope">
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@@ -394,7 +461,6 @@
|
||||
v-if="scope.row.inventoryStatusEnum == 2"
|
||||
>停供</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@@ -419,7 +485,7 @@
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
:style="'margin-top: 35px;'"
|
||||
@pagination="getList"
|
||||
@pagination="paginationList"
|
||||
/>
|
||||
<el-dialog
|
||||
title="药品追溯码"
|
||||
@@ -442,20 +508,45 @@ import {
|
||||
cancelSupply,
|
||||
stopSupply,
|
||||
productPageTotal,
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
productBackupPageTotal,
|
||||
getproductReturnBackUpPage,
|
||||
>>>>>>> v1.3
|
||||
} from './statisticalManagent';
|
||||
import traceabilityCodeManagement from './traceabilityCodeManagement.vue';
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
import { getSupplierList } from '@/api/public';
|
||||
import { useStore } from '@/store/store';
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import { computed, watch } from 'vue';
|
||||
>>>>>>> v1.3
|
||||
const store = useStore();
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
<<<<<<< HEAD
|
||||
const { item_category_code, inventory_range } = proxy.useDict(
|
||||
'item_category_code',
|
||||
'inventory_range'
|
||||
);
|
||||
|
||||
=======
|
||||
const { item_category_code, inventory_range, device_category_code, med_category_code } =
|
||||
proxy.useDict(
|
||||
'item_category_code',
|
||||
'inventory_range',
|
||||
'med_category_code',
|
||||
'device_category_code'
|
||||
);
|
||||
const medCategoryCodeOptions = computed(() => {
|
||||
return [{ value: 'all', label: '全部' }, ...med_category_code.value];
|
||||
});
|
||||
const deviceCategoryCodeOptions = computed(() => {
|
||||
return [{ value: 'all', label: '全部' }, ...device_category_code.value];
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
const purchaseinventoryList = ref([]);
|
||||
const visible = ref(false);
|
||||
const recordInfo = ref({});
|
||||
@@ -469,8 +560,6 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const salePriceTotal = ref(0);
|
||||
const priceTotal = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const supplierList = ref([]);
|
||||
@@ -484,13 +573,13 @@ const data = reactive({
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
remainingDays: undefined,
|
||||
// hospital:undefined,
|
||||
categoryCode: undefined,
|
||||
categoryCode: [],
|
||||
chrgitmLv: undefined,
|
||||
zeroFlag: undefined,
|
||||
locationId: undefined,
|
||||
// occurrenceTimeSTime:undefined,
|
||||
// occurrenceTimeETime:undefined,
|
||||
medCategoryCodes: [],
|
||||
devCategoryCodes: [],
|
||||
backUpDate: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
@@ -508,7 +597,58 @@ watch(
|
||||
},
|
||||
{ immediate: true } // 修正拼写错误
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
watch(
|
||||
() => queryParams.value.backUpDate,
|
||||
(newValue, oldValue) => {
|
||||
// 只在值真正变化时触发,避免初始化时触发
|
||||
if (newValue !== oldValue) {
|
||||
if (newValue) {
|
||||
getBackUpList();
|
||||
} else if (oldValue !== undefined) {
|
||||
// 只有当之前有值,现在清空时才调用 getList
|
||||
getList();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
const paginationList = computed(() => {
|
||||
if (queryParams.value.backUpDate) {
|
||||
return getBackUpList();
|
||||
}
|
||||
return getList();
|
||||
});
|
||||
function handleChangeMedCategoryCode(value) {
|
||||
// 如果选择的value等于"全部"(all),则全部选中
|
||||
if (value && value.includes('all')) {
|
||||
// 获取所有选项的值(排除"全部"本身,因为"全部"只是触发全选的选项)
|
||||
const allValues = medCategoryCodeOptions.value
|
||||
.filter((item) => item.value !== 'all')
|
||||
.map((item) => item.value);
|
||||
// 选中所有实际选项(不包含"全部")
|
||||
queryParams.value.medCategoryCodes = allValues;
|
||||
} else {
|
||||
// 如果选择了其他选项,保持当前选择
|
||||
queryParams.value.medCategoryCodes = value || [];
|
||||
}
|
||||
}
|
||||
function handleChangeDeviceCategoryCode(value) {
|
||||
// 如果选择的value等于"全部"(all),则全部选中
|
||||
if (value && value.includes('all')) {
|
||||
// 获取所有选项的值(排除"全部"本身,因为"全部"只是触发全选的选项)
|
||||
const allValues = deviceCategoryCodeOptions.value
|
||||
.filter((item) => item.value !== 'all')
|
||||
.map((item) => item.value);
|
||||
// 选中所有实际选项(不包含"全部")
|
||||
queryParams.value.devCategoryCodes = allValues;
|
||||
} else {
|
||||
// 如果选择了其他选项,保持当前选择
|
||||
queryParams.value.devCategoryCodes = value || [];
|
||||
}
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
@@ -520,6 +660,7 @@ function getPharmacyCabinetLists() {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions;
|
||||
});
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
console.log(store.remainingDays, '1');
|
||||
@@ -530,6 +671,31 @@ function getList() {
|
||||
queryParams.value.locationIds = locationId.value.join(',');
|
||||
queryParams.value.supplierIds = supplierId.value.join(',');
|
||||
getproductReturnPage(queryParams.value).then((res) => {
|
||||
=======
|
||||
/** 查询备份日期库存明细列表 */
|
||||
function getBackUpList() {
|
||||
loading.value = true;
|
||||
salePriceTotal.value = 0;
|
||||
priceTotal.value = 0;
|
||||
|
||||
const params = {
|
||||
...queryParams.value,
|
||||
locationIds: locationId.value.join(','),
|
||||
supplierIds: supplierId.value.join(','),
|
||||
medCategoryCodes:
|
||||
queryParams.value.medCategoryCodes?.length > 0
|
||||
? queryParams.value.medCategoryCodes.join(',')
|
||||
: undefined,
|
||||
devCategoryCodes:
|
||||
queryParams.value.devCategoryCodes?.length > 0
|
||||
? queryParams.value.devCategoryCodes.join(',')
|
||||
: undefined,
|
||||
backUpDateSTime: queryParams.value.backUpDate + ' 00:00:00' || undefined,
|
||||
backUpDateETime: queryParams.value.backUpDate + ' 23:59:59' || undefined,
|
||||
backUpDate: undefined,
|
||||
};
|
||||
getproductReturnBackUpPage(params).then((res) => {
|
||||
>>>>>>> v1.3
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
if (purchaseinventoryList.value && purchaseinventoryList.value.length > 0) {
|
||||
@@ -541,7 +707,46 @@ function getList() {
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
productPageTotal(queryParams.value).then((res) => {
|
||||
=======
|
||||
productBackupPageTotal(params).then((res) => {
|
||||
salePriceTotal.value = res.data.purchasePriceStatistics;
|
||||
priceTotal.value = res.data.salePriceStatistics;
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
salePriceTotal.value = 0;
|
||||
priceTotal.value = 0;
|
||||
const params = {
|
||||
...queryParams.value,
|
||||
locationIds: locationId.value.join(','),
|
||||
supplierIds: supplierId.value.join(','),
|
||||
medCategoryCodes:
|
||||
queryParams.value.medCategoryCodes?.length > 0
|
||||
? queryParams.value.medCategoryCodes.join(',')
|
||||
: undefined,
|
||||
devCategoryCodes:
|
||||
queryParams.value.devCategoryCodes?.length > 0
|
||||
? queryParams.value.devCategoryCodes.join(',')
|
||||
: undefined,
|
||||
};
|
||||
getproductReturnPage(params).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
if (purchaseinventoryList.value && purchaseinventoryList.value.length > 0) {
|
||||
purchaseinventoryList.value.map((k, index) => {
|
||||
k.inventoryStatusEnum_enumText =
|
||||
k.inventoryStatusEnum == 2 ? '未停供' : k.inventoryStatusEnum == 3 ? '已停供' : '';
|
||||
k.quantityUnit = k.quantity / k.partPercent;
|
||||
});
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
productPageTotal(params).then((res) => {
|
||||
>>>>>>> v1.3
|
||||
salePriceTotal.value = res.data.purchasePriceStatistics;
|
||||
priceTotal.value = res.data.salePriceStatistics;
|
||||
});
|
||||
@@ -558,7 +763,42 @@ function handleQuery() {
|
||||
// ? occurrenceTime.value[1] + " 23:59:59"
|
||||
// : "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
if (queryParams.value.backUpDate) {
|
||||
getBackUpList();
|
||||
} else {
|
||||
getList();
|
||||
}
|
||||
}
|
||||
|
||||
function formatQuantity(row) {
|
||||
if (row.remainder > 0) {
|
||||
return (
|
||||
row.number + ' ' + row.unitCode_dictText + row.remainder + ' ' + row.minUnitCode_dictText
|
||||
);
|
||||
} else {
|
||||
return row.number + ' ' + row.unitCode_dictText;
|
||||
}
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
const exportParams = {
|
||||
...queryParams.value,
|
||||
locationIds: locationId.value.join(','),
|
||||
supplierIds: supplierId.value.join(','),
|
||||
medCategoryCodes:
|
||||
queryParams.value.medCategoryCodes?.length > 0
|
||||
? queryParams.value.medCategoryCodes.join(',')
|
||||
: undefined,
|
||||
devCategoryCodes:
|
||||
queryParams.value.devCategoryCodes?.length > 0
|
||||
? queryParams.value.devCategoryCodes.join(',')
|
||||
: undefined,
|
||||
};
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/product/excel-out',
|
||||
exportParams,
|
||||
`库存明细记录_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
function formatQuantity(row) {
|
||||
|
||||
@@ -118,10 +118,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:">
|
||||
<el-select
|
||||
v-model="inventoryScope"
|
||||
v-model="queryParams.inventoryScope"
|
||||
placeholder=""
|
||||
style="width: 220px"
|
||||
@change="inventoryChange(inventoryScope)"
|
||||
@change="inventoryChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventoryOptions"
|
||||
@@ -203,7 +203,15 @@
|
||||
show-summary 每页单独合计-->
|
||||
<el-table-column type="selection" width="60px" align="center" />
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 1 || inventoryScope == 3 || inventoryScope == 5"
|
||||
=======
|
||||
v-if="
|
||||
queryParams.inventoryScope == 1 ||
|
||||
queryParams.inventoryScope == 3 ||
|
||||
queryParams.inventoryScope == 5
|
||||
"
|
||||
>>>>>>> v1.3
|
||||
label="发药人"
|
||||
align="center"
|
||||
key="practitionerName"
|
||||
@@ -212,7 +220,15 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 1 || inventoryScope == 3 || inventoryScope == 5"
|
||||
=======
|
||||
v-if="
|
||||
queryParams.inventoryScope == 1 ||
|
||||
queryParams.inventoryScope == 3 ||
|
||||
queryParams.inventoryScope == 5
|
||||
"
|
||||
>>>>>>> v1.3
|
||||
label="发药单号"
|
||||
align="center"
|
||||
key="dispenseNo"
|
||||
@@ -221,8 +237,17 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
|
||||
:label="inventoryScope == 2 ? '门诊号' : '住院号'"
|
||||
=======
|
||||
v-if="
|
||||
queryParams.inventoryScope == 2 ||
|
||||
queryParams.inventoryScope == 4 ||
|
||||
queryParams.inventoryScope == 6
|
||||
"
|
||||
:label="queryParams.inventoryScope == 2 ? '门诊号' : '住院号'"
|
||||
>>>>>>> v1.3
|
||||
align="center"
|
||||
key="outpatientNo"
|
||||
prop="outpatientNo"
|
||||
@@ -236,7 +261,15 @@
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
|
||||
=======
|
||||
v-if="
|
||||
queryParams.inventoryScope == 2 ||
|
||||
queryParams.inventoryScope == 4 ||
|
||||
queryParams.inventoryScope == 6
|
||||
"
|
||||
>>>>>>> v1.3
|
||||
label="处方号"
|
||||
align="center"
|
||||
key="prescriptionNo"
|
||||
@@ -245,7 +278,15 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
|
||||
=======
|
||||
v-if="
|
||||
queryParams.inventoryScope == 2 ||
|
||||
queryParams.inventoryScope == 4 ||
|
||||
queryParams.inventoryScope == 6
|
||||
"
|
||||
>>>>>>> v1.3
|
||||
label="病人"
|
||||
align="center"
|
||||
key="patientName"
|
||||
@@ -254,7 +295,15 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
|
||||
=======
|
||||
v-if="
|
||||
queryParams.inventoryScope == 2 ||
|
||||
queryParams.inventoryScope == 4 ||
|
||||
queryParams.inventoryScope == 6
|
||||
"
|
||||
>>>>>>> v1.3
|
||||
label="发药人"
|
||||
align="center"
|
||||
key="practitionerName"
|
||||
@@ -263,7 +312,15 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 2 || inventoryScope == 4 || inventoryScope == 6"
|
||||
=======
|
||||
v-if="
|
||||
queryParams.inventoryScope == 2 ||
|
||||
queryParams.inventoryScope == 4 ||
|
||||
queryParams.inventoryScope == 6
|
||||
"
|
||||
>>>>>>> v1.3
|
||||
label="发药单号"
|
||||
align="center"
|
||||
key="dispenseNo"
|
||||
@@ -280,7 +337,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 1 || inventoryScope == 3"
|
||||
=======
|
||||
v-if="queryParams.inventoryScope == 1 || queryParams.inventoryScope == 3"
|
||||
>>>>>>> v1.3
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
@@ -298,7 +359,11 @@
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
v-if="inventoryScope == 1 || inventoryScope == 3"
|
||||
=======
|
||||
v-if="queryParams.inventoryScope == 1 || queryParams.inventoryScope == 3"
|
||||
>>>>>>> v1.3
|
||||
label="医保编码"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
@@ -476,7 +541,10 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const practitionerNameOptions = ref([]);
|
||||
<<<<<<< HEAD
|
||||
const inventoryScope = ref(1);
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
@@ -493,6 +561,11 @@ const data = reactive({
|
||||
// patientName: undefined,
|
||||
dispenseTimeSTime: undefined,
|
||||
dispenseTimeETime: undefined,
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
inventoryScope: 1,
|
||||
flag: 2,
|
||||
>>>>>>> v1.3
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
@@ -507,6 +580,7 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
watch(
|
||||
() => inventoryScope.value,
|
||||
(newVlaue) => {
|
||||
@@ -514,6 +588,8 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
// 监听路由变化
|
||||
watch(
|
||||
() => route.query,
|
||||
@@ -535,6 +611,11 @@ watch(
|
||||
queryParams.value.dispenseTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
|
||||
}
|
||||
queryParams.value.flag = 1;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
console.log('11111111111111');
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 执行查询
|
||||
getList();
|
||||
}
|
||||
@@ -586,7 +667,13 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
// 合并一样的列住院号 outpatientNumber属性
|
||||
if (
|
||||
columnIndex === 1 &&
|
||||
<<<<<<< HEAD
|
||||
(inventoryScope.value == 2 || inventoryScope.value == 4 || inventoryScope.value == 6)
|
||||
=======
|
||||
(queryParams.value.inventoryScope == 2 ||
|
||||
queryParams.value.inventoryScope == 4 ||
|
||||
queryParams.value.inventoryScope == 6)
|
||||
>>>>>>> v1.3
|
||||
) {
|
||||
if (
|
||||
rowIndex === 0 ||
|
||||
@@ -670,9 +757,18 @@ const getSummaries = (param) => {
|
||||
};
|
||||
|
||||
function inventoryChange(val) {
|
||||
<<<<<<< HEAD
|
||||
inventoryScope.value = val;
|
||||
xiaojiTotal.value = [];
|
||||
purchaseinventoryList.value = [];
|
||||
=======
|
||||
xiaojiTotal.value = [];
|
||||
purchaseinventoryList.value = [];
|
||||
console.log('val=======>', val);
|
||||
|
||||
queryParams.value.flag = val == 1 || val == 2 ? 2 : 1;
|
||||
console.log('queryParams=======>', JSON.stringify(queryParams));
|
||||
>>>>>>> v1.3
|
||||
getList();
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
@@ -705,6 +801,7 @@ function getPharmacyCabinetLists() {
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList(type) {
|
||||
<<<<<<< HEAD
|
||||
if (type) {
|
||||
xiaojiTotal.value = [];
|
||||
purchaseinventoryList.value = [];
|
||||
@@ -893,10 +990,214 @@ function getList(type) {
|
||||
dispensePrice: dispensePrice2,
|
||||
refundPrice: refundPrice2,
|
||||
});
|
||||
=======
|
||||
console.log('query=======>', JSON.stringify(queryParams));
|
||||
|
||||
if (type) {
|
||||
xiaojiTotal.value = [];
|
||||
purchaseinventoryList.value = [];
|
||||
}
|
||||
loading.value = true;
|
||||
// let queryParamsValues ={...queryParams.value}
|
||||
// delete queryParamsValues.inventoryScope
|
||||
if (
|
||||
queryParams.value.inventoryScope == 1 ||
|
||||
queryParams.value.inventoryScope == 3 ||
|
||||
queryParams.value.inventoryScope == 5
|
||||
) {
|
||||
var dispensePrice = 0;
|
||||
var refundPrice = 0;
|
||||
getAmbPractitionerDetail(queryParams.value).then((res) => {
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
if (purchaseinventoryList.value.length == 0) {
|
||||
return;
|
||||
}
|
||||
purchaseinventoryList.value.map((k) => {
|
||||
k.dispensePrice = k.dispensePrice || '0.00';
|
||||
k.refundPrice = k.refundPrice || '0.00';
|
||||
k.dispenseQuantity = k.dispenseQuantity
|
||||
? k.dispenseQuantity + k.unitCode_dictText
|
||||
: '0.00' + k.unitCode_dictText;
|
||||
k.refundQuantity = k.refundQuantity
|
||||
? k.refundQuantity + k.refundUnitCode_dictText
|
||||
: '0.00' + k.unitCode_dictText;
|
||||
if (total.value && total.value <= queryParams.value.pageSize) {
|
||||
dispensePrice += Number(k.dispensePrice);
|
||||
refundPrice += Number(k.refundPrice);
|
||||
}
|
||||
});
|
||||
// 1页数据
|
||||
if (total.value && total.value <= queryParams.value.pageSize) {
|
||||
dispensePrice = dispensePrice ? dispensePrice.toFixed(4) : dispensePrice;
|
||||
refundPrice = refundPrice ? refundPrice.toFixed(4) : refundPrice;
|
||||
let pageNoAll = total.value / queryParams.value.pageSize;
|
||||
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
|
||||
purchaseinventoryList.value.push({
|
||||
practitionerName: '合计',
|
||||
dispensePrice: dispensePrice,
|
||||
refundPrice: refundPrice,
|
||||
});
|
||||
}
|
||||
}
|
||||
// 带分页数据
|
||||
if (total.value && total.value > queryParams.value.pageSize) {
|
||||
let queryParamsValue = {
|
||||
pageNo: 1,
|
||||
pageSize: total.value,
|
||||
};
|
||||
getAmbPractitionerDetail(queryParamsValue).then((res) => {
|
||||
purchaseinventoryListAll.value = res.data.records || [];
|
||||
if (purchaseinventoryListAll.value.length > 0) {
|
||||
purchaseinventoryListAll.value.map((k) => {
|
||||
k.dispensePrice = k.dispensePrice || '0.00';
|
||||
k.refundPrice = k.refundPrice || '0.00';
|
||||
k.dispenseQuantity = k.dispenseQuantity
|
||||
? k.dispenseQuantity + k.unitCode_dictText
|
||||
: '0.00' + k.unitCode_dictText;
|
||||
k.refundQuantity = k.refundQuantity
|
||||
? k.refundQuantity + k.refundUnitCode_dictText
|
||||
: '0.00' + k.unitCode_dictText;
|
||||
dispensePrice += Number(k.dispensePrice);
|
||||
refundPrice += Number(k.refundPrice);
|
||||
});
|
||||
dispensePrice = dispensePrice ? dispensePrice.toFixed(4) : dispensePrice;
|
||||
refundPrice = refundPrice ? refundPrice.toFixed(4) : refundPrice;
|
||||
let pageNoAll = total.value / queryParams.value.pageSize;
|
||||
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
|
||||
purchaseinventoryList.value.push({
|
||||
practitionerName: '合计',
|
||||
dispensePrice: dispensePrice,
|
||||
refundPrice: refundPrice,
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
} else if (
|
||||
queryParams.value.inventoryScope == 2 ||
|
||||
queryParams.value.inventoryScope == 4 ||
|
||||
queryParams.value.inventoryScope == 6
|
||||
) {
|
||||
var dispensePrice2 = 0;
|
||||
var refundPrice2 = 0;
|
||||
getAmbMedicationDetail(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
if (purchaseinventoryList.value.length == 0) {
|
||||
return;
|
||||
}
|
||||
purchaseinventoryList.value.map((k) => {
|
||||
k.dispensePrice = k.dispensePrice || '0.00';
|
||||
k.refundPrice = k.refundPrice || '0.00';
|
||||
k.dispenseQuantity = k.dispenseQuantity
|
||||
? k.dispenseQuantity + k.unitCode_dictText
|
||||
: '0.00' + k.unitCode_dictText;
|
||||
k.refundQuantity = k.refundQuantity
|
||||
? k.refundQuantity + k.refundUnitCode_dictText
|
||||
: '0.00' + k.unitCode_dictText;
|
||||
if (total.value && total.value <= queryParams.value.pageSize) {
|
||||
dispensePrice2 += Number(k.dispensePrice);
|
||||
refundPrice2 += Number(k.refundPrice);
|
||||
}
|
||||
});
|
||||
// 1页数据
|
||||
if (total.value && total.value <= queryParams.value.pageSize) {
|
||||
dispensePrice2 = dispensePrice2 ? dispensePrice2.toFixed(4) : dispensePrice2;
|
||||
refundPrice2 = refundPrice2 ? refundPrice2.toFixed(4) : refundPrice2;
|
||||
let pageNoAll = total.value / queryParams.value.pageSize;
|
||||
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
|
||||
purchaseinventoryList.value.push({
|
||||
prescriptionNo: '合计',
|
||||
dispensePrice: dispensePrice2,
|
||||
refundPrice: refundPrice2,
|
||||
});
|
||||
}
|
||||
}
|
||||
loading.value = false;
|
||||
// 带分页数据
|
||||
if (total.value && total.value > queryParams.value.pageSize) {
|
||||
let queryParamsValue = {
|
||||
pageNo: 1,
|
||||
pageSize: total.value,
|
||||
};
|
||||
getAmbMedicationDetail(queryParamsValue).then((res) => {
|
||||
purchaseinventoryListAll.value = res.data.records;
|
||||
if (purchaseinventoryListAll.value.length == 0) {
|
||||
return;
|
||||
}
|
||||
purchaseinventoryListAll.value.map((k, index) => {
|
||||
k.dispensePrice = k.dispensePrice || '0.00';
|
||||
k.refundPrice = k.refundPrice || '0.00';
|
||||
k.dispenseQuantity = k.dispenseQuantity
|
||||
? k.dispenseQuantity + k.unitCode_dictText
|
||||
: '0.00' + k.unitCode_dictText;
|
||||
k.refundQuantity = k.refundQuantity
|
||||
? k.refundQuantity + k.refundUnitCode_dictText
|
||||
: '0.00' + k.unitCode_dictText;
|
||||
dispensePrice2 += Number(k.dispensePrice);
|
||||
refundPrice2 += Number(k.refundPrice);
|
||||
//处理每页门诊号相同数据分开不在一页的问题start
|
||||
for (let m = 1; m < queryParams.value.pageSize && m < index; m++) {
|
||||
if (
|
||||
queryParams.value.pageNo > 1 &&
|
||||
index == queryParams.value.pageSize * (queryParams.value.pageNo - 1) &&
|
||||
k.outpatientNo == purchaseinventoryListAll.value[index - m]?.outpatientNo
|
||||
) {
|
||||
purchaseinventoryList.value.unshift(purchaseinventoryListAll.value[index - m]); // 加
|
||||
//修改计算的小计缺少加过来的部分
|
||||
let dispenseNoIndex1 = purchaseinventoryList.value.findIndex(
|
||||
(o) =>
|
||||
o.prescriptionNo == '小计' &&
|
||||
o.outpatientNo == purchaseinventoryListAll.value[index - m].outpatientNo
|
||||
);
|
||||
purchaseinventoryList.value[dispenseNoIndex1].dispensePrice =
|
||||
Number(purchaseinventoryList.value[dispenseNoIndex1].dispensePrice) +
|
||||
Number(purchaseinventoryListAll.value[index - m].dispensePrice);
|
||||
purchaseinventoryList.value[dispenseNoIndex1].refundPrice =
|
||||
Number(purchaseinventoryList.value[dispenseNoIndex1].refundPrice) +
|
||||
Number(purchaseinventoryListAll.value[index - m].refundPrice);
|
||||
}
|
||||
|
||||
if (
|
||||
index + m == queryParams.value.pageSize * queryParams.value.pageNo &&
|
||||
k.outpatientNo == purchaseinventoryListAll.value[index + m]?.outpatientNo
|
||||
) {
|
||||
let dispenseNoIndex = purchaseinventoryList.value.findIndex(
|
||||
(o) => o.dispenseNo == k.dispenseNo
|
||||
);
|
||||
purchaseinventoryList.value.splice(dispenseNoIndex, 1); // 减
|
||||
|
||||
if (
|
||||
purchaseinventoryList.value[dispenseNoIndex - 1] &&
|
||||
purchaseinventoryList.value[dispenseNoIndex - 1].prescriptionNo == '小计'
|
||||
) {
|
||||
purchaseinventoryList.value.splice(dispenseNoIndex + 1, 1); // 减掉带小计的
|
||||
}
|
||||
}
|
||||
}
|
||||
// end
|
||||
});
|
||||
dispensePrice2 = dispensePrice2 ? dispensePrice2.toFixed(4) : dispensePrice2;
|
||||
refundPrice2 = refundPrice2 ? refundPrice2.toFixed(4) : refundPrice2;
|
||||
let pageNoAll = total.value / queryParams.value.pageSize;
|
||||
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
|
||||
purchaseinventoryList.value.push({
|
||||
prescriptionNo: '合计',
|
||||
dispensePrice: dispensePrice2,
|
||||
refundPrice: refundPrice2,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
} else {
|
||||
total.value = 0;
|
||||
loading.value = false;
|
||||
@@ -966,4 +1267,4 @@ getPharmacyCabinetLists();
|
||||
.pagination-container {
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="产品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/机构名称/产品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationInboundList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="医疗机构代码"
|
||||
align="center"
|
||||
key="medinsCode"
|
||||
prop="medinsCode"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="组织机构名称"
|
||||
align="center"
|
||||
key="orgCode"
|
||||
prop="orgCode"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="国家药品编码(YPID)"
|
||||
align="center"
|
||||
key="ypNo"
|
||||
prop="ypNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="院内药品唯一码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="省级药品集中采购平台药品编码"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
align="center"
|
||||
key="productNmae"
|
||||
prop="productNmae"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库总金额(元)"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库数量(最小销售包装单位)"
|
||||
align="center"
|
||||
key="minUnitSale"
|
||||
prop="minUnitSale"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库数量(最小制剂单位)"
|
||||
align="center"
|
||||
key="minDoseQuantity"
|
||||
prop="minDoseQuantity"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationInboundDetails">
|
||||
import {
|
||||
getMedicationInboundDetails,
|
||||
} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const medicationInboundList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getMedicationInboundDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
medicationInboundList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,274 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/序号/药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select v-model="queryParams.supplierId" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplierList in supplierListOptions"
|
||||
:key="supplierList.value"
|
||||
:label="supplierList.label"
|
||||
:value="supplierList.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationSaleList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="定点编码"
|
||||
align="center"
|
||||
key="fixmedinsCode"
|
||||
prop="fixmedinsCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="定点名称"
|
||||
align="center"
|
||||
key="fixmedinsName"
|
||||
prop="fixmedinsName"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗目录编码"
|
||||
align="center"
|
||||
key="ybOrgNo"
|
||||
prop="ybOrgNo"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品通用名称"
|
||||
align="center"
|
||||
key="ypName"
|
||||
prop="ypName"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品69码"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="categoryCode"
|
||||
prop="categoryCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品剂型"
|
||||
align="center"
|
||||
key="doseFromCode"
|
||||
prop="doseFromCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小包装数量"
|
||||
align="center"
|
||||
key="minUnitSum"
|
||||
prop="minUnitSum"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小包装单位"
|
||||
align="center"
|
||||
key="minUnitCode"
|
||||
prop="minUnitCode"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产企业"
|
||||
align="center"
|
||||
key="supplyName"
|
||||
prop="supplyName"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="批准文号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="年度销售量(盒/瓶/支)"
|
||||
align="center"
|
||||
key="annualSales"
|
||||
prop="annualSales"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationSaleDetails">
|
||||
import {
|
||||
getMedicationSaleDetails,
|
||||
} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const medicationSaleList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getMedicationSaleDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
medicationSaleList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,68 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<<<<<<< HEAD
|
||||
</el-form>
|
||||
=======
|
||||
<el-form-item label="源仓库:" prop="sourceLocationId" label-width="80px">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder="请选择源仓库"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的仓库:" prop="purposeLocationId" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder="请选择目的仓库"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in locationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
style="margin-left: 20px; margin-right: 0px; margin-bottom: 5px"
|
||||
>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
>>>>>>> v1.3
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationStockOutDetailsList"
|
||||
@@ -12,8 +73,13 @@
|
||||
<el-table-column
|
||||
label="医疗机构代码"
|
||||
align="center"
|
||||
<<<<<<< HEAD
|
||||
key="medicalInstitutionCode"
|
||||
prop="medicalInstitutionCode"
|
||||
=======
|
||||
key="medinsCode"
|
||||
prop="medinsCode"
|
||||
>>>>>>> v1.3
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
@@ -21,8 +87,13 @@
|
||||
<el-table-column
|
||||
label="组织机构名称"
|
||||
align="center"
|
||||
<<<<<<< HEAD
|
||||
key="organizationName"
|
||||
prop="organizationName"
|
||||
=======
|
||||
key="orgCode"
|
||||
prop="orgCode"
|
||||
>>>>>>> v1.3
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
@@ -53,24 +124,43 @@
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
align="center"
|
||||
<<<<<<< HEAD
|
||||
key="lotName"
|
||||
prop="lotName"
|
||||
=======
|
||||
key="productName"
|
||||
prop="productName"
|
||||
>>>>>>> v1.3
|
||||
width="220"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
label="出库数量(最小销售包装单位)"
|
||||
align="center"
|
||||
key="quantitySales"
|
||||
prop="quantitySales"
|
||||
=======
|
||||
label="出库数量"
|
||||
align="center"
|
||||
key="totalQuantity"
|
||||
prop="totalQuantity"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
width="220"
|
||||
/>
|
||||
<el-table-column
|
||||
<<<<<<< HEAD
|
||||
label="出库数量(最小制剂单位)"
|
||||
align="center"
|
||||
key="quantityPreparation"
|
||||
prop="quantityPreparation"
|
||||
=======
|
||||
label="单位"
|
||||
align="center"
|
||||
key="minUnit"
|
||||
prop="minUnit"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
width="220"
|
||||
/>
|
||||
@@ -88,11 +178,20 @@
|
||||
<script setup name="medicationStockOutDetails">
|
||||
import {
|
||||
getReportMedicationStockOutDetails,
|
||||
<<<<<<< HEAD
|
||||
} from './statisticalManagent';
|
||||
|
||||
|
||||
const medicationStockOutDetailsList = ref([]);
|
||||
const loading = ref(true);
|
||||
=======
|
||||
getPharmacyCabinetList,
|
||||
} from './statisticalManagent';
|
||||
import { ElMessage } from 'element-plus';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const medicationStockOutDetailsList = ref([]);
|
||||
const loading = ref(false);
|
||||
>>>>>>> v1.3
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
@@ -100,6 +199,10 @@ const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
const occurrenceTime = ref([]);
|
||||
>>>>>>> v1.3
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -107,6 +210,11 @@ const data = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
sourceLocationId:undefined,
|
||||
purposeLocationId:undefined,
|
||||
>>>>>>> v1.3
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
@@ -116,15 +224,66 @@ const data = reactive({
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getList() {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
if(queryParams.value.sourceLocationId==null||
|
||||
queryParams.value.purposeLocationId==null||
|
||||
queryParams.value.occurrenceTimeSTime==null||
|
||||
queryParams.value.occurrenceTimeETime==null){
|
||||
ElMessage.warning("请构建完整的查询条件");
|
||||
}else{
|
||||
>>>>>>> v1.3
|
||||
loading.value = true;
|
||||
getReportMedicationStockOutDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
medicationStockOutDetailsList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
<<<<<<< HEAD
|
||||
});
|
||||
}
|
||||
|
||||
getList();
|
||||
=======
|
||||
});}
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0]
|
||||
: "";
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1]
|
||||
: "";
|
||||
getList();
|
||||
}
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
medicationStockOutDetailsList.value = [];
|
||||
total.value = 0;
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/report-manage/report/excel-out/2',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`药品调拨详情_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
// getList();
|
||||
getPharmacyCabinetLists();
|
||||
>>>>>>> v1.3
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -1,5 +1,50 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<!-- 搜索区域 -->
|
||||
<div class="search-form mb-4">
|
||||
<el-form :model="queryParams" inline @submit.prevent>
|
||||
<el-form-item label="搜索关键词">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入药品名称/编码等关键词"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.startTime"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
clearable
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.endTime"
|
||||
type="datetime"
|
||||
placeholder="选择结束日期"
|
||||
clearable
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
>>>>>>> v1.3
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationUsageList"
|
||||
@@ -19,14 +64,22 @@
|
||||
align="center"
|
||||
key="orgName"
|
||||
prop="orgName"
|
||||
<<<<<<< HEAD
|
||||
width="200"
|
||||
=======
|
||||
width="200"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="国家药品编码(YPID)"
|
||||
align="center"
|
||||
key="nationalDrugCode"
|
||||
<<<<<<< HEAD
|
||||
prop="ypCode"
|
||||
=======
|
||||
prop="nationalDrugCode"
|
||||
>>>>>>> v1.3
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
@@ -51,7 +104,11 @@
|
||||
align="center"
|
||||
key="itemName"
|
||||
prop="itemName"
|
||||
<<<<<<< HEAD
|
||||
width="200"
|
||||
=======
|
||||
width="200"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -73,12 +130,22 @@
|
||||
<el-table-column
|
||||
label="销售数量(最小制剂单位)"
|
||||
align="center"
|
||||
<<<<<<< HEAD
|
||||
key="dosageSalesQuantity"
|
||||
prop="dosageSalesQuantity"
|
||||
=======
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
>>>>>>> v1.3
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
<!-- 分页组件 -->
|
||||
>>>>>>> v1.3
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
@@ -90,6 +157,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="medicationUsageDetails">
|
||||
<<<<<<< HEAD
|
||||
import {
|
||||
getReportMedicationUsage
|
||||
} from './statisticalManagent';
|
||||
@@ -103,12 +171,37 @@ const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
=======
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { getReportMedicationUsage } from './statisticalManagent';
|
||||
|
||||
// 表格数据
|
||||
const medicationUsageList = ref([]);
|
||||
// 加载状态
|
||||
const loading = ref(true);
|
||||
// 选中的ID列表
|
||||
const ids = ref([]);
|
||||
// 总条数
|
||||
const total = ref(0);
|
||||
// 单选/多选状态(原代码遗漏,补充)
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
|
||||
// 查询参数(新增searchKey、startTime、endTime)
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: '', // 搜索关键词
|
||||
startTime: '', // 开始时间
|
||||
endTime: '', // 结束时间
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportMedicationUsage(queryParams.value).then((res) => {
|
||||
<<<<<<< HEAD
|
||||
loading.value = false;
|
||||
medicationUsageList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
@@ -122,10 +215,38 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
=======
|
||||
medicationUsageList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 重置查询条件 */
|
||||
function resetQuery() {
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
};
|
||||
getList(); // 重置后重新查询
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 页面加载时获取数据
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
@@ -138,5 +259,19 @@ onMounted(() => {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
=======
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 搜索表单间距 */
|
||||
.search-form {
|
||||
padding: 10px;
|
||||
background: #f5f5f5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
/* 表格与搜索框间距 */
|
||||
.mb-4 {
|
||||
margin-bottom: 16px;
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
</style>
|
||||
@@ -17,7 +17,6 @@
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- @change="inventoryChange(queryParams.statisticsType)" -->
|
||||
<el-form-item label="统计类型:">
|
||||
<el-select
|
||||
v-model="queryParams.statisticsType"
|
||||
@@ -33,33 +32,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="医保号:" prop="ybCode">
|
||||
<el-input
|
||||
v-model="queryParams.ybCode"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="门诊号:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="病人姓名:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width:150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="科室:" prop="departmentId">
|
||||
<el-select v-model="queryParams.departmentId" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
@@ -89,6 +61,7 @@
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
<<<<<<< HEAD
|
||||
</el-form-item>
|
||||
<!-- 字典item_type -->
|
||||
<el-form-item label="项目类型:" prop="clinicalType">
|
||||
@@ -102,6 +75,27 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 医保号,门诊号,患者姓名,项目名,项目编码 -->
|
||||
=======
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类型:" prop="clinicalType" label-width="90px">
|
||||
<el-tree-select
|
||||
v-model="selectedTypeIds"
|
||||
:data="clinicalTree"
|
||||
:props="treeProps"
|
||||
placeholder="选择项目类型"
|
||||
clearable
|
||||
multiple
|
||||
style="width: 220px"
|
||||
:filterable="true"
|
||||
:check-strictly="false"
|
||||
:collapse-tags="selectedTypeIds.length > 2"
|
||||
:max-tag-count="3"
|
||||
:collapse-tags-tooltip="true"
|
||||
@change="handleTreeChange"
|
||||
@clear="handleTreeClear"
|
||||
/>
|
||||
</el-form-item>
|
||||
>>>>>>> v1.3
|
||||
<el-form-item
|
||||
label="医保号/门诊号/患者姓名/项目名/项目编码:"
|
||||
prop="searchKey"
|
||||
@@ -123,12 +117,22 @@
|
||||
style="margin-left: 20px; margin-right: 0px; margin-bottom: 5px"
|
||||
>
|
||||
<el-col :span="1.5">
|
||||
<<<<<<< HEAD
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
=======
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
>>>>>>> v1.3
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -139,10 +143,14 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
:span-method="arraySpanMethod"
|
||||
>
|
||||
<<<<<<< HEAD
|
||||
<!-- :span-method="arraySpanMethod" -->
|
||||
<!-- :summary-method="getSummaries"
|
||||
show-summary 每页单独合计-->
|
||||
<el-table-column type="selection" width="50px" align="center" resizable />
|
||||
=======
|
||||
<el-table-column type="selection" width="50px" align="center" />
|
||||
>>>>>>> v1.3
|
||||
<el-table-column
|
||||
label="门诊号"
|
||||
align="center"
|
||||
@@ -186,7 +194,10 @@
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
<el-table-column
|
||||
label="药品项目"
|
||||
align="center"
|
||||
@@ -212,7 +223,10 @@
|
||||
:show-overflow-tooltip="true"
|
||||
resizable
|
||||
/>
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
<el-table-column
|
||||
label="开单人"
|
||||
align="center"
|
||||
@@ -286,7 +300,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
v-show="total > 0 && !queryParams.searchKey"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@@ -316,17 +330,21 @@
|
||||
import {
|
||||
getReportChargePage,
|
||||
getAmbPractitionerDetail,
|
||||
// getMedicationDetailsInit,
|
||||
getDepartmentList,
|
||||
getReportChargeInit,
|
||||
} from './statisticalManagent';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import { get } from 'lodash';
|
||||
>>>>>>> v1.3
|
||||
import { watch } from 'vue';
|
||||
const userStore = useUserStore();
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const totalAmount = ref(0);
|
||||
<<<<<<< HEAD
|
||||
// const {
|
||||
// item_category_code,
|
||||
// hosp_lv
|
||||
@@ -334,6 +352,8 @@ const totalAmount = ref(0);
|
||||
// "item_category_code",
|
||||
// "hosp_lv"
|
||||
// );
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
const purchaseinventoryListAll = ref([]);
|
||||
const xiaojiTotal = ref([]);
|
||||
const rowSpan = ref(1);
|
||||
@@ -349,7 +369,27 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const getDepartmentOptions = ref([]);
|
||||
<<<<<<< HEAD
|
||||
// const queryParams.value.statisticsType = ref(1)
|
||||
=======
|
||||
|
||||
// 树形结构相关变量
|
||||
const selectedTypeIds = ref([]); // 选中的节点ID集合
|
||||
const clinicalTree = ref([]); // 树形结构数据
|
||||
const treeProps = ref({
|
||||
label: 'label',
|
||||
value: 'value',
|
||||
children: 'children',
|
||||
disabled: 'disabled',
|
||||
});
|
||||
|
||||
// 字典
|
||||
const { device_category_code, med_category_code, activity_category_code } = proxy.useDict(
|
||||
'device_category_code',
|
||||
'med_category_code',
|
||||
'activity_category_code'
|
||||
);
|
||||
>>>>>>> v1.3
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -358,14 +398,23 @@ const data = reactive({
|
||||
pageSize: 10,
|
||||
statisticsType: 1,
|
||||
searchKey: undefined,
|
||||
<<<<<<< HEAD
|
||||
// ybCode: undefined,
|
||||
// busNo:undefined,
|
||||
// name: undefined,
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
departmentId: undefined,
|
||||
issuerId: undefined,
|
||||
payeeId: undefined,
|
||||
clinicalType: undefined,
|
||||
<<<<<<< HEAD
|
||||
// clinicalName:undefined,
|
||||
=======
|
||||
medicationCategoryCode: undefined,
|
||||
deviceCategoryCode: undefined,
|
||||
activityCategoryCode: undefined,
|
||||
>>>>>>> v1.3
|
||||
chargeTimeSTime: undefined,
|
||||
chargeTimeETime: undefined,
|
||||
},
|
||||
@@ -373,17 +422,27 @@ const data = reactive({
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
// 监听表格数据变化计算合计金额
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
<<<<<<< HEAD
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
=======
|
||||
(newValue) => {
|
||||
if (newValue && newValue.length > 0) {
|
||||
>>>>>>> v1.3
|
||||
handleTotalAmount();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// 监听统计类型变化
|
||||
watch(
|
||||
() => queryParams.value.statisticsType,
|
||||
<<<<<<< HEAD
|
||||
(newVlaue) => {
|
||||
queryParams.value.statisticsType = newVlaue;
|
||||
},
|
||||
@@ -430,6 +489,218 @@ function getTotals(row, i) {
|
||||
}
|
||||
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
// 合并一样的列住院号 outpatientNumber属性&&(queryParams.value.statisticsType==1||queryParams.value.statisticsType==4||queryParams.value.statisticsType==6)
|
||||
=======
|
||||
(newValue) => {
|
||||
queryParams.value.statisticsType = newValue;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// 构建树形结构数据
|
||||
function buildClinicalTree() {
|
||||
clinicalTree.value = [];
|
||||
|
||||
if (!clinicalTypeOptions.value || !Array.isArray(clinicalTypeOptions.value)) {
|
||||
return;
|
||||
}
|
||||
|
||||
clinicalTypeOptions.value.forEach((topOption) => {
|
||||
if (!topOption) return;
|
||||
|
||||
const rootNode = {
|
||||
label: topOption.label || '',
|
||||
value: String(topOption.value),
|
||||
children: [],
|
||||
disabled: false,
|
||||
};
|
||||
|
||||
const parentValue = String(topOption.value);
|
||||
switch (parentValue) {
|
||||
case '1': // 药品类别
|
||||
if (med_category_code.value && Array.isArray(med_category_code.value)) {
|
||||
rootNode.children = med_category_code.value.map((item) => ({
|
||||
label: item.label || '',
|
||||
value: `med_${item.value}`,
|
||||
disabled: false,
|
||||
}));
|
||||
}
|
||||
break;
|
||||
case '2': // 器械类别
|
||||
if (device_category_code.value && Array.isArray(device_category_code.value)) {
|
||||
rootNode.children = device_category_code.value.map((item) => ({
|
||||
label: item.label || '',
|
||||
value: `dev_${item.value}`,
|
||||
disabled: false,
|
||||
}));
|
||||
}
|
||||
break;
|
||||
case '3': // 诊疗类别
|
||||
if (activity_category_code.value && Array.isArray(activity_category_code.value)) {
|
||||
rootNode.children = activity_category_code.value.map((item) => ({
|
||||
label: item.label || '',
|
||||
value: `act_${item.value}`,
|
||||
disabled: false,
|
||||
}));
|
||||
}
|
||||
break;
|
||||
case '4': // 挂号类别(无子节点)
|
||||
rootNode.children = [];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
clinicalTree.value.push(rootNode);
|
||||
});
|
||||
}
|
||||
|
||||
// 树形选择器变化处理
|
||||
function handleTreeChange(selectedIds) {
|
||||
if (!Array.isArray(selectedIds)) {
|
||||
selectedIds = [];
|
||||
}
|
||||
|
||||
// 获取所有选中的叶子节点
|
||||
const leafNodeIds = getLeafNodeIds(selectedIds);
|
||||
|
||||
// 按类型拆分参数
|
||||
const medIds = [];
|
||||
const devIds = [];
|
||||
const actIds = [];
|
||||
const clinicalTypes = [];
|
||||
|
||||
leafNodeIds.forEach((id) => {
|
||||
const idStr = String(id);
|
||||
|
||||
if (idStr === '4') {
|
||||
// 挂号类型
|
||||
if (!clinicalTypes.includes('4')) clinicalTypes.push('4');
|
||||
} else if (idStr.startsWith('med_')) {
|
||||
// 药品子类别
|
||||
medIds.push(idStr.replace('med_', ''));
|
||||
if (!clinicalTypes.includes('1')) clinicalTypes.push('1');
|
||||
} else if (idStr.startsWith('dev_')) {
|
||||
// 器械子类别
|
||||
devIds.push(idStr.replace('dev_', ''));
|
||||
if (!clinicalTypes.includes('2')) clinicalTypes.push('2');
|
||||
} else if (idStr.startsWith('act_')) {
|
||||
// 诊疗子类别
|
||||
actIds.push(idStr.replace('act_', ''));
|
||||
if (!clinicalTypes.includes('3')) clinicalTypes.push('3');
|
||||
} else if (['1', '2', '3'].includes(idStr)) {
|
||||
// 父节点选中(全选)
|
||||
clinicalTypes.push(idStr);
|
||||
// 自动选中所有子类别
|
||||
const parentNode = clinicalTree.value.find(node => String(node.value) === idStr);
|
||||
if (parentNode?.children?.length) {
|
||||
parentNode.children.forEach(child => {
|
||||
const childId = String(child.value);
|
||||
if (childId.startsWith('med_')) medIds.push(childId.replace('med_', ''));
|
||||
if (childId.startsWith('dev_')) devIds.push(childId.replace('dev_', ''));
|
||||
if (childId.startsWith('act_')) actIds.push(childId.replace('act_', ''));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 更新查询参数
|
||||
queryParams.value.clinicalType = clinicalTypes.length ? clinicalTypes.join(',') : undefined;
|
||||
queryParams.value.medicationCategoryCode = medIds.length ? medIds.join(',') : undefined;
|
||||
queryParams.value.deviceCategoryCode = devIds.length ? devIds.join(',') : undefined;
|
||||
queryParams.value.activityCategoryCode = actIds.length ? actIds.join(',') : undefined;
|
||||
|
||||
console.log('最终查询参数:', {
|
||||
clinicalType: queryParams.value.clinicalType,
|
||||
medicationCategoryCode: queryParams.value.medicationCategoryCode,
|
||||
deviceCategoryCode: queryParams.value.deviceCategoryCode,
|
||||
activityCategoryCode: queryParams.value.activityCategoryCode
|
||||
});
|
||||
}
|
||||
|
||||
// 获取所有叶子节点ID(处理父节点选中情况)
|
||||
function getLeafNodeIds(selectedIds) {
|
||||
const leafIds = [];
|
||||
|
||||
const traverse = (nodes) => {
|
||||
nodes.forEach(node => {
|
||||
const nodeValue = String(node.value);
|
||||
if (selectedIds.includes(nodeValue)) {
|
||||
if (!node.children || !node.children.length) {
|
||||
// 叶子节点直接添加
|
||||
leafIds.push(nodeValue);
|
||||
} else {
|
||||
// 父节点选中,递归获取所有子节点
|
||||
traverse(node.children);
|
||||
}
|
||||
} else if (node.children && node.children.length) {
|
||||
// 继续递归检查子节点
|
||||
traverse(node.children);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
traverse(clinicalTree.value);
|
||||
|
||||
// 处理直接选中的叶子节点(非父节点递归获取的)
|
||||
selectedIds.forEach(id => {
|
||||
const idStr = String(id);
|
||||
// 挂号类型或无子节点的节点直接添加
|
||||
if (idStr === '4' || !clinicalTree.value.some(node =>
|
||||
String(node.value) === idStr && node.children && node.children.length
|
||||
)) {
|
||||
if (!leafIds.includes(idStr)) {
|
||||
leafIds.push(idStr);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return [...new Set(leafIds)];
|
||||
}
|
||||
|
||||
// 树形选择器清空处理
|
||||
function handleTreeClear() {
|
||||
selectedTypeIds.value = [];
|
||||
queryParams.value.clinicalType = undefined;
|
||||
queryParams.value.medicationCategoryCode = undefined;
|
||||
queryParams.value.deviceCategoryCode = undefined;
|
||||
queryParams.value.activityCategoryCode = undefined;
|
||||
}
|
||||
|
||||
// 计算合计金额
|
||||
function handleTotalAmount() {
|
||||
totalAmount.value = purchaseinventoryList.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (Number(currentRow.totalPrice) || 0);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 门诊号合并行处理
|
||||
function getTotals(row, i) {
|
||||
let totalPriceSums = Number(purchaseinventoryList.value[i].totalPrice);
|
||||
|
||||
for (let j = 1; i - j >= 0; j++) {
|
||||
if (purchaseinventoryList.value[i].busNo == purchaseinventoryList.value[i - j].busNo) {
|
||||
totalPriceSums += Number(purchaseinventoryList.value[i - j].totalPrice);
|
||||
}
|
||||
}
|
||||
|
||||
xiaojiTotal.value.push({
|
||||
inde: i + 1,
|
||||
busNo: row.busNo,
|
||||
genderEnum_enumText: row.genderEnum_enumText,
|
||||
totalPrice: totalPriceSums.toFixed(4) || 0.0,
|
||||
});
|
||||
|
||||
purchaseinventoryList.value.splice(i + 1, 0, {
|
||||
busNo: row.busNo,
|
||||
genderEnum_enumText: row.genderEnum_enumText,
|
||||
departmentName: '小计',
|
||||
totalPrice: totalPriceSums.toFixed(4) || 0.0,
|
||||
});
|
||||
}
|
||||
|
||||
// 表格合并行方法
|
||||
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
>>>>>>> v1.3
|
||||
if (columnIndex === 1 && purchaseinventoryList.value.length > 0) {
|
||||
if (
|
||||
rowIndex === 0 ||
|
||||
@@ -437,7 +708,11 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
) {
|
||||
let rowspan = 1;
|
||||
let totalPriceSum = 0;
|
||||
<<<<<<< HEAD
|
||||
// let totalReturnPriceSum = 0
|
||||
=======
|
||||
|
||||
>>>>>>> v1.3
|
||||
for (let i = rowIndex + 1; i < purchaseinventoryList.value.length + 1; i++) {
|
||||
if (purchaseinventoryList.value[i - 1].departmentName != '合计') {
|
||||
if (
|
||||
@@ -446,18 +721,30 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
) {
|
||||
rowspan++;
|
||||
totalPriceSum += Number(purchaseinventoryList.value[i].totalPrice);
|
||||
<<<<<<< HEAD
|
||||
// totalReturnPriceSum += Number(purchaseinventoryList.value[i].refundPrice)
|
||||
=======
|
||||
|
||||
>>>>>>> v1.3
|
||||
if (i == purchaseinventoryList.value.length - 1) {
|
||||
let findIndexTotal = xiaojiTotal.value.findIndex((k) => k.busNo == row.busNo);
|
||||
if (findIndexTotal < 0) {
|
||||
getTotals(row, i);
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
totalPriceSum += Number(row.totalPrice);
|
||||
// totalReturnPriceSum += Number(row.refundPrice)
|
||||
let findIndexTotal = xiaojiTotal.value.findIndex((k) => k.busNo == row.busNo);
|
||||
=======
|
||||
}
|
||||
} else {
|
||||
totalPriceSum += Number(row.totalPrice);
|
||||
let findIndexTotal = xiaojiTotal.value.findIndex((k) => k.busNo == row.busNo);
|
||||
|
||||
>>>>>>> v1.3
|
||||
if (findIndexTotal < 0) {
|
||||
xiaojiTotal.value.push({
|
||||
inde: i,
|
||||
@@ -465,19 +752,27 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
busNo: row.busNo,
|
||||
totalPrice: totalPriceSum,
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> v1.3
|
||||
purchaseinventoryList.value.splice(i, 0, {
|
||||
busNo: row.busNo,
|
||||
genderEnum_enumText: row.genderEnum_enumText,
|
||||
departmentName: '小计',
|
||||
totalPrice: totalPriceSum.toFixed(4) || 0.0,
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
// console.log(purchaseinventoryList.value,"12121")
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
rowspan++;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
return { rowspan, colspan: 1 };
|
||||
} else {
|
||||
// 非起始行不显示
|
||||
@@ -534,12 +829,32 @@ function inventoryChange(val) {
|
||||
purchaseinventoryList.value = [];
|
||||
getList();
|
||||
}
|
||||
=======
|
||||
|
||||
return { rowspan, colspan: 1 };
|
||||
} else {
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 统计类型变化处理
|
||||
function inventoryChange(val) {
|
||||
queryParams.value.statisticsType = val;
|
||||
xiaojiTotal.value = [];
|
||||
purchaseinventoryList.value = [];
|
||||
getList();
|
||||
}
|
||||
|
||||
// 初始化数据加载
|
||||
>>>>>>> v1.3
|
||||
function getPharmacyCabinetLists() {
|
||||
getReportChargeInit().then((response) => {
|
||||
inventoryOptions.value = response.data.statisticsTypeOptions;
|
||||
queryParams.value.statisticsType = 1;
|
||||
issuerOptions.value = response.data.issuerOptions;
|
||||
payeeOptions.value = response.data.payeeOptions;
|
||||
<<<<<<< HEAD
|
||||
clinicalTypeOptions.value = response.data.clinicalTypeOptions;
|
||||
});
|
||||
getDepartmentList().then((response) => {
|
||||
@@ -547,12 +862,30 @@ function getPharmacyCabinetLists() {
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
=======
|
||||
clinicalTypeOptions.value = response.data.clinicalTypeOptions || [];
|
||||
|
||||
// 确保字典数据加载完成后再构建树形
|
||||
nextTick(() => {
|
||||
buildClinicalTree();
|
||||
});
|
||||
});
|
||||
|
||||
getDepartmentList().then((response) => {
|
||||
getDepartmentOptions.value = response.data || [];
|
||||
});
|
||||
}
|
||||
|
||||
// 查询列表数据
|
||||
>>>>>>> v1.3
|
||||
function getList(type) {
|
||||
if (type) {
|
||||
xiaojiTotal.value = [];
|
||||
purchaseinventoryList.value = [];
|
||||
}
|
||||
|
||||
loading.value = true;
|
||||
<<<<<<< HEAD
|
||||
// purchaseinventoryList.value = [
|
||||
// {busNo:'M2505070009100304',name:"张三",departmentName:'CF2505070009101361',birthDate:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',clinicalName:'依折麦布片',busNo:'yp3065',medicalName:'依折麦布片',ybNo:'XC10AXY097A0010',totalVolume:'10mg*10',salePrice:'63.56',price:'63.56',totalPrice:'63.56',number:'1盒',totalPrice:'63.56',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'Y013201',manufacturerText:'杭州默沙东制药有限公司',supplierName:'旧系统批量'},
|
||||
// {busNo:'M2505070009100304',name:"张三",departmentName:'CF2505070009101362',birthDate:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',clinicalName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'4.8',price:'4.8',totalPrice:'4.8',number:'1盒',totalPrice:'4.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
@@ -605,11 +938,72 @@ function getList(type) {
|
||||
totalPrice2 = totalPrice2 ? totalPrice2.toFixed(4) : totalPrice2;
|
||||
// refundPrice2 = refundPrice2?refundPrice2.toFixed(4):refundPrice2
|
||||
let pageNoAll = total.value / queryParams.value.pageSize;
|
||||
=======
|
||||
var totalPrice2 = 0;
|
||||
|
||||
// 构建请求参数(自动排除undefined/null属性)
|
||||
let param = {
|
||||
...queryParams.value,
|
||||
pageSize: queryParams.value.searchKey ? 1000 : queryParams.value.pageSize,
|
||||
pageNo: queryParams.value.searchKey ? 1 : queryParams.value.pageNo,
|
||||
};
|
||||
|
||||
// 移除空值参数
|
||||
Object.keys(param).forEach(key => {
|
||||
if (param[key] === undefined || param[key] === null || param[key] === '') {
|
||||
delete param[key];
|
||||
}
|
||||
});
|
||||
|
||||
getReportChargePage(param).then((res) => {
|
||||
purchaseinventoryList.value = res.data.records || [];
|
||||
total.value = res.data.total;
|
||||
|
||||
purchaseinventoryList.value.map((k) => {
|
||||
k.totalPrice = k.totalPrice ? k.totalPrice.toFixed(4) : '0.0000';
|
||||
k.price = k.price ? k.price.toFixed(4) : '0.0000';
|
||||
k.number = k.number
|
||||
? k.number + (k.quantityUnit_dictText ? k.quantityUnit_dictText : '')
|
||||
: '0.0000' + (k.quantityUnit_dictText ? k.quantityUnit_dictText : '');
|
||||
});
|
||||
|
||||
// 处理搜索关键词时的合计
|
||||
if (queryParams.value.searchKey) {
|
||||
purchaseinventoryList.value.forEach((k) => {
|
||||
if (k.departmentName !== '小计' && k.departmentName !== '合计') {
|
||||
totalPrice2 += Number(k.totalPrice) || 0;
|
||||
}
|
||||
});
|
||||
|
||||
totalPrice2 = totalPrice2 ? totalPrice2.toFixed(4) : totalPrice2;
|
||||
purchaseinventoryList.value.push({ departmentName: '合计', totalPrice: totalPrice2 });
|
||||
loading.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// 处理分页数据
|
||||
purchaseinventoryList.value.forEach((k) => {
|
||||
if (total.value && total.value <= queryParams.value.pageSize) {
|
||||
totalPrice2 += Number(k.totalPrice);
|
||||
}
|
||||
});
|
||||
|
||||
if (total.value <= res.data.size) {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
// 单页数据合计
|
||||
if (total.value && total.value <= queryParams.value.pageSize) {
|
||||
totalPrice2 = totalPrice2 ? totalPrice2.toFixed(4) : totalPrice2;
|
||||
let pageNoAll = total.value / queryParams.value.pageSize;
|
||||
|
||||
>>>>>>> v1.3
|
||||
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
|
||||
purchaseinventoryList.value.push({ departmentName: '合计', totalPrice: totalPrice2 });
|
||||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 带分页数据
|
||||
if (total.value && total.value > queryParams.value.pageSize) {
|
||||
// var purchaseinventoryListsAll = []
|
||||
@@ -627,10 +1021,29 @@ function getList(type) {
|
||||
// }
|
||||
// purchaseinventoryListAll.value = purchaseinventoryListsArrayAll
|
||||
purchaseinventoryListAll.value = res.data.records || [];
|
||||
=======
|
||||
// 多页数据处理
|
||||
if (total.value && total.value > queryParams.value.pageSize && !queryParams.value.searchKey) {
|
||||
let queryParamsValue = { ...queryParams.value };
|
||||
queryParamsValue.pageSize = total.value;
|
||||
queryParamsValue.pageNo = 1;
|
||||
|
||||
// 移除空值参数
|
||||
Object.keys(queryParamsValue).forEach(key => {
|
||||
if (queryParamsValue[key] === undefined || queryParamsValue[key] === null || queryParamsValue[key] === '') {
|
||||
delete queryParamsValue[key];
|
||||
}
|
||||
});
|
||||
|
||||
getReportChargePage(queryParamsValue).then((res) => {
|
||||
purchaseinventoryListAll.value = res.data.records || [];
|
||||
|
||||
>>>>>>> v1.3
|
||||
if (purchaseinventoryListAll.value.length > 0) {
|
||||
purchaseinventoryListAll.value.map((k, index) => {
|
||||
k.totalPrice = k.totalPrice ? k.totalPrice.toFixed(4) : '0.0000';
|
||||
k.price = k.price ? k.price.toFixed(4) : '0.0000';
|
||||
<<<<<<< HEAD
|
||||
// k.refundPrice = k.refundPrice || '0.00'
|
||||
k.number = k.number
|
||||
? k.number + k.quantityUnit_dictText
|
||||
@@ -644,22 +1057,37 @@ function getList(type) {
|
||||
// refundPrice2 += Number(k.refundPrice)
|
||||
//处理不同页门诊号相同小计在最后回显问题start
|
||||
// m<queryParams.value.pageSize&&
|
||||
=======
|
||||
k.number = k.number
|
||||
? k.number + (k.quantityUnit_dictText ? k.quantityUnit_dictText : '')
|
||||
: '0.0000' + (k.quantityUnit_dictText ? k.quantityUnit_dictText : '');
|
||||
|
||||
totalPrice2 += Number(k.totalPrice);
|
||||
|
||||
// 处理跨页门诊号小计
|
||||
>>>>>>> v1.3
|
||||
for (let m = 1; m < index; m++) {
|
||||
if (
|
||||
queryParams.value.pageNo > 1 &&
|
||||
index == queryParams.value.pageSize * (queryParams.value.pageNo - 1) &&
|
||||
k.busNo == purchaseinventoryListAll.value[index - m]?.busNo
|
||||
) {
|
||||
<<<<<<< HEAD
|
||||
// purchaseinventoryList.value.unshift(purchaseinventoryListAll.value[index-m]) // 加
|
||||
// //修改计算的小计缺少加过来的部分
|
||||
let dispenseNoIndex1 = purchaseinventoryList.value.findIndex(
|
||||
(o) =>
|
||||
o.departmentName == '小计' &&
|
||||
o.busNo == purchaseinventoryListAll.value[index - m].busNo
|
||||
=======
|
||||
let dispenseNoIndex1 = purchaseinventoryList.value.findIndex(
|
||||
(o) => o.departmentName == '小计' && o.busNo == purchaseinventoryListAll.value[index - m].busNo
|
||||
>>>>>>> v1.3
|
||||
);
|
||||
|
||||
if (dispenseNoIndex1 > 0) {
|
||||
purchaseinventoryList.value[dispenseNoIndex1].totalPrice =
|
||||
<<<<<<< HEAD
|
||||
Number(purchaseinventoryList.value[dispenseNoIndex1].totalPrice) +
|
||||
Number(purchaseinventoryListAll.value[index - m].totalPrice);
|
||||
purchaseinventoryList.value[dispenseNoIndex1].totalPrice = purchaseinventoryList
|
||||
@@ -668,6 +1096,13 @@ function getList(type) {
|
||||
: '0.0000';
|
||||
}
|
||||
}
|
||||
=======
|
||||
(Number(purchaseinventoryList.value[dispenseNoIndex1].totalPrice) +
|
||||
Number(purchaseinventoryListAll.value[index - m].totalPrice)).toFixed(4) || '0.0000';
|
||||
}
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
if (
|
||||
index + m == queryParams.value.pageSize * queryParams.value.pageNo &&
|
||||
k.busNo == purchaseinventoryListAll.value[index + m]?.busNo
|
||||
@@ -676,6 +1111,7 @@ function getList(type) {
|
||||
purchaseinventoryList.value[purchaseinventoryList.value.length - 1]
|
||||
.departmentName == '小计'
|
||||
) {
|
||||
<<<<<<< HEAD
|
||||
purchaseinventoryList.value.splice(purchaseinventoryList.value.length - 1, 1); // 减掉第二页还有相同门诊号的第一页的小计
|
||||
}
|
||||
// let dispenseNoIndex = purchaseinventoryList.value.findIndex(o=>o.paymentId==k.paymentId&&o.chargeId==k.chargeId) //通过唯一主键进行区分
|
||||
@@ -690,6 +1126,17 @@ function getList(type) {
|
||||
totalPrice2 = totalPrice2 ? totalPrice2.toFixed(4) : totalPrice2;
|
||||
// refundPrice2 = refundPrice2?refundPrice2.toFixed(4):refundPrice2
|
||||
loading.value = false;
|
||||
=======
|
||||
purchaseinventoryList.value.splice(purchaseinventoryList.value.length - 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
totalPrice2 = totalPrice2 ? totalPrice2.toFixed(4) : totalPrice2;
|
||||
loading.value = false;
|
||||
|
||||
>>>>>>> v1.3
|
||||
let pageNoAll = total.value / queryParams.value.pageSize;
|
||||
if (Math.ceil(pageNoAll) == queryParams.value.pageNo) {
|
||||
purchaseinventoryList.value.push({ departmentName: '合计', totalPrice: totalPrice2 });
|
||||
@@ -700,49 +1147,87 @@ function getList(type) {
|
||||
});
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
/** 搜索按钮操作 */
|
||||
=======
|
||||
// 查询按钮点击事件
|
||||
>>>>>>> v1.3
|
||||
function handleQuery() {
|
||||
queryParams.value.chargeTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> v1.3
|
||||
queryParams.value.chargeTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> v1.3
|
||||
queryParams.value.pageNo = 1;
|
||||
getList(1);
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
// 重置按钮点击事件
|
||||
function handleClear() {
|
||||
<<<<<<< HEAD
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = '';
|
||||
queryParams.value.chargeTimeSTime = '';
|
||||
queryParams.value.chargeTimeETime = '';
|
||||
=======
|
||||
occurrenceTime.value = [];
|
||||
queryParams.value.chargeTimeSTime = '';
|
||||
queryParams.value.chargeTimeETime = '';
|
||||
queryParams.value.searchKey = undefined;
|
||||
queryParams.value.departmentId = undefined;
|
||||
queryParams.value.issuerId = undefined;
|
||||
queryParams.value.payeeId = undefined;
|
||||
queryParams.value.clinicalType = undefined;
|
||||
queryParams.value.medicationCategoryCode = undefined;
|
||||
queryParams.value.deviceCategoryCode = undefined;
|
||||
queryParams.value.activityCategoryCode = undefined;
|
||||
|
||||
selectedTypeIds.value = [];
|
||||
>>>>>>> v1.3
|
||||
proxy.resetForm('queryRef');
|
||||
getList(1);
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
// 表格选择事件
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 初始化日期范围为当前月第一天到今天
|
||||
=======
|
||||
// 初始化日期范围为当月
|
||||
>>>>>>> v1.3
|
||||
function initDefaultDateRange() {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = now.getMonth();
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 当前月第一天
|
||||
const firstDay = new Date(year, month, 1);
|
||||
// 今天
|
||||
const today = now;
|
||||
|
||||
// 格式化为YYYY-MM-DD格式
|
||||
=======
|
||||
const firstDay = new Date(year, month, 1);
|
||||
const today = now;
|
||||
|
||||
>>>>>>> v1.3
|
||||
const formatDate = (date) => {
|
||||
const y = date.getFullYear();
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0');
|
||||
@@ -752,16 +1237,44 @@ function initDefaultDateRange() {
|
||||
|
||||
occurrenceTime.value = [formatDate(firstDay), formatDate(today)];
|
||||
|
||||
<<<<<<< HEAD
|
||||
// 同时设置到queryParams中,确保首次加载时传递时间参数
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
queryParams.value.chargeTimeSTime = occurrenceTime.value[0] + ' 00:00:00';
|
||||
queryParams.value.chargeTimeETime = occurrenceTime.value[1] + ' 23:59:59';
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// 导出Excel
|
||||
function handleExport() {
|
||||
// 构建导出参数(移除分页参数)
|
||||
const exportParams = { ...queryParams.value };
|
||||
delete exportParams.pageNo;
|
||||
delete exportParams.pageSize;
|
||||
|
||||
// 移除空值参数
|
||||
Object.keys(exportParams).forEach(key => {
|
||||
if (exportParams[key] === undefined || exportParams[key] === null || exportParams[key] === '') {
|
||||
delete exportParams[key];
|
||||
}
|
||||
});
|
||||
|
||||
proxy.downloadGet(
|
||||
'/report-manage/charge/excel-out',
|
||||
exportParams,
|
||||
`门诊收费报表_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 初始化页面
|
||||
getPharmacyCabinetLists();
|
||||
initDefaultDateRange();
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
|
||||
@@ -0,0 +1,451 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="统计时间:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD" />
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:" prop="statisticsType">
|
||||
<el-select
|
||||
v-model="queryParams.statisticsType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option label="门诊收入分类" value="outpatientIncome" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医院:" prop="hospital">
|
||||
<el-select
|
||||
v-model="queryParams.hospital"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px">
|
||||
<el-option label="长春市朝阳区中医院" value="sameHospital" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="科室:" prop="department">
|
||||
<el-select
|
||||
v-model="queryParams.department"
|
||||
placeholder="请选择科室"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="handleDepartmentChange"
|
||||
>
|
||||
<el-option label="全部" value="all" />
|
||||
<el-option
|
||||
v-for="dept in departmentOptions"
|
||||
:key="dept.value"
|
||||
:label="dept.label"
|
||||
:value="dept.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类型:" prop="itemType">
|
||||
<el-select
|
||||
v-model="queryParams.itemType"
|
||||
placeholder="请选择项目类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
:disabled="!queryParams.department || queryParams.department === 'all'"
|
||||
>
|
||||
<el-option label="全部" value="all" />
|
||||
<el-option
|
||||
v-for="item in filteredItemTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="processedTableData" @selection-change="handleSelectionChange"
|
||||
:span-method="spanMethod" height="calc(100vh - 300px)" border>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="科室" align="center" key="department" prop="department" width="120"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="类别" align="center" key="category" prop="category" width="120" />
|
||||
<el-table-column label="金额" align="center" key="amount" prop="amount" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDisplayValue(scope.row.amount, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="药品成本" align="center" prop="drugCost" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDrugCostDisplay(scope.row.drugCost, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="净收入" align="center" prop="netIncome" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDisplayValue(scope.row.netIncome, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="OutpatientDepartmentMetrics">
|
||||
import {
|
||||
getOutpatientDepartmentMetrics
|
||||
} from './statisticalManagent';
|
||||
import { ref, reactive, computed, toRefs, watch } from 'vue';
|
||||
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
statisticsType: undefined,
|
||||
hospital: undefined,
|
||||
department: undefined,
|
||||
itemType: undefined
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
// 原始数据
|
||||
const originalData = ref([
|
||||
{ department: '内科门诊', category: '西药', amount: 115.64, drugCost: 100.56, netIncome: 15.084 },
|
||||
{ department: '内科门诊', category: '医用耗材', amount: 6.00, drugCost: 0, netIncome: 6 },
|
||||
{ department: '内科门诊', category: '护理', amount: 30.00, drugCost: 0, netIncome: 30 },
|
||||
{ department: '妇科', category: '西药', amount: 148.70, drugCost: 112.44, netIncome: 36.255 },
|
||||
{ department: '妇科', category: '治疗', amount: 18.00, drugCost: 0, netIncome: 18 },
|
||||
]);
|
||||
|
||||
// 动态生成科室选项
|
||||
const departmentOptions = computed(() => {
|
||||
const departments = [...new Set(originalData.value.map(item => item.department))];
|
||||
return departments.map(dept => ({
|
||||
label: dept,
|
||||
value: dept
|
||||
}));
|
||||
});
|
||||
|
||||
// 所有项目类型选项
|
||||
const allItemTypeOptions = computed(() => {
|
||||
const categories = [...new Set(originalData.value.map(item => item.category))];
|
||||
return categories.map(category => ({
|
||||
label: category,
|
||||
value: category
|
||||
}));
|
||||
});
|
||||
|
||||
// 根据选择的科室过滤项目类型选项
|
||||
const filteredItemTypeOptions = computed(() => {
|
||||
if (!queryParams.value.department || queryParams.value.department === 'all') {
|
||||
return allItemTypeOptions.value;
|
||||
}
|
||||
|
||||
// 获取该科室下的所有项目类型
|
||||
const deptCategories = [...new Set(
|
||||
originalData.value
|
||||
.filter(item => item.department === queryParams.value.department)
|
||||
.map(item => item.category)
|
||||
)];
|
||||
|
||||
return allItemTypeOptions.value.filter(item =>
|
||||
deptCategories.includes(item.value)
|
||||
);
|
||||
});
|
||||
|
||||
// 科室变化时的处理
|
||||
const handleDepartmentChange = (value) => {
|
||||
// 如果选择了具体科室,重置项目类型为"全部"
|
||||
if (value && value !== 'all') {
|
||||
queryParams.value.itemType = 'all';
|
||||
}
|
||||
};
|
||||
|
||||
// 过滤后的数据(根据查询条件)
|
||||
const filteredData = computed(() => {
|
||||
let data = [...originalData.value];
|
||||
|
||||
// 科室筛选
|
||||
if (queryParams.value.department && queryParams.value.department !== 'all') {
|
||||
data = data.filter(item => item.department === queryParams.value.department);
|
||||
}
|
||||
|
||||
// 项目类型筛选
|
||||
if (queryParams.value.itemType && queryParams.value.itemType !== 'all') {
|
||||
data = data.filter(item => item.category === queryParams.value.itemType);
|
||||
}
|
||||
|
||||
return data;
|
||||
});
|
||||
|
||||
const formatCurrency = (value) => {
|
||||
return value ? value.toFixed(2) : '0.00';
|
||||
}
|
||||
|
||||
const formatDisplayValue = (value, rowType) => {
|
||||
if (rowType === 'drug' && typeof value === 'string') {
|
||||
return value; // 药品占比行显示百分比字符串
|
||||
}
|
||||
return formatCurrency(value);
|
||||
}
|
||||
|
||||
const formatDrugCostDisplay = (value, rowType) => {
|
||||
if (rowType === 'drug') {
|
||||
return '药品占比'; // 药品占比行显示文字"药品占比"
|
||||
}
|
||||
return formatCurrency(value);
|
||||
}
|
||||
|
||||
// 动态获取所有科室(基于过滤后的数据)
|
||||
const departments = computed(() => {
|
||||
return [...new Set(filteredData.value.map(item => item.department))];
|
||||
})
|
||||
|
||||
// 构建完整的表格数据(包含小计、药品金额和占比、总计)
|
||||
const processedTableData = computed(() => {
|
||||
const data = [];
|
||||
|
||||
// 处理每个科室
|
||||
departments.value.forEach(dept => {
|
||||
const deptData = filteredData.value.filter(item => item.department === dept);
|
||||
|
||||
// 添加详细数据
|
||||
data.push(...deptData.map(item => ({
|
||||
...item,
|
||||
rowType: 'detail'
|
||||
})));
|
||||
|
||||
// 计算小计
|
||||
const subtotal = deptData.reduce((sum, item) => ({
|
||||
amount: sum.amount + item.amount,
|
||||
drugCost: sum.drugCost + item.drugCost,
|
||||
netIncome: sum.netIncome + item.netIncome
|
||||
}), { amount: 0, drugCost: 0, netIncome: 0 });
|
||||
|
||||
// 添加小计行
|
||||
data.push({
|
||||
department: dept,
|
||||
category: '小计',
|
||||
amount: Number(subtotal.amount.toFixed(2)),
|
||||
drugCost: Number(subtotal.drugCost.toFixed(2)),
|
||||
netIncome: Number(subtotal.netIncome.toFixed(2)),
|
||||
rowType: 'subtotal'
|
||||
});
|
||||
|
||||
// 计算药品金额和占比
|
||||
const drugAmount = deptData
|
||||
.filter(item => item.category.includes('药'))
|
||||
.reduce((sum, item) => sum + item.amount, 0);
|
||||
|
||||
const totalAmount = subtotal.amount;
|
||||
const drugRatio = totalAmount > 0 ? ((drugAmount / totalAmount) * 100).toFixed(2) + '%' : '0.00%';
|
||||
|
||||
// 添加药品金额和占比行
|
||||
data.push({
|
||||
department: dept,
|
||||
category: '药品金额',
|
||||
amount: Number(drugAmount.toFixed(2)), // 在金额列显示药品金额
|
||||
drugCost: '药品占比', // 在药品成本列显示文字"药品占比"
|
||||
netIncome: drugRatio, // 在净收入列显示占比值
|
||||
rowType: 'drug'
|
||||
});
|
||||
});
|
||||
|
||||
// 计算合计
|
||||
const totalData = filteredData.value.reduce((sum, item) => ({
|
||||
amount: sum.amount + item.amount,
|
||||
drugCost: sum.drugCost + item.drugCost,
|
||||
netIncome: sum.netIncome + item.netIncome
|
||||
}), { amount: 0, drugCost: 0, netIncome: 0 });
|
||||
|
||||
|
||||
// 计算合计的药品金额和占比
|
||||
const totalDrugAmount = filteredData.value.filter(item => item.category.includes('药')).reduce((sum, item) => sum + item.amount, 0);
|
||||
const totalDrugRatio = totalData.amount > 0 ?
|
||||
((totalDrugAmount / totalData.amount) * 100).toFixed(2) + '%' : '0.00%';
|
||||
|
||||
// 添加合计行
|
||||
data.push({
|
||||
department: '合计',
|
||||
category: '合计',
|
||||
amount: Number(totalData.amount.toFixed(2)),
|
||||
drugCost: Number(totalData.drugCost.toFixed(2)),
|
||||
netIncome: Number(totalData.netIncome.toFixed(2)),
|
||||
rowType: 'total'
|
||||
});
|
||||
|
||||
// 添加总计的药品占比行
|
||||
data.push({
|
||||
department: '药品金额',
|
||||
category: '药品金额',
|
||||
amount: Number(totalDrugAmount.toFixed(2)),
|
||||
drugCost: '药品占比',
|
||||
netIncome: totalDrugRatio,
|
||||
rowType: 'drug'
|
||||
});
|
||||
|
||||
return data;
|
||||
});
|
||||
|
||||
// 预计算合并信息
|
||||
const spanInfo = computed(() => {
|
||||
const info = [];
|
||||
let currentDept = null;
|
||||
let startIndex = 0;
|
||||
let rowCount = 0;
|
||||
|
||||
for (let i = 0; i < processedTableData.value.length; i++) {
|
||||
const row = processedTableData.value[i];
|
||||
|
||||
if (row.department !== currentDept) {
|
||||
if (currentDept !== null) {
|
||||
info.push({ startIndex: startIndex, rowCount: rowCount });
|
||||
}
|
||||
currentDept = row.department;
|
||||
startIndex = i;
|
||||
rowCount = 1;
|
||||
} else {
|
||||
rowCount++;
|
||||
}
|
||||
|
||||
// 最后一个元素
|
||||
if (i === processedTableData.value.length - 1) {
|
||||
info.push({ startIndex: startIndex, rowCount: rowCount });
|
||||
}
|
||||
}
|
||||
|
||||
return info;
|
||||
});
|
||||
|
||||
const spanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
// 合并科室列(第一列)
|
||||
if (columnIndex === 1) {
|
||||
for (const info of spanInfo.value) {
|
||||
if (rowIndex >= info.startIndex && rowIndex < info.startIndex + info.rowCount) {
|
||||
if (rowIndex === info.startIndex) {
|
||||
// 该科室的第一行,合并所有行
|
||||
return { rowspan: info.rowCount, colspan: 1 };
|
||||
} else {
|
||||
// 该科室的其他行隐藏
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getOutpatientDepartmentMetrics(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
// 这里将接口返回的数据赋值给 originalData
|
||||
if (res.data && res.data.records) {
|
||||
originalData.value = res.data.records;
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function handleClear() {
|
||||
// 重置查询参数
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
statisticsType: undefined,
|
||||
hospital: undefined,
|
||||
department: undefined,
|
||||
itemType: undefined
|
||||
};
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
// 处理选中数据
|
||||
console.log('选中数据:', selection);
|
||||
}
|
||||
|
||||
// 初始化加载
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.subtotal-text {
|
||||
font-weight: bold;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.drug-text {
|
||||
font-weight: bold;
|
||||
color: #67C23A;
|
||||
}
|
||||
|
||||
.total-text {
|
||||
font-weight: bold;
|
||||
color: #F56C6C;
|
||||
}
|
||||
|
||||
/* 行样式 */
|
||||
:deep(.el-table .el-table__row) {
|
||||
&[data-row-type="subtotal"] td {
|
||||
background-color: #f0f9ff;
|
||||
}
|
||||
&[data-row-type="drug"] td {
|
||||
background-color: #f0f9ff;
|
||||
}
|
||||
&[data-row-type="total"] td {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
|
||||
/* 禁用状态样式 */
|
||||
:deep(.el-select .el-input.is-disabled .el-input__inner) {
|
||||
background-color: #f5f7fa;
|
||||
border-color: #e4e7ed;
|
||||
color: #c0c4cc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,55 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="搜索条件" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="门诊号/药品名/生产企业"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品医保编码" prop="medYbNo">
|
||||
<el-input
|
||||
v-model="queryParams.medYbNo"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品类型:" prop="categoryCode">
|
||||
<el-select
|
||||
v-model="queryParams.categoryCode"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
>>>>>>> v1.3
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="patientDetailsList"
|
||||
@@ -19,7 +69,11 @@
|
||||
align="center"
|
||||
key="medName"
|
||||
prop="medName"
|
||||
<<<<<<< HEAD
|
||||
width="140"
|
||||
=======
|
||||
width="140"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -43,7 +97,10 @@
|
||||
align="center"
|
||||
key="doseFormCode_dictText"
|
||||
prop="doseFormCode_dictText"
|
||||
<<<<<<< HEAD
|
||||
width="140px"
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -51,7 +108,17 @@
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
<<<<<<< HEAD
|
||||
width="140"
|
||||
=======
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装"
|
||||
align="center"
|
||||
key="packageUnit_dictText"
|
||||
prop="packageUnit_dictText"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -59,7 +126,10 @@
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
<<<<<<< HEAD
|
||||
width="160"
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -67,15 +137,25 @@
|
||||
align="center"
|
||||
key="isSelected"
|
||||
prop="isSelected"
|
||||
<<<<<<< HEAD
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
=======
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
>>>>>>> v1.3
|
||||
label="生产企业"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
<<<<<<< HEAD
|
||||
width="100"
|
||||
=======
|
||||
width="240"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -83,7 +163,10 @@
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
<<<<<<< HEAD
|
||||
width="200"
|
||||
=======
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -91,7 +174,11 @@
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
<<<<<<< HEAD
|
||||
width="200"
|
||||
=======
|
||||
width="160"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -99,7 +186,11 @@
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
<<<<<<< HEAD
|
||||
width="200"
|
||||
=======
|
||||
width="140"
|
||||
>>>>>>> v1.3
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
@@ -114,15 +205,24 @@
|
||||
</template>
|
||||
|
||||
<script setup name="patientDetails">
|
||||
<<<<<<< HEAD
|
||||
import {
|
||||
getReportPatientDetails
|
||||
} from './statisticalManagent';
|
||||
|
||||
=======
|
||||
import { ref, onMounted, getCurrentInstance } from 'vue';
|
||||
import { getReportPatientDetails } from './statisticalManagent';
|
||||
|
||||
// 获取当前实例的proxy
|
||||
const { proxy } = getCurrentInstance();
|
||||
>>>>>>> v1.3
|
||||
|
||||
const patientDetailsList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const total = ref(0);
|
||||
<<<<<<< HEAD
|
||||
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
@@ -133,28 +233,91 @@ const queryParams = ref({
|
||||
});
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
=======
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const queryRef = ref();
|
||||
|
||||
// 字典数据
|
||||
const { med_category_code } = proxy.useDict("med_category_code");
|
||||
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
categoryCode: undefined, // 添加缺失的categoryCode属性
|
||||
encounterBusNo: undefined,
|
||||
medName: undefined,
|
||||
medYbNo: undefined,
|
||||
manufacturerText: undefined,
|
||||
});
|
||||
|
||||
/** 查询患者明细列表 */
|
||||
>>>>>>> v1.3
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportPatientDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
patientDetailsList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
<<<<<<< HEAD
|
||||
})
|
||||
=======
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
proxy.resetForm('queryRef');
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
<<<<<<< HEAD
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
=======
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`patient_details_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
>>>>>>> v1.3
|
||||
// 页面加载时获取数据
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
|
||||
</script>
|
||||
=======
|
||||
</script>
|
||||
|
||||
>>>>>>> v1.3
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
@@ -166,4 +329,11 @@ onMounted(() => {
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
.mb8 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
</style>
|
||||
@@ -148,8 +148,13 @@ const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
<<<<<<< HEAD
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
=======
|
||||
encounterBusNo: undefined,
|
||||
patientName: undefined,
|
||||
>>>>>>> v1.3
|
||||
});
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
|
||||
@@ -1,536 +1,670 @@
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request';
|
||||
// 查询库存明细列表
|
||||
export function getproductReturnPage(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询备份日期库存明细列表
|
||||
export function getproductReturnBackUpPage(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-backup-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-init',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function getBusNoInit() { //单据号
|
||||
return request({
|
||||
url: '/inventory-manage/product/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
export function getBusNoInit() {
|
||||
//单据号
|
||||
return request({
|
||||
url: '/inventory-manage/product/bus-no-init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
return request({
|
||||
url: '/app-common/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 药房药库列表
|
||||
export function getPharmacyCabinetList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 停供
|
||||
export function stopSupply(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/stop-supply',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
return request({
|
||||
url: '/inventory-manage/product/stop-supply',
|
||||
method: 'put',
|
||||
data: busNo,
|
||||
});
|
||||
}
|
||||
|
||||
// 取消停供
|
||||
export function cancelSupply(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/cancel-supply',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
return request({
|
||||
url: '/inventory-manage/product/cancel-supply',
|
||||
method: 'put',
|
||||
data: busNo,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询库存商品明细查询报表列表
|
||||
export function getReportProductPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/inventory-product/report-product-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/inventory-product/report-product-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//查询采购入库明细报表
|
||||
export function getReportInboundPCage(query) {
|
||||
return request({
|
||||
url: '/report-manage/inbound/report-inbound-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/inbound/report-inbound-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//查询调拨入库明细报表
|
||||
export function getReportTransferPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/transfer/report-transfer-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/transfer/report-transfer-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//查询库存盘点明细报表
|
||||
export function getReportStocktakingPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/stocktaking/report-stocktaking-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/stocktaking/report-stocktaking-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//报损明细
|
||||
export function getReportLossPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/loss/report-loss-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/loss/report-loss-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 医保对账
|
||||
export function ybRequestReconcile(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/reconcile',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 合同
|
||||
export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 对账列表 结算
|
||||
export function getReconcileList(params) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile-list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/reconcile-list',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//领用出库明细
|
||||
export function getRreportOutboundPage(query) {
|
||||
return request({
|
||||
url: '/report-manage/outbound/report-outbound-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/outbound/report-outbound-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取科室列表
|
||||
export function getDepartmentList() {
|
||||
return request({
|
||||
url: '/app-common/department-list',
|
||||
method: 'get',
|
||||
})
|
||||
return request({
|
||||
url: '/app-common/department-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 查询领用出库明细初始化数据 供应商
|
||||
export function getOutboundInit() {
|
||||
return request({
|
||||
url: '/report-manage/outbound/init',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/outbound/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 查询采购入库明细初始化数据 供应商
|
||||
export function getInboundInit() {
|
||||
return request({
|
||||
url: '/report-manage/inbound/init',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/inbound/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//领用退库明细
|
||||
export function getRreportReturnIssue(query) {
|
||||
return request({
|
||||
url: '/report-manage/return-issue/report-return-issue',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/return-issue/report-return-issue',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询领用退库明细初始化数据 供应商
|
||||
export function getReturnIssueInit() {
|
||||
return request({
|
||||
url: '/report-manage/return-issue/init',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/return-issue/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//采购退库明细
|
||||
export function getReportPurchaseReturn(query) {
|
||||
return request({
|
||||
url: '/report-manage/purchase-return/report-purchase-return',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/purchase-return/report-purchase-return',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询采购退库明细初始化数据
|
||||
// 查询采购退库明细初始化数据
|
||||
export function getPurchaseReturnInit() {
|
||||
return request({
|
||||
url: '/report-manage/purchase-return/init',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/purchase-return/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//待发药查询
|
||||
export function getAwaitingPendingMedicationPageList(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/pending-medication/pending-medication-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/pharmacy-manage/pending-medication/pending-medication-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//发药明细 切换统计类型
|
||||
export function getAmbPractitionerDetail(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/amb-practitioner-detail',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/amb-practitioner-detail',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 门诊发药明细流水账接口
|
||||
export function getAmbMedicationDetail(query) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/amb-medication-detail',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/amb-medication-detail',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 查询发药明细初始化数据
|
||||
// 查询发药明细初始化数据
|
||||
export function getMedicationDetailsInit() {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/init',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 医保对账明细
|
||||
export function reconcileDetailList(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile-detail-list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/reconcile-detail-list',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 医保对账明细导出txt
|
||||
export function reconcileDetailTxt(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile-detail-txt',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/reconcile-detail-txt',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 医保明细对总账
|
||||
export function reconcileGeneral(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile-general',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/reconcile-general',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
//查询门诊收费明细
|
||||
export function getReportChargePage(params) {
|
||||
return request({
|
||||
url: '/report-manage/charge/report-charge-page',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/charge/report-charge-page',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
//查询门诊收费明细初始值
|
||||
export function getReportChargeInit() {
|
||||
return request({
|
||||
url: '/report-manage/charge/init',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/charge/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
//查询挂号收费明细
|
||||
export function getReportRegisterPage(params) {
|
||||
return request({
|
||||
url: '/report-manage/register/report-register-page',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/register/report-register-page',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
//查询挂号收费明细初始值
|
||||
export function getReportRegisterInit() {
|
||||
return request({
|
||||
url: '/report-manage/register/init',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/register/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 文件上传
|
||||
export function ybRequestFileUp(data) {
|
||||
return request({
|
||||
url: '/yb-request/file-up',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/file-up',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
export function getExpirationWarning(query) {
|
||||
<<<<<<< HEAD
|
||||
// return request({
|
||||
// url: '/inventory-manage/product/expiration-warning',
|
||||
// method: 'get',
|
||||
// params: query
|
||||
// })
|
||||
return null;
|
||||
=======
|
||||
return request({
|
||||
url: '/inventory-manage/product/expiration-warning',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
export function getClroptins(query) {
|
||||
return request({
|
||||
url: '/yb-request/select-clroptins',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/select-clroptins',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function applyFinancialClearing(data) {
|
||||
return request({
|
||||
url: '/yb-request/apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function applyFinancialClearingList(query) {
|
||||
return request({
|
||||
url: '/yb-request/apply-financial-clearing-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/apply-financial-clearing-list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function applyUnClearing(query) {
|
||||
return request({
|
||||
url: '/yb-request/apply-un-clearing',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/apply-un-clearing',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function autoApplyFinancialClearing(data) {
|
||||
return request({
|
||||
url: '/yb-request/auto-apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/auto-apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function traceabilityCodeManagementInit(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/traceNo/init',
|
||||
method: 'get',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/inventory-manage/traceNo/init',
|
||||
method: 'get',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function inventoryReceiptPage(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/traceNo/inventory-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/inventory-manage/traceNo/inventory-receipt-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function handOperatedApplyFinancialClearing(data) {
|
||||
return request({
|
||||
url: '/yb-request/hand-operated-apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/hand-operated-apply-financial-clearing',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
export function handOperatedApplyReconcileAccounts(data) {
|
||||
return request({
|
||||
url: '/yb-request/hand-operated-apply-reconcile-accounts',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
return request({
|
||||
url: '/yb-request/hand-operated-apply-reconcile-accounts',
|
||||
method: 'post',
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function productPageTotal(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-statistics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-statistics',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
export function productBackupPageTotal(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/product/product-backup-statistics',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
export function getMedDevInfo(query) {
|
||||
return request({
|
||||
url: '/report-manage/medication-device/med-dev-info',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/medication-device/med-dev-info',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function getMedDevAll(query) {
|
||||
return request({
|
||||
url: '/report-manage/medication-device/med-dev-all',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
return request({
|
||||
url: '/report-manage/medication-device/med-dev-all',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function getReportStocktakingPageAuto(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/stocktaking/report-stocktaking-page-auto',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/stocktaking/report-stocktaking-page-auto',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//报表导出
|
||||
export function exportRecords(params) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/excel-out',
|
||||
method: 'get',
|
||||
params: qparamsuery
|
||||
})
|
||||
|
||||
=======
|
||||
return request({
|
||||
url: '/pharmacy-manage/medication-details/excel-out',
|
||||
method: 'get',
|
||||
params: qparamsuery,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//查看单据详情
|
||||
export function getDocumentDetails(params) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
||||
=======
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//药剂科报表_常规报表:出库明细表(例子)
|
||||
export function getStockOutDetail(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/stock-out-detail-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/stock-out-detail-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//查询患者明细主报表--20251106追加
|
||||
export function getReportPatientMasterDetail(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/patient-master-detail',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/patient-master-detail',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//线下采购占比报表--20251106追加
|
||||
export function getReportOfflinePurchaseRatio(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/offline-purchase-ratio',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/offline-purchase-ratio',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//药品使用情况报表--20251106追加
|
||||
export function getReportMedicationUsage(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/medication-usage',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/medication-usage',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//查询患者明细报表--20251106追加
|
||||
export function getReportPatientDetails(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/patient-details',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/patient-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//药剂科报表:药品费用增长率--20251106追加
|
||||
export function getDrugExpensesGrowthRate(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/drug-expenses-growth-rate',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/drug-expenses-growth-rate',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//药剂科报表:30天回款率--20251106追加
|
||||
export function getThirtyDayCollectionRate(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/thirty-day-collection-rate',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/thirty-day-collection-rate',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//药剂科报表:基本情况--20251106追加
|
||||
export function getReportBasicInformationDetails(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/basic-information-details',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/basic-information-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//药剂科报表:药品出库情况--20251106追加
|
||||
export function getReportMedicationStockOutDetails(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/medication-stock-out-details',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/medication-stock-out-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//药剂科报表:产品使用情况--20251106追加
|
||||
export function getReportProductUsageDetails(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/product-usage-details',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/product-usage-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
>>>>>>> v1.3
|
||||
}
|
||||
|
||||
//药剂科报表:非中选产品采购量占比--20251106追加
|
||||
export function getReportNonWinQtyRatio(query) {
|
||||
<<<<<<< HEAD
|
||||
return request({
|
||||
url: '/report-manage/report/non-win-qty-ratio',
|
||||
method: 'get',
|
||||
@@ -538,3 +672,73 @@ export function getReportNonWinQtyRatio(query) {
|
||||
})
|
||||
}
|
||||
|
||||
=======
|
||||
return request({
|
||||
url: '/report-manage/report/non-win-qty-ratio',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:药品入库情况--20251106追加
|
||||
export function getMedicationInboundDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/medication-inbound-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:红旗药品销售情况--20251106追加
|
||||
export function getMedicationSaleDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/medication-sale-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//药剂科报表:疾病统计(健康保健)--20251106追加
|
||||
export function getDiseaseDetails(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/disease-details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//同一报表:门诊科室工作量统计
|
||||
export function getOutpatientDepartmentMetrics(query) {
|
||||
return request({
|
||||
url: '/report-manage/report/outpatient-department-metrics',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//同一报表:查询门诊收费明细初始值--20251106追加
|
||||
export function getReportPhysicianWorkloadInit() {
|
||||
return request({
|
||||
url: '/report-manage/report/physician-workload-init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
//同一报表:查询门诊收费明细--20251106追加
|
||||
export function getPhysicianWorkloadPage(params) {
|
||||
return request({
|
||||
url: '/report-manage/report/report-physician-workload-page',
|
||||
method: 'get',
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询追溯患者列表
|
||||
export function tracePatient(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/traceNo/trace-patient',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
>>>>>>> v1.3
|
||||
|
||||
@@ -1,23 +1,59 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="earlyWarningRef" :inline="true" :rules="rules" label-width="140px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="earlyWarningRef"
|
||||
:inline="true"
|
||||
:rules="rules"
|
||||
label-width="140px"
|
||||
>
|
||||
<el-form-item label="追溯码:" prop="searchKey" label-width="120px">
|
||||
<el-input v-model="queryParams.searchKey" placeholder="请输入药品名称/追溯码" clearable @keyup.enter="handleQuery" style="width: 200px" />
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入药品名称/追溯码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="进出时间:">
|
||||
<el-date-picker v-model="occurrenceTime" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
style="width: 300px" value-format="YYYY-MM-DD" />
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="追溯码状态:" prop="statusEnum" label-width="120px">
|
||||
<el-select v-model="queryParams.statusEnum" placeholder="请选择追溯码状态" clearable style="width: 200px">
|
||||
<el-option v-for="traceNoStatus in traceNoStatusOptions" :key="traceNoStatus.value"
|
||||
:label="traceNoStatus.label" :value="traceNoStatus.value" />
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder="请选择追溯码状态"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="traceNoStatus in traceNoStatusOptions"
|
||||
:key="traceNoStatus.value"
|
||||
:label="traceNoStatus.label"
|
||||
:value="traceNoStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型:" prop="operationType" label-width="120px">
|
||||
<el-select v-model="queryParams.operationType" placeholder="请选择操作类型" clearable style="width: 200px">
|
||||
<el-option v-for="operationType in operationTypeOptions" :key="operationType.value"
|
||||
:label="operationType.label" :value="operationType.value" />
|
||||
<el-select
|
||||
v-model="queryParams.operationType"
|
||||
placeholder="请选择操作类型"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="operationType in operationTypeOptions"
|
||||
:key="operationType.value"
|
||||
:label="operationType.label"
|
||||
:value="operationType.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -34,52 +70,118 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="purchaseinventoryList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-click="onClickCell"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="药品名" align="center" key="name" prop="name"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="药房药库" align="center" key="locationName" prop="locationName" width="140"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="产品批号" align="center" key="lotNumber" prop="lotNumber" width="120"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="追溯码" align="center" key="traceNo" prop="traceNo" width="200"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="追溯码状态" align="center" key="statusEnum_enumText" prop="statusEnum_enumText" width="140"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="追溯码单位" align="center" key="unitCode_dictText" prop="unitCode_dictText" width="140"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作类型" align="center" key="operationType_enumText" prop="operationType_enumText" width="165"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="项目类型" align="center" key="itemType_enumText" prop="itemType_enumText" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="进出时间" align="center" key="createTime" prop="createTime" :show-overflow-tooltip="true" width="180" />
|
||||
<el-table-column
|
||||
label="药品名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药房药库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="追溯码"
|
||||
align="center"
|
||||
key="traceNo"
|
||||
prop="traceNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="追溯码状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="追溯码单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作类型"
|
||||
align="center"
|
||||
key="operationType_enumText"
|
||||
prop="operationType_enumText"
|
||||
width="165"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
key="itemType_enumText"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进出时间"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
:show-overflow-tooltip="true"
|
||||
width="180"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<el-dialog v-model="dialogVisible" title="追溯详情" width="80%">
|
||||
<traceabilityPersonInfo :infoIdParams="infoIdParams"></traceabilityPersonInfo>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="earlyWarning">
|
||||
import {
|
||||
inventoryReceiptPage,
|
||||
traceabilityCodeManagementInit
|
||||
} from "./statisticalManagent";
|
||||
import { onMounted } from 'vue';
|
||||
import { inventoryReceiptPage, traceabilityCodeManagementInit } from './statisticalManagent';
|
||||
import { nextTick, onMounted } from 'vue';
|
||||
import { formatDateStr } from '@/utils';
|
||||
|
||||
import traceabilityPersonInfo from './traceabilityPersonInfo.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
<<<<<<< HEAD
|
||||
const {
|
||||
item_category_code,
|
||||
} = proxy.useDict(
|
||||
"item_category_code",
|
||||
);
|
||||
=======
|
||||
const { item_category_code } = proxy.useDict('item_category_code');
|
||||
>>>>>>> v1.3
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const occurrenceTime = ref([])
|
||||
const occurrenceTime = ref([]);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
@@ -88,13 +190,15 @@ const locationIdList = ref(undefined);
|
||||
const traceNoStatusOptions = ref(undefined);
|
||||
const operationTypeOptions = ref(undefined);
|
||||
const itemTypeOptions = ref(undefined);
|
||||
const dialogVisible = ref(false);
|
||||
const infoIdParams = ref();
|
||||
|
||||
const props = defineProps({
|
||||
recordInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({})
|
||||
}
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
@@ -135,15 +239,18 @@ function setDefaultDateRange() {
|
||||
const today = new Date();
|
||||
const oneMonthAgo = new Date(today);
|
||||
oneMonthAgo.setMonth(today.getMonth() - 1);
|
||||
occurrenceTime.value = [formatDateStr(oneMonthAgo, 'YYYY-MM-DD'), formatDateStr(today, 'YYYY-MM-DD')];
|
||||
occurrenceTime.value = [
|
||||
formatDateStr(oneMonthAgo, 'YYYY-MM-DD'),
|
||||
formatDateStr(today, 'YYYY-MM-DD'),
|
||||
];
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
}
|
||||
function getInit() {
|
||||
traceabilityCodeManagementInit().then((res) => {
|
||||
@@ -162,7 +269,7 @@ function getList() {
|
||||
queryParams.value.itemId = props.recordInfo.itemId;
|
||||
inventoryReceiptPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
@@ -173,12 +280,12 @@ function handleQuery() {
|
||||
if (valid) {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.locationId = props.recordInfo.locationId;
|
||||
queryParams.value.lotNumber = props.recordInfo.lotNumber;
|
||||
queryParams.value.itemTable = props.recordInfo.itemTable;
|
||||
@@ -186,16 +293,16 @@ function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("earlyWarningRef");
|
||||
queryParams.value.createTimeSTime = '';
|
||||
queryParams.value.createTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('earlyWarningRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
@@ -205,12 +312,21 @@ function handleSelectionChange(selection) {
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
getInit()
|
||||
|
||||
// 点击当前条数触发
|
||||
const onClickCell = (row) => {
|
||||
// console.log('@@@@@=======>', JSON.stringify(row));
|
||||
dialogVisible.value = true;
|
||||
nextTick(() => {
|
||||
infoIdParams.value = {
|
||||
id: row.id,
|
||||
};
|
||||
});
|
||||
};
|
||||
getInit();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table border :data="tableData" style="width: 100%" class="el-table">
|
||||
<el-table-column prop="name" label="姓名" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" />
|
||||
<el-table-column prop="age" label="年龄" show-overflow-tooltip />
|
||||
<el-table-column prop="phone" label="电话" show-overflow-tooltip />
|
||||
<el-table-column label="挂号时间" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ filterDate(scope.row.registerTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import moment from 'moment';
|
||||
import { tracePatient } from './statisticalManagent';
|
||||
const tableData = ref([]);
|
||||
const props = defineProps({
|
||||
infoIdParams: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
// 格式化时间
|
||||
const filterDate = (date) => {
|
||||
return moment(date).format('YYYY - MM- DD HH:mm:ss');
|
||||
};
|
||||
// 查询接口
|
||||
const getList = async () => {
|
||||
try {
|
||||
const res = await tracePatient(props.infoIdParams);
|
||||
tableData.value = res.data;
|
||||
} catch (error) {}
|
||||
};
|
||||
watch(
|
||||
() => props.infoIdParams,
|
||||
(newValue) => {
|
||||
console.log('newValue========>', newValue);
|
||||
getList();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-table {
|
||||
height: calc(100vh - 400px);
|
||||
}
|
||||
</style>
|
||||
@@ -86,6 +86,7 @@
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-if="viewStatus == 'view'"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取库房对账列表
|
||||
export function getStoreReconciliationList (query) {
|
||||
return request ({
|
||||
url: '/inventory-manage/dynamic/dynamic-inventory',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 获取库房列表// 药房药库列表
|
||||
export function getPharmacyCabinetList () {
|
||||
return request ({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 查询备份单号
|
||||
export function getBackupList () {
|
||||
return request ({
|
||||
url: '/app-common/backup-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,372 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="queryForm" :model="queryParams" label-width="120px" :inline="true">
|
||||
<el-form-item label="药品名称/编码/拼音/五笔码" prop="searchKey" label-width="200px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 350px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="期初备份单据号" prop="startBusNo">
|
||||
<el-select
|
||||
v-model="queryParams.startBusNo"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in backUpOptions"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="期末备份单据号" prop="endBusNo">
|
||||
<el-select
|
||||
v-model="queryParams.endBusNo"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in backUpOptions"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库房" prop="locationId">
|
||||
<el-select
|
||||
v-model="queryParams.locationId"
|
||||
placeholder="请选择库房"
|
||||
@change="handleQuery"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in locationOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否发生过业务" prop="isBus">
|
||||
<el-select v-model="queryParams.isBus" filterable clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ id: 1, name: '已发生业务' },
|
||||
{ id: 0, name: '未发生业务' },
|
||||
]"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否账平" prop="isBalance">
|
||||
<el-select v-model="queryParams.isBalance" filterable clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ id: 1, name: '已平账' },
|
||||
{ id: 0, name: '未平账' },
|
||||
]"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
stripe
|
||||
v-loading="loading"
|
||||
element-loading-text="数据加载中..."
|
||||
:header-cell-style="{ backgroundColor: '#f5f7fa', color: '#303133' }"
|
||||
empty-text="暂无数据"
|
||||
>
|
||||
<el-table-column type="expand" width="48">
|
||||
<template #default="{ row }">
|
||||
<el-row :gutter="10" style="width: 100%">
|
||||
<el-form label-width="100px" :inline="true">
|
||||
<el-form-item label="发药单据数" :class="computedClass(row)">
|
||||
{{ row.dispenseOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="退药单据数" :class="computedClass(row)">
|
||||
{{ row.returnOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="采购单据数" :class="computedClass(row)">
|
||||
{{ row.purchaseOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="退库单据数" :class="computedClass(row)">
|
||||
{{ row.purchaseReturnOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="调拨进单据数" :class="computedClass(row)">
|
||||
{{ row.transferInOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="调拨出单据数" :class="computedClass(row)">
|
||||
{{ row.transferOutOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="报损单据数" :class="computedClass(row)">
|
||||
{{ row.lossOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="盘点单据数" :class="computedClass(row)">
|
||||
{{ row.stocktakeOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="领用单据数" :class="computedClass(row)">
|
||||
{{ row.issueOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="退领单据数" :class="computedClass(row)">
|
||||
{{ row.returnIssueOrderCount }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row :gutter="40" style="width: 100%">
|
||||
<el-col :span="16" class="formula-wrapper">
|
||||
<div class="formula">
|
||||
<template v-for="segment in balanceSegments" :key="segment.label">
|
||||
<span v-if="segment.operator" class="formula-operator">
|
||||
{{ segment.operator }}
|
||||
</span>
|
||||
<span class="formula-label">{{ segment.label }}</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">
|
||||
{{ formatInventoryUnit(row[segment.field], row) }}
|
||||
</span>
|
||||
<span>)</span>
|
||||
</template>
|
||||
<span class="formula-operator">=</span>
|
||||
<span class="formula-label">推算期末数</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">{{ computedEndNum(row) }}</span>
|
||||
<span>)</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="formula-wrapper">
|
||||
<span>期末数量</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">
|
||||
{{ formatInventoryUnit(row.endCount, row) }}
|
||||
</span>
|
||||
<span>)</span>
|
||||
<span class="formula-operator">-</span>
|
||||
<span>推测期末数量</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">{{ computedEndNum(row) }}</span>
|
||||
<span>)</span>
|
||||
<span class="formula-operator">=</span>
|
||||
<span>盈亏数量</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">
|
||||
{{ formatInventoryUnit(row.profitLossDiff, row) }}</span
|
||||
>
|
||||
<span>)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="itemName" label="药品名称" align="center" width="200" />
|
||||
<el-table-column prop="itemNo" label="项目编号" align="center" />
|
||||
<el-table-column prop="unitCode_dictText" label="单位" align="center" />
|
||||
<el-table-column prop="minUnitCode_dictText" label="最小单位" align="center" />
|
||||
<el-table-column prop="totalVolume" label="规格" align="center" />
|
||||
<el-table-column prop="categoryCode_dictText" label="药品分类" align="center" />
|
||||
<el-table-column prop="manufacturerText" label="生产厂家" align="center" width="300" />
|
||||
<el-table-column prop="partPercent" label="拆零比" align="center" />
|
||||
<el-table-column prop="isBalance" label="是否账平" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.isBalance == 1" type="success">已平账</el-tag>
|
||||
<el-tag v-else-if="scope.row.isBalance == 0" type="danger">未平账</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="storeReconciliation">
|
||||
import { ref, reactive, onMounted, watch, computed } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import {
|
||||
getStoreReconciliationList,
|
||||
getPharmacyCabinetList,
|
||||
getBackupList,
|
||||
} from './components/api.js';
|
||||
import { formatInventory } from '@/utils/his.js';
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: '',
|
||||
startBusNo: '',
|
||||
endBusNo: '',
|
||||
locationId: '',
|
||||
isBus: 1,
|
||||
isBalance: 0,
|
||||
});
|
||||
// 获取库存单位
|
||||
function formatInventoryUnit(num, row) {
|
||||
return formatInventory(num, row.partPercent, row.unitCode_dictText, row.minUnitCode_dictText);
|
||||
}
|
||||
// 推算期末数
|
||||
function computedEndNum(row) {
|
||||
if (!row) return '';
|
||||
|
||||
const {
|
||||
startCount = 0,
|
||||
dispenseCount = 0,
|
||||
returnCount = 0,
|
||||
purchaseCount = 0,
|
||||
purchaseReturnCount = 0,
|
||||
transferInCount = 0,
|
||||
transferOutCount = 0,
|
||||
lossCount = 0,
|
||||
stocktakeCount = 0,
|
||||
issueCount = 0,
|
||||
returnIssueCount = 0,
|
||||
} = row;
|
||||
|
||||
const endCount =
|
||||
Number(startCount || 0) -
|
||||
Number(dispenseCount || 0) +
|
||||
Number(returnCount || 0) +
|
||||
Number(purchaseCount || 0) -
|
||||
Number(purchaseReturnCount || 0) +
|
||||
Number(transferInCount || 0) -
|
||||
Number(transferOutCount || 0) -
|
||||
Number(lossCount || 0) +
|
||||
Number(stocktakeCount || 0) -
|
||||
Number(issueCount || 0) +
|
||||
Number(returnIssueCount || 0);
|
||||
|
||||
return formatInventoryUnit(endCount, row);
|
||||
}
|
||||
function computedClass(row) {
|
||||
if (row.isBalance == 1) {
|
||||
return 'label-green';
|
||||
}
|
||||
if (row.isBalance == 0) {
|
||||
return 'label-red';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
// function
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
const resetQuery = () => {
|
||||
queryParams.locationId = '';
|
||||
queryParams.startBusNo = '';
|
||||
queryParams.endBusNo = '';
|
||||
queryParams.isBus = 1;
|
||||
queryParams.isBalance = 0;
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
const tableData = ref([]);
|
||||
const getList = async () => {
|
||||
const response = await getStoreReconciliationList(queryParams);
|
||||
tableData.value = response?.data?.records || [];
|
||||
total.value = response?.data?.total || 0;
|
||||
};
|
||||
const locationOptions = ref([]);
|
||||
const getLocationList = async () => {
|
||||
try {
|
||||
const response = await getPharmacyCabinetList();
|
||||
locationOptions.value = response?.data || [];
|
||||
queryParams.locationId = response?.data[0].id;
|
||||
} catch (error) {
|
||||
ElMessage.error('获取库房列表失败,请稍后重试');
|
||||
}
|
||||
};
|
||||
const backUpOptions = ref([]);
|
||||
const getBackupOptionsList = async () => {
|
||||
try {
|
||||
const response = await getBackupList();
|
||||
backUpOptions.value = response?.data || [];
|
||||
queryParams.startBusNo = response?.data[backUpOptions.value.length - 1];
|
||||
} catch (error) {
|
||||
ElMessage.error('获取备份单号失败,请稍后重试');
|
||||
}
|
||||
};
|
||||
const balanceSegments = [
|
||||
{ label: '期初数', field: 'startCount', operator: null },
|
||||
{ label: '发药数', field: 'dispenseCount', operator: '-' },
|
||||
{ label: '退药数', field: 'returnCount', operator: '+' },
|
||||
{ label: '入库数', field: 'purchaseCount', operator: '+' },
|
||||
{ label: '退库数', field: 'purchaseReturnCount', operator: '-' },
|
||||
{ label: '调拨进数', field: 'transferInCount', operator: '+' },
|
||||
{ label: '调拨出数', field: 'transferOutCount', operator: '-' },
|
||||
{ label: '报损数', field: 'lossCount', operator: '-' },
|
||||
{ label: '盘点数', field: 'stocktakeCount', operator: '+' },
|
||||
{ label: '领用数', field: 'issueCount', operator: '-' },
|
||||
{ label: '领用退数', field: 'returnIssueCount', operator: '+' },
|
||||
];
|
||||
watch(
|
||||
[() => queryParams.locationId, () => queryParams.startBusNo],
|
||||
([newLocationId, newStartBusNo]) => {
|
||||
if (newLocationId && newStartBusNo) {
|
||||
getList();
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
getBackupOptionsList();
|
||||
getLocationList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.label-red {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.label-green {
|
||||
color: #67c23a;
|
||||
}
|
||||
.formula-wrapper {
|
||||
margin-top: 8px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
.formula-wrapper span {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.formula {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
}
|
||||
.formula-label {
|
||||
font-weight: 500;
|
||||
}
|
||||
.formula-operator {
|
||||
padding: 0 2px;
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,310 @@
|
||||
{
|
||||
"panels": [
|
||||
{
|
||||
"index": 0,
|
||||
"name": 1,
|
||||
"paperType": "A4",
|
||||
"height": 297,
|
||||
"width": 210,
|
||||
"paperHeader": 73.5,
|
||||
"paperFooter": 817.5,
|
||||
"paperNumberContinue": true,
|
||||
"overPrintOptions": {},
|
||||
"watermarkOptions": {},
|
||||
"panelLayoutOptions": {},
|
||||
"printElements": [
|
||||
{
|
||||
"options": {
|
||||
"left": 249,
|
||||
"top": 12,
|
||||
"height": 12,
|
||||
"width": 70.5,
|
||||
"title": "调拨单据",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 16.5,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 10.5,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 120,
|
||||
"title": "单据号",
|
||||
"field": "busNo",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 141,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 97.5,
|
||||
"title": "源仓库",
|
||||
"field": "sourceLocationName",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 249,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 97.5,
|
||||
"title": "目的仓库",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "purposeLocationName"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 360.99609375,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 78,
|
||||
"title": "项目类型",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "itemType_dictText"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 445.5,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 136.5,
|
||||
"title": "制单日期",
|
||||
"field": "occurrenceTime",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 9,
|
||||
"top": 88.5,
|
||||
"height": 36,
|
||||
"width": 573,
|
||||
"title": "undefined+beforeDragIn",
|
||||
"field": "detailsList",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"columns": [
|
||||
[
|
||||
{
|
||||
"title": "项目名称",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 86.67519359101631,
|
||||
"field": "name",
|
||||
"checked": true,
|
||||
"columnId": "name",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "规格",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 80.21549132169478,
|
||||
"field": "totalVolume",
|
||||
"checked": true,
|
||||
"columnId": "totalVolume",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "厂家",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 75.93737727220328,
|
||||
"field": "manufacturerText",
|
||||
"checked": true,
|
||||
"columnId": "manufacturerText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "批号",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 67.21760769186436,
|
||||
"field": "lotNumber",
|
||||
"checked": true,
|
||||
"columnId": "lotNumber",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "单价",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 60.17562958542372,
|
||||
"field": "price",
|
||||
"checked": true,
|
||||
"columnId": "price",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "调拨单位",
|
||||
"titleSync": false,
|
||||
"align": "center",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 30.9839942645893,
|
||||
"field": "measurementUnitCode_dictText",
|
||||
"checked": true,
|
||||
"columnId": "measurementUnitCode_dictText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "源库存数",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 55.062860531575446,
|
||||
"field": "totalSourceQuantity",
|
||||
"checked": true,
|
||||
"columnId": "totalSourceQuantity",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "调拨数",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 63.064593526717786,
|
||||
"field": "itemQuantity",
|
||||
"checked": true,
|
||||
"columnId": "itemQuantity",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "合计金额",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 53.66725221491505,
|
||||
"field": "totalPrice",
|
||||
"checked": true,
|
||||
"columnId": "totalPrice",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"width": 85.25,
|
||||
"checked": false,
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"width": 85.25,
|
||||
"checked": false,
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "表格",
|
||||
"type": "table",
|
||||
"editable": true,
|
||||
"columnDisplayEditable": true,
|
||||
"columnDisplayIndexEditable": true,
|
||||
"columnTitleEditable": true,
|
||||
"columnResizable": true,
|
||||
"columnAlignEditable": true,
|
||||
"isEnableEditField": true,
|
||||
"isEnableContextMenu": true,
|
||||
"isEnableInsertRow": true,
|
||||
"isEnableDeleteRow": true,
|
||||
"isEnableInsertColumn": true,
|
||||
"isEnableDeleteColumn": true,
|
||||
"isEnableMergeCell": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"paperNumberLeft": 565,
|
||||
"paperNumberTop": 819
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="批量调拨单明细"
|
||||
width="90%"
|
||||
:destroy-on-close="true"
|
||||
@close="close"
|
||||
>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<template v-if="props.isApply">
|
||||
<el-button plain type="primary" icon="Edit" @click="handelApply"> 审批通过 </el-button>
|
||||
<el-button type="primary" plain icon="Edit" @click="handleReject"> 驳回 </el-button>
|
||||
</template>
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport"> 导出 </el-button>
|
||||
<el-button type="warning" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
|
||||
</el-row>
|
||||
<el-descriptions :column="5" style="margin-bottom: 10px">
|
||||
<el-descriptions-item label="单据号:">
|
||||
{{ detailsList[0]?.busNo || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="源仓库:">
|
||||
{{ detailsList[0]?.sourceLocationName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="目的仓库:">
|
||||
{{ detailsList[0]?.purposeLocationName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目类型:">
|
||||
{{ detailsList[0]?.itemType_dictText || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="制单日期:">
|
||||
{{ proxy.formatDateStr(detailsList[0]?.occurrenceTime, 'YYYY-MM-DD HH:mm:ss') || '-' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table :data="detailsList" border max-height="650" v-loading="loading">
|
||||
<el-table-column label="序号" width="60" type="index" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="name" />
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
prop="manufacturerText"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价" align="right" header-align="center" prop="price" width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.price?.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调拨单位"
|
||||
align="center"
|
||||
prop="measurementUnitCode_dictText"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
label="源库存数"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemName"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(Number(scope.row.totalSourceQuantity), scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="目的库存数"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemName"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatQuantity(
|
||||
Number(scope.row.itemQuantity) - Number(scope.row.totalSourceQuantity),
|
||||
scope.row
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="调拨数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalQuitemQuantityantity"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(scope.row.itemQuantity, scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合计金额"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalPrice"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice?.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产日期" align="center" prop="startTime" width="120">
|
||||
<template #default="scope">
|
||||
{{ proxy.formatDateStr(scope.row.startTime, 'YYYY-MM-DD') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效期至" align="center" prop="endTime" width="120">
|
||||
<template #default="scope">
|
||||
{{ proxy.formatDateStr(scope.row.endTime, 'YYYY-MM-DD') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getTransferProductDetail, productTransferApproved, reject } from './transferManagement';
|
||||
import templateJson from './template.json';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const detailsList = ref([]);
|
||||
const dialogVisible = ref(false);
|
||||
const loading = ref(false);
|
||||
const supplyBusNo = ref('');
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
isApply: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
function open(busNo) {
|
||||
dialogVisible.value = true;
|
||||
supplyBusNo.value = busNo;
|
||||
loading.value = true;
|
||||
getTransferProductDetail({ busNo: busNo, pageSize: 1000, pageNo: 1 }).then((res) => {
|
||||
detailsList.value = res.data.records;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function formatQuantity(quantity, row) {
|
||||
if (row.measurementUnitCode == row.unitCode) {
|
||||
return formatInventory(
|
||||
quantity,
|
||||
row.partPercent,
|
||||
row.unitCode_dictText,
|
||||
row.minUnitCode_dictText
|
||||
);
|
||||
} else {
|
||||
return quantity + row.minUnitCode_dictText;
|
||||
}
|
||||
}
|
||||
|
||||
function handelApply() {
|
||||
loading.value = true;
|
||||
productTransferApproved(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleReject() {
|
||||
reject(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化库存数量显示(大单位情况)
|
||||
* @param quantity 小单位库存数量
|
||||
* @param partPercent 拆零比
|
||||
* @param unitCode 大单位
|
||||
* @param minUnitCode 小单位
|
||||
*/
|
||||
function formatInventory(quantity, partPercent, unitCode, minUnitCode) {
|
||||
// 处理负数情况
|
||||
const isNegative = quantity < 0;
|
||||
const absQuantity = Math.abs(quantity);
|
||||
|
||||
if (absQuantity % partPercent !== 0) {
|
||||
const integerPart = Math.floor(absQuantity / partPercent);
|
||||
const decimalPart = absQuantity % partPercent;
|
||||
|
||||
let result = integerPart.toString() + ' ' + unitCode;
|
||||
if (decimalPart > 0) {
|
||||
result += decimalPart.toString() + ' ' + minUnitCode;
|
||||
}
|
||||
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 整除情况
|
||||
const result = absQuantity / partPercent + ' ' + unitCode;
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 打印盘点单
|
||||
function handlePrint() {
|
||||
const result = [];
|
||||
const printList = detailsList.value.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
volume: item.totalVolume,
|
||||
price: Number(item.price).toFixed(2) + ' 元',
|
||||
totalPrice: Number(item.totalPrice).toFixed(2) + ' 元',
|
||||
totalSourceQuantity: formatQuantity(Number(item.totalSourceQuantity), item),
|
||||
itemQuantity: formatQuantity(Number(item.itemQuantity), item),
|
||||
profitAmount: ((item.itemQuantity * item.price) / item.partPercent).toFixed(2),
|
||||
};
|
||||
});
|
||||
result.push({
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
sourceLocationName: printList[0].sourceLocationName,
|
||||
itemType_dictText: printList[0].itemType_dictText,
|
||||
name: userStore.name,
|
||||
occurrenceTime: proxy.formatDateStr(printList[0].occurrenceTime, 'YYYY-MM-DD HH:mm:ss'),
|
||||
busNo: printList[0].busNo,
|
||||
detailsList: printList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
title: '打印标题',
|
||||
}); //开始打印
|
||||
}
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/transfer/excel-out',
|
||||
{
|
||||
busNo: supplyBusNo.value,
|
||||
},
|
||||
`批量调拨单据明细记录_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
});
|
||||
</script>
|
||||
@@ -54,7 +54,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,23 +7,18 @@
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px;"
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型:" prop="typeEnum">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-select v-model="queryParams.typeEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyTypeOptions"
|
||||
:key="supplyStatus.value"
|
||||
@@ -71,15 +66,10 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-form-item label="审批状态:" prop="statusEnum">
|
||||
<el-select v-model="queryParams.statusEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
@@ -101,49 +91,28 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddaddTransferProductDialog"
|
||||
>新增调拨单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProducts"
|
||||
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddaddTransferProducts"
|
||||
>新增批量调拨单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -152,7 +121,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
@@ -165,7 +134,7 @@
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
@@ -252,7 +221,11 @@
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleUpdate(scope.row,'view')"
|
||||
@click="
|
||||
() => {
|
||||
proxy.$refs['detailsDialogRef'].open(scope.row.supplyBusNo);
|
||||
}
|
||||
"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
@@ -260,9 +233,10 @@
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
:disabled="
|
||||
scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'
|
||||
scope.row.statusEnum != '1' &&
|
||||
scope.row.statusEnum != '9' &&
|
||||
scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
@@ -272,7 +246,6 @@
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
@@ -282,7 +255,6 @@
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
@@ -297,6 +269,7 @@
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<TransferDetailsDialog ref="detailsDialogRef" />
|
||||
<!-- <Dialog
|
||||
ref="transferProductRef"
|
||||
:supplyTypeOptions="supplyTypeOptions"
|
||||
@@ -317,9 +290,10 @@ import {
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delTransferProduct,
|
||||
getpharmacyCabinetList
|
||||
} from "../components/transferManagement";
|
||||
getpharmacyCabinetList,
|
||||
} from '../components/transferManagement';
|
||||
import { useStore } from '@/store/store';
|
||||
import TransferDetailsDialog from '../components/transferDetailsDialog.vue';
|
||||
const store = useStore();
|
||||
// import Dialog from "./components/Dialog";
|
||||
|
||||
@@ -327,7 +301,7 @@ const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const getpharmacyCabinetOptions = ref([])
|
||||
const getpharmacyCabinetOptions = ref([]);
|
||||
const purchaseinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
@@ -336,12 +310,12 @@ const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const title = ref('');
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const busNoAdd = ref(''); // 单据号新增
|
||||
const purposeTypeListOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined)
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceLocationIdListOptions = ref(undefined); // 源仓库
|
||||
const purposeLocationIdListOptions = ref(undefined); //目的仓库
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
@@ -354,13 +328,13 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
typeEnum:undefined, // 单据类型
|
||||
sourceLocationId:undefined,//源仓库
|
||||
purposeLocationId:undefined,// 目的仓库
|
||||
searchKey: undefined,
|
||||
typeEnum: undefined, // 单据类型
|
||||
sourceLocationId: undefined, //源仓库
|
||||
purposeLocationId: undefined, // 目的仓库
|
||||
statusEnum: undefined, // 单据状态
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
createTimeSTime: undefined,
|
||||
createTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
@@ -370,14 +344,14 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
/** 调拨管理查询下拉树结构 */
|
||||
function getTransferProductTypeList() {
|
||||
getInit().then((response) => {
|
||||
purposeTypeListOptions.value = response.data.purposeTypeListOptions;
|
||||
purposeTypeListOptions.value = response.data.purposeTypeListOptions;
|
||||
sourceTypeListOptions.value = response.data.sourceTypeListOptions;
|
||||
supplyTypeOptions.value = response.data.supplyTypeOptions ;
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
supplyTypeOptions.value = response.data.supplyTypeOptions;
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
});
|
||||
getpharmacyCabinetList().then((response) => {
|
||||
getpharmacyCabinetOptions.value = response.data
|
||||
})
|
||||
getpharmacyCabinetOptions.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
@@ -394,12 +368,12 @@ function getList() {
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
@@ -407,10 +381,10 @@ function handleQuery() {
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
queryParams.value.createTimeSTime = '';
|
||||
queryParams.value.createTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
@@ -421,8 +395,8 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 打开批量新增 */
|
||||
function openAddaddTransferProducts(){
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer'})
|
||||
function openAddaddTransferProducts() {
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer' });
|
||||
}
|
||||
/** 打开新增 */
|
||||
function openAddaddTransferProductDialog() {
|
||||
@@ -434,32 +408,31 @@ function openAddaddTransferProductDialog() {
|
||||
// const partItem = {partFlg: 'add',rowData: []}
|
||||
// item: JSON.stringify(partItem)
|
||||
// ,query:{item: JSON.stringify(partItem)}
|
||||
sessionStorage.setItem('busNo',"")
|
||||
store.clearCurrentDataDB()
|
||||
router.push({ path: '/medicationmanagement/transferManagement/transferManagent'})
|
||||
sessionStorage.setItem('busNo', '');
|
||||
store.clearCurrentDataDB();
|
||||
router.push({ path: '/medicationmanagement/transferManagement/transferManagent' });
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row,view) {
|
||||
function handleUpdate(row, view) {
|
||||
editRow.value = row;
|
||||
if(row.typeEnum==8){ // 批量调拨
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/transferManagement/batchTransfer',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer',query:{supplyBusNo:editRow.value.supplyBusNo}})
|
||||
}
|
||||
}else{
|
||||
if(view){
|
||||
router.replace({path: '/medicationmanagement/transferManagement/transferManagent',query:{supplyBusNo:row.supplyBusNo,view:view}});
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/transferManagement/transferManagent',query:{supplyBusNo:editRow.value.supplyBusNo}})
|
||||
}
|
||||
if (row.typeEnum == 8) {
|
||||
// 批量调拨
|
||||
router.replace({
|
||||
path: '/medicationmanagement/transferManagement/batchTransfer',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
});
|
||||
} else {
|
||||
router.replace({
|
||||
path: '/medicationmanagement/transferManagement/transferManagent',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
});
|
||||
}
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
proxy.$modal.msgSuccess('提交审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@@ -468,7 +441,7 @@ function handleSubmitApproval(row) {
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
proxy.$modal.msgSuccess('撤销审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@@ -478,16 +451,25 @@ function handleWithdrawApproval(row) {
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认删除以上数据?")
|
||||
.confirm('是否确认删除以上数据?')
|
||||
.then(function () {
|
||||
return delTransferProduct({ ids: delId.join(",") });
|
||||
return delTransferProduct({ ids: delId.join(',') });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'inventory-manage/transfer/export-excel',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`调拨单_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
getTransferProductTypeList();
|
||||
getList();
|
||||
|
||||
Reference in New Issue
Block a user