版本更新
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 获取单据待审批列表
|
||||
*/
|
||||
export function getReceiptList(queryParams) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/receipt-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批通过
|
||||
*/
|
||||
export function purchaseInventoryApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/purchase-inventory-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 领用出库审批通过
|
||||
*/
|
||||
export function requisitionIssueApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/requisition-issue-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
// 领用退库审批通过
|
||||
export function returnIssueApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/return-issue-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
// 报损审批通过
|
||||
export function lossReportApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/loss-report-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品调拨审批通过
|
||||
*/
|
||||
export function productTransferApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/product-transfer-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 盘点审批通过
|
||||
*/
|
||||
export function productStocktakingApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/product-stocktaking-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
// 入库单据详情
|
||||
export function getpurchaseInventoryDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
// 查询已退库单详情
|
||||
export function getpurchaseInventoryDetailReturn(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/return-detail',
|
||||
method: 'get',
|
||||
params: { busNo }
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,360 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="table-header">
|
||||
<el-input
|
||||
class="table-header-search"
|
||||
placeholder="单据号"
|
||||
v-model="queryParams.searchKey"
|
||||
></el-input>
|
||||
<el-select
|
||||
class="table-header-search"
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder="审批状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplyStatusOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
class="table-header-search"
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder="单据类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplyTypeOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="queryParams.applyTime"
|
||||
placeholder="请选择申请日期"
|
||||
type="date"
|
||||
size="default"
|
||||
placement="bottom"
|
||||
@change="handleDateQuery"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button
|
||||
class="table-header-button"
|
||||
icon="Refresh"
|
||||
@click="
|
||||
() => {
|
||||
queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
statusEnum: undefined,
|
||||
searchKey: undefined,
|
||||
typeEnum: undefined,
|
||||
};
|
||||
getList();
|
||||
}
|
||||
"
|
||||
>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button
|
||||
class="table-header-button"
|
||||
type="primary"
|
||||
@click="getList"
|
||||
icon="Search"
|
||||
>
|
||||
搜索
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
max-height="700"
|
||||
:data="receiptList"
|
||||
row-key="supplyBusNo"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
prop="statusEnum_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
prop="typeEnum_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
prop="supplierId_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="经手人"
|
||||
align="center"
|
||||
prop="practitionerId_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="申请人"
|
||||
align="center"
|
||||
prop="applicantId_dictText"
|
||||
/>
|
||||
<el-table-column label="申请时间" align="center" prop="applyTime">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.applyTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审批人"
|
||||
align="center"
|
||||
prop="approverId_dictText"
|
||||
/>
|
||||
<el-table-column label="审批时间" align="center" prop="approvalTime">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.approvalTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="200"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handelApplys(scope.row,'apply')"
|
||||
:disabled="scope.row.statusEnum == 3 || scope.row.statusEnum == 4"
|
||||
>
|
||||
审批
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handelApplys(scope.row,'view')"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handelApply(scope.row)"
|
||||
:disabled="scope.row.statusEnum == 3 || scope.row.statusEnum == 4"
|
||||
>
|
||||
审批通过
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleReject(scope.row)"
|
||||
:disabled="scope.row.statusEnum == 4 || scope.row.statusEnum == 3"
|
||||
>
|
||||
驳回
|
||||
</el-button> -->
|
||||
</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="Billapproval">
|
||||
import {
|
||||
getReceiptList,
|
||||
purchaseInventoryApproved,
|
||||
requisitionIssueApproved,
|
||||
returnIssueApproved,
|
||||
productTransferApproved,
|
||||
productStocktakingApproved,
|
||||
lossReportApproved,
|
||||
reject,
|
||||
init,
|
||||
getpurchaseInventoryDetail,
|
||||
getpurchaseInventoryDetailReturn
|
||||
} from "./components/api";
|
||||
import { useStore } from '@/store/store';
|
||||
import { formatDate } from "@/utils/index";
|
||||
import useTagsViewStore from '@/store/modules/tagsView';
|
||||
const tagsViewStore = useTagsViewStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const emit = defineEmits(["selectAdviceBase"]);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const receiptList = ref([]);
|
||||
const supplyTypeOption = ref([]);
|
||||
const supplyStatusOption = ref([]);
|
||||
const loading = ref(false);
|
||||
|
||||
watch(
|
||||
() => route.query.type,
|
||||
(newVlaue) => {
|
||||
if(newVlaue){
|
||||
getList()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReceiptList(queryParams.value).then((res) => {
|
||||
receiptList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function handelApply(row) {
|
||||
if(row.typeEnum ==2 || row.typeEnum ==8){ //商品调拨 8 批量
|
||||
productTransferApproved(row.supplyBusNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}else if(row.typeEnum ==7 ){ //领用出库审批通过
|
||||
requisitionIssueApproved(row.supplyBusNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}else if(row.typeEnum == 9){ //领用退库审批通过
|
||||
returnIssueApproved(row.supplyBusNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}else if(row.typeEnum == 4||row.typeEnum == 10){ //盘点审批 批量盘点10通过
|
||||
productStocktakingApproved(row.supplyBusNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}else if(row.typeEnum == 6){ // 报损审批通过
|
||||
lossReportApproved(row.supplyBusNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
getList();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
purchaseInventoryApproved(row.supplyBusNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(row,"typeEnum_enumText")
|
||||
|
||||
}
|
||||
|
||||
// 审批,查看
|
||||
function handelApplys(row,view) {
|
||||
// if(view=='apply'){ // 审批
|
||||
// tagsViewStore.delView(router.currentRoute.value)
|
||||
// }
|
||||
if(row.typeEnum == 2){//商品调拨
|
||||
// 跳转到审核页面
|
||||
router.replace({path: '/medicationmanagement/transferManagement/transferManagent',query:{supplyBusNo:row.supplyBusNo,view:view}});
|
||||
// router.push({ path: '/medicationmanagement/transferManagement/transferManagent',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else if(row.typeEnum == 8){ //8 批量
|
||||
router.replace({ path: '/medicationmanagement/transferManagement/batchTransfer',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else if(row.typeEnum == 7 ){ //领用出库审批通过
|
||||
router.replace({ path: '/medicationmanagement/requisitionManagement/requisitionManagement',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else if(row.typeEnum == 9){ //领用退库审批通过
|
||||
router.replace({ path: '/medicationmanagement/requisitionManagement/returningInventory',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else if(row.typeEnum == 4){ //盘点审批
|
||||
router.replace({ path: '/medicationmanagement/chkstock/chkstockPart',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else if(row.typeEnum == 10){ // 批量盘点
|
||||
router.replace({ path: '/medicationmanagement/chkstock/chkstockBatch',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else if(row.typeEnum == 6){ // 报损审批通过
|
||||
router.replace({ path: '/medicationmanagement/lossReportingManagement/lossReportingManagement',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else if(row.typeEnum == 5){ // 采购退货通过5
|
||||
// getpurchaseInventoryDetailReturn(row.supplyBusNo).then((response) => {
|
||||
// let currentData = response.data;
|
||||
// console.log(currentData,"退库详情")
|
||||
// store.setCurrentReturnData({ editRow: row, item: currentData });
|
||||
router.replace({ path: '/medicationmanagement/medicationmanagement/returnedPurchase',query:{originalSupplyBusNo:row.supplyBusNo,view:view}})
|
||||
// });
|
||||
|
||||
}else{ // 采购入库 1
|
||||
getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
|
||||
let currentData = response.data;
|
||||
store.setCurrentData({ editRow: row, item: currentData });
|
||||
router.replace({ path: '/medicationmanagement/medicationmanagement/purchaseDocument',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
});
|
||||
|
||||
}
|
||||
console.log(row,"typeEnum_enumText")
|
||||
|
||||
}
|
||||
|
||||
// 驳回
|
||||
function handleReject(row) {
|
||||
reject(row.supplyBusNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleDateQuery(value) {
|
||||
if (value) {
|
||||
queryParams.value.applyTimeSTime = value + " 00:00:00";
|
||||
queryParams.value.applyTimeETime = value + " 23:59:59";
|
||||
} else {
|
||||
queryParams.value.applyTimeSTime = undefined;
|
||||
queryParams.value.applyTimeETime = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
optionInit();
|
||||
function optionInit() {
|
||||
init().then((res) => {
|
||||
supplyTypeOption.value = res.data.supplyTypeOptions;
|
||||
supplyStatusOption.value = res.data.supplyStatusOptions;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.table-header-search {
|
||||
width: 200px;
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.table-header {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.table-header-button {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,122 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询盘点列表
|
||||
export function getStockinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询盘点列表初始化查询区数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点详情初始化查询区数据
|
||||
export function getDetailInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/detail-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成批量盘点
|
||||
export function getStocktakingReceiptBatch() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-batch',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//保存批量盘点
|
||||
export function addBatch(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-addBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
export function delProductStocktaking(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,130 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询盘点列表
|
||||
export function getStockinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addProductStocktaking(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询盘点列表初始化查询区数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点详情初始化查询区数据
|
||||
export function getDetailInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/detail-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成批量盘点
|
||||
export function getStocktakingReceiptBatch() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-batch',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//保存批量盘点
|
||||
export function addBatch(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-addBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
export function delProductStocktaking(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function stocktakingReceiptAuto() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-auto',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="ybNo"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId1:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
itemType: props.itemType,
|
||||
orgLocationId:props.purposeLocationId,
|
||||
orgLocationId1:props.purposeLocationId1,
|
||||
purchaseFlag:0
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey
|
||||
queryParams.value.itemType = newValue.itemType
|
||||
queryParams.value.orgLocationId = newValue.sourceLocationId
|
||||
queryParams.value.orgLocationId1 = newValue.sourceLocationId1
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
if(route.query.supplyBusNo){ // 编辑
|
||||
queryParams.value.itemType = queryParams.value.itemType;
|
||||
queryParams.value.orgLocationId = queryParams.value.orgLocationId1
|
||||
}
|
||||
delete queryParams.value.orgLocationId1
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,107 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询盘点列表
|
||||
export function getStockinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询盘点列表初始化查询区数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点详情初始化查询区数据
|
||||
export function getDetailInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/detail-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
export function delPurchaseinventory(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,452 @@
|
||||
<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"
|
||||
/>
|
||||
</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-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
|
||||
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="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- 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
|
||||
ref="stockReceiptRef"
|
||||
:cabinetListOptions="cabinetListOptions"
|
||||
:categoryListOptions ="categoryListOptions"
|
||||
:profitReasonOptions = "profitReasonOptions"
|
||||
:busNoAdd="busNoAdd"
|
||||
:item="currentData"
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</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: {},
|
||||
});
|
||||
|
||||
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; // 审批状态
|
||||
});
|
||||
}
|
||||
/** 详情页查询下拉树结构 */
|
||||
|
||||
/** 查询盘点列表 */
|
||||
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} })
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
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();
|
||||
getList();
|
||||
});
|
||||
|
||||
// 添加组件被激活时的处理逻辑
|
||||
onActivated(() => {
|
||||
// 重新加载数据
|
||||
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,143 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询盘点列表
|
||||
export function getStockinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail(params) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt',
|
||||
method: 'get',
|
||||
params: params // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addProductStocktaking(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询盘点列表初始化查询区数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点详情初始化查询区数据
|
||||
export function getDetailInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/detail-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成批量盘点
|
||||
export function getStocktakingReceiptBatch(params) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-batch',
|
||||
method: 'get',
|
||||
params: params // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
//保存批量盘点
|
||||
export function addBatch(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-addBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
export function delProductStocktaking(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(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
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-pharmacy-list',
|
||||
// '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-cabinet-list',
|
||||
// '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 盘点审批通过
|
||||
*/
|
||||
export function productStocktakingApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/product-stocktaking-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="规格"
|
||||
align="center"
|
||||
prop="volume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
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" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="ybNo"
|
||||
/>
|
||||
</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>
|
||||
import { getMedicineList } from "./api";
|
||||
import { ref, watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const total = ref(0)
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
// pageNum: 1,
|
||||
// pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
orgLocationId:props.purposeLocationId,
|
||||
purchaseFlag:0
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
queryParams.value.orgLocationId=newValue.purposeLocationId;
|
||||
queryParams.value.purchaseFlag = 0
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
console.log(queryParams.value,"queryParams.value")
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data.records?res.data.records:res.data
|
||||
total.value = res.data.total?res.data.total:medicineList.value.length
|
||||
console.log(medicineList.value,"medicineList.value ")
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,131 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询管理列表
|
||||
export function getTransferProductList(query) {
|
||||
return request({
|
||||
url:'/inventory-manage/loss/loss-report-form-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
export function getTransferProductDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/loss/loss-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑单据
|
||||
export function addTransferProduct(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/loss/loss-receipt-edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/loss/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getBusNoInit() { //单据号
|
||||
return request({
|
||||
url: '/inventory-manage/loss/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
export function delTransferProduct(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/loss/loss-receipt-del?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/loss/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/loss/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url:'/app-common/inventory-item-info',
|
||||
// url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-pharmacy-list',
|
||||
// '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 药房药库列表
|
||||
export function getPharmacyCabinetList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-cabinet-list',
|
||||
// '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
// 报损审批通过
|
||||
export function lossReportApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/loss-report-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="规格"
|
||||
align="center"
|
||||
prop="volume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
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" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="ybNo"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "../../lossReporting";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
const route = useRoute();
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
lossLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
// pageNum: 1,
|
||||
// pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
orgLocationId:props.lossLocationId,
|
||||
purchaseFlag:0
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
console.log(newValue,"newValue")
|
||||
console.log(newValue,"newValue")
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
queryParams.value.orgLocationId=newValue.lossLocationId;
|
||||
queryParams.value.purchaseFlag = 0
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
console.log(queryParams.value,"queryParams.value")
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
console.log(row,"row--------------------")
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep( .hover_row){
|
||||
width: 100vw!important;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,507 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<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="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="100px">
|
||||
<el-select
|
||||
v-model="queryParams.applicantId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
:disabled="data.isEdit"
|
||||
>
|
||||
<el-option
|
||||
v-for="practitioner in practitionerListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: auto"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="单据类型:" prop="typeEnum" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyTypeOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.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="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
>新增报损单</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProducts"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>新增批量调拨单</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<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="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
key="type_enumText"
|
||||
prop="type_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="type_enumText"
|
||||
prop="type_enumText"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
label="当前机构"
|
||||
align="center"
|
||||
key="sourceLocationName"
|
||||
prop="sourceLocationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="盘点仓库"
|
||||
align="center"
|
||||
key="inventoryLocationName"
|
||||
prop="inventoryLocationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损金额"
|
||||
align="center"
|
||||
key="reportedLossAmount"
|
||||
prop="reportedLossAmount"
|
||||
: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="160"
|
||||
: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="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="purposeLocationNam"
|
||||
prop="purposeLocationNam"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<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="
|
||||
scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
<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"
|
||||
/>
|
||||
<!-- <Dialog
|
||||
ref="transferProductRef"
|
||||
:supplyTypeOptions="supplyTypeOptions"
|
||||
:purposeTypeListOptions="purposeTypeListOptions"
|
||||
:sourceTypeListOptions="sourceTypeListOptions"
|
||||
:busNoAdd="busNoAdd"
|
||||
:item="currentData"
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="lossReportingList">
|
||||
import {
|
||||
getTransferProductList,
|
||||
addTransferProduct,
|
||||
getTransferProductDetail,
|
||||
getInit,
|
||||
getBusNoInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delTransferProduct,
|
||||
} from "../lossReporting";
|
||||
|
||||
// import Dialog from "./components/Dialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const {
|
||||
warehous_type,
|
||||
category_code,
|
||||
service_type_code,
|
||||
specialty_code,
|
||||
purchase_type,
|
||||
} = proxy.useDict(
|
||||
"warehous_type",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"purchase_type"
|
||||
);
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const practitionerListOptions = ref([])
|
||||
const purchaseinventoryList = 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 title = ref("");
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const purposeTypeListOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined)
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceLocationIdListOptions = ref(undefined); // 源仓库
|
||||
const purposeLocationIdListOptions = ref(undefined); //目的仓库
|
||||
const supplyStatusOptions = ref([]);
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// SupplyBusNo: undefined, // 单据号
|
||||
typeEnum:undefined, // 单据类型
|
||||
applicantId: undefined, //制单人
|
||||
sourceLocationId:undefined,
|
||||
purposeLocationId:undefined,
|
||||
// supplierId: undefined,
|
||||
statusEnum: undefined, // 单据状态
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询下拉树结构 */
|
||||
function getTransferProductTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log(response,'response',response.data)
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions
|
||||
practitionerListOptions.value = response.data.applicantListOptions
|
||||
});
|
||||
}
|
||||
function getBusNoInitList() {
|
||||
getBusNoInit().then((response) => {
|
||||
console.log(response,'response',response.data)
|
||||
busNoAdd.value = response.data.SupplyBusNo; // 单据号新增
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// // queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
// proxy.addoccurrenceTime(queryParams.value, occurrenceTime.value)
|
||||
getTransferProductList(queryParams.value).then((res) => {
|
||||
console.log(res,"res----------------")
|
||||
loading.value = false;
|
||||
purchaseinventoryList.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 openAddaddTransferProducts(){
|
||||
router.push({ path: '/medicationmanagement/lossReportingManagement/lossReporting'})
|
||||
}
|
||||
/** 打开新增 */
|
||||
function openAddaddTransferProductDialog() {
|
||||
// getTransferProductTypeList();
|
||||
// getBusNoInitList()
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["transferProductRef"].show();
|
||||
// });
|
||||
const partItem = {partFlg: 'add',rowData: []}
|
||||
// item: JSON.stringify(partItem)
|
||||
// ,query:{item: JSON.stringify(partItem)}
|
||||
router.push({ path: '/medicationmanagement/lossReportingManagement/lossReportingManagement'})
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row,view) {
|
||||
editRow.value = row;
|
||||
if(view){ // 详情
|
||||
router.replace({ path: '/medicationmanagement/lossReportingManagement/lossReportingManagement',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/lossReportingManagement/lossReportingManagement',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();
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认删除以上数据?")
|
||||
.then(function () {
|
||||
return delTransferProduct({ ids: delId.join(",") });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
getTransferProductTypeList();
|
||||
// getBusNoInitList()
|
||||
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,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getList(query) {
|
||||
return request({
|
||||
url: '/report-manage/monthly-settlement/month',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/report-manage/monthly-settlement/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 顶部查询条件 -->
|
||||
<div class="table-header">
|
||||
<el-select class="table-header-search" v-model="searchParams.locationId" placeholder="请选择库房">
|
||||
<el-option
|
||||
v-for="item in locationOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="searchParams.startTime"
|
||||
type="date"
|
||||
placeholder="选择开始时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="margin-right: 15px"
|
||||
/>
|
||||
|
||||
<el-date-picker
|
||||
class="table-header-search"
|
||||
v-model="searchParams.endTime"
|
||||
type="date"
|
||||
placeholder="选择结束时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
<el-button class="table-header-button" type="primary" @click="handleSearch">查询</el-button>
|
||||
<el-button class="table-header-button" @click="resetForm">重置</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<div class="table-container">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="reconciliationData"
|
||||
style="width: 100%"
|
||||
border
|
||||
>
|
||||
<el-table-column prop="locationId_dictText" label="库房" width="180" />
|
||||
<el-table-column prop="initialAmount" label="期初金额" width="120" align="right" />
|
||||
<el-table-column prop="finalAmount" label="期末金额" width="120" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 1)">
|
||||
{{ scope.row.finalAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="expectFinalAmount" label="预期期末金额" width="140" align="right" />
|
||||
<el-table-column prop="offsetAmount" label="偏移量" width="100" align="right" />
|
||||
<el-table-column prop="purchaseInAmount" label="采购入库金额" width="140" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 2)">
|
||||
{{ scope.row.purchaseInAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="purchaseInNumber" label="采购入库单据数" width="140" align="right" />
|
||||
<el-table-column prop="purchaseReturnAmount" label="采购出库金额" width="140" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 3)">
|
||||
{{ scope.row.purchaseReturnAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="purchaseReturnNumber" label="采购出库单据数" width="140" align="right" />
|
||||
<el-table-column prop="applyOutAmount" label="领用出库金额" width="140" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 4)">
|
||||
{{ scope.row.applyOutAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="applyOutNumber" label="领用出库单据数" width="140" align="right" />
|
||||
<el-table-column prop="applyReturnAmount" label="领用退货金额" width="140" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 5)">
|
||||
{{ scope.row.applyReturnAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="applyReturnNumber" label="领用退货单据数" width="140" align="right" />
|
||||
<el-table-column prop="transferInAmount" label="调拨入库金额" width="140" align="right" />
|
||||
<el-table-column prop="transferInNumber" label="调拨入库单据数" width="140" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 6)">
|
||||
{{ scope.row.transferInNumber }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="transferOutAmount" label="调拨出库金额" width="140" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 6)">
|
||||
{{ scope.row.transferOutAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="transferOutNumber" label="调拨出库单据数" width="140" align="right" />
|
||||
<el-table-column prop="checkProfitLossAmount" label="盘点盈亏金额" width="140" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 7)">
|
||||
{{ scope.row.checkProfitLossAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="checkProfitLossNumber" label="盘点盈亏单据数" width="140" align="right" />
|
||||
<el-table-column prop="lossAmount" label="报损金额" width="120" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 8)">
|
||||
{{ scope.row.lossAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lossNumber" label="报损单据数" width="120" align="right" />
|
||||
<el-table-column prop="drugIssueAmount" label="药品发放金额" width="140" align="right">
|
||||
<template #default="scope">
|
||||
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 9)">
|
||||
{{ scope.row.drugIssueAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
// 导入路由钩子
|
||||
import { useRouter } from 'vue-router';
|
||||
// 假设API模块存在,实际项目中需要根据实际情况导入
|
||||
import { getList, getPharmacyList } from './components/api.js';
|
||||
|
||||
// 创建路由实例
|
||||
const router = useRouter();
|
||||
|
||||
// 搜索参数
|
||||
const searchParams = reactive({
|
||||
locationId: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
});
|
||||
|
||||
// 搜索表单引用
|
||||
const searchFormRef = ref(null);
|
||||
|
||||
// 库房选项
|
||||
const locationOptions = ref([]);
|
||||
|
||||
// 对账数据
|
||||
const reconciliationData = ref([]);
|
||||
|
||||
// 加载状态
|
||||
const loading = ref(false);
|
||||
|
||||
// 格式化金额
|
||||
const formatMoney = (value) => {
|
||||
if (value === null || value === undefined) return '0.00';
|
||||
return Number(value).toFixed(2);
|
||||
};
|
||||
|
||||
// 格式化日期为YYYY-MM-DD
|
||||
const formatDate = (date) => {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
|
||||
// 设置默认日期范围(今日之前一个月)
|
||||
const setDefaultDateRange = () => {
|
||||
const today = new Date();
|
||||
// 结束时间为昨天
|
||||
const endDate = new Date(today);
|
||||
endDate.setDate(today.getDate() - 1);
|
||||
|
||||
// 开始时间为一个月前的今天
|
||||
const startDate = new Date(today);
|
||||
startDate.setMonth(today.getMonth() - 1);
|
||||
|
||||
// 处理月份溢出(如1月减1个月变为12月)
|
||||
if (startDate.getMonth() === 11 && today.getMonth() === 0) {
|
||||
startDate.setFullYear(today.getFullYear() - 1);
|
||||
}
|
||||
|
||||
// 确保日期有效性(处理不同月份天数差异)
|
||||
const lastDayOfMonth = new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0).getDate();
|
||||
if (startDate.getDate() > lastDayOfMonth) {
|
||||
startDate.setDate(lastDayOfMonth);
|
||||
}
|
||||
|
||||
searchParams.startTime = formatDate(startDate);
|
||||
searchParams.endTime = formatDate(endDate);
|
||||
};
|
||||
|
||||
// 查询数据
|
||||
const handleSearch = async () => {
|
||||
try {
|
||||
loading.value = true;
|
||||
// 构建查询参数
|
||||
const params = {
|
||||
...searchParams
|
||||
};
|
||||
|
||||
// 调用API获取数据,实际项目中替换为真实API调用
|
||||
const response = await getList(params);
|
||||
loading.value = false;
|
||||
console.log('查询结果:', response)
|
||||
reconciliationData.value.push(response.data.data)
|
||||
|
||||
} catch (error) {
|
||||
ElMessage.error('获取对账数据失败: ' + (error.message || '未知错误'));
|
||||
console.error('Failed to get reconciliation data:', error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 重置表单
|
||||
const resetForm = () => {
|
||||
searchFormRef.value?.resetFields();
|
||||
// 重置后重新设置默认日期范围
|
||||
setDefaultDateRange();
|
||||
};
|
||||
|
||||
// 获取库房列表
|
||||
const getLocationList = async () => {
|
||||
try {
|
||||
// 调用API获取库房数据,实际项目中替换为真实API调用
|
||||
const response = await getPharmacyList();
|
||||
locationOptions.value = response.data.locationListOptions || [];
|
||||
|
||||
// 默认选择第一个库房
|
||||
if (locationOptions.value.length > 0) {
|
||||
searchParams.locationId = locationOptions.value[0].value;
|
||||
}
|
||||
handleSearch()
|
||||
} catch (error) {
|
||||
ElMessage.error('获取库房数据失败: ' + (error.message || '未知错误'));
|
||||
console.error('Failed to get location list:', error);
|
||||
}
|
||||
};
|
||||
|
||||
// 跳转到对应页面的函数
|
||||
const skipToPage = (records, index) => {
|
||||
// 获取当前选中的库房ID和日期范围
|
||||
const { startTime, endTime } = searchParams;
|
||||
console.log(records.row)
|
||||
const { locationId } = records.row;
|
||||
// 根据index跳转到不同页面
|
||||
let path = '';
|
||||
switch (index) {
|
||||
case 1:
|
||||
path = '/medicationmanagement/chkstock/chkstockPart'; // 盘点
|
||||
break;
|
||||
case 2:
|
||||
path = '/medicationmanagement/medicationmanagement/purchaseDocument'; // 采购入库页
|
||||
break;
|
||||
case 3:
|
||||
path = '/medicationmanagement/medicationmanagement/returnedPurchase'; // 采购退货页
|
||||
break;
|
||||
case 4:
|
||||
path = '/medicationmanagement/requisitionManagement/requisitionManagement'; // 领用出库页
|
||||
break;
|
||||
case 5:
|
||||
path = '/medicationmanagement/requisitionManagement/returningInventory'; // 领用退库页
|
||||
break;
|
||||
case 6:
|
||||
path = '/medicationmanagement/transferManagement/transferManagent'; // 调拨页
|
||||
break;
|
||||
case 7:
|
||||
path = '/medicationmanagement/chkstock/chkstockPart'; // 盘点页
|
||||
break;
|
||||
case 8:
|
||||
path = '/medicationmanagement/lossReportingManagement/lossReportingManagement'; // 报损页
|
||||
break;
|
||||
case 9:
|
||||
path = '/giveGrug/pharmacymanagement'; // 药品发放
|
||||
break;
|
||||
default:
|
||||
ElMessage.warning('无效的页面索引');
|
||||
return;
|
||||
}
|
||||
|
||||
// 跳转到对应页面并传递参数
|
||||
router.push({
|
||||
path: path,
|
||||
query: {
|
||||
locationId: locationId,
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
fromReconciliation: 'true' // 添加标志参数
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 组件初始化
|
||||
onMounted(() => {
|
||||
// 设置默认日期范围
|
||||
setDefaultDateRange();
|
||||
getLocationList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.table-header-search {
|
||||
width: 200px;
|
||||
float: left;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.table-header {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.table-header-button {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
background-color: #fff;
|
||||
padding: 16px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.text-red {
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.text-green {
|
||||
color: #67c23a;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,124 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询采购入库列表
|
||||
export function getPurchaseinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 入库单据详情
|
||||
export function getpurchaseInventoryDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询采购入库单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询busNo
|
||||
export function getInitBusNo() {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
export function delPurchaseinventory(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(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
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-pharmacy-list',
|
||||
// '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-cabinet-list',
|
||||
// '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 审批通过
|
||||
*/
|
||||
export function purchaseInventoryApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/purchase-inventory-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目编码"
|
||||
align="center"
|
||||
prop="itemBusNo"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.purchaseFlag = 1
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./purchaseinventory";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,140 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询采购入库列表
|
||||
export function getPurchaseinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 入库单据详情
|
||||
export function getpurchaseInventoryDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询采购入库单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询busNo
|
||||
export function getInitBusNo() {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
export function delPurchaseinventory(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询已退库单列表详情
|
||||
export function generatedReturnDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/generated-return-detail',
|
||||
method: 'get',
|
||||
params: { busNo }
|
||||
})
|
||||
}
|
||||
// 查询已退库单详情
|
||||
export function getpurchaseInventoryDetailReturn(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/return-detail',
|
||||
method: 'get',
|
||||
params: { busNo }
|
||||
})
|
||||
}
|
||||
|
||||
// 退库提交审批
|
||||
export function submitApprovalReturn(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/return-submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 退库撤回审批
|
||||
export function withdrawApprovalReturn(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/return-withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,700 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum">
|
||||
<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="typeEnum">
|
||||
<el-select v-model="queryParams.typeEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="item in supplyTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select v-model="queryParams.supplierId" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplier in supplierListOptions"
|
||||
:key="supplier.value"
|
||||
:label="supplier.label"
|
||||
:value="supplier.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="经手人:" prop="practitionerId">
|
||||
<el-select
|
||||
v-model="queryParams.practitionerId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="practitioner in practitionerListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="查询时间:">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddInventoryReceiptDialog"
|
||||
|
||||
>添加记录</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['monitor:job:remove']" -->
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<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="purchaseinventoryList"
|
||||
@row-click="handleRowClick"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退库状态"
|
||||
align="center"
|
||||
key="returnStatus_text"
|
||||
prop="returnStatus_text"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierId_dictText"
|
||||
prop="supplierId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="经手人"
|
||||
align="center"
|
||||
key="practitionerId_dictText"
|
||||
prop="practitionerId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click.stop="handleUpdate(scope.row,'view')"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click.stop="handleUpdate(scope.row)"
|
||||
|
||||
:disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9'"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
v-if="scope.row.statusEnum_enumText=='同意'"
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click.stop="handleUpdateTK(scope.row)"
|
||||
|
||||
>退库</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click.stop="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.stop="handleWithdrawApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
</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"
|
||||
/>
|
||||
<!-- 退货列表 -->
|
||||
<el-table
|
||||
v-if="purchaseinventoryReturnList&&purchaseinventoryReturnList.length>0"
|
||||
style="height:190px;margin-top:32px;"
|
||||
v-loading="loadingReturn"
|
||||
:data="purchaseinventoryReturnList"
|
||||
@selection-change="handleSelectionChangeReturn"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierId_dictText"
|
||||
prop="supplierId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="经手人"
|
||||
align="center"
|
||||
key="practitionerId_dictText"
|
||||
prop="practitionerId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click.stop="handleUpdateReturn(scope.row,'view')"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click.stop="handleUpdateReturn(scope.row)"
|
||||
|
||||
:disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click.stop="handleSubmitApprovalReturn(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.stop="handleWithdrawApprovalReturn(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<inventory-receipt-dialog
|
||||
ref="inventoryReceiptRef"
|
||||
:practitionerListOptions="practitionerListOptions"
|
||||
:itemTypeOptions="itemTypeOptions"
|
||||
:supplierListOptions="supplierListOptions"
|
||||
:busNoAdd="busNoAdd"
|
||||
:item="currentData"
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Purchaseinventory">
|
||||
import {
|
||||
getPurchaseinventoryList,
|
||||
addPurchaseinventory,
|
||||
getpurchaseInventoryDetail,
|
||||
getInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delPurchaseinventory,
|
||||
generatedReturnDetail,
|
||||
getpurchaseInventoryDetailReturn,
|
||||
submitApprovalReturn,
|
||||
withdrawApprovalReturn
|
||||
} from './components/purchaseinventory';
|
||||
import { useStore } from '@/store/store';
|
||||
import inventoryReceiptDialog from './components/inventoryReceiptDialog';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const router = useRouter();
|
||||
const store = useStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const purchaseinventoryReturnList = ref([])
|
||||
const purchaseinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const loadingReturn = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const idsReturn = ref([]);
|
||||
const singleReturn = ref(true);
|
||||
const multipleReturn = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const dateRange = ref([]);
|
||||
const busNoAdd = ref(''); // 单据号新增
|
||||
const itemTypeOptions = ref(undefined); // 入库项目类型
|
||||
const supplyTypeOptions = ref(undefined); // 入库单据类型
|
||||
const practitionerListOptions = ref(undefined); // 查询经手人列表
|
||||
const supplierListOptions = ref(undefined); // 供应商列表
|
||||
const supplyStatusOptions = ref(undefined); // 审批状态
|
||||
const editRow = ref({});
|
||||
const editRowTK = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
const selectedRows = ref([])
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
busNo: undefined, // 编码
|
||||
practitionerId: undefined,
|
||||
supplierId: undefined,
|
||||
statusEnum: undefined, // 审批状态
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 采购入库查询下拉树结构 */
|
||||
function getPurchaseinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
busNoAdd.value = response.data.busNo; // 单据号新增
|
||||
itemTypeOptions.value = response.data.itemTypeOptions; // 活动标记
|
||||
supplyTypeOptions.value = response.data.supplyTypeOptions; // 活动标记
|
||||
practitionerListOptions.value = response.data.practitionerListOptions; // 预约必填标记
|
||||
supplierListOptions.value = response.data.supplierListOptions; // 供应商列表
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 供应状态
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询采购入库项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// // queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
// proxy.addDateRange(queryParams.value, dateRange.value)
|
||||
getPurchaseinventoryList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
purchaseinventoryList.value.map(k=>{
|
||||
k.returnStatus_text = k.returnStatus==1?'已退库':''
|
||||
})
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.createTimeETime =
|
||||
dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
dateRange.value = ""
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddInventoryReceiptDialog() {
|
||||
store.clearCurrentData();
|
||||
router.push({
|
||||
path: 'purchaseDocument',
|
||||
});
|
||||
// getPurchaseinventoryTypeList();
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["inventoryReceiptRef"].show();
|
||||
// });
|
||||
}
|
||||
function handleUpdateTK(row) {
|
||||
// store.clearCurrentReturnData();
|
||||
editRow.value = row;
|
||||
router.push({
|
||||
path: 'returnedPurchase',
|
||||
query:{originalSupplyBusNo:editRow.value.supplyBusNo}
|
||||
});
|
||||
// getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
|
||||
// currentData.value = response.data;
|
||||
// // nextTick(() => {
|
||||
// // proxy.$refs['inventoryReceiptRef'].edit();
|
||||
// // });
|
||||
// store.setCurrentData({ editRow: row, item: currentData.value });
|
||||
// router.push({
|
||||
// path: 'purchaseDocument',
|
||||
// });
|
||||
// getList();
|
||||
// });
|
||||
}
|
||||
/** 退库修改按钮操作 */
|
||||
function handleUpdateReturn(row,view) {
|
||||
if(view){
|
||||
router.replace({ path: 'returnedPurchase',query:{originalSupplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else{
|
||||
router.push({
|
||||
path: 'returnedPurchase',query:{originalSupplyBusNo:row.originalSupplyBusNo,supplyBusNo:row.supplyBusNo}
|
||||
});
|
||||
}
|
||||
handleRowClick(editRowTK.value)
|
||||
}
|
||||
/** 退库提交审核按钮 */
|
||||
function handleSubmitApprovalReturn(row) {
|
||||
submitApprovalReturn(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('提交审批成功');
|
||||
// open.value = false;
|
||||
handleRowClick(editRowTK.value)
|
||||
// loadingReturn.value = false
|
||||
});
|
||||
}
|
||||
|
||||
/** 退库撤回审批按钮 */
|
||||
function handleWithdrawApprovalReturn(row) {
|
||||
withdrawApprovalReturn(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('撤销审批成功');
|
||||
// open.value = false;
|
||||
handleRowClick(editRowTK.value);
|
||||
// loadingReturn.value = false
|
||||
});
|
||||
}
|
||||
/** 退库修改按钮操作 */
|
||||
function handleUpdate(row,view) {
|
||||
if(row.typeEnum==5){ //采购退货
|
||||
// editRow.value = row;
|
||||
// getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
|
||||
// currentData.value = response.data;
|
||||
// store.setCurrentData({ editRow: row, item: currentData.value });
|
||||
router.push({
|
||||
path:'returnedPurchase',query:{supplyBusNo:row.supplyBusNo}
|
||||
});
|
||||
// getList();
|
||||
// })
|
||||
}else{ // 采购入库
|
||||
editRow.value = row;
|
||||
getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
|
||||
currentData.value = response.data;
|
||||
// nextTick(() => {
|
||||
// proxy.$refs['inventoryReceiptRef'].edit();
|
||||
// });
|
||||
store.setCurrentData({ editRow: row, item: currentData.value });
|
||||
if(view){ // 详情
|
||||
router.push({
|
||||
path: 'purchaseDocument',query:{supplyBusNo:row.supplyBusNo,view:view}
|
||||
});
|
||||
}else{
|
||||
router.push({
|
||||
path: 'purchaseDocument',
|
||||
});
|
||||
}
|
||||
|
||||
getList();
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('提交审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('撤销审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
selectedRows.value = selection;
|
||||
console.log(selectedRows.value,"!21212")
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 选择退货条数 */
|
||||
function handleSelectionChangeReturn(selection) {
|
||||
idsReturn.value = selection.map((item) => item.id);
|
||||
singleReturn.value = selection.length != 1;
|
||||
multipleReturn.value = !selection.length;
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
let length = selectedRows.value.length;
|
||||
let ids = []
|
||||
if(selectedRows.value[0].id){
|
||||
ids = selectedRows.value.map((item) => {
|
||||
return item.id
|
||||
});
|
||||
}
|
||||
console.log(ids, "ids");
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据?')
|
||||
.then(function () {
|
||||
return delPurchaseinventory(ids);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
//点击列表当前行
|
||||
function handleRowClick(row) {
|
||||
editRowTK.value = row
|
||||
console.log(row,"row")
|
||||
if(row.returnStatus==1){
|
||||
loadingReturn.value = true
|
||||
generatedReturnDetail(row.supplyBusNo).then((response) => {
|
||||
purchaseinventoryReturnList.value = response.data
|
||||
purchaseinventoryReturnList.value.map(k=>{
|
||||
// k.returnStatus_text = k.returnStatus==1?'已退库':''
|
||||
k.originalSupplyBusNo = k.originalSupplyBusNo?k.originalSupplyBusNo:row.supplyBusNo
|
||||
})
|
||||
|
||||
})
|
||||
loadingReturn.value = false
|
||||
}
|
||||
}
|
||||
|
||||
getPurchaseinventoryTypeList();
|
||||
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,212 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询管理列表
|
||||
export function getTransferProductList(query) {
|
||||
return request({
|
||||
url:'/issue-manage/requisition/requisition-issue-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
export function getTransferProductDetail(busNo) {
|
||||
return request({
|
||||
url: '/issue-manage/requisition/requisition-issue-detail',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑单据
|
||||
export function addTransferProduct(data) {
|
||||
return request({
|
||||
url: '/issue-manage/requisition/requisition-issue-edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/issue-manage/requisition/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getBusNoInit() { //单据号
|
||||
return request({
|
||||
url: '/issue-manage/requisition/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
export function delTransferProduct(param) {
|
||||
return request({
|
||||
url: '/issue-manage/requisition/requisition-issue-del?supplyRequestIds=' + param,
|
||||
// '/inventory-manage/purchase/inventory-receipt?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/issue-manage/requisition/submit-approval',
|
||||
// '/inventory-manage/purchase/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/issue-manage/requisition/withdraw-approval',
|
||||
// '/inventory-manage/purchase/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url:'/app-common/inventory-item-info',
|
||||
// url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 药房药库列表
|
||||
export function getPharmacyCabinetList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询管理列表
|
||||
export function getTHTransferProductlist(query) {
|
||||
return request({
|
||||
url:'/issue-manage/return/return-issue-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
export function getTHTransferProductDetail(busNo) {
|
||||
return request({
|
||||
url: '/issue-manage/return/return-issue-detail',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑单据
|
||||
export function addTHTransferProduct(data) {
|
||||
return request({
|
||||
url: '/issue-manage/return/return-issue-edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询单据初始化数据
|
||||
export function getTHInit() {
|
||||
return request({
|
||||
url: '/issue-manage/return/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getTHBusNoInit() { //单据号
|
||||
return request({
|
||||
url: '/issue-manage/return/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
export function delTHTransferProduct(param) {
|
||||
return request({
|
||||
url: '/issue-manage/return/return-issue-del?supplyRequestId=' + param,
|
||||
// '/inventory-manage/purchase/inventory-receipt?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitTHApproval(busNo) {
|
||||
return request({
|
||||
url: '/issue-manage/return/submit-approval',
|
||||
// '/inventory-manage/purchase/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawTHApproval(busNo) {
|
||||
return request({
|
||||
url: '/issue-manage/return/withdraw-approval',
|
||||
// '/inventory-manage/purchase/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 领用出库审批通过
|
||||
*/
|
||||
export function requisitionIssueApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/requisition-issue-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
// 领用退库审批通过
|
||||
export function returnIssueApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/return-issue-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="medicineRef" height="400" :data="medicineList" @cell-click="clickRow">
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" :show-overflow-tooltip="true" />
|
||||
<el-table-column 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" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="编码" align="center" prop="ybNo" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from './api';
|
||||
import { watch } from 'vue';
|
||||
import { throttle } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
|
||||
});
|
||||
const emit = defineEmits(['selectRow']);
|
||||
const queryParams = ref({
|
||||
// pageNum: 1,
|
||||
// pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
purchaseFlag: 0,
|
||||
// sourceLocationId: props.sourceLocationId,
|
||||
// purposeLocationId:props.purposeLocationId
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
queryParams.value.purchaseFlag = 0;
|
||||
// queryParams.value.sourceLocationId = newValue.sourceLocationId;
|
||||
// queryParams.value.purposeLocationId = newValue.purposeLocationId;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit('selectRow', row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.hover_row) {
|
||||
width: 100vw !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,532 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<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="searchKey" label-width="40">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="部门:" prop="sourceLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="sourceLocationId in issueDepartmentDto"
|
||||
:key="sourceLocationId.locationId"
|
||||
:label="sourceLocationId.name"
|
||||
:value="sourceLocationId.locationId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门经手人:" prop="practitionerId" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.practitionerId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="purposeLocation in practitionerListOptions"
|
||||
:key="purposeLocation.value"
|
||||
:label="purposeLocation.label"
|
||||
:value="purposeLocation.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: auto"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
:disabled="data.isEdit"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplier in supplierListOptions"
|
||||
:key="supplier.value"
|
||||
:label="supplier.label"
|
||||
:value="supplier.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品类型:" prop="medicationType">
|
||||
<el-select
|
||||
v-model="queryParams.medicationType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
:disabled="data.isEdit"
|
||||
@change="
|
||||
(value) => {
|
||||
itemType = value;
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="itemType in purchase_type"
|
||||
:key="itemType.value"
|
||||
:label="itemType.label"
|
||||
:value="itemType.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
|
||||
>新增领用退库单</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
: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="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="领用部门"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="部门经手人"
|
||||
align="center"
|
||||
key="practitionerId_dictText"
|
||||
prop="practitionerId_dictText"
|
||||
: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="createTime"
|
||||
prop="createTime"
|
||||
width="160"
|
||||
: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="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<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="
|
||||
scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<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
|
||||
>
|
||||
</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"
|
||||
/>
|
||||
<!-- <Dialog
|
||||
ref="transferProductRef"
|
||||
:supplyTypeOptions="supplyTypeOptions"
|
||||
:purposeTypeListOptions="purposeTypeListOptions"
|
||||
:sourceTypeListOptions="sourceTypeListOptions"
|
||||
:busNoAdd="busNoAdd"
|
||||
:item="currentData"
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="requisitionInventoryManagement">
|
||||
import {
|
||||
getTHTransferProductlist,
|
||||
getTHInit,
|
||||
getTHBusNoInit,
|
||||
submitTHApproval,
|
||||
withdrawTHApproval,
|
||||
delTHTransferProduct,
|
||||
|
||||
} from '../components/api';
|
||||
|
||||
import { formatDate } from "@/utils/index";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const {
|
||||
warehous_type,
|
||||
category_code,
|
||||
service_type_code,
|
||||
specialty_code,
|
||||
purchase_type,
|
||||
} = proxy.useDict(
|
||||
"warehous_type",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"purchase_type"
|
||||
);
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const issueDepartmentDto = ref(undefined);
|
||||
const supplierListOptions = ref(undefined);
|
||||
const practitionerListOptions = ref(undefined)
|
||||
const purchaseinventoryList = 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 title = ref("");
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const purposeTypeListOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined)
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
// const purposeLocationIdListOptions = ref(undefined); // 源仓库
|
||||
const purposeLocationIdListOptions = ref(undefined); //目的仓库
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// SupplyBusNo: undefined, // 单据号
|
||||
typeEnum:undefined, // 单据类型
|
||||
// practitionerId: undefined,
|
||||
sourceLocationId:undefined,//源仓库
|
||||
// purposeLocationId:undefined,// 目的仓库
|
||||
supplierId: undefined,
|
||||
medicationType:undefined,
|
||||
statusEnum: undefined, // 单据状态
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 调拨管理查询下拉树结构 */
|
||||
function getTransferProductTypeList() {
|
||||
getTHInit().then((response) => {
|
||||
console.log(response,'response',response.data)
|
||||
// busNoAdd.value = response.data.SupplyBusNo; // 单据号新增
|
||||
issueDepartmentDto.value = response.data.issueDepartmentDto;
|
||||
practitionerListOptions.value = response.data.practitionerListOptions;
|
||||
supplierListOptions.value = response.data.supplierListOptions
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
});
|
||||
}
|
||||
function getBusNoInitList() {
|
||||
getTHBusNoInit().then((response) => {
|
||||
console.log(response,'response',response.data)
|
||||
busNoAdd.value = response.data.SupplyBusNo; // 单据号新增
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// // queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
// proxy.addoccurrenceTime(queryParams.value, occurrenceTime.value)
|
||||
getTHTransferProductlist(queryParams.value).then((res) => {
|
||||
console.log(res,"res----------------")
|
||||
loading.value = false;
|
||||
purchaseinventoryList.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 openAddaddTransferProductDialog() {
|
||||
// getTransferProductTypeList();
|
||||
// getBusNoInitList()
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["transferProductRef"].show();
|
||||
// });
|
||||
const partItem = {partFlg: 'add',rowData: []}
|
||||
// item: JSON.stringify(partItem)
|
||||
// ,query:{item: JSON.stringify(partItem)}
|
||||
router.push({ path: '/medicationmanagement/requisitionManagement/returningInventory'})
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row,view) {
|
||||
editRow.value = row;
|
||||
console.log('修改按钮操作rowdata',row)
|
||||
// const partItem = {partFlg: 'edit',rowData: editRow.value.supplyBusNo }
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/requisitionManagement/returningInventory',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/requisitionManagement/returningInventory',query:{supplyBusNo:editRow.value.supplyBusNo}})
|
||||
}
|
||||
// getTransferProductDetail(row.supplyBusNo).then((response) => {
|
||||
// currentData.value = response.data;
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["transferProductRef"].edit();
|
||||
// });
|
||||
// getList();
|
||||
// });
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitTHApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawTHApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认删除以上数据?")
|
||||
.then(function () {
|
||||
return delTHTransferProduct({ ids: delId.join(",") });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
getTransferProductTypeList();
|
||||
// getBusNoInitList()
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,507 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<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="searchKey" label-width="40">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="领用部门:" prop="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="purposeLocation in issueDepartmentDto"
|
||||
:key="purposeLocation.locationId"
|
||||
:label="purposeLocation.name"
|
||||
:value="purposeLocation.locationId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门经手人:" prop="practitionerId" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.practitionerId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="purposeLocationId in practitionerListOptions"
|
||||
:key="purposeLocationId.value"
|
||||
:label="purposeLocationId.label"
|
||||
:value="purposeLocationId.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: auto"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="单据类型:" prop="typeEnum" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyTypeOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
|
||||
>新增领用出库单</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
: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="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="领用部门"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="部门经手人"
|
||||
align="center"
|
||||
key="practitionerId_dictText"
|
||||
prop="practitionerId_dictText"
|
||||
: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="createTime"
|
||||
prop="createTime"
|
||||
width="160"
|
||||
: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="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<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="
|
||||
scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<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
|
||||
>
|
||||
</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"
|
||||
/>
|
||||
<!-- <Dialog
|
||||
ref="transferProductRef"
|
||||
:supplyTypeOptions="supplyTypeOptions"
|
||||
:purposeTypeListOptions="purposeTypeListOptions"
|
||||
:sourceTypeListOptions="sourceTypeListOptions"
|
||||
:busNoAdd="busNoAdd"
|
||||
:item="currentData"
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="requisitionManagementList">
|
||||
import {
|
||||
getTransferProductList,
|
||||
addTransferProduct,
|
||||
getTransferProductDetail,
|
||||
getInit,
|
||||
getBusNoInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delTransferProduct,
|
||||
} from '../components/api';
|
||||
// import Dialog from "./components/Dialog";
|
||||
|
||||
import { formatDate } from "@/utils/index";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const {
|
||||
warehous_type,
|
||||
category_code,
|
||||
service_type_code,
|
||||
specialty_code,
|
||||
purchase_type,
|
||||
} = proxy.useDict(
|
||||
"warehous_type",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"purchase_type"
|
||||
);
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const issueDepartmentDto = ref(undefined);
|
||||
const supplierListOptions = ref(undefined);
|
||||
const practitionerListOptions = ref(undefined)
|
||||
const purchaseinventoryList = 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 title = ref("");
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const purposeTypeListOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined)
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceLocationIdListOptions = ref(undefined); // 源仓库
|
||||
const purposeLocationIdListOptions = ref(undefined); //目的仓库
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// SupplyBusNo: undefined, // 单据号
|
||||
typeEnum:undefined, // 单据类型
|
||||
// practitionerId: undefined,
|
||||
sourceLocationId:undefined,//源仓库
|
||||
purposeLocationId:undefined,// 目的仓库
|
||||
// supplierId: undefined,
|
||||
statusEnum: undefined, // 单据状态
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 调拨管理查询下拉树结构 */
|
||||
function getTransferProductTypeList() {
|
||||
getInit().then((response) => {
|
||||
// busNoAdd.value = response.data.SupplyBusNo; // 单据号新增
|
||||
issueDepartmentDto.value = response.data.issueDepartmentDto;
|
||||
practitionerListOptions.value = response.data.practitionerListOptions;
|
||||
supplierListOptions.value = response.data.supplierListOptions
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
});
|
||||
}
|
||||
function getBusNoInitList() {
|
||||
getBusNoInit().then((response) => {
|
||||
busNoAdd.value = response.data.SupplyBusNo; // 单据号新增
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** 查询管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// // queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
// proxy.addoccurrenceTime(queryParams.value, occurrenceTime.value)
|
||||
getTransferProductList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.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 openAddaddTransferProductDialog() {
|
||||
// getTransferProductTypeList();
|
||||
// getBusNoInitList()
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["transferProductRef"].show();
|
||||
// });
|
||||
const partItem = {partFlg: 'add',rowData: []}
|
||||
// item: JSON.stringify(partItem)
|
||||
// ,query:{item: JSON.stringify(partItem)}
|
||||
router.push({ path: '/medicationmanagement/requisitionManagement/requisitionManagement'})
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row,view) {
|
||||
editRow.value = row;
|
||||
// const partItem = {partFlg: 'edit',rowData: editRow.value.supplyBusNo }
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/requisitionManagement/requisitionManagement',query:{supplyBusNo:row.supplyBusNo,view:view}})
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/requisitionManagement/requisitionManagement',query:{supplyBusNo:editRow.value.supplyBusNo}})
|
||||
}
|
||||
// getTransferProductDetail(row.supplyBusNo).then((response) => {
|
||||
// currentData.value = response.data;
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["transferProductRef"].edit();
|
||||
// });
|
||||
// getList();
|
||||
// });
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认删除以上数据?")
|
||||
.then(function () {
|
||||
return delTransferProduct({ ids: delId.join(",") });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
getTransferProductTypeList();
|
||||
// getBusNoInitList()
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,121 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询已退库单详情
|
||||
export function getPurchaseinventoryList(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/generated-return-detail',
|
||||
method: 'get',
|
||||
params: { busNo }
|
||||
})
|
||||
}
|
||||
|
||||
// 根据订单号查询退货详情
|
||||
export function getpurchaseInventoryDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/return-detail',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑退货单据
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/generate-return-receipt',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询采购入库单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/return/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询busNo
|
||||
export function getInitBusNo() {
|
||||
return request({
|
||||
url: '/inventory-manage/return/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
export function delPurchaseinventory(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/delete-return-receipt?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(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
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 退库提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/return-submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 退库撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/return/return-withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 审批通过
|
||||
*/
|
||||
export function purchaseInventoryApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/purchase-return-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="规格"
|
||||
align="center"
|
||||
prop="volume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品批号"
|
||||
align="center"
|
||||
prop="lotNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.purchaseFlag = 1
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,276 @@
|
||||
<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="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="输入名称/拼音/编码后回车查询"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:">
|
||||
<el-select
|
||||
v-model="inventoryScope"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventoryOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="medicineNo"
|
||||
prop="medicineNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="待发数量"
|
||||
align="center"
|
||||
key="dispenseQuantity"
|
||||
prop="dispenseQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="处方类型"
|
||||
align="center"
|
||||
key="dispenseEnum_enumText"
|
||||
prop="dispenseEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="病人"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="处方号"
|
||||
align="center"
|
||||
key="prescriptionNo"
|
||||
prop="prescriptionNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="门诊号"
|
||||
align="center"
|
||||
key="outpatientNo"
|
||||
prop="outpatientNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="住院号"
|
||||
align="center"
|
||||
key="admissionNo"
|
||||
prop="admissionNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="开单时间"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
: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="awaitingMedicineDetails">
|
||||
import {
|
||||
getAwaitingPendingMedicationPageList,
|
||||
getPharmacyCabinetList,
|
||||
} from "./statisticalManagent";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { ref } from "vue";
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const inventoryOptions = ref([])
|
||||
const totalAmount = ref(0);
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const inventoryScope = ref("")
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// startTime:undefined,
|
||||
// endTime: undefined,
|
||||
// inventoryScope: undefined,
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
totalAmount.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.totalPrice) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
// 统计类型
|
||||
inventoryOptions.value = [
|
||||
{value:1,label:'待发药明细账'},
|
||||
]
|
||||
inventoryScope.value = 1
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getAwaitingPendingMedicationPageList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.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 = ""
|
||||
// inventoryScope.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();
|
||||
getPharmacyCabinetLists()
|
||||
</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,301 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="药品名称:" prop="searchKey" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/项目名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="编码:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="项目名称:"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</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" class="mb8">
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盈亏数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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="ChkstockPartDetails">
|
||||
import {
|
||||
getReportStocktakingPage,
|
||||
getInit,
|
||||
getPharmacyCabinetList,
|
||||
|
||||
cancelSupply,
|
||||
stopSupply,
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// busNo: undefined,
|
||||
// name:undefined,
|
||||
categoryType: undefined,
|
||||
// occurrenceTime:undefined,
|
||||
approvalTimeSTime:undefined,
|
||||
approvalTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportStocktakingPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = ""
|
||||
queryParams.value.approvalTimeETime = ""
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</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,304 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="earlyWarningRef"
|
||||
:inline="true"
|
||||
:rules="rules"
|
||||
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="remainingDays" label-width="150px">
|
||||
<el-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="请输入效期小于(天)"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@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="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</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-item label="库存件数检查">
|
||||
<el-radio-group v-model="queryParams.flg" @change="handleQuery">
|
||||
<el-radio label="1" :value="1">是</el-radio>
|
||||
<el-radio label="0" :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
width="240"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="320"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="有效期至"
|
||||
align="center"
|
||||
key="expirationDate"
|
||||
prop="expirationDate"
|
||||
width="165"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.expirationDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="效期(天)"
|
||||
align="center"
|
||||
key="remainingDays"
|
||||
prop="remainingDays"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="效期(月)"
|
||||
align="center"
|
||||
key="remainingMonth"
|
||||
prop="remainingMonth"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存单位"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存量(最小单位)"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="该药总库存(最小单位)"
|
||||
align="center"
|
||||
key="specificationQuantity"
|
||||
prop="specificationQuantity"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小库存警戒量"
|
||||
align="center"
|
||||
key="itemMinQuantity"
|
||||
prop="itemMinQuantity"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最大库存警戒量"
|
||||
align="center"
|
||||
key="itemMaxQuantity"
|
||||
prop="itemMaxQuantity"
|
||||
width="150"
|
||||
: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="earlyWarning">
|
||||
import { getExpirationWarning } from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { item_type } = proxy.useDict('item_type');
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const occurrenceTime = ref([]);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
categoryCode: undefined,
|
||||
remainingDays: 180,
|
||||
expirationDateSTime: undefined,
|
||||
expirationDateETime: undefined,
|
||||
flg: undefined,
|
||||
},
|
||||
rules: {
|
||||
remainingMonth: [
|
||||
// { required: true, message: '单次最大剂量不能为空', trigger: 'blur' },
|
||||
{ validator: validateMaxUnit, trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function validateMaxUnit(rule, value, callback) {
|
||||
const numberRegex = /^[0-9]+$/; // 正则表达式,确保输入为数字
|
||||
if (!numberRegex.test(value)) {
|
||||
callback(new Error('请输入有效的数字'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
const params = {
|
||||
...queryParams.value,
|
||||
flg: queryParams.value.flg == 1 ? '1' : null,
|
||||
};
|
||||
getExpirationWarning(params).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
proxy.$refs['earlyWarningRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
queryParams.value.expirationDateSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.expirationDateETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.expirationDateSTime = '';
|
||||
queryParams.value.expirationDateETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('earlyWarningRef');
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,383 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="85px"
|
||||
>
|
||||
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.setlOptins"
|
||||
placeholder="请输入结算经办机构"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</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="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleQuery"
|
||||
>统计</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleApplyForLiquidation"
|
||||
>申请清算</el-button
|
||||
>
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<div style="margin-bottom:5px">结算笔数:{{counts}}(其中 总费用:{{totalPrice1?totalPrice1.toFixed(2):0}}元, 基金支付金额:{{totalPrice2?totalPrice2.toFixed(2):0}}元, 账户支付金额:{{totalPrice3?totalPrice3.toFixed(2):0}}元,现金支付金额:{{totalPrice4?totalPrice4.toFixed(2):0}}元)</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="个人编码"
|
||||
align="center"
|
||||
key="psnNo"
|
||||
prop="psnNo"
|
||||
width="190"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="患者姓名"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊ID"
|
||||
align="center"
|
||||
key="mdtrtId"
|
||||
prop="mdtrtId"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结算ID"
|
||||
align="center"
|
||||
key="setlId"
|
||||
prop="setlId"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="medfeeSumamt"
|
||||
prop="medfeeSumamt"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金支付金额"
|
||||
align="center"
|
||||
key="fundPaySumamt"
|
||||
prop="fundPaySumamt"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户金额"
|
||||
align="center"
|
||||
key="acctPay"
|
||||
prop="acctPay"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结算时间"
|
||||
align="center"
|
||||
key="setlTime"
|
||||
prop="setlTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.setlTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="是否退费"
|
||||
align="center"
|
||||
key="refdSetlFlag"
|
||||
prop="refdSetlFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="revoked-filled"
|
||||
:disabled="scope.row.id == ''"
|
||||
@click="revokedSelectedRows(scope.row)"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="reconciliationDetails">
|
||||
import {
|
||||
applyFinancialClearingList,
|
||||
applyUnClearing,
|
||||
autoApplyFinancialClearing,
|
||||
applyFinancialClearing,
|
||||
reconcileDetailList
|
||||
} from "./statisticalManagent";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([
|
||||
formatDateStr(getFirstDayOfMonth(new Date()), 'YYYY-MM-DD'), // 当前月份的第一天
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD') // 当天
|
||||
])
|
||||
const clrTypeOptions = ref([]);
|
||||
const filePath = ref("")
|
||||
const purchaseinventoryReturnList = ref([])
|
||||
const loadingReturn = ref(false)
|
||||
const selectedRow = ref([])
|
||||
const counts = ref(0)
|
||||
const totalPrice1 = ref(0)
|
||||
const totalPrice2 = ref(0)
|
||||
const totalPrice3 = ref(0)
|
||||
const totalPrice4 = ref(0)
|
||||
|
||||
const fileSize = ref(10)
|
||||
const uploadList = ref([]);
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const fileType = ref(["zip","txt"]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
// pageNo: 1,
|
||||
// pageSize: 10,
|
||||
setlOptins: '229900',
|
||||
filePath: undefined,
|
||||
orgId:undefined,
|
||||
clrType: undefined,
|
||||
fileQuryNo: undefined,
|
||||
stmtBegnDate:undefined,
|
||||
stmtEndDate:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.stmtBegnDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.stmtEndDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
// queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
function getFirstDayOfMonth(date) {
|
||||
return new Date(date.getFullYear(), date.getMonth(), 1);
|
||||
}
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = "";
|
||||
separator = separator || ",";
|
||||
for (let i in list) {
|
||||
if (list[i].url) {
|
||||
strs += list[i].url + separator;
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
counts.value = purchaseinventoryList.value.length
|
||||
totalPrice1.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.medfeeSumamt) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice2.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.fundPaySumamt) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice3.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.acctPay) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
// 现金支付金额
|
||||
// totalPrice4.value = purchaseinventoryList.value.reduce(
|
||||
// (accumulator, currentRow) => {
|
||||
// return (accumulator + (Number(currentRow.profitAmount) || 0))
|
||||
// },
|
||||
// 0
|
||||
// );
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
clrTypeOptions.value = [
|
||||
{ value: 11, label: '门诊' },
|
||||
{ value: 21, label: '住院' },
|
||||
];
|
||||
}
|
||||
function handleSelectionChangeReturn(selection) {
|
||||
idsReturn.value = selection.map((item) => item.id);
|
||||
singleReturn.value = selection.length != 1;
|
||||
multipleReturn.value = !selection.length;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
reconcileDetailList(queryParams.value).then((res) => {
|
||||
// console.log(res,"res----------------")
|
||||
// loading.value = false;
|
||||
// purchaseinventoryList.value = [{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"4.72",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"7.43",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"1",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"-1",insutype:"410",clrType: 11,contractNo:"229900"}]
|
||||
purchaseinventoryList.value = res.data.records ? res.data.records : res.data;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function handleApplyForLiquidation () {
|
||||
let params = {}
|
||||
params.clrType = queryParams.value.clrType?queryParams.value.clrType:""
|
||||
params.setlOptins = queryParams.value.setlOptins?queryParams.value.setlOptins:""
|
||||
params.stmtBegnDate = queryParams.value.stmtBegnDate?queryParams.value.stmtBegnDate:""
|
||||
params.stmtEndDate = queryParams.value.stmtEndDate?queryParams.value.stmtEndDate:""
|
||||
autoApplyFinancialClearing(params).then((res) => {
|
||||
console.log(res.data,'res----------------');
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
function isAllSelected() {
|
||||
return selectedRow.value.length === purchaseinventoryList.value.length;
|
||||
}
|
||||
|
||||
function revokedSelectedRows(row) {
|
||||
let queryParamsss = {
|
||||
clrAppyEvtId:row.outResult,
|
||||
clroptins:queryParams.value.setlOptins?queryParams.value.setlOptins:"",
|
||||
}
|
||||
applyUnClearing(queryParamsss).then(res => {
|
||||
proxy.$message.success('撤销成功')
|
||||
getList()
|
||||
}).catch(err => {
|
||||
proxy.$message.error('撤销失败')
|
||||
})
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRow.value = selection
|
||||
console.log(selectedRow.value,"selectedRow.value")
|
||||
ids.value = selection.map((item) => item.setlId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
//点击列表当前行
|
||||
function handleRowClick(row) {
|
||||
// editRowTK.value = row
|
||||
console.log(row,"row")
|
||||
// if(row.returnStatus==1){
|
||||
// loadingReturn.value = true
|
||||
// generatedReturnDetail(row.supplyBusNo).then((response) => {
|
||||
// purchaseinventoryReturnList.value = response.data
|
||||
// purchaseinventoryReturnList.value.map(k=>{
|
||||
// // k.returnStatus_text = k.returnStatus==1?'已退库':''
|
||||
// k.originalSupplyBusNo = k.originalSupplyBusNo?k.originalSupplyBusNo:row.supplyBusNo
|
||||
// })
|
||||
|
||||
// })
|
||||
// loadingReturn.value = false
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</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,630 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="药品编码/药品名称/名称拼音/供应商名"
|
||||
clearable
|
||||
style="width: 250px"
|
||||
@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-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="查询 ≤ X 天的记录"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@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="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医保等级:" prop="chrgitmLv">
|
||||
<el-select
|
||||
v-model="queryParams.chrgitmLv"
|
||||
placeholder="请选择医保等级"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库药房:" prop="locationId">
|
||||
<el-select
|
||||
v-model="queryParams.locationId"
|
||||
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="warehouseScope">
|
||||
<el-select
|
||||
v-model="queryParams.warehouseScope"
|
||||
placeholder="请选择库存范围"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventory_range"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="医院:" prop="hospital" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.hospital"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyTypeOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.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="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
>备份</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<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="purchaseinventoryList"
|
||||
max-height="600"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column type="index" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="130"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保等级"
|
||||
align="center"
|
||||
key="chrgitmLv_enumText"
|
||||
prop="chrgitmLv_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="180px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存(采购单位)"
|
||||
align="center"
|
||||
key="quantityUnit"
|
||||
prop="quantityUnit"
|
||||
width="130px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存单位"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
align="center"
|
||||
key="partPercent"
|
||||
prop="partPercent"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购价格"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="零售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进价总额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span
|
||||
:style="
|
||||
scope.row.totalPrice == scope.row.totalSalePrice ? 'color: black' : 'color: red'
|
||||
"
|
||||
>{{ scope.row.totalPrice }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="零售价总额"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span
|
||||
:style="
|
||||
scope.row.totalPrice == scope.row.totalSalePrice ? 'color: black' : 'color: red'
|
||||
"
|
||||
>{{ scope.row.totalSalePrice }}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="剂型"
|
||||
align="center"
|
||||
key="doseFormCode_dictText"
|
||||
prop="doseFormCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="国药准字"
|
||||
align="center"
|
||||
key="approvalNumber"
|
||||
prop="approvalNumber"
|
||||
width="165"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplyName"
|
||||
prop="supplyName"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产日期"
|
||||
align="center"
|
||||
key="productionDate"
|
||||
prop="productionDate"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.productionDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="有效期至"
|
||||
align="center"
|
||||
key="expirationDate"
|
||||
prop="expirationDate"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.expirationDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拼音码"
|
||||
align="center"
|
||||
key="pyStr"
|
||||
prop="pyStr"
|
||||
width="110"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="剩余过期天数"
|
||||
align="center"
|
||||
key="remainingDays"
|
||||
prop="remainingDays"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品追溯码"
|
||||
align="center"
|
||||
key="traceNo"
|
||||
prop="traceNo"
|
||||
width="120px"
|
||||
: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="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仓库类型"
|
||||
align="center"
|
||||
key="formEnum_enumText"
|
||||
prop="formEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="停供状态"
|
||||
align="center"
|
||||
key="inventoryStatusEnum_enumText"
|
||||
prop="inventoryStatusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="追溯码入库数"
|
||||
align="center"
|
||||
key="inCount"
|
||||
prop="inCount"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="追溯码出库数"
|
||||
align="center"
|
||||
key="outCount"
|
||||
prop="outCount"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="180"
|
||||
fixed="right"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<!-- 停供/停用3,取消停供/启用2 -->
|
||||
<template #default="scope">
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handlestopcancelSupply(scope.row)"
|
||||
v-if="scope.row.inventoryStatusEnum == 2"
|
||||
>停供</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handlestopcancelSupply(scope.row)"
|
||||
v-if="scope.row.inventoryStatusEnum == 3"
|
||||
>取消停供</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleOpenPage(scope.row)"
|
||||
>追溯码</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="float: right; margin-top: 10px; margin-right: 10px">
|
||||
<span class="descriptions-item-label">进价合计金额:{{ salePriceTotal.toFixed(2) }}</span>
|
||||
<span class="descriptions-item-label">零售价合计金额:{{ priceTotal.toFixed(2) }}</span>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
:style="'margin-top: 35px;'"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="药品追溯码"
|
||||
v-model="visible"
|
||||
width="1400"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
:draggable="true"
|
||||
>
|
||||
<traceabilityCodeManagement :recordInfo="recordInfo"></traceabilityCodeManagement>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup name="StatisticalManagement">
|
||||
import {
|
||||
getproductReturnPage,
|
||||
getInit,
|
||||
getPharmacyCabinetList,
|
||||
cancelSupply,
|
||||
stopSupply,
|
||||
productPageTotal
|
||||
} from './statisticalManagent';
|
||||
import Decimal from 'decimal.js';
|
||||
import traceabilityCodeManagement from './traceabilityCodeManagement.vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { item_type, inventory_range } = proxy.useDict('item_type', 'inventory_range');
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const visible = ref(false);
|
||||
const recordInfo = ref({});
|
||||
|
||||
const loading = ref(true);
|
||||
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
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 data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
remainingDays: undefined,
|
||||
// hospital:undefined,
|
||||
categoryCode: undefined,
|
||||
chrgitmLv: undefined,
|
||||
warehouseScope: undefined,
|
||||
locationId: undefined,
|
||||
// occurrenceTimeSTime:undefined,
|
||||
// occurrenceTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions;
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
salePriceTotal.value = 0;
|
||||
priceTotal.value = 0;
|
||||
getproductReturnPage(queryParams.value).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;
|
||||
const integerPart1 = Math.floor(k.quantityUnit); // 获取整数部分
|
||||
const decimalPart1 = k.quantityUnit - integerPart1; // 获取小数部分
|
||||
|
||||
if (decimalPart1) {
|
||||
k.quantityUnit =
|
||||
integerPart1 +
|
||||
k.unitCode_dictText +
|
||||
(decimalPart1 * k.partPercent).toFixed(0) +
|
||||
k.minUnitCode_dictText;
|
||||
}
|
||||
k.price = k.price ? k.price.toFixed(2) : 0;
|
||||
k.retailPrice = k.retailPrice ? k.retailPrice.toFixed(2) : 0;
|
||||
k.totalPrice = k.price * (Number(k.quantity) / k.partPercent);
|
||||
k.totalPrice = k.totalPrice ? k.totalPrice.toFixed(2) : 0;
|
||||
k.totalSalePrice = k.retailPrice * (Number(k.quantity) / k.partPercent);
|
||||
k.totalSalePrice = k.totalSalePrice ? k.totalSalePrice.toFixed(2) : 0;
|
||||
});
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
productPageTotal(queryParams.value).then((res) => {
|
||||
salePriceTotal.value = res.data.totalPurchasePrice;
|
||||
priceTotal.value = res.data.totalSalePrice;
|
||||
})
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
// queryParams.value.occurrenceTimeSTime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[0] + " 00:00:00"
|
||||
// : "";
|
||||
// queryParams.value.occurrenceTimeETime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[1] + " 23:59:59"
|
||||
// : "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
function handleOpenPage (row) {
|
||||
recordInfo.value = row;
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 备份 */
|
||||
function openAddaddTransferProductDialog() {
|
||||
// getTransferProductTypeList();
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["transferProductRef"].show();
|
||||
// });
|
||||
// const partItem = {partFlg: 'add',rowData: []}
|
||||
// item: JSON.stringify(partItem)
|
||||
// ,query:{item: JSON.stringify(partItem)}
|
||||
// router.push({ path: '/medicationmanagement/transferManagement/transferManagent'})
|
||||
}
|
||||
|
||||
// 取消停供 停供
|
||||
function handlestopcancelSupply(row) {
|
||||
if (row.inventoryStatusEnum == 2) {
|
||||
stopSupply(row.id).then((response) => {
|
||||
proxy.$modal.msgSuccess('停供成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
if (row.inventoryStatusEnum == 3) {
|
||||
cancelSupply(row.id).then((response) => {
|
||||
proxy.$modal.msgSuccess('取消停供成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 停供
|
||||
function handlestopSupply(row) {}
|
||||
|
||||
// getTransferProductTypeList();
|
||||
getList();
|
||||
getPharmacyCabinetLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,442 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<!-- <el-form-item label="药品名称:" prop="searchKey" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="商品编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="商品编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="商品名称:"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="剩余过期天数:" prop="remainingDays" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="查询 ≤ X 天的记录"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="医保等级:" prop="chrgitmLv" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.chrgitmLv"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="药房:" prop="purposeTypeEnum" label-width="80px">
|
||||
<el-select
|
||||
v-model="queryParams.purposeTypeEnum"
|
||||
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="inventoryScope">
|
||||
<el-select
|
||||
v-model="queryParams.inventoryScope"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventory_range"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-input
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="回车查询"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="180px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode"
|
||||
prop="unitCode"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="小包装库存数"
|
||||
align="center"
|
||||
key="minPackageQuantity"
|
||||
prop="minPackageQuantity"
|
||||
width="110"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="小包装单位"
|
||||
align="center"
|
||||
key="minPackageUnit"
|
||||
prop="minPackageUnit"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
-->
|
||||
<el-table-column
|
||||
label="拆零进价"
|
||||
align="center"
|
||||
key="partPrice"
|
||||
prop="partPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="拆零售价"
|
||||
align="center"
|
||||
key="partSalePrice"
|
||||
prop="partSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进价金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价金额"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="仓库类型"
|
||||
align="center"
|
||||
key="purposeTypeEnum_enumText"
|
||||
prop="purposeTypeEnum_enumText"
|
||||
: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="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="有效期至"
|
||||
align="center"
|
||||
key="expirationDate"
|
||||
prop="expirationDate"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.expirationDate) }}</span>
|
||||
</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="InventoryProductDetails">
|
||||
import {
|
||||
getReportProductPage,
|
||||
getInit,
|
||||
getPharmacyCabinetList,
|
||||
getBusNoInit,
|
||||
cancelSupply,
|
||||
stopSupply,
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {
|
||||
item_type,
|
||||
inventory_range,
|
||||
} = proxy.useDict(
|
||||
"item_type",
|
||||
"inventory_range",
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
// medicationDefId: undefined,
|
||||
busNo:undefined,
|
||||
name: undefined,
|
||||
categoryType:undefined,
|
||||
purposeTypeEnum:undefined,
|
||||
inventoryScope: undefined,
|
||||
supplierId: undefined,
|
||||
// occurrenceTimeSTime:undefined,
|
||||
// occurrenceTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportProductPage(queryParams.value).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
|
||||
const integerPart1 = Math.floor(k.quantityUnit); // 获取整数部分
|
||||
const decimalPart1 = k.quantityUnit - integerPart1; // 获取小数部分
|
||||
|
||||
if(decimalPart1){
|
||||
k.quantityUnit = integerPart1 + k.unitCode_dictText +
|
||||
(decimalPart1*k.partPercent).toFixed(0) + k.minUnitCode_dictText
|
||||
}
|
||||
})
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
// queryParams.value.occurrenceTimeSTime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[0] + " 00:00:00"
|
||||
// : "";
|
||||
// queryParams.value.occurrenceTimeETime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[1] + " 23:59:59"
|
||||
// : "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</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,513 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="85px"
|
||||
>
|
||||
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.setlOptins"
|
||||
placeholder="请输入结算经办机构"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</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="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form> -->
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleQuery"
|
||||
>统计</el-button
|
||||
> -->
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleApplyForLiquidation"
|
||||
>申请清算</el-button
|
||||
> -->
|
||||
<!-- </el-col> -->
|
||||
<!-- </el-row> -->
|
||||
<!-- <div style="margin-bottom:5px"> -->
|
||||
<el-row :guutter="15">
|
||||
|
||||
<el-form
|
||||
:model="totalPrice"
|
||||
ref="priceRef"
|
||||
:inline="true"
|
||||
>
|
||||
<el-row :guutter="15">
|
||||
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.setlOptins"
|
||||
placeholder="请输入结算经办机构"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算日期:" label-width="130px">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType" label-width="160px">
|
||||
<el-select
|
||||
v-model="totalPrice.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row :guutter="15">
|
||||
<el-form-item label="医疗费总额:" prop="medfeeSumamt" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.medfeeSumamt"
|
||||
placeholder="请输入医疗费总额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="基金支付总额:" prop="fundAppySum" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.fundAppySum"
|
||||
placeholder="请输入基金支付总额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="个人账户支付金额:" prop="acctPay" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.acctPay"
|
||||
placeholder="请输入个人账户支付金额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="现金支付金额:" prop="cashPayamt" label-width="160px">
|
||||
<el-input
|
||||
v-model="totalPrice.cashPayamt"
|
||||
placeholder="请输入现金支付金额"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handOperatedApply"
|
||||
>手动清算</el-button
|
||||
>
|
||||
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<!-- </div> -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="申请清算ID"
|
||||
align="center"
|
||||
key="outResult"
|
||||
prop="outResult"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
align="center"
|
||||
key="begndate"
|
||||
prop="begndate"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
align="center"
|
||||
key="enddate"
|
||||
prop="enddate"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="清算类别"
|
||||
align="center"
|
||||
key="clrType"
|
||||
prop="clrType"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="medfeeSumamt"
|
||||
prop="medfeeSumamt"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保认可总费用"
|
||||
align="center"
|
||||
key="medSumfee"
|
||||
prop="medSumfee"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金申报金额"
|
||||
align="center"
|
||||
key="fundAppySum"
|
||||
prop="fundAppySum"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="现金支付总额"
|
||||
align="center"
|
||||
key="cashPayamt"
|
||||
prop="cashPayamt"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户金额"
|
||||
align="center"
|
||||
key="acctPay"
|
||||
prop="acctPay"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="status"
|
||||
prop="status"
|
||||
width="170"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.setlTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="是否退费"
|
||||
align="center"
|
||||
key="refdSetlFlag"
|
||||
prop="refdSetlFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="300"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="revoked-filled"
|
||||
:disabled="scope.row.id == ''"
|
||||
@click="revokedSelectedRows(scope.row)"
|
||||
>
|
||||
撤销
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="reconciliationDetails">
|
||||
import {
|
||||
applyFinancialClearingList,
|
||||
applyUnClearing,
|
||||
autoApplyFinancialClearing,
|
||||
reconcileDetailList,
|
||||
handOperatedApplyFinancialClearing
|
||||
} from "./statisticalManagent";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([
|
||||
formatDateStr(getFirstDayOfMonth(new Date()), 'YYYY-MM-DD'), // 当前月份的第一天
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD') // 当天
|
||||
])
|
||||
const clrTypeOptions = ref([]);
|
||||
const filePath = ref("")
|
||||
const purchaseinventoryReturnList = ref([])
|
||||
const loadingReturn = ref(false)
|
||||
const selectedRow = ref([])
|
||||
|
||||
const fileSize = ref(10)
|
||||
const uploadList = ref([]);
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const fileType = ref(["zip","txt"]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
// pageNo: 1,
|
||||
// pageSize: 10,
|
||||
setlOptins: '229900',
|
||||
filePath: undefined,
|
||||
orgId:undefined,
|
||||
clrType: undefined,
|
||||
fileQuryNo: undefined,
|
||||
stmtBegnDate:undefined,
|
||||
stmtEndDate:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const totalPrice = reactive({
|
||||
medfeeSumamt: 0,
|
||||
fundAppySum: 0,
|
||||
acctPay: 0,
|
||||
cashPayamt: 0,
|
||||
counts: 0,
|
||||
medSumfee: 0.00
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.stmtBegnDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.stmtEndDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
// queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
function getFirstDayOfMonth(date) {
|
||||
return new Date(date.getFullYear(), date.getMonth(), 1);
|
||||
}
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = "";
|
||||
separator = separator || ",";
|
||||
for (let i in list) {
|
||||
if (list[i].url) {
|
||||
strs += list[i].url + separator;
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
totalPrice.counts = purchaseinventoryList.value.length
|
||||
totalPrice.medfeeSumamt = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return Number(
|
||||
(accumulator + Number(currentRow.medfeeSumamt || 0)).toFixed(2)
|
||||
);
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice.fundAppySum = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return Number(
|
||||
(accumulator + Number(currentRow.fundPaySumamt || 0)).toFixed(2)
|
||||
);
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice.acctPay = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return Number(
|
||||
(accumulator + Number(currentRow.acctPay || 0)).toFixed(2)
|
||||
);
|
||||
},
|
||||
0
|
||||
);
|
||||
// 现金支付金额
|
||||
// cashPayamt.value = purchaseinventoryList.value.reduce(
|
||||
// (accumulator, currentRow) => {
|
||||
// return (accumulator + (Number(currentRow.profitAmount) || 0))
|
||||
// },
|
||||
// 0
|
||||
// );
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
clrTypeOptions.value = [
|
||||
{ value: 11, label: '门诊' },
|
||||
{ value: 21, label: '住院' },
|
||||
];
|
||||
}
|
||||
function handleSelectionChangeReturn(selection) {
|
||||
idsReturn.value = selection.map((item) => item.id);
|
||||
singleReturn.value = selection.length != 1;
|
||||
multipleReturn.value = !selection.length;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
applyFinancialClearingList(queryParams.value).then((res) => {
|
||||
// console.log(res,"res----------------")
|
||||
// loading.value = false;
|
||||
// purchaseinventoryList.value = [{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"4.72",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"7.43",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"1",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"-1",insutype:"410",clrType: 11,contractNo:"229900"}]
|
||||
purchaseinventoryList.value = res.data.records ? res.data.records : res.data;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function handleApplyForLiquidation () {
|
||||
let params = {}
|
||||
params.clrType = queryParams.value.clrType?queryParams.value.clrType:""
|
||||
params.setlOptins = queryParams.value.setlOptins?queryParams.value.setlOptins:""
|
||||
params.stmtBegnDate = queryParams.value.stmtBegnDate?queryParams.value.stmtBegnDate:""
|
||||
params.stmtEndDate = queryParams.value.stmtEndDate?queryParams.value.stmtEndDate:""
|
||||
autoApplyFinancialClearing(params).then((res) => {
|
||||
console.log(res.data,'res----------------');
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
function isAllSelected() {
|
||||
return selectedRow.value.length === purchaseinventoryList.value.length;
|
||||
}
|
||||
|
||||
function revokedSelectedRows(row) {
|
||||
let queryParamsss = {
|
||||
clrAppyEvtId:row.outResult,
|
||||
clroptins:queryParams.value.setlOptins?queryParams.value.setlOptins:"",
|
||||
}
|
||||
applyUnClearing(queryParamsss).then(res => {
|
||||
proxy.$message.success('撤销成功')
|
||||
getList()
|
||||
}).catch(err => {
|
||||
proxy.$message.error('撤销失败')
|
||||
})
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRow.value = selection
|
||||
console.log(selectedRow.value,"selectedRow.value")
|
||||
ids.value = selection.map((item) => item.setlId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
function handOperatedApply () {
|
||||
const params = {...totalPrice}
|
||||
params.clrOptins = queryParams.value.setlOptins?queryParams.value.setlOptins:""
|
||||
params.begndate = queryParams.value.stmtBegnDate?queryParams.value.stmtBegnDate:""
|
||||
params.enddate = queryParams.value.stmtEndDate?queryParams.value.stmtEndDate:""
|
||||
params.clrType = queryParams.value.clrType?queryParams.value.clrType:""
|
||||
handOperatedApplyFinancialClearing(params).then(res => {
|
||||
}).catch(err => {
|
||||
proxy.$message.error('申请失败')
|
||||
})
|
||||
}
|
||||
//点击列表当前行
|
||||
function handleRowClick(row) {
|
||||
// editRowTK.value = row
|
||||
console.log(row,"row")
|
||||
// if(row.returnStatus==1){
|
||||
// loadingReturn.value = true
|
||||
// generatedReturnDetail(row.supplyBusNo).then((response) => {
|
||||
// purchaseinventoryReturnList.value = response.data
|
||||
// purchaseinventoryReturnList.value.map(k=>{
|
||||
// // k.returnStatus_text = k.returnStatus==1?'已退库':''
|
||||
// k.originalSupplyBusNo = k.originalSupplyBusNo?k.originalSupplyBusNo:row.supplyBusNo
|
||||
// })
|
||||
|
||||
// })
|
||||
// loadingReturn.value = false
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</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,280 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="项目名称:" prop="searchKey" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/项目名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <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="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="项目名称:"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@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="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</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" class="mb8">
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="类型"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仓库"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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="lossReportingDetails">
|
||||
import {
|
||||
getReportLossPage,
|
||||
getInit,
|
||||
getPharmacyCabinetList,
|
||||
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
approvalTimeSTime:undefined,
|
||||
approvalTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportLossPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = ""
|
||||
queryParams.value.approvalTimeETime = ""
|
||||
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;
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,863 @@
|
||||
<template>
|
||||
<div outpatientNo="app-container">
|
||||
<el-form
|
||||
style="margin-top:20px;margin-left:20px;"
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<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="startTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.startTime"
|
||||
type="datetime"
|
||||
placeholder="请选择开始时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
value-format="YYYY/MM/DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.endTime"
|
||||
type="datetime"
|
||||
placeholder="请选择结束时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
value-format="YYYY/MM/DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="商品编码:" prop="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="商品编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称:" prop="medicationName">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="商品名称:"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="药房:" prop="locationId">
|
||||
<el-select
|
||||
v-model="queryParams.locationId"
|
||||
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="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="病人姓名:" prop="patientName">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入病人姓名"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="发药人:" prop="practitionerId">
|
||||
<el-select
|
||||
v-model="queryParams.practitionerId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in practitionerNameOptions"
|
||||
:key="supplyStatus.id"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品查询/病人姓名:" prop="searchKey" label-width="150">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="输入药品名称/拼音/编码/病人姓名后回车查询"
|
||||
clearable
|
||||
style="width: 310px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:">
|
||||
<el-select
|
||||
v-model="inventoryScope"
|
||||
placeholder=""
|
||||
style="width: 220px"
|
||||
@change="inventoryChange(inventoryScope)"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventoryOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="结算状态:" prop="settlementStatus">
|
||||
<el-select
|
||||
v-model="queryParams.settlementStatus"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in purposeLocationIdList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="出院状态:" prop="dischargeStatus">
|
||||
<el-select
|
||||
v-model="queryParams.dischargeStatus"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in dischargeStatusList"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商:" prop="supplierId">
|
||||
<el-input
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="回车查询"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" outpatientNo="mb8" 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-row>
|
||||
|
||||
<el-table
|
||||
style="padding:0 20px;width:100%"
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:span-method="arraySpanMethod"
|
||||
|
||||
>
|
||||
<!-- :summary-method="getSummaries"
|
||||
show-summary 每页单独合计-->
|
||||
<el-table-column type="selection" width="60px" align="center" />
|
||||
<el-table-column
|
||||
v-if="inventoryScope==1||inventoryScope==3||inventoryScope==5"
|
||||
label="发药人"
|
||||
align="center"
|
||||
key="practitionerName"
|
||||
prop="practitionerName"
|
||||
width="90px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="inventoryScope==1||inventoryScope==3||inventoryScope==5"
|
||||
label="发药单号"
|
||||
align="center"
|
||||
key="dispenseNo"
|
||||
prop="dispenseNo"
|
||||
width="130px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="inventoryScope==2||inventoryScope==4||inventoryScope==6"
|
||||
:label="inventoryScope==2?'门诊号':'住院号'"
|
||||
align="center"
|
||||
key="outpatientNo"
|
||||
prop="outpatientNo"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column label="门诊号" v-if="inventoryScope==2" width="180" key="outpatientNo" :show-overflow-tooltip="true"
|
||||
prop="outpatientNo">
|
||||
<template #default="{ row, column, $index }">
|
||||
<span v-if="$index === 0 || (purchaseinventoryList[$index - 1].outpatientNo !== row.outpatientNo)">{{ row.outpatientNo }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
v-if="inventoryScope==2||inventoryScope==4||inventoryScope==6"
|
||||
label="处方号"
|
||||
align="center"
|
||||
key="prescriptionNo"
|
||||
prop="prescriptionNo"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="inventoryScope==2||inventoryScope==4||inventoryScope==6"
|
||||
label="病人"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
width="90px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="inventoryScope==2||inventoryScope==4||inventoryScope==6"
|
||||
label="发药人"
|
||||
align="center"
|
||||
key="practitionerName"
|
||||
prop="practitionerName"
|
||||
width="90px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="inventoryScope==2||inventoryScope==4||inventoryScope==6"
|
||||
label="发药单号"
|
||||
align="center"
|
||||
key="dispenseNo"
|
||||
prop="dispenseNo"
|
||||
width="130px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品项目"
|
||||
align="center"
|
||||
key="medicationName"
|
||||
prop="medicationName"
|
||||
width="160px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="inventoryScope==1||inventoryScope==3"
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="130px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
v-if="inventoryScope==1||inventoryScope==3"
|
||||
label="医保项目"
|
||||
align="center"
|
||||
key="medicalName"
|
||||
prop="medicalName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
v-if="inventoryScope==1||inventoryScope==3"
|
||||
label="医保编码"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
width="218px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="零售价"
|
||||
align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="inventoryScope==1||inventoryScope==3||inventoryScope==5"
|
||||
label="采购价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="inventoryScope==1||inventoryScope==3||inventoryScope==5"
|
||||
label="采购金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="发药数量"
|
||||
align="center"
|
||||
key="dispenseQuantity"
|
||||
prop="dispenseQuantity"
|
||||
width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="发药金额"
|
||||
align="center"
|
||||
key="dispensePrice"
|
||||
prop="dispensePrice"
|
||||
width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退药数量"
|
||||
align="center"
|
||||
key="refundQuantity"
|
||||
prop="refundQuantity"
|
||||
width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退药金额"
|
||||
align="center"
|
||||
key="refundPrice"
|
||||
prop="refundPrice"
|
||||
width="100px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierName"
|
||||
prop="supplierName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="发药时间"
|
||||
align="center"
|
||||
key="dispenseTime"
|
||||
prop="dispenseTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.dispenseTime) }}</span>
|
||||
</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(1)"
|
||||
/>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
margin-left:0px;margin-right:0px;padding:0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span>制单人:{{ userStore.name }}</span>
|
||||
</el-col>
|
||||
<!-- <el-col :span="6">
|
||||
<el-row
|
||||
:gutter="8"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
"
|
||||
>
|
||||
<el-col :span="10">
|
||||
<span>合计金额:{{ totalAmount?totalAmount.toFixed(4):0 }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationDetails">
|
||||
import {
|
||||
getPharmacyCabinetList,
|
||||
getAmbMedicationDetail,
|
||||
getAmbPractitionerDetail,
|
||||
getMedicationDetailsInit
|
||||
} from "./statisticalManagent";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { watch } from "vue";
|
||||
import { endsWith } from "lodash";
|
||||
const userStore = useUserStore();
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const totalAmount = ref(0);
|
||||
const {
|
||||
item_type,
|
||||
} = proxy.useDict(
|
||||
"item_type",
|
||||
);
|
||||
const purchaseinventoryListAll = ref([])
|
||||
const xiaojiTotal = ref([])
|
||||
const rowSpan = ref(1)
|
||||
const purposeLocationIdList = ref([])
|
||||
const dischargeStatusList = ref([])
|
||||
const inventoryOptions = ref([])
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const practitionerNameOptions = ref([]);
|
||||
const inventoryScope = ref(1)
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
practitionerId: undefined,
|
||||
// busNo:undefined,
|
||||
dischargeStatus: undefined,
|
||||
// settlementStatus:undefined,
|
||||
locationId:undefined,
|
||||
// patientName: undefined,
|
||||
dispenseTimeSTime:undefined,
|
||||
dispenseTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
watch(
|
||||
() => inventoryScope.value,
|
||||
(newVlaue) => {
|
||||
inventoryScope.value = newVlaue
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
totalAmount.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.totalPrice) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
}
|
||||
function getTotals(row,i){
|
||||
let dispensePriceSums = Number(purchaseinventoryList.value[i].dispensePrice)
|
||||
let totalReturnPriceSums = Number(purchaseinventoryList.value[i].refundPrice)
|
||||
for (let j=1; i-j>=0; j++) {
|
||||
if (purchaseinventoryList.value[i].outpatientNo == purchaseinventoryList.value[i-j].outpatientNo) {
|
||||
dispensePriceSums += Number(purchaseinventoryList.value[i-j].dispensePrice)
|
||||
totalReturnPriceSums += Number(purchaseinventoryList.value[i-j].refundPrice)
|
||||
}
|
||||
}
|
||||
xiaojiTotal.value.push({inde:i+1,outpatientNo:row.outpatientNo,dispensePrice:dispensePriceSums,refundPrice:totalReturnPriceSums})
|
||||
// var dispensePrice2 = 0
|
||||
// var refundPrice2 = 0
|
||||
purchaseinventoryList.value.splice(i+1, 0, {outpatientNo:row.outpatientNo,prescriptionNo:'小计',dispensePrice:dispensePriceSums.toFixed(4)||0,refundPrice:totalReturnPriceSums.toFixed(4)||0})
|
||||
// purchaseinventoryList.value.map(k=>{
|
||||
// if(k.prescriptionNo!='小计'){
|
||||
// dispensePrice2 += Number(k.dispensePrice)
|
||||
// refundPrice2 += Number(k.refundPrice)
|
||||
// }
|
||||
// })
|
||||
// dispensePrice2 = dispensePrice2?dispensePrice2.toFixed(4):dispensePrice2
|
||||
// refundPrice2 = refundPrice2?refundPrice2.toFixed(4):refundPrice2
|
||||
// purchaseinventoryList.value.push({prescriptionNo:'合计',dispensePrice:dispensePrice2,refundPrice:refundPrice2})
|
||||
}
|
||||
const arraySpanMethod = ({
|
||||
row,
|
||||
column,
|
||||
rowIndex,
|
||||
columnIndex,
|
||||
}) => {
|
||||
// 合并一样的列住院号 outpatientNumber属性
|
||||
if (columnIndex === 1&&(inventoryScope.value==2||inventoryScope.value==4||inventoryScope.value==6)) {
|
||||
if (rowIndex === 0 || (rowIndex > 0 && row.outpatientNo !== purchaseinventoryList.value[rowIndex - 1]?.outpatientNo)) {
|
||||
let rowspan = 1;
|
||||
let dispensePriceSum = 0
|
||||
let totalReturnPriceSum = 0
|
||||
for (let i = rowIndex + 1; i < purchaseinventoryList.value.length; i++) {
|
||||
if (purchaseinventoryList.value[i].outpatientNo === row.outpatientNo) {
|
||||
rowspan++;
|
||||
dispensePriceSum += Number(purchaseinventoryList.value[i].dispensePrice)
|
||||
totalReturnPriceSum += Number(purchaseinventoryList.value[i].refundPrice)
|
||||
if(i==purchaseinventoryList.value.length-1){
|
||||
let findIndexTotal = xiaojiTotal.value.findIndex(k=>k.outpatientNo==row.outpatientNo)
|
||||
if(findIndexTotal<0){
|
||||
getTotals(row,i)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dispensePriceSum += Number(row.dispensePrice)
|
||||
totalReturnPriceSum += Number(row.refundPrice)
|
||||
let findIndexTotal = xiaojiTotal.value.findIndex(k=>k.outpatientNo==row.outpatientNo)
|
||||
if(findIndexTotal<0){
|
||||
xiaojiTotal.value.push({inde:i,outpatientNo:row.outpatientNo,dispensePrice:dispensePriceSum,refundPrice:totalReturnPriceSum})
|
||||
purchaseinventoryList.value.splice(i, 0, {outpatientNo:row.outpatientNo,prescriptionNo:'小计',dispensePrice:dispensePriceSum.toFixed(4)||0,refundPrice:totalReturnPriceSum.toFixed(4)||0})
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return { rowspan, colspan: 1 };
|
||||
} else {
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
}
|
||||
const getSummaries = (param) => {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = h('div', { style: { textDecoration: 'underline' } }, [
|
||||
'合计',
|
||||
])
|
||||
return
|
||||
}
|
||||
const values = data.map((item) => (item.prescriptionNo!='小计'&&Number(item[column.property])))
|
||||
if (column.property=='refundPrice'||column.property=='dispensePrice'||column.property=='totalPrice') {
|
||||
// !values.every((value) => Number.isNaN(value))
|
||||
sums[index] = `${values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return (Number(prev) + Number(curr)).toFixed(4) || 0
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)}`
|
||||
} else {
|
||||
sums[index] = ' '
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
function inventoryChange(val){
|
||||
inventoryScope.value = val
|
||||
xiaojiTotal.value = []
|
||||
purchaseinventoryList.value = []
|
||||
getList()
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
// 统计类型
|
||||
inventoryOptions.value = [
|
||||
{value:1,label:'门诊人员发药明细'},
|
||||
{value:2,label:'门诊发药明细流水账'},
|
||||
{value:3,label:'住院人员发药明细账'},
|
||||
{value:4,label:'住院发药明细流水账'},
|
||||
{value:5,label:'住院耗材记账领用明细'},
|
||||
{value:6,label:'住院耗材记账领用流水账'}
|
||||
]
|
||||
// practitionerNameOptions.value = [{value:' ',label:'全部'},{value:"2",label:'超级管理员'},{value:"1925368521993523202",label:'郭鑫'}]
|
||||
purposeLocationIdList.value = [{value:' ',label:'全部'},{value:1,label:'已结算'},{value:2,label:'未结算'}]
|
||||
dischargeStatusList.value = [{value:' ',label:'全部'},{value:1,label:'已出院'},{value:2,label:'未出院'}]
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
})
|
||||
getMedicationDetailsInit().then((response) => {
|
||||
practitionerNameOptions.value = response.data.practitionerList
|
||||
})
|
||||
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList(type) {
|
||||
if(type){
|
||||
xiaojiTotal.value = []
|
||||
purchaseinventoryList.value = []
|
||||
}
|
||||
loading.value = true;
|
||||
// let queryParamsValues ={...queryParams.value}
|
||||
// delete queryParamsValues.inventoryScope
|
||||
if(inventoryScope.value==1||inventoryScope.value==3||inventoryScope.value==5){
|
||||
var dispensePrice = 0
|
||||
var refundPrice = 0
|
||||
getAmbPractitionerDetail(queryParams.value).then((res) => {
|
||||
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){
|
||||
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})
|
||||
}
|
||||
}
|
||||
loading.value = false;
|
||||
// 带分页数据
|
||||
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})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}else if(inventoryScope.value==2||inventoryScope.value==4||inventoryScope.value==6){
|
||||
var dispensePrice2 = 0
|
||||
var refundPrice2 = 0
|
||||
getAmbMedicationDetail(queryParams.value).then((res) => {
|
||||
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})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}else{
|
||||
total.value =0
|
||||
purchaseinventoryList.value = [
|
||||
{outpatientNo:'M2505070009100304',prescriptionNo:'CF2505070009101361',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'依折麦布片',busNo:'yp3065',medicalName:'依折麦布片',ybNo:'XC10AXY097A0010',totalVolume:'10mg*10',salePrice:'63.56',price:'63.56',totalPrice:'63.56',dispenseQuantity:'1盒',dispensePrice:'63.56',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'Y013201',manufacturerText:'杭州默沙东制药有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100304',prescriptionNo:'CF2505070009101362',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'4.8',price:'4.8',totalPrice:'4.8',dispenseQuantity:'1盒',dispensePrice:'4.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100305',prescriptionNo:'CF2505070009101363',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'4.8',price:'4.8',totalPrice:'4.8',dispenseQuantity:'1盒',dispensePrice:'4.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100305',prescriptionNo:'CF2505070009101364',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'依折麦布片',busNo:'yp3065',medicalName:'依折麦布片',ybNo:'XC10AXY097A0010',totalVolume:'10mg*10',salePrice:'63.56',price:'63.56',totalPrice:'63.56',dispenseQuantity:'1盒',dispensePrice:'63.56',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'Y013201',manufacturerText:'杭州默沙东制药有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100305',prescriptionNo:'CF2505070009101365',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'4.8',price:'4.8',totalPrice:'4.8',dispenseQuantity:'1盒',dispensePrice:'4.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100305',prescriptionNo:'CF2505070009101366',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'4.8',price:'4.8',totalPrice:'4.8',dispenseQuantity:'1盒',dispensePrice:'4.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100306',prescriptionNo:'CF2505070009101367',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'依折麦布片',busNo:'yp3065',medicalName:'依折麦布片',ybNo:'XC10AXY097A0010',totalVolume:'10mg*10',salePrice:'63.56',price:'63.56',totalPrice:'63.56',dispenseQuantity:'1盒',dispensePrice:'63.56',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'Y013201',manufacturerText:'杭州默沙东制药有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100306',prescriptionNo:'CF2505070009101368',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'4.8',price:'4.8',totalPrice:'4.8',dispenseQuantity:'1盒',dispensePrice:'4.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100306',prescriptionNo:'CF2505070009101369',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'4.8',price:'4.8',totalPrice:'4.8',dispenseQuantity:'1盒',dispensePrice:'4.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100307',prescriptionNo:'CF2505070009101368',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'4.8',price:'4.8',totalPrice:'4.8',dispenseQuantity:'1盒',dispensePrice:'4.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
{outpatientNo:'M2505070009100307',prescriptionNo:'CF2505070009101369',dispenseTime:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',medicationName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'2.8',price:'2.8',totalPrice:'2.8',dispenseQuantity:'1盒',dispensePrice:'2.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
]
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.dispenseTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.dispenseTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList(1);
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = ""
|
||||
queryParams.value.dispenseTimeSTime = ""
|
||||
queryParams.value.dispenseTimeETime = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList(1);
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pagination-container{
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="年份:" prop="visitsYear">
|
||||
<el-date-picker
|
||||
v-model="visitsYear"
|
||||
type="year"
|
||||
placeholder="请选择年份"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间类型:" prop="dateType">
|
||||
<el-select
|
||||
v-model="queryParams.dateType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="dateTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="dateType in dateTypeOptions"
|
||||
:key="dateType.value"
|
||||
:label="dateType.label"
|
||||
:value="dateType.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊时间" prop="visitTime1" v-if="queryParams.dateType=='1'">
|
||||
<el-date-picker
|
||||
|
||||
v-model="queryParams.visitTime1"
|
||||
type="datetime"
|
||||
placeholder="请选择就诊时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="就诊时间" prop="visitTime2" v-if="queryParams.dateType=='2'">
|
||||
<el-date-picker
|
||||
|
||||
@change="visitTimeChange"
|
||||
v-model="queryParams.visitTime2"
|
||||
type="week"
|
||||
format="[Week] ww"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择就诊时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊时间" prop="visitTime3" v-if="queryParams.dateType=='3'">
|
||||
<el-date-picker
|
||||
|
||||
v-model="queryParams.visitTime3"
|
||||
type="month"
|
||||
placeholder="请选择就诊时间"
|
||||
/>
|
||||
</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" class="mb8">
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
|
||||
<el-table-column
|
||||
label="就诊人数"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="发热人数"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="腹泻人数"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="报损日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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="numberOfVisits">
|
||||
import {
|
||||
getReportLossPage,
|
||||
|
||||
|
||||
} from "./statisticalManagent";
|
||||
const { proxy } = getCurrentInstance();
|
||||
import moment from "moment";
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const dateTypeOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const visitsYear = formatDate(new Date(),1)
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
dateType:"1",
|
||||
visitTime1: formatDate(new Date(),2),
|
||||
visitTime2: formatDate(new Date(),3),
|
||||
visitTime3: formatDate(new Date(),4),
|
||||
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
function visitTimeChange(val){
|
||||
getWeekDataList(val)
|
||||
}
|
||||
function getWeek(){
|
||||
if(new Date().getDay()==1){ //当前是星期一
|
||||
let weekTime = formatDate(new Date(),5,1)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==2){ //当前是星期二
|
||||
let weekTime = formatDate(new Date(),5,2)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==3){ //当前是星期三
|
||||
let weekTime = formatDate(new Date(),5,3)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==4){ //当前是星期四
|
||||
let weekTime = formatDate(new Date(),5,4)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==5){ //当前是星期五
|
||||
let weekTime = formatDate(new Date(),5,5)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==6){ //当前是星期六
|
||||
let weekTime = formatDate(new Date(),5,6)
|
||||
return weekTime
|
||||
}else if(new Date().getDay()==7){ //当前是星期日
|
||||
let weekTime = formatDate(new Date(),5,7)
|
||||
return weekTime
|
||||
}
|
||||
}
|
||||
|
||||
function getWeekDataList(val) {
|
||||
let oneDayTime = 1000 * 60 * 60 * 24
|
||||
let today =val?new Date(val):new Date(getWeek())
|
||||
let todayDay = today.getDay() || 7
|
||||
let startDate =new Date(today.getTime() + oneDayTime * (todayDay - 1))
|
||||
let dateList = []
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let temp =new Date(startDate.getTime() - i * oneDayTime)
|
||||
let year = temp.getFullYear()
|
||||
let month = temp.getMonth() + 1 < 10 ? '0' + (temp.getMonth() + 1) : temp.getMonth() + 1
|
||||
let day = temp.getDate() < 10 ? '0' + temp.getDate() : temp.getDate()
|
||||
dateList[i] = `${year}-${month}-${day}`
|
||||
}
|
||||
console.log(dateList,"选中周的时间")
|
||||
return dateList
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
dateTypeOptions.value = [{value:"1",label:"每天"},{value:"2",label:"每周"},{value:"3",label:"每月"}]
|
||||
queryParams.value.dateType = "1"
|
||||
// getInit().then((response) => {
|
||||
// chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
// })
|
||||
}
|
||||
function dateTypeChange(val){
|
||||
console.log(val,queryParams.value.visitTime2,"!@1")
|
||||
if(val == "2"){ //每周
|
||||
getWeekDataList()
|
||||
}
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportLossPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
function formatDate(cellValue,yearType,value) {
|
||||
if (cellValue == null || cellValue == "") return "";
|
||||
var date = new Date(cellValue)
|
||||
var year = date.getFullYear()
|
||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
||||
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
||||
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
|
||||
var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
|
||||
var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
|
||||
// var nowDayOfWeek = date.getDay(); // 今天本周的第几天
|
||||
// var nowDay = nowDayOfWeek || 7;
|
||||
// var startWeek = new Date(year, month, day + 1 - nowDay)
|
||||
// console.log(startWeek,"startWeek")
|
||||
if(yearType==2||yearType==1||yearType==3){
|
||||
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
||||
}else if(yearType==5){
|
||||
day = date.getDate() < 10 ? '0' + date.getDate()-value : date.getDate()-value
|
||||
console.log(day,"day")
|
||||
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
|
||||
}else{
|
||||
return year + '-' + month
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,713 @@
|
||||
<template>
|
||||
<div busNo="app-container">
|
||||
<el-form
|
||||
style="margin-top:20px;margin-left:20px;"
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<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>
|
||||
<!-- @change="inventoryChange(queryParams.statisticsType)" -->
|
||||
<el-form-item label="统计类型:">
|
||||
<el-select
|
||||
v-model="queryParams.statisticsType"
|
||||
placeholder=""
|
||||
style="width: 220px"
|
||||
@change="inventoryChange(queryParams.statisticsType)"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventoryOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</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
|
||||
v-for="supplyStatus in getDepartmentOptions"
|
||||
:key="supplyStatus.id"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开单人:" prop="issuerId">
|
||||
<el-select
|
||||
v-model="queryParams.issuerId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in issuerOptions"
|
||||
:key="supplyStatus.id"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收费人:" prop="payeeId">
|
||||
<el-select
|
||||
v-model="queryParams.payeeId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in payeeOptions"
|
||||
:key="supplyStatus.id"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 字典item_type -->
|
||||
<el-form-item label="项目类型:" prop="clinicalType">
|
||||
<el-select
|
||||
v-model="queryParams.clinicalType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in clinicalTypeOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 医保号,门诊号,患者姓名,项目名,项目编码 -->
|
||||
<el-form-item label="医保号/门诊号/患者姓名/项目名/项目编码:" prop="searchKey" label-width="295">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="输入医保号/门诊号/患者姓名/项目名称/项目编码后回车查询"
|
||||
clearable
|
||||
style="width: 395px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" busNo="mb8" 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-row>
|
||||
|
||||
<el-table
|
||||
style="padding:0 20px;width:100%;height:67vh"
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:span-method="arraySpanMethod"
|
||||
|
||||
>
|
||||
<!-- :span-method="arraySpanMethod" -->
|
||||
<!-- :summary-method="getSummaries"
|
||||
show-summary 每页单独合计-->
|
||||
<el-table-column type="selection" width="50px" align="center" />
|
||||
<el-table-column
|
||||
label='门诊号'
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="110px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="departmentName"
|
||||
prop="departmentName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="90px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保号"
|
||||
align="center"
|
||||
key="ybCode"
|
||||
prop="ybCode"
|
||||
width="190px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="药品项目"
|
||||
align="center"
|
||||
key="clinicalName"
|
||||
prop="clinicalName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保码"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
width="220px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保类别"
|
||||
align="center"
|
||||
key="type_dictText"
|
||||
prop="type_dictText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="开单人"
|
||||
align="center"
|
||||
key="issuerName"
|
||||
prop="issuerName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
||||
label="收费人"
|
||||
align="center"
|
||||
key="payeeName"
|
||||
prop="payeeName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="135px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
align="center"
|
||||
key="number"
|
||||
prop="number"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保等级"
|
||||
align="center"
|
||||
key="chrgitmLv_enumText"
|
||||
prop="chrgitmLv_enumText"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="收费时间"
|
||||
align="center"
|
||||
key="chargeTime"
|
||||
prop="chargeTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.chargeTime) }}</span>
|
||||
</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(1)"
|
||||
/>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
busNo="mb8"
|
||||
style="
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
margin-left:0px;margin-right:0px;padding:0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span>制单人:{{ userStore.name }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="outPatientCharge">
|
||||
import {
|
||||
getReportChargePage,
|
||||
getAmbPractitionerDetail,
|
||||
// getMedicationDetailsInit,
|
||||
getDepartmentList,
|
||||
getReportChargeInit
|
||||
} from "./statisticalManagent";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { watch } from "vue";
|
||||
const userStore = useUserStore();
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const totalAmount = ref(0);
|
||||
// const {
|
||||
// item_type,
|
||||
// hosp_lv
|
||||
// } = proxy.useDict(
|
||||
// "item_type",
|
||||
// "hosp_lv"
|
||||
// );
|
||||
const purchaseinventoryListAll = ref([])
|
||||
const xiaojiTotal = ref([])
|
||||
const rowSpan = ref(1)
|
||||
const issuerOptions = ref([])
|
||||
const payeeOptions = ref([])
|
||||
const inventoryOptions = ref([])
|
||||
const clinicalTypeOptions = ref([]);
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const getDepartmentOptions = ref([])
|
||||
// const queryParams.value.statisticsType = ref(1)
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
statisticsType: 1,
|
||||
searchKey:undefined,
|
||||
// ybCode: undefined,
|
||||
// busNo:undefined,
|
||||
// name: undefined,
|
||||
departmentId:undefined,
|
||||
issuerId:undefined,
|
||||
payeeId: undefined,
|
||||
clinicalType:undefined,
|
||||
// clinicalName:undefined,
|
||||
chargeTimeSTime:undefined,
|
||||
chargeTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
watch(
|
||||
() => queryParams.value.statisticsType,
|
||||
(newVlaue) => {
|
||||
queryParams.value.statisticsType = newVlaue
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
/**计算合计金额 */
|
||||
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)
|
||||
// let totalReturnPriceSums = Number(purchaseinventoryList.value[i].refundPrice)
|
||||
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)
|
||||
// totalReturnPriceSums += Number(purchaseinventoryList.value[i-j].refundPrice)
|
||||
}
|
||||
}
|
||||
xiaojiTotal.value.push({inde:i+1,busNo:row.busNo,genderEnum_enumText:row.genderEnum_enumText,totalPrice:totalPriceSums.toFixed(4)||0.0000})
|
||||
// var totalPrice2 = 0
|
||||
// var refundPrice2 = 0
|
||||
purchaseinventoryList.value.splice(i+1, 0, {busNo:row.busNo,genderEnum_enumText:row.genderEnum_enumText,departmentName:'小计',totalPrice:totalPriceSums.toFixed(4)||0.0000})
|
||||
// purchaseinventoryList.value.map(k=>{
|
||||
// if(k.departmentName!='小计'){
|
||||
// totalPrice2 += Number(k.totalPrice)
|
||||
// refundPrice2 += Number(k.refundPrice)
|
||||
// }
|
||||
// })
|
||||
// totalPrice2 = totalPrice2?totalPrice2.toFixed(4):totalPrice2
|
||||
// refundPrice2 = refundPrice2?refundPrice2.toFixed(4):refundPrice2
|
||||
// purchaseinventoryList.value.push({departmentName:'合计',totalPrice:totalPrice2,refundPrice:refundPrice2})
|
||||
}
|
||||
const arraySpanMethod = ({
|
||||
row,
|
||||
column,
|
||||
rowIndex,
|
||||
columnIndex,
|
||||
}) => {
|
||||
// 合并一样的列住院号 outpatientNumber属性&&(queryParams.value.statisticsType==1||queryParams.value.statisticsType==4||queryParams.value.statisticsType==6)
|
||||
if (columnIndex === 1&&purchaseinventoryList.value.length>0) {
|
||||
if (rowIndex === 0 || (rowIndex > 0 && row.busNo !== purchaseinventoryList.value[rowIndex - 1]?.busNo)) {
|
||||
let rowspan = 1;
|
||||
let totalPriceSum = 0
|
||||
// let totalReturnPriceSum = 0
|
||||
for (let i = rowIndex + 1; i < purchaseinventoryList.value.length+1; i++) {
|
||||
if(purchaseinventoryList.value[i-1].departmentName!='合计'){
|
||||
if (purchaseinventoryList.value[i]&&purchaseinventoryList.value[i].busNo === row.busNo) {
|
||||
rowspan++;
|
||||
totalPriceSum += Number(purchaseinventoryList.value[i].totalPrice)
|
||||
// totalReturnPriceSum += Number(purchaseinventoryList.value[i].refundPrice)
|
||||
if(i==purchaseinventoryList.value.length-1){
|
||||
let findIndexTotal = xiaojiTotal.value.findIndex(k=>k.busNo==row.busNo)
|
||||
if(findIndexTotal<0){
|
||||
getTotals(row,i)
|
||||
}
|
||||
}else{
|
||||
}
|
||||
} else {
|
||||
totalPriceSum += Number(row.totalPrice)
|
||||
// totalReturnPriceSum += Number(row.refundPrice)
|
||||
let findIndexTotal = xiaojiTotal.value.findIndex(k=>k.busNo==row.busNo)
|
||||
if(findIndexTotal<0){
|
||||
xiaojiTotal.value.push({inde:i,genderEnum_enumText:row.genderEnum_enumText,busNo:row.busNo,totalPrice:totalPriceSum})
|
||||
purchaseinventoryList.value.splice(i, 0, {busNo:row.busNo,genderEnum_enumText:row.genderEnum_enumText,departmentName:'小计',totalPrice:totalPriceSum.toFixed(4)||0.0000})
|
||||
// console.log(purchaseinventoryList.value,"12121")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// console.log(purchaseinventoryList.value,"12122")
|
||||
return { rowspan, colspan: 1 };
|
||||
} else {
|
||||
// console.log(purchaseinventoryList.value,"12123")
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
// }else{ // 姓名列patientName
|
||||
// if (columnIndex ===2&&purchaseinventoryList.value.length>0) {
|
||||
// if (rowIndex === 0 || (rowIndex > 0 && row.name !== purchaseinventoryList.value[rowIndex - 1]?.name)) {
|
||||
// let rowspan = 1;
|
||||
// for (let i = rowIndex + 1; i < purchaseinventoryList.value.length; i++) {
|
||||
// if (purchaseinventoryList.value[i].name === row.name) {
|
||||
// rowspan++;
|
||||
// } else {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return { rowspan:rowspan, colspan: 1 };
|
||||
// } else {
|
||||
// return { rowspan: 0, colspan: 0 };
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
const getSummaries = (param) => {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = h('div', { style: { textDecoration: 'underline' } }, [
|
||||
'合计',
|
||||
])
|
||||
return
|
||||
}
|
||||
const values = data.map((item) => (item.departmentName!='小计'&&Number(item[column.property])))
|
||||
if (column.property=='totalPrice') {
|
||||
sums[index] = `${values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return (Number(prev) + Number(curr)).toFixed(4) || 0.0000
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0.0000)}`
|
||||
} else {
|
||||
sums[index] = ' '
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
function inventoryChange(val){
|
||||
queryParams.value.statisticsType = val
|
||||
xiaojiTotal.value = []
|
||||
purchaseinventoryList.value = []
|
||||
getList()
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
getReportChargeInit().then((response)=>{
|
||||
inventoryOptions.value = response.data.statisticsTypeOptions
|
||||
queryParams.value.statisticsType = 1
|
||||
issuerOptions.value = response.data.issuerOptions
|
||||
payeeOptions.value = response.data.payeeOptions
|
||||
clinicalTypeOptions.value = response.data.clinicalTypeOptions
|
||||
})
|
||||
getDepartmentList().then((response) => {
|
||||
getDepartmentOptions.value = response.data // 科室
|
||||
})
|
||||
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList(type) {
|
||||
if(type){
|
||||
xiaojiTotal.value = []
|
||||
purchaseinventoryList.value = []
|
||||
}
|
||||
loading.value = true;
|
||||
// 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:'旧系统批量'},
|
||||
// {busNo:'M2505070009100305',name:"李四",departmentName:'CF2505070009101363',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:'旧系统批量'},
|
||||
// {busNo:'M2505070009100305',name:"李四",departmentName:'CF2505070009101364',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:'M2505070009100305',name:"李四",departmentName:'CF2505070009101365',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:'旧系统批量'},
|
||||
// {busNo:'M2505070009100305',name:"李四",departmentName:'CF2505070009101366',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:'旧系统批量'},
|
||||
// {busNo:'M2505070009100306',name:"王五",departmentName:'CF2505070009101367',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:'M2505070009100306',name:"王五",departmentName:'CF2505070009101368',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:'旧系统批量'},
|
||||
// {busNo:'M2505070009100306',name:"王五",departmentName:'CF2505070009101369',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:'旧系统批量'},
|
||||
// {busNo:'M2505070009100307',name:"赵六",departmentName:'CF2505070009101368',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:'旧系统批量'},
|
||||
// {busNo:'M2505070009100307',name:"赵六",departmentName:'CF2505070009101369',birthDate:'2025-05-07 16:28',practitionerName:'张三',practitionerName:'王东收费',clinicalName:'布洛芬缓释胶囊',busNo:'yp3065',medicalName:'布洛芬缓释胶囊',ybNo:'XC10AXY097A0010',totalVolume:'0.3g*24',salePrice:'2.8',price:'2.8',totalPrice:'2.8',number:'1盒',totalPrice:'2.8',refundQuantity:'0.00盒',refundPrice:'0.00',lotNumber:'72240709',manufacturerText:'上海信谊天平药业有限公司',supplierName:'旧系统批量'},
|
||||
// ]
|
||||
var totalPrice2 = 0
|
||||
// var refundPrice2 = 0
|
||||
// var purchaseinventoryLists = []
|
||||
// var purchaseinventoryListsArray = []
|
||||
getReportChargePage(queryParams.value).then((res) => {
|
||||
// purchaseinventoryLists = res.data.records||[] //转换数据结构
|
||||
// if(purchaseinventoryLists.length>0){
|
||||
// purchaseinventoryLists.map(p=>{
|
||||
// purchaseinventoryListsArray = [...purchaseinventoryListsArray, ...p.reportPageItemDto]
|
||||
// // purchaseinventoryList.value.concat(p.reportPageItemDto)
|
||||
// })
|
||||
// }
|
||||
// purchaseinventoryList.value = purchaseinventoryListsArray
|
||||
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.refundPrice = k.refundPrice || '0.00'
|
||||
k.number = k.number?(k.number+(k.quantityUnit_dictText?k.quantityUnit_dictText:"")):('0.0000'+ k.quantityUnit_dictText?k.quantityUnit_dictText:"")
|
||||
// k.refundQuantity = k.refundQuantity?(k.refundQuantity+k.refundUnitCode_dictText):('0.00'+ k.quantityUnit_dictText)
|
||||
if(total.value&&total.value<=queryParams.value.pageSize){
|
||||
totalPrice2 += Number(k.totalPrice)
|
||||
// refundPrice2 += Number(k.refundPrice)
|
||||
}
|
||||
})
|
||||
if(total.value<=res.data.size){
|
||||
loading.value = false;
|
||||
}
|
||||
// 1页数据
|
||||
if(total.value&&total.value<=queryParams.value.pageSize){
|
||||
totalPrice2 = totalPrice2?totalPrice2.toFixed(4):totalPrice2
|
||||
// refundPrice2 = refundPrice2?refundPrice2.toFixed(4):refundPrice2
|
||||
let pageNoAll = total.value / queryParams.value.pageSize
|
||||
if(Math.ceil(pageNoAll)==queryParams.value.pageNo){
|
||||
purchaseinventoryList.value.push({departmentName:'合计',totalPrice:totalPrice2})
|
||||
}
|
||||
}
|
||||
|
||||
// 带分页数据
|
||||
if(total.value&&total.value>queryParams.value.pageSize){
|
||||
// var purchaseinventoryListsAll = []
|
||||
// var purchaseinventoryListsArrayAll = []
|
||||
let queryParamsValue = {...queryParams.value}
|
||||
queryParamsValue.pageSize = total.value
|
||||
queryParamsValue.pageNo = 1
|
||||
getReportChargePage(queryParamsValue).then((res) => {
|
||||
// purchaseinventoryListsAll = res.data.records||[]
|
||||
// if(purchaseinventoryListsAll.length>0){
|
||||
// purchaseinventoryListsAll.map(p=>{
|
||||
// purchaseinventoryListsArrayAll = [...purchaseinventoryListsArrayAll, ...p.reportPageItemDto]
|
||||
// // purchaseinventoryList.value.concat(p.reportPageItemDto)
|
||||
// })
|
||||
// }
|
||||
// purchaseinventoryListAll.value = purchaseinventoryListsArrayAll
|
||||
purchaseinventoryListAll.value = res.data.records||[]
|
||||
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'
|
||||
// k.refundPrice = k.refundPrice || '0.00'
|
||||
k.number = k.number?(k.number+k.quantityUnit_dictText?k.quantityUnit_dictText:""):('0.0000'+ k.quantityUnit_dictText?k.quantityUnit_dictText:"")
|
||||
// k.refundQuantity = k.refundQuantity?(k.refundQuantity+k.refundUnitCode_dictText):('0.00'+ k.quantityUnit_dictText)
|
||||
totalPrice2 += Number(k.totalPrice)
|
||||
// refundPrice2 += Number(k.refundPrice)
|
||||
//处理不同页门诊号相同小计在最后回显问题start
|
||||
// m<queryParams.value.pageSize&&
|
||||
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
|
||||
) {
|
||||
// purchaseinventoryList.value.unshift(purchaseinventoryListAll.value[index-m]) // 加
|
||||
// //修改计算的小计缺少加过来的部分
|
||||
let dispenseNoIndex1 = purchaseinventoryList.value.findIndex(o=>o.departmentName=='小计'&&o.busNo==purchaseinventoryListAll.value[index-m].busNo)
|
||||
|
||||
if(dispenseNoIndex1>0){
|
||||
purchaseinventoryList.value[dispenseNoIndex1].totalPrice = Number(purchaseinventoryList.value[dispenseNoIndex1].totalPrice)+Number(purchaseinventoryListAll.value[index-m].totalPrice)
|
||||
purchaseinventoryList.value[dispenseNoIndex1].totalPrice = purchaseinventoryList.value[dispenseNoIndex1].totalPrice?purchaseinventoryList.value[dispenseNoIndex1].totalPrice.toFixed(4):'0.0000'
|
||||
}
|
||||
}
|
||||
if ((index+m) == (queryParams.value.pageSize*queryParams.value.pageNo)&& k.busNo == purchaseinventoryListAll.value[index + m]?.busNo) {
|
||||
if(purchaseinventoryList.value[purchaseinventoryList.value.length-1].departmentName=='小计'){
|
||||
purchaseinventoryList.value.splice(purchaseinventoryList.value.length-1,1) // 减掉第二页还有相同门诊号的第一页的小计
|
||||
}
|
||||
// let dispenseNoIndex = purchaseinventoryList.value.findIndex(o=>o.paymentId==k.paymentId&&o.chargeId==k.chargeId) //通过唯一主键进行区分
|
||||
// purchaseinventoryList.value.splice(dispenseNoIndex,1) // 减
|
||||
// if(purchaseinventoryList.value[dispenseNoIndex-1]&&purchaseinventoryList.value[dispenseNoIndex-1].departmentName=='小计'){
|
||||
// purchaseinventoryList.value.splice(dispenseNoIndex+1,1) // 减掉带小计的
|
||||
// }
|
||||
}
|
||||
}
|
||||
// end
|
||||
})
|
||||
totalPrice2 = totalPrice2?totalPrice2.toFixed(4):totalPrice2
|
||||
// refundPrice2 = refundPrice2?refundPrice2.toFixed(4):refundPrice2
|
||||
loading.value = false;
|
||||
let pageNoAll = total.value / queryParams.value.pageSize
|
||||
if(Math.ceil(pageNoAll)==queryParams.value.pageNo){
|
||||
purchaseinventoryList.value.push({departmentName:'合计',totalPrice:totalPrice2})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.chargeTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.chargeTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList(1);
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = ""
|
||||
queryParams.value.chargeTimeSTime = ""
|
||||
queryParams.value.chargeTimeETime = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList(1);
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pagination-container{
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,342 @@
|
||||
<!--
|
||||
* @Author: X_bo v-hss@tbpartners.local
|
||||
* @Date: 2025-09-01 16:37:41
|
||||
* @LastEditTime: 2025-09-02 17:21:49
|
||||
* @LastEditors: X_bo v-hss@tbpartners.local
|
||||
* @Description:
|
||||
* @FilePath: \openhis-ui-vue3\src\views\medicationmanagement\statisticalManagement\pharmacyMonthlybalance.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<div class="left-container">
|
||||
<el-form
|
||||
style="margin-top:20px;margin-left:20px;"
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="开始时间:">
|
||||
<el-date-picker
|
||||
v-model="queryParams.dispenseDateSTime"
|
||||
type="datetime"
|
||||
placeholder="请选择开始时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 200px;"
|
||||
:clearable="false"
|
||||
@change="handleTimeChange('start')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间:">
|
||||
<el-date-picker
|
||||
v-model="queryParams.dispenseDateETime"
|
||||
type="datetime"
|
||||
placeholder="请选择结束时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 200px;"
|
||||
:clearable="false"
|
||||
@change="handleTimeChange('end')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
>查询</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
>重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
style="padding:0 20px;width:100%;margin-top:20px;"
|
||||
v-loading="leftLoading"
|
||||
:data="leftTableData"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column label="科室名" prop="orgName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="耗材和药品总金额" prop="totalMoney" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<span class="link" @click.stop="handleRowClick(scope.row)">{{ scope.row.totalMoney }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<div class="right-container">
|
||||
<el-form
|
||||
style="margin-top:20px;margin-left:20px;"
|
||||
:model="rightQueryParams"
|
||||
:inline="true"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="项目名:">
|
||||
<el-input
|
||||
v-model="rightQueryParams.name"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleRightQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="Search"
|
||||
@click="handleRightQuery"
|
||||
>查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
style="padding:0 20px;margin-top:20px;"
|
||||
v-loading="rightLoading"
|
||||
:data="rightTableData"
|
||||
>
|
||||
<el-table-column label="项目名" prop="name" width="180" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格" prop="totalVolume" width="150" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="产品型号" prop="lotNumber" width="150" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="生产厂家" prop="manufacturerText" width="500" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="数量" prop="totalQuantity" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="单位" prop="unitCode_dictText" width="100" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="项目总价" prop="totalMoney" width="120" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="所属科室" prop="orgId_dictText" width="150" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="发放时间" prop="dispenseTime" width="240" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<span>{{ formatIsoDate(scope.row.dispenseTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加右侧分页组件 -->
|
||||
<div class="pagination-container">
|
||||
<el-pagination
|
||||
v-model:current-page="rightQueryParams.pageNo"
|
||||
v-model:page-size="rightQueryParams.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="rightTotal"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="pharmacyStatisticsDetails">
|
||||
import { ref, reactive, toRefs, onMounted } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { getMedDevInfo, getMedDevAll } from './statisticalManagent';
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
// 左侧列表数据
|
||||
const leftTableData = ref([]);
|
||||
const leftLoading = ref(false);
|
||||
const selectedRow = ref(null);
|
||||
|
||||
// 右侧列表数据
|
||||
const rightTableData = ref([]);
|
||||
const rightLoading = ref(false);
|
||||
// 添加右侧总条数
|
||||
const rightTotal = ref(0);
|
||||
|
||||
// 查询参数
|
||||
// 初始化时就设置默认时间,防止被清空
|
||||
const today = new Date();
|
||||
const lastMonth = new Date();
|
||||
lastMonth.setMonth(lastMonth.getMonth() - 1);
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
dispenseDateSTime: formatDate(lastMonth),
|
||||
dispenseDateETime: formatDate(today),
|
||||
},
|
||||
rightQueryParams: {
|
||||
name: '',
|
||||
orgId: '',
|
||||
dispenseDateSTime: '',
|
||||
dispenseDateETime: '',
|
||||
// 添加分页参数
|
||||
pageNo: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, rightQueryParams } = toRefs(data);
|
||||
|
||||
// 添加时间变化处理函数
|
||||
function handleTimeChange(type) {
|
||||
if (type === 'start' && !queryParams.value.dispenseDateSTime) {
|
||||
queryParams.value.dispenseDateSTime = formatDate(lastMonth);
|
||||
} else if (type === 'end' && !queryParams.value.dispenseDateETime) {
|
||||
queryParams.value.dispenseDateETime = formatDate(today);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取左侧统计数据
|
||||
function getLeftList() {
|
||||
leftLoading.value = true;
|
||||
getMedDevAll(queryParams.value).then((res) => {
|
||||
leftTableData.value = res.data.data || [];
|
||||
leftLoading.value = false;
|
||||
}).catch(() => {
|
||||
leftLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 获取右侧详情数据
|
||||
function getRightList() {
|
||||
rightLoading.value = true;
|
||||
getMedDevInfo(rightQueryParams.value).then((res) => {
|
||||
console.log(res)
|
||||
rightTableData.value = res.data.data.records || [];
|
||||
// 设置总条数
|
||||
rightTotal.value = res.data.data.total || 0;
|
||||
rightLoading.value = false;
|
||||
}).catch(() => {
|
||||
rightLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 左侧列表查询
|
||||
function handleQuery() {
|
||||
getLeftList();
|
||||
}
|
||||
|
||||
// 左侧列表清空 - 修改为不清空时间
|
||||
function handleClear() {
|
||||
// 不再清空时间字段
|
||||
proxy.resetForm("queryRef", ['dispenseDateSTime', 'dispenseDateETime']);
|
||||
getLeftList();
|
||||
}
|
||||
|
||||
// 点击左侧行
|
||||
function handleRowClick(row) {
|
||||
selectedRow.value = row;
|
||||
// 设置右侧查询参数
|
||||
rightQueryParams.value.orgId = row.orgId;
|
||||
rightQueryParams.value.dispenseDateSTime = queryParams.value.dispenseDateSTime;
|
||||
rightQueryParams.value.dispenseDateETime = queryParams.value.dispenseDateETime;
|
||||
// 重置页码
|
||||
rightQueryParams.value.pageNo = 1;
|
||||
// 查询右侧数据
|
||||
getRightList();
|
||||
}
|
||||
|
||||
// 右侧列表查询
|
||||
function handleRightQuery() {
|
||||
getRightList();
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
onMounted(() => {
|
||||
// 设置默认时间为近一个月
|
||||
const endDate = new Date();
|
||||
const startDate = new Date();
|
||||
startDate.setMonth(startDate.getMonth() - 1);
|
||||
queryParams.value.dispenseDateSTime = formatDate(startDate);
|
||||
queryParams.value.dispenseDateETime = formatDate(endDate);
|
||||
getLeftList();
|
||||
});
|
||||
|
||||
// 格式化日期为YYYY-MM-DD HH:mm:ss
|
||||
function formatDate(date) {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
|
||||
// 格式化ISO日期字符串为YYYY-MM-DD HH:mm:ss
|
||||
function formatIsoDate(isoString) {
|
||||
if (!isoString) return '';
|
||||
try {
|
||||
const date = new Date(isoString);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const hours = String(date.getHours()).padStart(2, '0');
|
||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
} catch (error) {
|
||||
console.error('Invalid ISO date string:', isoString);
|
||||
return isoString;
|
||||
}
|
||||
}
|
||||
|
||||
// 分页处理函数
|
||||
function handleSizeChange(val) {
|
||||
rightQueryParams.value.pageSize = val;
|
||||
getRightList();
|
||||
}
|
||||
|
||||
function handleCurrentChange(val) {
|
||||
rightQueryParams.value.pageNo = val;
|
||||
getRightList();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.left-container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-container .el-table {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden; /* 添加这行来隐藏水平滚动条 */
|
||||
margin-top: 20px;
|
||||
width: 100%; /* 确保表格宽度适应容器 */
|
||||
}
|
||||
|
||||
.right-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.right-container .el-table {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
margin-top: 15px;
|
||||
text-align: right;
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,421 @@
|
||||
<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="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品名称:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@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="审核日期:">
|
||||
<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-item label="科室:" prop="department">
|
||||
<el-select
|
||||
v-model="queryParams.department"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="存放仓库:" prop="purposeLocationId" >
|
||||
<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="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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">
|
||||
<!-- 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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="140px"
|
||||
: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="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价金额"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="采购科室"
|
||||
align="center"
|
||||
key="department"
|
||||
prop="department"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplier"
|
||||
prop="supplier"
|
||||
: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="160"
|
||||
: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="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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="PurchaseDocumentDetsils">
|
||||
import {
|
||||
getReportInboundPCage,
|
||||
getPharmacyCabinetList,
|
||||
getInboundInit
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
// const {
|
||||
// item_type
|
||||
// } = proxy.useDict(
|
||||
// "item_type"
|
||||
// );
|
||||
const purchaseinventoryList = 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 chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name:undefined,
|
||||
medicationDefId: undefined,
|
||||
// approvalTime:undefined,
|
||||
department:undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime: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 getList() {
|
||||
loading.value = true;
|
||||
getReportInboundPCage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2
|
||||
? approvalTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.createTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2
|
||||
? approvalTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
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();
|
||||
getPharmacyCabinetLists()
|
||||
</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,438 @@
|
||||
<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="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品名称:" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@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="审核日期:">
|
||||
<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-item label="科室:" prop="department">
|
||||
<el-select
|
||||
v-model="queryParams.department"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="存放仓库:" prop="purposeLocationId" >
|
||||
<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="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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">
|
||||
<!-- 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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单据号"
|
||||
align="center"
|
||||
key="originalBusNo"
|
||||
prop="originalBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="140px"
|
||||
: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="locationStoreName"
|
||||
prop="locationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退货数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退货单价"
|
||||
align="center"
|
||||
key="returnPrice"
|
||||
prop="returnPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退货金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="售价"
|
||||
align="center"
|
||||
key="salePrice"
|
||||
prop="salePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="售价金额"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
label="采购科室"
|
||||
align="center"
|
||||
key="department"
|
||||
prop="department"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplier"
|
||||
prop="supplier"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
width="160"
|
||||
: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="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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="PurchaseReturnDetsils">
|
||||
import {
|
||||
getReportPurchaseReturn,
|
||||
getPharmacyCabinetList,
|
||||
getPurchaseReturnInit
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
// const {
|
||||
// item_type
|
||||
// } = proxy.useDict(
|
||||
// "item_type"
|
||||
// );
|
||||
const purchaseinventoryList = 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 chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name:undefined,
|
||||
medicationDefId: undefined,
|
||||
// approvalTime:undefined,
|
||||
department:undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getPurchaseReturnInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions
|
||||
})
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportPurchaseReturn(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2
|
||||
? approvalTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.createTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2
|
||||
? approvalTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
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();
|
||||
getPharmacyCabinetLists()
|
||||
</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,321 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="结算日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="险种类型:" prop="insuType">
|
||||
<el-select
|
||||
v-model="queryParams.insuType"
|
||||
placeholder="请选择险种类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="insuType in insutype"
|
||||
:key="insuType.value"
|
||||
:label="insuType.label"
|
||||
:value="insuType.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同:" prop="contractNo">
|
||||
<el-select
|
||||
v-model="queryParams.contractNo"
|
||||
placeholder="请选择合同"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="insuType in contractNoOptions"
|
||||
:key="insuType.busNo"
|
||||
:label="insuType.contractName"
|
||||
:value="insuType.busNo"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="医院" prop="orgId">
|
||||
<el-input
|
||||
v-model="queryParams.orgId"
|
||||
placeholder="请输入医院id"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<!-- <el-col :span="1.5"> -->
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<!-- <el-button type="primary" plain icon="Edit" @click="getList">查询</el-button> -->
|
||||
<el-button type="primary" plain icon="Edit" @click="handleQuery">结算</el-button>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="1.5"> -->
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleReconciliation"
|
||||
:disabled="ids.length == 0"
|
||||
>
|
||||
医保对总账
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleGetClroptins"
|
||||
>
|
||||
清算机构查询
|
||||
</el-button>
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<!-- <div style="margin-bottom: 5px">
|
||||
定点医药机构结算笔数:{{ counts }}(其中 医疗费总额:{{ totalPrice1 }},基金支付总额:{{
|
||||
totalPrice2
|
||||
}},个人账户支付金额:{{ totalPrice3 }},现金支付金额:{{ totalPrice4 }},认可费用总额:{{
|
||||
totalPrice5
|
||||
}}
|
||||
)
|
||||
</div> -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
border
|
||||
@select="clickRow"
|
||||
ref="refTables"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="清算类别" align="center" prop="contractNo_dictText" />
|
||||
<el-table-column label="险种" align="center" prop="insutype_dictText" />
|
||||
<el-table-column label="是否异地" align="center" key="locationName" prop="locationName" />
|
||||
<el-table-column label="医疗费用总额" align="right" prop="medFeeSumAmt" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ formatNumber(scope.row.medFeeSumAmt) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="基金支付金额"
|
||||
align="right"
|
||||
prop="fundPaySumAmt"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatNumber(scope.row.fundPaySumAmt) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="个人账户支付总额" align="right" prop="acctPay" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ formatNumber(scope.row.acctPay) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="账户共济总额" align="right" prop="acctGjPay" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ formatNumber(scope.row.acctGjPay) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算笔数" align="center" prop="fixMedInsSetlCnt">
|
||||
<template #default="scope">
|
||||
{{ scope.row.fixMedInsSetlCnt + ' 笔' }}
|
||||
</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"
|
||||
/> -->
|
||||
<el-form :inline="true" label-width="90px" style="width: 100%; margin-top: 30px">
|
||||
<el-form-item label="对账结果:" style="width: 100%">
|
||||
<el-input
|
||||
v-model="reconciliation"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
disabled
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="reconciliation">
|
||||
import {
|
||||
ybRequestReconcile, // 医保对账
|
||||
getReconcileList, // 对账列表 结算
|
||||
getContractList, // 合同
|
||||
getClroptins,
|
||||
} from './statisticalManagent';
|
||||
import { formatDate } from '@/utils/index';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { insutype } = proxy.useDict('insutype');
|
||||
// 险种类型
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([formatDate(new Date()), formatDate(new Date())]);
|
||||
const contractNoOptions = ref([]);
|
||||
const clrTypeOptions = ref([]);
|
||||
const selectedRow = ref(null);
|
||||
const reconciliation = ref('');
|
||||
const counts = ref(0);
|
||||
const totalPrice1 = ref(0);
|
||||
const totalPrice2 = ref(0);
|
||||
const totalPrice3 = ref(0);
|
||||
const totalPrice4 = ref(0);
|
||||
const totalPrice5 = ref(0);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
// pageNo: 1,
|
||||
// pageSize: 10,
|
||||
// searchKey: undefined,
|
||||
insuType: undefined, // 险种
|
||||
clrType: undefined, //住院或门诊
|
||||
contractNo: undefined,
|
||||
orgId: undefined,
|
||||
stmtBegnDate: undefined,
|
||||
stmtEndDate: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function clickRow(row) {
|
||||
if (row.length > 1) {
|
||||
let del_row = row.shift(); // 删除选中的第一项
|
||||
proxy.$refs['refTables'].toggleRowSelection(del_row, false); //改变table勾选状态
|
||||
}
|
||||
}
|
||||
function getContractLists() {
|
||||
getContractList().then((response) => {
|
||||
contractNoOptions.value = response.data;
|
||||
});
|
||||
clrTypeOptions.value = [
|
||||
{ value: 11, label: '门诊' },
|
||||
{ value: 21, label: '住院' },
|
||||
];
|
||||
// insuTypeOptions.value = [
|
||||
// { value: 310, label: '职工基本医疗保险' },
|
||||
// { value: 390, label: '城乡居民基本医疗保险' },
|
||||
// { value: 391, label: '城镇居民基本医疗保险' },
|
||||
// { value: 399, label: '其他特殊人员医疗保障' },
|
||||
// ];
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReconcileList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.record ? res.data.record : res.data;
|
||||
// [{insutype:"410",clrType: 11,contractNo:"229900"},{insutype:"410",clrType: 21,contractNo:"229900"}]
|
||||
counts.value = res.data.fixMedInsSetlCnt | 0;
|
||||
totalPrice1.value = res.data.medFeeSumAmt | 0;
|
||||
totalPrice2.value = res.data.fundPaySumAmt | 0;
|
||||
totalPrice3.value = res.data.acctPay | 0;
|
||||
totalPrice4.value = res.data.acctGjPay | 0;
|
||||
totalPrice5.value =
|
||||
totalPrice1.value + totalPrice2.value + totalPrice3.value + totalPrice4.value;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function formatNumber(value) {
|
||||
return value ? value.toFixed(2) : '0.00';
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.stmtBegnDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.stmtEndDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
// queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 按钮操作 */
|
||||
function handleReconciliation() {
|
||||
// 调用接口返回值
|
||||
// loading.value = true;
|
||||
reconciliation.value = '';
|
||||
let queryParams = {
|
||||
insuType: selectedRow.value.insutype.toString(),
|
||||
clrType: selectedRow.value.clrType,
|
||||
contractNo: selectedRow.value.contractNo.toString(),
|
||||
stmtBegnDate:
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '',
|
||||
stmtEndDate:
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '',
|
||||
};
|
||||
ybRequestReconcile(queryParams).then((res) => {
|
||||
// loading.value = false;
|
||||
reconciliation.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRow.value = selection[selection.length - 1];
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
function handleGetClroptins() {
|
||||
getClroptins({ pageNum: 1, pageSize: 100, fixmedinsCode: 'H22010200672' }).then((res) => {});
|
||||
}
|
||||
|
||||
getList();
|
||||
getContractLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .el-textarea.is-disabled .el-textarea__inner {
|
||||
resize: none !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,733 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="85px"
|
||||
>
|
||||
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.setlOptins"
|
||||
placeholder="请输入结算经办机构"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</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="结束日期"
|
||||
style="width: 300px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="清算类型:" prop="clrType">
|
||||
<el-select
|
||||
v-model="queryParams.clrType"
|
||||
placeholder="请选择清算类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in clrTypeOptions"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="医院:" prop="orgId" label-width="70px">
|
||||
<el-input
|
||||
v-model="queryParams.orgId"
|
||||
placeholder="请输入医院id"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="文件查询号:" prop="fileQuryNo" label-width="100px">
|
||||
<el-input
|
||||
v-model="queryParams.fileQuryNo"
|
||||
placeholder="请输入文件查询号"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="本地文件路径:" prop="filePath" label-width="110px">
|
||||
<el-input
|
||||
v-model="queryParams.filePath"
|
||||
placeholder="请输入本地文件路径"
|
||||
clearable
|
||||
style="width: 566px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-upload
|
||||
multiple
|
||||
:action="uploadFileUrl"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:file-list="fileList"
|
||||
limit=1
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleUploadSuccess"
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
class="upload-file-uploader"
|
||||
ref="fileUpload"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
|
||||
>上传文件</el-button
|
||||
>
|
||||
</el-upload>
|
||||
<div class="el-upload__tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
|
||||
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
|
||||
的文件
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <el-row :gutter="10" class="mb8"> -->
|
||||
<!-- <el-col :span="1.5"> -->
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleQuery"
|
||||
>统计</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleExport"
|
||||
>生成txt文件</el-button
|
||||
>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="1.5"> -->
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
@click="handleReconciliation"
|
||||
>开始明细对账</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="ids.length == 0"
|
||||
@click="handleApplyForLiquidation"
|
||||
>申请清算</el-button
|
||||
>
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<div style="margin-bottom:5px">结算笔数:{{counts}}(其中 总费用:{{totalPrice1?totalPrice1.toFixed(2):0}}元, 基金支付金额:{{totalPrice2?totalPrice2.toFixed(2):0}}元, 账户支付金额:{{totalPrice3?totalPrice3.toFixed(2):0}}元,现金支付金额:{{totalPrice4?totalPrice4.toFixed(2):0}}元)</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="个人编码"
|
||||
align="center"
|
||||
key="psnNo"
|
||||
prop="psnNo"
|
||||
width="190"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="患者姓名"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊ID"
|
||||
align="center"
|
||||
key="mdtrtId"
|
||||
prop="mdtrtId"
|
||||
width="270"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结算ID"
|
||||
align="center"
|
||||
key="setlId"
|
||||
prop="setlId"
|
||||
width="270"
|
||||
: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="productionDate"
|
||||
prop="productionDate"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.productionDate) }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="medfeeSumamt"
|
||||
prop="medfeeSumamt"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金支付金额"
|
||||
align="center"
|
||||
key="fundPaySumamt"
|
||||
prop="fundPaySumamt"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户金额"
|
||||
align="center"
|
||||
key="acctPay"
|
||||
prop="acctPay"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="现金支付金额"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- <el-table-column
|
||||
label="共计支付金额"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="结算时间"
|
||||
align="center"
|
||||
key="setlTime"
|
||||
prop="setlTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.setlTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="是否退费"
|
||||
align="center"
|
||||
key="refdSetlFlag"
|
||||
prop="refdSetlFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="报销类型"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="身份证"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="收据编号"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
</el-table>
|
||||
<el-form :inline="true" label-width="90px" style="width: 100%; margin-top: 30px">
|
||||
<el-form-item label="上传结果:" style="width: 100%">
|
||||
<el-input
|
||||
v-model="reconciliationDetail"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
disabled
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
<!-- v-if="purchaseinventoryReturnList&&purchaseinventoryReturnList.length>0" -->
|
||||
<!-- <el-table
|
||||
v-if="purchaseinventoryList.length>0"
|
||||
style="height:190px;margin-top:32px;"
|
||||
v-loading="loadingReturn"
|
||||
:data="purchaseinventoryReturnList"
|
||||
@selection-change="handleSelectionChangeReturn"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="人员ID"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊ID"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="结算ID"
|
||||
align="center"
|
||||
key="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
: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="locationName"
|
||||
prop="locationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总费用"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
width="180px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗费总额"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="基金支付总额"
|
||||
align="center"
|
||||
key="quantityUnit"
|
||||
prop="quantityUnit"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="个人账户支付总额"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="发送方报文ID"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退费结算标志"
|
||||
align="center"
|
||||
key="minUnitCode_dictText"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="reconciliationDetails">
|
||||
import {
|
||||
reconcileDetailList,
|
||||
reconcileDetailTxt,
|
||||
reconcileGeneral,
|
||||
getPharmacyCabinetList,
|
||||
ybRequestFileUp,
|
||||
applyFinancialClearing
|
||||
} from "./statisticalManagent";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { formatDate } from '@/utils/index';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const reconciliationDetail = ref("")
|
||||
const occurrenceTime = ref([formatDate(new Date()),formatDate(new Date())]);
|
||||
const clrTypeOptions = ref([]);
|
||||
const filePath = ref("")
|
||||
const purchaseinventoryReturnList = ref([])
|
||||
const loadingReturn = ref(false)
|
||||
const selectedRow = ref([])
|
||||
const counts = ref(0)
|
||||
const totalPrice1 = ref(0)
|
||||
const totalPrice2 = ref(0)
|
||||
const totalPrice3 = ref(0)
|
||||
const totalPrice4 = ref(0)
|
||||
|
||||
const fileSize = ref(10)
|
||||
const uploadList = ref([]);
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API;
|
||||
const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/yb-request/file-up"); // 上传文件服务器地址
|
||||
const headers = ref({ Authorization: "Bearer " + getToken() });
|
||||
const fileList = ref([]);
|
||||
const fileType = ref(["zip","txt"]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
// pageNo: 1,
|
||||
// pageSize: 10,
|
||||
setlOptins: '229900',
|
||||
filePath: undefined,
|
||||
orgId:undefined,
|
||||
clrType: undefined,
|
||||
fileQuryNo: undefined,
|
||||
stmtBegnDate:undefined,
|
||||
stmtEndDate:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
watch(
|
||||
() => purchaseinventoryList.value,
|
||||
(newVlaue) => {
|
||||
if(newVlaue&&newVlaue.length>0){
|
||||
handleTotalAmount()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
function handleBeforeUpload(file) {
|
||||
// 校检文件类型
|
||||
if (fileType.value.length) {
|
||||
const fileName = file.name.split('.');
|
||||
const fileExt = fileName[fileName.length - 1];
|
||||
const isTypeOk = fileType.value.indexOf(fileExt) >= 0;
|
||||
if (!isTypeOk) {
|
||||
proxy.$modal.msgError(`文件格式不正确, 请上传${fileType.value.join("/")}格式文件!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 校检文件大小
|
||||
if (fileSize.value) {
|
||||
const isLt = file.size / 1024 / 1024 < fileSize.value;
|
||||
if (!isLt) {
|
||||
proxy.$modal.msgError(`上传文件大小不能超过10MB!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
formData.append('filename', file.name)
|
||||
ybRequestFileUp(formData).then((res) => {
|
||||
if(res.code==200){
|
||||
proxy.$modal.msgSuccess("上传成功")
|
||||
}
|
||||
|
||||
})
|
||||
// proxy.$modal.loading("正在上传文件,请稍候...");
|
||||
number.value++;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 文件个数超出
|
||||
function handleExceed() {
|
||||
proxy.$modal.msgError(`上传文件数量不能超过 1 个!`);
|
||||
}
|
||||
|
||||
// 上传失败
|
||||
function handleUploadError(err) {
|
||||
proxy.$modal.msgError("上传文件失败");
|
||||
}
|
||||
|
||||
// 上传成功回调
|
||||
function handleUploadSuccess(res, file) {
|
||||
if (res.code === 200) {
|
||||
console.log(res,file,"file")
|
||||
uploadList.value.push({ name: res.fileName, url: res.fileName });
|
||||
uploadedSuccessfully();
|
||||
} else {
|
||||
number.value--;
|
||||
proxy.$modal.closeLoading();
|
||||
proxy.$modal.msgError(res.msg);
|
||||
proxy.$refs.fileUpload.handleRemove(file);
|
||||
uploadedSuccessfully();
|
||||
}
|
||||
}
|
||||
// function submitFileForm() {
|
||||
// proxy.$refs['fileUpload'].submit();
|
||||
// }
|
||||
// 上传结束处理
|
||||
function uploadedSuccessfully() {
|
||||
if (number.value > 0 && uploadList.value.length === number.value) {
|
||||
fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
|
||||
uploadList.value = [];
|
||||
number.value = 0;
|
||||
// proxy.$refs['fileUpload'].submit();
|
||||
emit("update:modelValue", listToString(fileList.value));
|
||||
proxy.$modal.closeLoading();
|
||||
}
|
||||
}
|
||||
// 删除文件
|
||||
function handleDelete(index) {
|
||||
fileList.value.splice(index, 1);
|
||||
emit("update:modelValue", listToString(fileList.value));
|
||||
}
|
||||
|
||||
// 获取文件名称
|
||||
function getFileName(name) {
|
||||
// 如果是url那么取最后的名字 如果不是直接返回
|
||||
if (name.lastIndexOf("/") > -1) {
|
||||
return name.slice(name.lastIndexOf("/") + 1);
|
||||
} else {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
// 对象转成指定字符串分隔
|
||||
function listToString(list, separator) {
|
||||
let strs = "";
|
||||
separator = separator || ",";
|
||||
for (let i in list) {
|
||||
if (list[i].url) {
|
||||
strs += list[i].url + separator;
|
||||
}
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
/**计算合计金额 */
|
||||
function handleTotalAmount() {
|
||||
counts.value = purchaseinventoryList.value.length
|
||||
totalPrice1.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.medfeeSumamt) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice2.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.fundPaySumamt) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
totalPrice3.value = purchaseinventoryList.value.reduce(
|
||||
(accumulator, currentRow) => {
|
||||
return (accumulator + (Number(currentRow.acctPay) || 0))
|
||||
},
|
||||
0
|
||||
);
|
||||
// 现金支付金额
|
||||
// totalPrice4.value = purchaseinventoryList.value.reduce(
|
||||
// (accumulator, currentRow) => {
|
||||
// return (accumulator + (Number(currentRow.profitAmount) || 0))
|
||||
// },
|
||||
// 0
|
||||
// );
|
||||
}
|
||||
function getPharmacyCabinetLists() {
|
||||
clrTypeOptions.value = [
|
||||
{ value: 11, label: '门诊' },
|
||||
{ value: 21, label: '住院' },
|
||||
];
|
||||
}
|
||||
function handleSelectionChangeReturn(selection) {
|
||||
idsReturn.value = selection.map((item) => item.id);
|
||||
singleReturn.value = selection.length != 1;
|
||||
multipleReturn.value = !selection.length;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
reconcileDetailList(queryParams.value).then((res) => {
|
||||
// console.log(res,"res----------------")
|
||||
// loading.value = false;
|
||||
// purchaseinventoryList.value = [{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"4.72",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"7.43",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"1",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"-1",insutype:"410",clrType: 11,contractNo:"229900"}]
|
||||
purchaseinventoryList.value = res.data.record ? res.data.record : res.data;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.stmtBegnDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.stmtEndDate =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
// queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 按钮操作 */
|
||||
function handleReconciliation() {
|
||||
// 调用接口返回值
|
||||
if(selectedRow.value.length==0){
|
||||
proxy.$message.error('请选择一行数据开始明细对账');
|
||||
return
|
||||
}
|
||||
loading.value = true;
|
||||
let queryParamsss = {
|
||||
settlementIdList:ids.value,
|
||||
filePath:queryParams.value.filePath?queryParams.value.filePath:"",
|
||||
fileQuryNo:queryParams.value.fileQuryNo?queryParams.value.fileQuryNo:"",
|
||||
setlOptins:queryParams.value.setlOptins?queryParams.value.setlOptins:"",
|
||||
clrType:queryParams.value.clrType?queryParams.value.clrType:""
|
||||
}
|
||||
reconcileGeneral(queryParamsss).then((res) => {
|
||||
console.log(res.data, 'res----------------');
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
function handleApplyForLiquidation () {
|
||||
if (isAllSelected()) {
|
||||
let params = {}
|
||||
params.clrType = queryParams.value.clrType?queryParams.value.clrType:""
|
||||
params.clrOptins = queryParams.value.setlOptins?queryParams.value.setlOptins:""
|
||||
params.stmtBegnDate = occurrenceTime.value[0]
|
||||
params.stmtEndDate = occurrenceTime.value[1]
|
||||
params.settlementIdList = ids.value
|
||||
applyFinancialClearing(params).then((res) => {
|
||||
console.log(res.data,'res----------------');
|
||||
loading.value = false;
|
||||
});
|
||||
} else {
|
||||
proxy.$message.warning('当前未全选');
|
||||
}
|
||||
}
|
||||
function isAllSelected() {
|
||||
return selectedRow.value.length === purchaseinventoryList.value.length;
|
||||
}
|
||||
function handleExport(){
|
||||
if(selectedRow.value.length==0){
|
||||
proxy.$message.error('请选择一行数据进行生成txt文件');
|
||||
return
|
||||
}
|
||||
loading.value = true;
|
||||
reconcileDetailTxt({settlementIdList:ids.value}).then((res) => {
|
||||
console.log(res.data,'res----------------');
|
||||
let fileName = Date.now()+'.txt'; // 默认文件名
|
||||
// 2. 创建Blob对象
|
||||
const blob = new Blob([res], { type: 'application/octet-stream;charset=utf-8' });
|
||||
// 3. 创建临时下载链接
|
||||
const link = document.createElement('a');
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
link.href = url;
|
||||
link.download = fileName; // 设置下载文件名
|
||||
// 4. 触发下载
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
// 5. 清理资源
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(url);
|
||||
loading.value = false;
|
||||
if(res.data){
|
||||
queryParams.value.filePath = res.data.split("生成txt文件成功,文件路径:")?res.data.split("生成txt文件成功,文件路径:")[1]:""
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRow.value = selection
|
||||
console.log(selectedRow.value,"selectedRow.value")
|
||||
ids.value = selection.map((item) => item.setlId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
//点击列表当前行
|
||||
function handleRowClick(row) {
|
||||
// editRowTK.value = row
|
||||
console.log(row,"row")
|
||||
// if(row.returnStatus==1){
|
||||
// loadingReturn.value = true
|
||||
// generatedReturnDetail(row.supplyBusNo).then((response) => {
|
||||
// purchaseinventoryReturnList.value = response.data
|
||||
// purchaseinventoryReturnList.value.map(k=>{
|
||||
// // k.returnStatus_text = k.returnStatus==1?'已退库':''
|
||||
// k.originalSupplyBusNo = k.originalSupplyBusNo?k.originalSupplyBusNo:row.supplyBusNo
|
||||
// })
|
||||
|
||||
// })
|
||||
// loadingReturn.value = false
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</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,322 @@
|
||||
<template>
|
||||
<div busNo="app-container">
|
||||
<el-form
|
||||
style="margin-top:20px;margin-left:20px;"
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<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="departmentId">
|
||||
<el-select
|
||||
v-model="queryParams.departmentId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in getDepartmentOptions"
|
||||
:key="supplyStatus.id"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医生:" prop="doctorId">
|
||||
<el-select
|
||||
v-model="queryParams.doctorId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in issuerOptions"
|
||||
:key="supplyStatus.id"
|
||||
:label="supplyStatus.name"
|
||||
:value="supplyStatus.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" busNo="mb8" 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-row>
|
||||
|
||||
<el-table
|
||||
style="padding:0 20px;width:100%"
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:span-method="arraySpanMethod"
|
||||
|
||||
>
|
||||
<!-- :summary-method="getSummaries"
|
||||
show-summary 每页单独合计-->
|
||||
<el-table-column type="selection" align="center" />
|
||||
<el-table-column
|
||||
label='门诊号'
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="departmentName"
|
||||
prop="departmentName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目"
|
||||
align="center"
|
||||
key="clinicalName"
|
||||
prop="clinicalName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="挂号医生"
|
||||
align="center"
|
||||
key="doctorName"
|
||||
prop="doctorName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="收费人"
|
||||
align="center"
|
||||
key="payeeName"
|
||||
prop="payeeName"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
align="center"
|
||||
key="number"
|
||||
prop="number"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="时间"
|
||||
align="center"
|
||||
key="chargeTime"
|
||||
prop="chargeTime"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.chargeTime) }}</span>
|
||||
</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()"
|
||||
/>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
busNo="mb8"
|
||||
style="
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
margin-left:0px;margin-right:0px;padding:0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span>制单人:{{ userStore.name }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="registrationFeeDetails">
|
||||
import {
|
||||
getReportRegisterPage,
|
||||
getDepartmentList,
|
||||
getReportRegisterInit
|
||||
} from "./statisticalManagent";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
import { watch } from "vue";
|
||||
const userStore = useUserStore();
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const totalAmount = ref(0);
|
||||
// const {
|
||||
// item_type,
|
||||
// hosp_lv
|
||||
// } = proxy.useDict(
|
||||
// "item_type",
|
||||
// "hosp_lv"
|
||||
// );
|
||||
const purchaseinventoryListAll = ref([])
|
||||
const xiaojiTotal = ref([])
|
||||
|
||||
const currentCategory = ref(null);
|
||||
const rowSpan = ref(1)
|
||||
const issuerOptions = ref([])
|
||||
const payeeOptions = ref([])
|
||||
const inventoryOptions = ref([])
|
||||
const clinicalTypeOptions = ref([]);
|
||||
const purchaseinventoryList = ref([]);
|
||||
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const payeeNameOptions = ref([]);
|
||||
const getDepartmentOptions = ref([])
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
departmentId: undefined,
|
||||
doctorId:undefined,
|
||||
registerTimeSTime:undefined,
|
||||
registerTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getReportRegisterInit().then((response)=>{
|
||||
issuerOptions.value = response.data.doctorOptions
|
||||
})
|
||||
getDepartmentList().then((response) => {
|
||||
getDepartmentOptions.value = response.data // 科室
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
console.log(queryParams.value,"queryParams.value")
|
||||
getReportRegisterPage(queryParams.value).then((res) => {
|
||||
purchaseinventoryList.value = res.data.records||[]
|
||||
purchaseinventoryList.value.map(k=>{
|
||||
k.number = k.number?(k.number+k.quantityUnit_dictText):0
|
||||
k.price = k.price?k.price.toFixed(2):"0.00"
|
||||
// k.totalPrice = k.totalPrice?("¥"+k.totalPrice.toFixed(2)):"¥0.00"
|
||||
k.totalPrice = k.totalPrice?k.totalPrice.toFixed(2):"0.00"
|
||||
})
|
||||
total.value = res.data.total;
|
||||
loading.value = false
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.chargeTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.chargeTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = ""
|
||||
queryParams.value.chargeTimeSTime = ""
|
||||
queryParams.value.chargeTimeETime = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pagination-container{
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,417 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- <el-form-item label="单据号:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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="medicationDefId">
|
||||
<el-input
|
||||
v-model="queryParams.medicationDefId"
|
||||
placeholder="编码:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<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="sourceLocationId">
|
||||
<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="审核日期:">
|
||||
<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="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="issueDepartment in issueDepartmentDto"
|
||||
:key="issueDepartment.id"
|
||||
:label="issueDepartment.name"
|
||||
:value="issueDepartment.id"
|
||||
/>
|
||||
</el-select>
|
||||
</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">
|
||||
<!-- 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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="出库类型"
|
||||
align="center"
|
||||
key="formEnum_enumText"
|
||||
prop="formEnum_enumText"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="medicationType"
|
||||
prop="medicationType"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="存放库房"
|
||||
align="center"
|
||||
key="sourceLocationName"
|
||||
prop="sourceLocationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="sourceLocationStoreName"
|
||||
prop="sourceLocationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出库数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="purchasePrice"
|
||||
prop="purchasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="采购金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="领用单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="领用科室"
|
||||
align="center"
|
||||
key="purposeLocationName"
|
||||
prop="purposeLocationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierId_dictText"
|
||||
prop="supplierId_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="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
: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"
|
||||
: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="requisitionDetails">
|
||||
import {
|
||||
getRreportOutboundPage,
|
||||
getPharmacyCabinetList,
|
||||
getDepartmentList,
|
||||
getOutboundInit
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const {
|
||||
item_type,
|
||||
} = proxy.useDict(
|
||||
"item_type",
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
const issueDepartmentDto = ref([])
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
purposeLocationId:undefined,
|
||||
sourceLocationId: undefined,
|
||||
supplierId: undefined,
|
||||
approvalTimeSTime:undefined,
|
||||
approvalTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getOutboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
getDepartmentList().then((response) => {
|
||||
issueDepartmentDto.value = response.data
|
||||
})
|
||||
loading.value = true;
|
||||
getRreportOutboundPage(queryParams.value).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?'已停供':'')
|
||||
// })
|
||||
// }
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = ""
|
||||
queryParams.value.approvalTimeETime = ""
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</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,447 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- <el-form-item label="单据号:" prop="busNo">
|
||||
<el-input
|
||||
v-model="queryParams.busNo"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="药品名称:" prop="medicineName">
|
||||
<el-input
|
||||
v-model="queryParams.medicineName"
|
||||
placeholder="项目编号/项目品名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@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="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/单据号/药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库房:" prop="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in purposeLocationIdList"
|
||||
: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-item label="科室:" prop="sourceLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="issueDepartment in issueDepartmentDto"
|
||||
:key="issueDepartment.id"
|
||||
:label="issueDepartment.name"
|
||||
:value="issueDepartment.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="项目类型:" prop="categoryType">
|
||||
<el-select
|
||||
v-model="queryParams.categoryType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型:" prop="typeEnum">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
>备份</el-button
|
||||
>
|
||||
</el-col>
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="出库类型"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
prop="statusEnum"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<!-- itemTable -->
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库房"
|
||||
align="center"
|
||||
key="purposeLocationName"
|
||||
prop="purposeLocationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="货位"
|
||||
align="center"
|
||||
key="purposeLocationStoreName"
|
||||
prop="purposeLocationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退库数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单价"
|
||||
align="center"
|
||||
key="purchasePrice"
|
||||
prop="purchasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="采购金额"
|
||||
align="center"
|
||||
key="purchasePriceSum"
|
||||
prop="purchasePriceSum"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="退库单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="sourceLocationName"
|
||||
prop="sourceLocationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
align="center"
|
||||
key="supplierId_dictText"
|
||||
prop="supplierId_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="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
: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"
|
||||
: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="returnOrutboundDetails">
|
||||
import {
|
||||
getRreportReturnIssue,
|
||||
getReturnIssueInit,
|
||||
getPharmacyCabinetList,
|
||||
getDepartmentList,
|
||||
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
|
||||
const supplierListOptions = ref(undefined);
|
||||
const issueDepartmentDto = ref([]);
|
||||
const purposeLocationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
purposeLocationId:undefined,
|
||||
sourceLocationId:undefined,
|
||||
supplierId:undefined,
|
||||
approvalTimeSTime:undefined,
|
||||
approvalTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getDepartmentList().then((response) => {
|
||||
issueDepartmentDto.value = response.data
|
||||
})
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
|
||||
purposeLocationIdList.value = response.data
|
||||
});
|
||||
getReturnIssueInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getRreportReturnIssue(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = ""
|
||||
queryParams.value.approvalTimeETime = ""
|
||||
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;
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</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,426 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="药品编码/药品名称/名称拼音/供应商名"
|
||||
clearable
|
||||
style="width: 250px"
|
||||
@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-input
|
||||
v-model="queryParams.remainingDays"
|
||||
placeholder="查询 ≤ X 天的记录"
|
||||
clearable
|
||||
style="width: 200px;"
|
||||
@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="categoryCode in item_type"
|
||||
:key="categoryCode.value"
|
||||
:label="categoryCode.label"
|
||||
:value="categoryCode.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医保等级:" prop="chrgitmLv" >
|
||||
<el-select
|
||||
v-model="queryParams.chrgitmLv"
|
||||
placeholder="请选择医保等级"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="chrgitmLv_enumText in chrgitmLv_enumTextOptions"
|
||||
:key="chrgitmLv_enumText.value"
|
||||
:label="chrgitmLv_enumText.info"
|
||||
:value="chrgitmLv_enumText.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库药房:" prop="locationId" >
|
||||
<el-select
|
||||
v-model="queryParams.locationId"
|
||||
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="warehouseScope">
|
||||
<el-select
|
||||
v-model="queryParams.warehouseScope"
|
||||
placeholder="请选择库存范围"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in inventory_range"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="130"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="medicineName"
|
||||
prop="medicineName"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="请领数量(本月药房入库数量)"
|
||||
align="center"
|
||||
key="quantityUnit"
|
||||
prop="quantityUnit"
|
||||
width="190px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="请领进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="请领零售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
width="89px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="销售零售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
width="89px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="返库数量(退货数量)"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="返库进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="返库零价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报损零售价"
|
||||
align="center"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
width="89px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点进价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="本期库存数量"
|
||||
align="center"
|
||||
key="quantity"
|
||||
prop="quantity"
|
||||
width="105px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存进价合计"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="105"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库存零价合计"
|
||||
align="center"
|
||||
key="totalSalePrice"
|
||||
prop="totalSalePrice"
|
||||
width="105"
|
||||
: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="settlementDoc">
|
||||
import {
|
||||
getproductReturnPage,
|
||||
getInit,
|
||||
getPharmacyCabinetList,
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const {
|
||||
item_type,
|
||||
inventory_range,
|
||||
} = proxy.useDict(
|
||||
"item_type",
|
||||
"inventory_range",
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
|
||||
const loading = ref(true);
|
||||
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const chrgitmLv_enumTextOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
remainingDays: undefined,
|
||||
// hospital:undefined,
|
||||
categoryCode:undefined,
|
||||
chrgitmLv:undefined,
|
||||
warehouseScope: undefined,
|
||||
locationId: undefined,
|
||||
// occurrenceTimeSTime:undefined,
|
||||
// occurrenceTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
getInit().then((response) => {
|
||||
chrgitmLv_enumTextOptions.value = response.data.chrgitmLvOptions
|
||||
})
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getproductReturnPage(queryParams.value).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
|
||||
const integerPart1 = Math.floor(k.quantityUnit); // 获取整数部分
|
||||
const decimalPart1 = k.quantityUnit - integerPart1; // 获取小数部分
|
||||
|
||||
if(decimalPart1){
|
||||
k.quantityUnit = integerPart1 + k.unitCode_dictText +
|
||||
(decimalPart1*k.partPercent).toFixed(0) + k.minUnitCode_dictText
|
||||
}
|
||||
k.price = k.price?k.price.toFixed(2):0
|
||||
k.retailPrice = k.retailPrice?k.retailPrice.toFixed(2):0
|
||||
k.totalPrice = k.price * (Number(k.quantity) / k.partPercent)
|
||||
k.totalPrice = k.totalPrice?k.totalPrice.toFixed(2):0
|
||||
k.totalSalePrice = k.retailPrice * (Number(k.quantity) / k.partPercent)
|
||||
k.totalSalePrice = k.totalSalePrice?k.totalSalePrice.toFixed(2):0
|
||||
})
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
// queryParams.value.occurrenceTimeSTime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[0] + " 00:00:00"
|
||||
// : "";
|
||||
// queryParams.value.occurrenceTimeETime =
|
||||
// occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
// ? occurrenceTime.value[1] + " 23:59:59"
|
||||
// : "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,402 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询库存明细列表
|
||||
export function getproductReturnPage(query) {
|
||||
return request({
|
||||
url:'/inventory-manage/product/product-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询单据初始化数据
|
||||
export function getInit() {
|
||||
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 getMedicineList(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
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 药房药库列表
|
||||
export function getPharmacyCabinetList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
// 取消停供
|
||||
export function cancelSupply(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
|
||||
})
|
||||
}
|
||||
//查询采购入库明细报表
|
||||
export function getReportInboundPCage(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
|
||||
})
|
||||
}
|
||||
|
||||
//查询库存盘点明细报表
|
||||
export function getReportStocktakingPage(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
|
||||
})
|
||||
}
|
||||
// 医保对账
|
||||
export function ybRequestReconcile(data) {
|
||||
return request({
|
||||
url: '/yb-request/reconcile',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 合同
|
||||
export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 对账列表 结算
|
||||
export function getReconcileList(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
|
||||
})
|
||||
}
|
||||
|
||||
// 获取科室列表
|
||||
export function getDepartmentList() {
|
||||
return request({
|
||||
url: '/app-common/department-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 查询领用出库明细初始化数据 供应商
|
||||
export function getOutboundInit() {
|
||||
return request({
|
||||
url: '/report-manage/outbound/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 查询采购入库明细初始化数据 供应商
|
||||
export function getInboundInit() {
|
||||
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
|
||||
})
|
||||
}
|
||||
// 查询领用退库明细初始化数据 供应商
|
||||
export function getReturnIssueInit() {
|
||||
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
|
||||
})
|
||||
}
|
||||
// 查询采购退库明细初始化数据
|
||||
export function getPurchaseReturnInit() {
|
||||
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
|
||||
})
|
||||
}
|
||||
//发药明细 切换统计类型
|
||||
export function getAmbPractitionerDetail(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
|
||||
})
|
||||
}
|
||||
// 查询发药明细初始化数据
|
||||
export function getMedicationDetailsInit() {
|
||||
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
|
||||
})
|
||||
}
|
||||
// 医保对账明细导出txt
|
||||
export function reconcileDetailTxt(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
|
||||
})
|
||||
}
|
||||
//查询门诊收费明细
|
||||
export function getReportChargePage(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'
|
||||
})
|
||||
}
|
||||
//查询挂号收费明细
|
||||
export function getReportRegisterPage(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'
|
||||
})
|
||||
}
|
||||
// 文件上传
|
||||
export function ybRequestFileUp(data) {
|
||||
return request({
|
||||
url: '/yb-request/file-up',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getExpirationWarning(query) {
|
||||
return request({
|
||||
url:'/inventory-manage/product/expiration-warning',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getClroptins(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
|
||||
})
|
||||
}
|
||||
|
||||
export function applyFinancialClearingList(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
|
||||
})
|
||||
}
|
||||
|
||||
export function autoApplyFinancialClearing(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
|
||||
})
|
||||
}
|
||||
|
||||
export function inventoryReceiptPage(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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function productPageTotal(query) {
|
||||
return request({
|
||||
url:'/inventory-manage/product/product-page-total',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getMedDevInfo(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
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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-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-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>
|
||||
</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>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<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-row>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="purchaseinventoryList" @selection-change="handleSelectionChange">
|
||||
<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>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="earlyWarning">
|
||||
import {
|
||||
inventoryReceiptPage,
|
||||
traceabilityCodeManagementInit
|
||||
} from "./statisticalManagent";
|
||||
import { onMounted } from 'vue';
|
||||
import { formatDateStr } from '@/utils';
|
||||
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const {
|
||||
item_type,
|
||||
} = proxy.useDict(
|
||||
"item_type",
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const occurrenceTime = ref([])
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const locationIdList = ref(undefined);
|
||||
const traceNoStatusOptions = ref(undefined);
|
||||
const operationTypeOptions = ref(undefined);
|
||||
const itemTypeOptions = ref(undefined);
|
||||
|
||||
const props = defineProps({
|
||||
recordInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({})
|
||||
}
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
categoryCode: undefined,
|
||||
remainingMonth: undefined,
|
||||
createTimeSTime: undefined,
|
||||
createTimeETime: undefined,
|
||||
},
|
||||
rules: {
|
||||
remainingMonth: [
|
||||
// { required: true, message: '单次最大剂量不能为空', trigger: 'blur' },
|
||||
{ validator: validateMaxUnit, trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
setDefaultDateRange();
|
||||
getList();
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function validateMaxUnit(rule, value, callback) {
|
||||
const numberRegex = /^[0-9]+$/; // 正则表达式,确保输入为数字
|
||||
if (!numberRegex.test(value)) {
|
||||
callback(new Error('请输入有效的数字'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
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')];
|
||||
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"
|
||||
: "";
|
||||
}
|
||||
function getInit() {
|
||||
traceabilityCodeManagementInit().then((res) => {
|
||||
locationIdList.value = res.data.locationOptions;
|
||||
traceNoStatusOptions.value = res.data.traceNoStatusOptions;
|
||||
operationTypeOptions.value = res.data.operationTypeOptions;
|
||||
itemTypeOptions.value = res.data.itemTypeOptions;
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
queryParams.value.locationId = props.recordInfo.locationId;
|
||||
queryParams.value.lotNumber = props.recordInfo.lotNumber;
|
||||
queryParams.value.itemTable = props.recordInfo.itemTable;
|
||||
queryParams.value.itemId = props.recordInfo.itemId;
|
||||
inventoryReceiptPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
proxy.$refs['earlyWarningRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
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.locationId = props.recordInfo.locationId;
|
||||
queryParams.value.lotNumber = props.recordInfo.lotNumber;
|
||||
queryParams.value.itemTable = props.recordInfo.itemTable;
|
||||
queryParams.value.itemId = props.recordInfo.itemId;
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("earlyWarningRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
getInit()
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,340 @@
|
||||
<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="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" class="mb8">
|
||||
<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-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@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="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否调拨"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
width="90"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="120px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="源仓库"
|
||||
align="center"
|
||||
key="sourceLocationName"
|
||||
prop="sourceLocationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="源货位"
|
||||
align="center"
|
||||
key="sourceLocationStoreName"
|
||||
prop="sourceLocationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="目的仓库"
|
||||
align="center"
|
||||
key="purposeLocationName"
|
||||
prop="purposeLocationName"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="目的货位"
|
||||
align="center"
|
||||
key="purposeLocationStoreName"
|
||||
prop="purposeLocationStoreName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="调拨数量"
|
||||
align="center"
|
||||
key="itemQuantity"
|
||||
prop="itemQuantity"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
width="80"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单价"
|
||||
align="center"
|
||||
key="price"
|
||||
prop="price"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="合计金额"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
: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="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="申请日期"
|
||||
align="center"
|
||||
key="applyTime"
|
||||
prop="applyTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.applyTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调拨日期"
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</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="transferManagentDetails">
|
||||
import {
|
||||
getReportTransferPage,
|
||||
getPharmacyCabinetList,
|
||||
} from "./statisticalManagent";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
sourceLocationId:undefined,
|
||||
purposeLocationId:undefined,
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data
|
||||
});
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getReportTransferPage(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records
|
||||
|
||||
if(purchaseinventoryList.value&& purchaseinventoryList.value.length>0){
|
||||
purchaseinventoryList.value.map((k,index)=>{
|
||||
k.statusEnum_enumText = k.statusEnum_enumText=='同意'?'已调拨':''
|
||||
})
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists()
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,153 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询调拨管理列表
|
||||
export function getTransferProductList(query) {
|
||||
return request({
|
||||
url:'/inventory-manage/transfer/product-transfer-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 调拨详情
|
||||
export function getTransferProductDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer-detail',
|
||||
method: 'get',
|
||||
params: busNo // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑调拨单据
|
||||
export function addTransferProduct(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer',
|
||||
// product-transfer-edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑批量调拨单据
|
||||
export function addTransferProductBatch(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer-batch',
|
||||
// product-transfer-edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量调拨详情
|
||||
export function getTransferProductDetails(params) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer-batch',
|
||||
method: 'get',
|
||||
params: params // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getBusNoInit() { //单据号
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
export function delTransferProduct(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer-del?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/submit-approval',
|
||||
// product-transfer-approved
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(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
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-pharmacy-list',
|
||||
// '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url:'/app-common/inventory-cabinet-list',
|
||||
// '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 获取仓库药房列表
|
||||
export function getpharmacyCabinetList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品调拨审批通过
|
||||
*/
|
||||
export function productTransferApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/product-transfer-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="规格"
|
||||
align="center"
|
||||
prop="volume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
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" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="ybNo"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./transferManagement";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
sourceLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
sourceLocationId1:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId1:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
// pageNum: 1,
|
||||
// pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
// itemType1: props.itemType1,
|
||||
orgLocationId:props.sourceLocationId,
|
||||
// objLocationId:props.purposeLocationId,
|
||||
orgLocationId1:props.sourceLocationId1,
|
||||
objLocationId1:props.purposeLocationId1,
|
||||
purchaseFlag:0
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
console.log(newValue,"newValue")
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
// queryParams.value.itemType1 = newValue.itemType1;
|
||||
queryParams.value.orgLocationId=newValue.sourceLocationId;
|
||||
// queryParams.value.objLocationId=newValue.purposeLocationId;
|
||||
queryParams.value.orgLocationId1=newValue.sourceLocationId1;
|
||||
// queryParams.value.objLocationId1=newValue.purposeLocationId1;
|
||||
queryParams.value.purchaseFlag = 0
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
console.log(queryParams.value,"queryParams.value1")
|
||||
if(route.query.supplyBusNo){ // 编辑
|
||||
queryParams.value.itemType = queryParams.value.itemType;
|
||||
queryParams.value.orgLocationId = queryParams.value.orgLocationId1
|
||||
// queryParams.value.objLocationId = queryParams.value.objLocationId1
|
||||
console.log(queryParams.value,"queryParams.value1111111")
|
||||
}
|
||||
// delete queryParams.value.itemType
|
||||
delete queryParams.value.orgLocationId1
|
||||
delete queryParams.value.objLocationId1
|
||||
console.log(queryParams.value,"queryParams.value")
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
console.log(medicineList.value,"medicineList.value ")
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
console.log(row,"row--------------------")
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep( .hover_row){
|
||||
width: 100vw!important;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,506 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<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="typeEnum">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyTypeOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="药品" prop="searchKey" label-width="40">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="源仓库:" prop="sourceLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="sourceLocationId in getpharmacyCabinetOptions"
|
||||
:key="sourceLocationId.value"
|
||||
:label="sourceLocationId.name"
|
||||
:value="sourceLocationId.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="目的仓库:" prop="purposeLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.purposeLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="purposeLocationId in getpharmacyCabinetOptions"
|
||||
:key="purposeLocationId.value"
|
||||
:label="purposeLocationId.name"
|
||||
:value="purposeLocationId.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum">
|
||||
<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="查询时间:">
|
||||
<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" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<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
|
||||
>
|
||||
<!-- 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="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
<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="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="源仓库"
|
||||
align="center"
|
||||
key="sourceLocationName"
|
||||
prop="sourceLocationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="目的仓库"
|
||||
align="center"
|
||||
key="purposeLocationName"
|
||||
prop="purposeLocationName"
|
||||
: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="160"
|
||||
: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="160"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="
|
||||
scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- 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"
|
||||
/>
|
||||
<!-- <Dialog
|
||||
ref="transferProductRef"
|
||||
:supplyTypeOptions="supplyTypeOptions"
|
||||
:purposeTypeListOptions="purposeTypeListOptions"
|
||||
:sourceTypeListOptions="sourceTypeListOptions"
|
||||
:busNoAdd="busNoAdd"
|
||||
:item="currentData"
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="transferManagementList">
|
||||
import {
|
||||
getTransferProductList,
|
||||
getInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delTransferProduct,
|
||||
getpharmacyCabinetList
|
||||
} from "../components/transferManagement";
|
||||
import { useStore } from '@/store/store';
|
||||
const store = useStore();
|
||||
// import Dialog from "./components/Dialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const getpharmacyCabinetOptions = ref([])
|
||||
const purchaseinventoryList = 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 title = ref("");
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const purposeTypeListOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined)
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceLocationIdListOptions = ref(undefined); // 源仓库
|
||||
const purposeLocationIdListOptions = ref(undefined); //目的仓库
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
typeEnum:undefined, // 单据类型
|
||||
sourceLocationId:undefined,//源仓库
|
||||
purposeLocationId:undefined,// 目的仓库
|
||||
statusEnum: undefined, // 单据状态
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 调拨管理查询下拉树结构 */
|
||||
function getTransferProductTypeList() {
|
||||
getInit().then((response) => {
|
||||
purposeTypeListOptions.value = response.data.purposeTypeListOptions;
|
||||
sourceTypeListOptions.value = response.data.sourceTypeListOptions;
|
||||
supplyTypeOptions.value = response.data.supplyTypeOptions ;
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
});
|
||||
getpharmacyCabinetList().then((response) => {
|
||||
getpharmacyCabinetOptions.value = response.data
|
||||
})
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getTransferProductList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.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 openAddaddTransferProducts(){
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer'})
|
||||
}
|
||||
/** 打开新增 */
|
||||
function openAddaddTransferProductDialog() {
|
||||
// getTransferProductTypeList();
|
||||
// getBusNoInitList()
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["transferProductRef"].show();
|
||||
// });
|
||||
// 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'})
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
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}})
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认删除以上数据?")
|
||||
.then(function () {
|
||||
return delTransferProduct({ ids: delId.join(",") });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
getTransferProductTypeList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user