@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,225 +1,255 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-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-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
|
||||
<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"
|
||||
>
|
||||
<!-- 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
|
||||
<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="
|
||||
() => {
|
||||
proxy.$refs['detailsDialogRef'].open(scope.row.supplyBusNo);
|
||||
}
|
||||
"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
:disabled="
|
||||
scope.row.statusEnum != '1' &&
|
||||
scope.row.statusEnum != '9' &&
|
||||
scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- :disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'" -->
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<ChkstockDetailsDialog ref="detailsDialogRef" />
|
||||
<!-- <stock-receipt-dialog
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleUpdate(scope.row,'view')"
|
||||
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
disabled
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- :disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'" -->
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- <stock-receipt-dialog
|
||||
ref="stockReceiptRef"
|
||||
:cabinetListOptions="cabinetListOptions"
|
||||
:categoryListOptions ="categoryListOptions"
|
||||
@@ -229,200 +259,195 @@
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ChkstockRecord">
|
||||
// 导入onActivated钩子
|
||||
import { onMounted, onActivated } from 'vue';
|
||||
import {
|
||||
getStockinventoryList,
|
||||
getstocktakingDetail,
|
||||
getInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
getDetailInit,
|
||||
} from '../components/api';
|
||||
import ChkstockDetailsDialog from '../components/chkstockDetailsDialog.vue';
|
||||
// import stockReceiptDialog from "./components/stockReceiptDialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const stockinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(''); // 单据号新增
|
||||
const applicantListOptions = ref(undefined); // 制单人列表
|
||||
const cabinetListOptions = ref(undefined); // 仓库列表
|
||||
const categoryListOptions = ref(undefined); // 药品类型
|
||||
const pharmacyListOptions = ref(undefined); // 药房列表
|
||||
const supplyStatusOptions = ref(undefined); // 审批状态
|
||||
const profitReasonOptions = ref(undefined); // 盈亏原因
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
supplyBusNo: undefined, // 编码
|
||||
statusEnum: undefined, // 审批状态
|
||||
applicantId: undefined, // 制单人
|
||||
createTimeSTime: undefined,
|
||||
createTimeETime: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 列表页查询下拉树结构 */
|
||||
function getStockinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log('列表页下拉树response1111111', response);
|
||||
busNoAdd.value = response.data.busNo; // 单据号新增
|
||||
applicantListOptions.value = response.data.applicantListOptions; // 制单人列表
|
||||
|
||||
cabinetListOptions.value = response.data.cabinetListOptions; // 仓库列表
|
||||
categoryListOptions.value = response.data.categoryListOptions; // 药品类型列表
|
||||
pharmacyListOptions.value = response.data.pharmacyListOptions; // 药房列表
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏类型列表
|
||||
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 审批状态
|
||||
// 导入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; // 制单人列表
|
||||
|
||||
/** 查询盘点列表 */
|
||||
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;
|
||||
});
|
||||
}
|
||||
cabinetListOptions.value = response.data.cabinetListOptions; // 仓库列表
|
||||
categoryListOptions.value = response.data.categoryListOptions; // 药品类型列表
|
||||
pharmacyListOptions.value = response.data.pharmacyListOptions; // 药房列表
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏类型列表
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = '';
|
||||
queryParams.value.createTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开商品盘点 */
|
||||
function openAddStockPart() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart' });
|
||||
}
|
||||
/** 打开批量商品盘点 */
|
||||
function openAddStockBatch() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch' });
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row, view) {
|
||||
editRow.value = row;
|
||||
if (row.typeEnum == 4) {
|
||||
// 盘点
|
||||
router.push({
|
||||
path: '/medicationmanagement/chkstock/chkstockPart',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 审批状态
|
||||
});
|
||||
} 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 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;
|
||||
/** 提交审核按钮 */
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('撤销审批成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getStockinventoryTypeList();
|
||||
getList();
|
||||
});
|
||||
|
||||
// 添加组件被激活时的处理逻辑
|
||||
onActivated(() => {
|
||||
// 添加组件被激活时的处理逻辑
|
||||
onActivated(() => {
|
||||
// 重新加载数据
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,267 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="盘点单明细"
|
||||
width="90%"
|
||||
:destroy-on-close="true"
|
||||
v-loading="loading"
|
||||
@close="close"
|
||||
>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<template v-if="props.isApply">
|
||||
<el-button plain type="primary" icon="Edit" @click="handelApply"> 审批通过 </el-button>
|
||||
<el-button type="primary" plain icon="Edit" @click="handleReject"> 驳回 </el-button>
|
||||
</template>
|
||||
<el-button type="warning" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport"> 导出 </el-button>
|
||||
</el-row>
|
||||
<el-descriptions :column="4" style="margin-bottom: 10px">
|
||||
<el-descriptions-item label="单据号:">
|
||||
{{ detailsList[0]?.busNo || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="盘点仓库:">
|
||||
{{ detailsList[0]?.purposeLocationName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目类型:">
|
||||
{{ detailsList[0]?.itemType_dictText || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="盘点日期:">
|
||||
{{ proxy.formatDateStr(detailsList[0]?.occurrenceTime, 'YYYY-MM-DD HH:mm:ss') || '-' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table :data="detailsList" border max-height="600">
|
||||
<el-table-column label="序号" width="60" type="index" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="itemName" />
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
prop="manufacturerText"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价" align="right" header-align="center" prop="price" width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.price.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="盘点单位"
|
||||
align="center"
|
||||
prop="measurementUnitCode_dictText"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘前库存"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemName"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatQuantity(
|
||||
Number(scope.row.totalQuantity) - Number(scope.row.itemQuantity),
|
||||
scope.row
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实盘数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalQuantity"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(scope.row.totalQuantity, scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实盘金额"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalPrice"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="盈亏数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemQuantity"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(scope.row.itemQuantity, scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盈亏金额" align="right" header-align="center" prop="">
|
||||
<template #default="scope">
|
||||
{{
|
||||
((scope.row.itemQuantity * scope.row.price) / scope.row.partPercent).toFixed(2) + '元'
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="盈亏类型" align="center" prop="reasonCode_dictText" />
|
||||
<el-table-column label="盈亏原因" align="center" prop="reason" />
|
||||
</el-table>
|
||||
<div>
|
||||
<span>合计盈亏金额:{{ totalAmount ? totalAmount.toFixed(4) : 0 }}</span>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getstocktakingDetail, productStocktakingApproved, reject } from './api';
|
||||
import templateJson from '@/views/medicationmanagement/chkstock/chkstockPart/components/template.json';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const detailsList = ref([]);
|
||||
const dialogVisible = ref(false);
|
||||
const loading = ref(false);
|
||||
const totalAmount = ref(0);
|
||||
const supplyBusNo = ref('');
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
isApply: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
function open(busNo) {
|
||||
dialogVisible.value = true;
|
||||
supplyBusNo.value = busNo;
|
||||
getstocktakingDetail({ busNo: busNo, pageSize: 1000, pageNo: 1 }).then((res) => {
|
||||
detailsList.value = res.data.records;
|
||||
totalAmount.value = res.data.records.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (Number(((currentRow.itemQuantity * currentRow.price) / currentRow.partPercent).toFixed(2)) || 0);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
|
||||
function formatQuantity(quantity, row) {
|
||||
if (row.measurementUnitCode == row.unitCode) {
|
||||
return formatInventory(
|
||||
quantity,
|
||||
row.partPercent,
|
||||
row.unitCode_dictText,
|
||||
row.minUnitCode_dictText
|
||||
);
|
||||
} else {
|
||||
return quantity + row.minUnitCode_dictText;
|
||||
}
|
||||
}
|
||||
|
||||
function handelApply() {
|
||||
loading.value = true;
|
||||
productStocktakingApproved(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleReject() {
|
||||
reject(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化库存数量显示(大单位情况)
|
||||
* @param quantity 小单位库存数量
|
||||
* @param partPercent 拆零比
|
||||
* @param unitCode 大单位
|
||||
* @param minUnitCode 小单位
|
||||
*/
|
||||
function formatInventory(quantity, partPercent, unitCode, minUnitCode) {
|
||||
// 处理负数情况
|
||||
const isNegative = quantity < 0;
|
||||
const absQuantity = Math.abs(quantity);
|
||||
|
||||
if (absQuantity % partPercent !== 0) {
|
||||
const integerPart = Math.floor(absQuantity / partPercent);
|
||||
const decimalPart = absQuantity % partPercent;
|
||||
|
||||
let result = integerPart.toString() + ' ' + unitCode;
|
||||
if (decimalPart > 0) {
|
||||
result += decimalPart.toString() + ' ' + minUnitCode;
|
||||
}
|
||||
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 整除情况
|
||||
const result = absQuantity / partPercent + ' ' + unitCode;
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 打印盘点单
|
||||
function handlePrint() {
|
||||
const result = [];
|
||||
const printList = detailsList.value.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.totalVolume,
|
||||
price: Number(item.price).toFixed(2),
|
||||
itemQuantity: formatQuantity(item.itemQuantity, item),
|
||||
profitAmount: ((item.itemQuantity * item.price) / item.partPercent).toFixed(2),
|
||||
};
|
||||
});
|
||||
result.push({
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
name: userStore.name,
|
||||
// totalAmount: totalAmount.value.toFixed(2),
|
||||
occurrenceTime: proxy.formatDateStr(printList[0].occurrenceTime, 'YYYY-MM-DD HH:mm:ss'),
|
||||
busNo: printList[0].busNo,
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
purchaseinventoryList: printList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
// printer: 'EPSON LQ-80KFII',
|
||||
title: '打印标题',
|
||||
}); //开始打印
|
||||
}
|
||||
// 导出
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/stocktaking/excel-out',
|
||||
{
|
||||
busNo: supplyBusNo.value,
|
||||
},
|
||||
`盘点单明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
});
|
||||
</script>
|
||||
@@ -40,6 +40,12 @@
|
||||
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" />
|
||||
@@ -48,7 +54,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<el-button type="primary" plain icon="Plus" @click="handleSave">批量保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">导出</el-button>
|
||||
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
@@ -229,17 +229,17 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
>
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -751,7 +751,7 @@ function addNewRow() {
|
||||
itemType: '',
|
||||
itemType_enumText: '',
|
||||
lotNumber: '',
|
||||
manufacturerText: '',
|
||||
manufacturer: '',
|
||||
minUnitCode: '',
|
||||
minUnitCode_dictText: '',
|
||||
name: '',
|
||||
@@ -878,7 +878,7 @@ function getTransferProductDetails() {
|
||||
form.purchaseinventoryList[index].statusMaxvalue = false;
|
||||
e.volume = e.totalVolume;
|
||||
e.name = e.itemName;
|
||||
e.manufacturerText = e.manufacturerText;
|
||||
e.manufacturer = e.manufacturerText;
|
||||
e.lossReason = e.reason;
|
||||
if (e.purposeTypeEnum) {
|
||||
warehous_type.value.map((item) => {
|
||||
@@ -1023,7 +1023,7 @@ function handleReject() {
|
||||
store.clearCurrentDataBS();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/billapproval',
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
query: { type: 'lossReporting' },
|
||||
});
|
||||
}
|
||||
@@ -1039,7 +1039,7 @@ function handelApply() {
|
||||
store.clearCurrentDataBS();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/billapproval',
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
query: { type: 'lossReporting' },
|
||||
});
|
||||
}
|
||||
@@ -1095,7 +1095,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber;
|
||||
@@ -1552,7 +1552,7 @@ function edit() {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.volume,
|
||||
manufacturerText: item.supplierName,
|
||||
manufacturer: item.supplierName,
|
||||
totalQuantity: item.totalQuantity,
|
||||
totalPurposeQuantity: item.totalPurposeQuantity,
|
||||
startTime: formatDateymd(item.startTime),
|
||||
@@ -1655,22 +1655,6 @@ getTransferProductDetails();
|
||||
// show,
|
||||
// edit,
|
||||
// });
|
||||
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/loss/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`报损单据明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -1,340 +0,0 @@
|
||||
// 医保目录各类型字段配置
|
||||
export const catalogFieldConfigs = {
|
||||
// 西药中成药目录 (1301)
|
||||
1301: {
|
||||
columns: [
|
||||
{ prop: 'medicalCatalogCode', label: '医疗目录编码' },
|
||||
{ prop: 'drugTradeName', label: '药品商品名' },
|
||||
{ prop: 'genericNameId', label: '通用名编号' },
|
||||
{ prop: 'drugGenericName', label: '药品通用名' },
|
||||
{ prop: 'chemicalName', label: '化学名称' },
|
||||
{ prop: 'alias', label: '别名' },
|
||||
{ prop: 'englishName', label: '英文名称' },
|
||||
{ prop: 'registeredName', label: '注册名称' },
|
||||
{ prop: 'drugSupervisionCode', label: '药监本位码' },
|
||||
{ prop: 'drugForm', label: '药品剂型' },
|
||||
{ prop: 'drugFormName', label: '药品剂型名称' },
|
||||
{ prop: 'drugCategory', label: '药品类别' },
|
||||
{ prop: 'drugCategoryName', label: '药品类别名称' },
|
||||
{ prop: 'drugSpecification', label: '药品规格' },
|
||||
{ prop: 'drugSpecCode', label: '药品规格代码' },
|
||||
{ prop: 'registeredForm', label: '注册剂型' },
|
||||
{ prop: 'registeredSpec', label: '注册规格' },
|
||||
{ prop: 'registeredSpecCode', label: '注册规格代码' },
|
||||
{ prop: 'dosage', label: '每次用量' },
|
||||
{ prop: 'frequency', label: '使用频次' },
|
||||
{ prop: 'acidBase', label: '酸根盐基' },
|
||||
{ prop: 'nationalDrugCode', label: '国家药品编号' },
|
||||
{ prop: 'usage', label: '用法' },
|
||||
{ prop: 'tcmFlag', label: '中成药标志' },
|
||||
{ prop: 'productionAreaType', label: '生产地类别' },
|
||||
{ prop: 'productionAreaName', label: '生产地类别名称' },
|
||||
{ prop: 'pricingUnitType', label: '计价单位类型' },
|
||||
{ prop: 'otcFlag', label: '非处方药标志' },
|
||||
{ prop: 'otcFlagName', label: '非处方药标志名称' },
|
||||
{ prop: 'packagingMaterial', label: '包装材质' },
|
||||
{ prop: 'packagingMaterialName', label: '包装材质名称' },
|
||||
{ prop: 'packagingSpec', label: '包装规格' },
|
||||
{ prop: 'packagingQuantity', label: '包装数量' },
|
||||
{ prop: 'functionIndication', label: '功能主治' },
|
||||
{ prop: 'administrationRoute', label: '给药途径' },
|
||||
{ prop: 'instructions', label: '说明书' },
|
||||
{ prop: 'startDate', label: '开始日期' },
|
||||
{ prop: 'endDate', label: '结束日期' },
|
||||
{ prop: 'minUseUnit', label: '最小使用单位' },
|
||||
{ prop: 'minSaleUnit', label: '最小销售单位' },
|
||||
{ prop: 'minMeasurementUnit', label: '最小计量单位' },
|
||||
{ prop: 'minPackageQuantity', label: '最小包装数量' },
|
||||
{ prop: 'minPackageUnit', label: '最小包装单位' },
|
||||
{ prop: 'minPreparationUnit', label: '最小制剂单位' },
|
||||
{ prop: 'minPackageUnitName', label: '最小包装单位名称' },
|
||||
{ prop: 'minPreparationUnitName', label: '最小制剂单位名称' },
|
||||
{ prop: 'conversionRatio', label: '转换比' },
|
||||
{ prop: 'shelfLife', label: '药品有效期' },
|
||||
{ prop: 'minPricingUnit', label: '最小计价单位' },
|
||||
{ prop: 'wubiCode', label: '五笔助记码' },
|
||||
{ prop: 'pinyinCode', label: '拼音助记码' },
|
||||
{ prop: 'repackager', label: '分包装厂家' },
|
||||
{ prop: 'manufacturerCode', label: '生产企业编号' },
|
||||
{ prop: 'manufacturerName', label: '生产企业名称' },
|
||||
{ prop: 'specialPriceLimitFlag', label: '特殊限价药品标志' },
|
||||
{ prop: 'specialDrugFlag', label: '特殊药品标志' },
|
||||
{ prop: 'useRestriction', label: '限制使用范围' },
|
||||
{ prop: 'useRestrictionFlag', label: '限制使用标志' },
|
||||
{ prop: 'registrationCertNo', label: '药品注册证号' },
|
||||
{ prop: 'regCertStartDate', label: '药品注册证号开始日期' },
|
||||
{ prop: 'regCertEndDate', label: '药品注册证号结束日期' },
|
||||
{ prop: 'approvalNo', label: '批准文号' },
|
||||
{ prop: 'approvalNoStartDate', label: '批准文号开始日期' },
|
||||
{ prop: 'approvalNoEndDate', label: '批准文号结束日期' },
|
||||
{ prop: 'marketStatus', label: '市场状态' },
|
||||
{ prop: 'marketStatusName', label: '市场状态名称' },
|
||||
{ prop: 'regDocumentArchive', label: '药品注册批件电子档案' },
|
||||
{ prop: 'suppApplicationArchive', label: '药品补充申请批件电子档案' },
|
||||
{ prop: 'nationalInsuranceNotes', label: '国家医保药品目录备注' },
|
||||
{ prop: 'essentialDrugFlagName', label: '基本药物标志名称' },
|
||||
{ prop: 'essentialDrugFlag', label: '基本药物标志' },
|
||||
{ prop: 'vatAdjustmentFlag', label: '增值税调整药品标志' },
|
||||
{ prop: 'vatAdjustmentName', label: '增值税调整药品名称' },
|
||||
{ prop: 'listedDrugFlag', label: '上市药品目录集药品' },
|
||||
{ prop: 'negotiationDrugFlag', label: '医保谈判药品标志' },
|
||||
{ prop: 'negotiationDrugName', label: '医保谈判药品名称' },
|
||||
{ prop: 'nhcDrugCode', label: '卫健委药品编码' },
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'validFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'createdAt', label: '数据创建时间' },
|
||||
{ prop: 'updatedAt', label: '数据更新时间' },
|
||||
{ prop: 'version', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
{ prop: 'pediatricUse', label: '儿童用药' },
|
||||
{ prop: 'companyName', label: '公司名称' },
|
||||
{ prop: 'genericEvaluationFlag', label: '仿制药一致性评价药品' },
|
||||
{ prop: 'distributionCompany', label: '经销企业' },
|
||||
{ prop: 'distributionContact', label: '经销企业联系人' },
|
||||
{ prop: 'distributionAuthArchive', label: '经销企业授权书电子档案' },
|
||||
{ prop: 'insuranceForm', label: '国家医保药品目录剂型' },
|
||||
{ prop: 'insuranceClass', label: '国家医保药品目录甲乙类标识' },
|
||||
{ prop: 'marketingAuthorizationHolder', label: '上市许可证持有人' },
|
||||
{ prop: 'releaseFlag', label: '下发标志' },
|
||||
{ prop: 'transmissionDataId', label: '传输数据ID' },
|
||||
{ prop: 'validFrom', label: '生效时间' },
|
||||
{ prop: 'validTo', label: '失效时间' },
|
||||
],
|
||||
},
|
||||
// 中药饮片目录 (1302)
|
||||
1302: {
|
||||
columns: [
|
||||
{ prop: 'medicalCatalogCode', label: '医疗目录编码' },
|
||||
{ prop: 'singleDrugName', label: '单味药名称' },
|
||||
{ prop: 'singleCompoundFlag', label: '单复方标志' }, //单复方标志(true:复方 false:单方)
|
||||
{ prop: 'qualityGrade', label: '质量等级' },
|
||||
{ prop: 'herbalYear', label: '中草药年份' },
|
||||
{ prop: 'medicinalPart', label: '药用部位' },
|
||||
{ prop: 'safeDosage', label: '安全剂量' },
|
||||
{ prop: 'conventionalUsage', label: '常规用法' },
|
||||
{ prop: 'propertiesTaste', label: '性味' },
|
||||
{ prop: 'meridianAttribution', label: '归经' },
|
||||
{ prop: 'species', label: '品种' },
|
||||
{ prop: 'startDate', label: '开始日期' },
|
||||
{ prop: 'endDate', label: '结束日期' },
|
||||
{ prop: 'validFlag', label: '有效标志' }, //有效标志(true:有效 false:无效)
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'createTime', label: '数据创建时间' },
|
||||
{ prop: 'updateTime', label: '数据更新时间' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
{ prop: 'herbName', label: '药材名称' },
|
||||
{ prop: 'indications', label: '功能主治' },
|
||||
{ prop: 'processingMethod', label: '炮制方法' },
|
||||
{ prop: 'efficacyClassification', label: '功效分类' },
|
||||
{ prop: 'herbSource', label: '药材来源' },
|
||||
{ prop: 'nationalInsurancePolicy', label: '国家医保支付政策' },
|
||||
{ prop: 'provincialInsurancePolicy', label: '省级医保支付政策' },
|
||||
{ prop: 'standardName', label: '标准名称' },
|
||||
{ prop: 'standardPage', label: '标准页码' },
|
||||
{ prop: 'electronicRecord', label: '标准电子档案' },
|
||||
{ prop: 'issuanceFlag', label: '下发标志' },
|
||||
{ prop: 'transferDataId', label: '传输数据ID' },
|
||||
{ prop: 'effectiveTime', label: '生效时间' },
|
||||
{ prop: 'expiryTime', label: '失效时间' },
|
||||
],
|
||||
},
|
||||
// 医疗服务项目目录 (1305)
|
||||
1305: {
|
||||
columns: [
|
||||
{ prop: 'medicalCatalogCode', label: '医疗目录编码' },
|
||||
{ prop: 'billingUnit', label: '计价单位' },
|
||||
{ prop: 'billingUnitName', label: '计价单位名称' },
|
||||
{ prop: 'medicalItemDesc', label: '诊疗项目说明' },
|
||||
{ prop: 'exclusionContent', label: '诊疗除外内容' },
|
||||
{ prop: 'medicalItemConnotation', label: '诊疗项目内涵' },
|
||||
{ prop: 'validFlag', label: '有效标志' }, //有效标志(true:有效 false:无效)
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'serviceCategory', label: '服务项目类别' },
|
||||
{ prop: 'medicalServiceName', label: '医疗服务项目名称' },
|
||||
{ prop: 'projectDescription', label: '项目说明' },
|
||||
{ prop: 'startDate', label: '开始日期' },
|
||||
{ prop: 'endDate', label: '结束日期' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' }, //uuid
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
{ prop: 'issuanceFlag', label: '下发标志' },
|
||||
{ prop: 'transferDataId', label: '传输数据ID' },
|
||||
{ prop: 'effectiveTime', label: '生效时间' },
|
||||
{ prop: 'expiryTime', label: '失效时间' },
|
||||
],
|
||||
},
|
||||
// 医用耗材目录 (1306)
|
||||
1306: {
|
||||
columns: [
|
||||
{ prop: 'medicalCatalogCode', label: '医疗目录编码' },
|
||||
{ prop: 'consumableName', label: '耗材名称' },
|
||||
{ prop: 'deviceUniqueId', label: '医疗器械唯一标识' },
|
||||
{ prop: 'insuranceGenericCode', label: '医保通用代码' },
|
||||
{ prop: 'insuranceGenericName', label: '医保通用名称' },
|
||||
{ prop: 'productModel', label: '产品型号' },
|
||||
{ prop: 'specCode', label: '规格代码' },
|
||||
{ prop: 'specification', label: '规格' },
|
||||
{ prop: 'consumableCategory', label: '耗材分类' },
|
||||
{ prop: 'specModel', label: '规格型号' },
|
||||
{ prop: 'materialCode', label: '材质代码' },
|
||||
{ prop: 'materialType', label: '耗材材质' },
|
||||
{ prop: 'packageSpec', label: '包装规格' },
|
||||
{ prop: 'packageQuantity', label: '包装数量' },
|
||||
{ prop: 'packageMaterial', label: '产品包装材质' },
|
||||
{ prop: 'packageUnit', label: '包装单位' },
|
||||
{ prop: 'conversionRatio', label: '产品转换比' },
|
||||
{ prop: 'minUsageUnit', label: '最小使用单位' },
|
||||
{ prop: 'productionAreaType', label: '生产地类别' },
|
||||
{ prop: 'productionAreaName', label: '生产地类别名称' },
|
||||
{ prop: 'productStandard', label: '产品标准' },
|
||||
{ prop: 'expiryDate', label: '产品有效期' },
|
||||
{ prop: 'structureComposition', label: '性能结构与组成' },
|
||||
{ prop: 'applicableScope', label: '适用范围' },
|
||||
{ prop: 'usageMethod', label: '产品使用方法' },
|
||||
{ prop: 'imageCode', label: '产品图片编号' },
|
||||
{ prop: 'qualityStandard', label: '产品质量标准' },
|
||||
{ prop: 'instructions', label: '说明书' },
|
||||
{ prop: 'proofMaterials', label: '其他证明材料' },
|
||||
{ prop: 'specialDeviceFlag', label: '专机专用标志' },
|
||||
{ prop: 'specialDeviceName', label: '专机名称' },
|
||||
{ prop: 'kitName', label: '组套名称' },
|
||||
{ prop: 'kitFlag', label: '组套标志' },
|
||||
{ prop: 'usageRestrictionFlag', label: '限制使用标志' },
|
||||
{ prop: 'insuranceRestriction', label: '医保限用范围' },
|
||||
{ prop: 'minSaleUnit', label: '最小销售单位' },
|
||||
{ prop: 'highValueFlag', label: '高值耗材标志' }, //高值耗材标志(true:是 false:否)
|
||||
{ prop: 'medicalMaterialCode', label: '医用材料分类代码' },
|
||||
{ prop: 'implantFlag', label: '植入材料和人体器官标志' },
|
||||
{ prop: 'sterilizationFlag', label: '灭菌标志' },
|
||||
{ prop: 'sterilizationName', label: '灭菌标志名称' },
|
||||
{ prop: 'implantInterventionFlag', label: '植入或介入类标志' },
|
||||
{ prop: 'implantInterventionName', label: '植入或介入类名称' },
|
||||
{ prop: 'disposableFlag', label: '一次性使用标志' },
|
||||
{ prop: 'disposableFlagName', label: '一次性使用标志名称' },
|
||||
{ prop: 'registrantName', label: '注册备案人名称' },
|
||||
{ prop: 'startDate', label: '开始日期' },
|
||||
{ prop: 'endDate', label: '结束日期' },
|
||||
{ prop: 'deviceManagementCategory', label: '医疗器械管理类别' },
|
||||
{ prop: 'deviceCategoryName', label: '医疗器械管理类别名称' },
|
||||
{ prop: 'registrationNo', label: '注册备案号' },
|
||||
{ prop: 'registeredProductName', label: '注册备案产品名称' },
|
||||
{ prop: 'structureDetails', label: '结构及组成' },
|
||||
{ prop: 'otherContent', label: '其他内容' },
|
||||
{ prop: 'approvalDate', label: '批准日期' },
|
||||
{ prop: 'registrantAddress', label: '注册备案人住所' },
|
||||
{ prop: 'certEffectiveStart', label: '注册证有效期开始时间' },
|
||||
{ prop: 'certEffectiveEnd', label: '注册证有效期结束时间' },
|
||||
{ prop: 'manufacturerCode', label: '生产企业编号' },
|
||||
{ prop: 'manufacturerName', label: '生产企业名称' },
|
||||
{ prop: 'productionAddress', label: '生产地址' },
|
||||
{ prop: 'agentCompany', label: '代理人企业' },
|
||||
{ prop: 'agentAddress', label: '代理人企业地址' },
|
||||
{ prop: 'productionCountry', label: '生产国或地区' },
|
||||
{ prop: 'serviceAgency', label: '售后服务机构' },
|
||||
{ prop: 'certArchivePath', label: '注册或备案证电子档案' },
|
||||
{ prop: 'productImages', label: '产品影像' },
|
||||
{ prop: 'validFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
// 疾病与诊断目录 (1307)
|
||||
1307: {
|
||||
columns: [
|
||||
{ prop: 'diseaseId', label: '西医疾病诊断' },
|
||||
{ prop: 'chapter', label: '章' },
|
||||
{ prop: 'chapterCodeRange', label: '章代码范围' },
|
||||
{ prop: 'chapterName', label: '章名称' },
|
||||
{ prop: 'sectionCodeRange', label: '节代码范围' },
|
||||
{ prop: 'sectionName', label: '节名称' },
|
||||
{ prop: 'categoryCode', label: '类目代码' },
|
||||
{ prop: 'categoryName', label: '类目名称' },
|
||||
{ prop: 'subcategoryCode', label: '亚目代码' },
|
||||
{ prop: 'subcategoryName', label: '亚目名称' },
|
||||
{ prop: 'diagnosisCode', label: '诊断代码' },
|
||||
{ prop: 'diagnosisName', label: '诊断名称' },
|
||||
{ prop: 'usageFlag', label: '使用标记' }, //使用标记(true:启用 false:停用)
|
||||
{ prop: 'gbDiagnosisCode', label: '国标版诊断代码' },
|
||||
{ prop: 'gbDiagnosisName', label: '国标版诊断名称' },
|
||||
{ prop: 'clinicalCode', label: '临床版诊断代码' },
|
||||
{ prop: 'clinicalName', label: '临床版诊断名称' },
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'validFlag', label: '有效标志' }, //有效标志(true:有效 false:无效)
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
// { prop: 'createTime', label: '数据创建时间' },
|
||||
// { prop: 'updateTime', label: '数据更新时间' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
// 手术操作目录 (1308)
|
||||
1308: {
|
||||
columns: [
|
||||
{ prop: 'id', label: '手术标准目录ID' },
|
||||
{ prop: 'chapter', label: '章' },
|
||||
{ prop: 'chapterCodeRange', label: '章代码范围' },
|
||||
{ prop: 'chapterName', label: '章名称' },
|
||||
{ prop: 'categoryCode', label: '类目代码' },
|
||||
{ prop: 'categoryName', label: '类目名称' },
|
||||
{ prop: 'subcategoryCode', label: '亚目代码' },
|
||||
{ prop: 'subcategoryName', label: '亚目名称' },
|
||||
{ prop: 'itemCode', label: '项目代码' },
|
||||
{ prop: 'itemName', label: '项目名称' },
|
||||
{ prop: 'operationCode', label: '手术操作代码' },
|
||||
{ prop: 'operationName', label: '手术操作名称' },
|
||||
{ prop: 'usageFlag', label: '使用标记' },
|
||||
{ prop: 'groupStandardOperationCode', label: '团标版手术操作代码' },
|
||||
{ prop: 'groupStandardOperationName', label: '团标版手术操作名称' },
|
||||
{ prop: 'clinicalVersionOperationCode', label: '临床版手术操作代码' },
|
||||
{ prop: 'clinicalVersionOperationName', label: '临床版手术操作名称' },
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'validFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'createTime', label: '数据创建时间' },
|
||||
{ prop: 'updateTime', label: '数据更新时间' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
// 中医疾病目录 (1314)
|
||||
1314: {
|
||||
columns: [
|
||||
{ prop: 'id', label: '中医疾病诊断' },
|
||||
{ prop: 'categoryCode', label: '科别类目编码' },
|
||||
{ prop: 'categoryName', label: '科别类目名称' },
|
||||
{ prop: 'specialtySystemCategoryCode', label: '专科系统分类目编码' },
|
||||
{ prop: 'specialtySystemCategoryName', label: '专科系统分类目名称' },
|
||||
{ prop: 'diseaseCategoryCode', label: '疾病分类编码' },
|
||||
{ prop: 'diseaseCategoryName', label: '疾病分类名称' },
|
||||
{ prop: 'remarks', label: '备注' },
|
||||
{ prop: 'validFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
// { prop: 'createTime', label: '数据创建时间' },
|
||||
// { prop: 'updateTime', label: '数据更新时间' },
|
||||
{ prop: 'versionNumber', label: '版本号' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
// 中医证候目录 (1315)
|
||||
1315: {
|
||||
columns: [
|
||||
{ prop: 'tcmSyndromeId', label: '中医证候ID' },
|
||||
{ prop: 'syndromeClassCode', label: '证候类目编码' },
|
||||
{ prop: 'syndromeClassName', label: '证候分类名称' },
|
||||
{ prop: 'syndromePropertyCode', label: '证候属性代码' },
|
||||
{ prop: 'syndromeProperty', label: '证候属性' },
|
||||
{ prop: 'syndromeTypeCode', label: '证候分类代码' },
|
||||
{ prop: 'syndromeTypeName', label: '证候分类名称' },
|
||||
{ prop: 'remark', label: '备注' },
|
||||
{ prop: 'activeFlag', label: '有效标志' },
|
||||
{ prop: 'uniqueRecordId', label: '唯一记录号' },
|
||||
{ prop: 'craetTime', label: '创建时间' },
|
||||
{ prop: 'updateTime', label: '更新时间' },
|
||||
{ prop: 'version', label: '版本' },
|
||||
{ prop: 'versionName', label: '版本名称' },
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 查询
|
||||
export function getYbCatalogResult(params) {
|
||||
return request({
|
||||
url: '/catalog/page',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
//更新查询
|
||||
export function getYbCatalog(address, v) {
|
||||
return request({
|
||||
url: `/yb-request/query-catalog?address=${address}&v=${v}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -1,358 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--药品目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<div class="head-title">医保目录</div>
|
||||
<el-tree
|
||||
:data="medicationOptions"
|
||||
:props="{
|
||||
label: 'info',
|
||||
children: 'children',
|
||||
}"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="medicationTreeRef"
|
||||
node-key="value"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
current-node-key="1301"
|
||||
:default-expand-all="true"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span :class="{ 'text-light-gray': !data.available }">
|
||||
{{ data.info }}
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--药品目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-row :gutter="10" class="mb8" style="margin-bottom: 20px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
style="display: flex; align-items: center; margin: 0"
|
||||
>
|
||||
<el-form-item
|
||||
label="搜索"
|
||||
prop="searchKey"
|
||||
label-width="40"
|
||||
style="margin: 0; margin-right: 10px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
:placeholder="searchPlaceholder"
|
||||
clearable
|
||||
style="width: 400px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="版本号"
|
||||
prop="versionNumber"
|
||||
label-width="80"
|
||||
style="margin: 0; margin-right: 10px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.v"
|
||||
placeholder="版本号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="margin: 0 10px">
|
||||
<el-button type="primary" plain icon="Search" @click="getList">查询</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="margin: 0 10px">
|
||||
<el-button type="primary" plain icon="Search" @click="handleUpdateCatalog"
|
||||
>更新目录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="medicationList" style="width: 100%" height="70vh">
|
||||
<template v-for="(column, index) in currentColumns" :key="index">
|
||||
<el-table-column
|
||||
:prop="column.prop"
|
||||
:label="column.label"
|
||||
:min-width="calculateColumnWidth(column)"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
<template v-if="column.type === 'tag'">
|
||||
<el-tag v-if="scope.row[column.prop.split('_')[0]] == 2" type="success">
|
||||
{{ scope.row[column.prop] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="error">{{ scope.row[column.prop] }}</el-tag>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{
|
||||
scope.row[column.prop] === null ||
|
||||
scope.row[column.prop] === '' ||
|
||||
scope.row[column.prop] === undefined ||
|
||||
scope.row[column.prop] === 'null'
|
||||
? '--'
|
||||
: scope.row[column.prop]
|
||||
}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Medication">
|
||||
import { getYbCatalogResult, getYbCatalog } from './components/medicine';
|
||||
//字段配置文件
|
||||
import { catalogFieldConfigs } from './components/catalogFields';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const medicationList = ref([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const total = ref(0);
|
||||
const medicationOptions = ref(undefined);
|
||||
const currentCategoryEnum = ref('1301'); // 默认选中1301
|
||||
const medicationTreeRef = ref(null); // 医保目录树引用
|
||||
const currentColumns = ref([]); // 表格列配置
|
||||
const searchPlaceholder = ref('医疗目录编码/注册名称/批准文号/唯一记录号'); // 默认搜索提示
|
||||
// 定义有数据的catalogType值
|
||||
const availableCatalogTypes = ['1301', '1302', '1305', '1306', '1307', '1308', '1314', '1315'];
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
searchKey: undefined, // 搜索关键词(医疗目录编码/注册名称/批准文号/唯一记录号)
|
||||
catalogType: '1301', // 默认使用有数据的目录类型1301
|
||||
v: '0', // 版本号
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.info.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
/** 病种目录分类查询下拉树结构 - 使用前端写死的数据 */
|
||||
function getMedicationCategoryList() {
|
||||
// 直接使用CatalogType枚举值,并为每个选项添加available属性
|
||||
const catalogTypeOptions = [
|
||||
{ info: '西药中成药目录', value: '1301', available: true },
|
||||
{ info: '中药饮片目录', value: '1302', available: true },
|
||||
{ info: '医疗机构制剂目录', value: '1303', available: false },
|
||||
{ info: '民族药品目录', value: '1304', available: false },
|
||||
{ info: '医疗服务项目目录', value: '1305', available: true },
|
||||
{ info: '医用耗材目录', value: '1306', available: true },
|
||||
{ info: '疾病与诊断目录', value: '1307', available: true },
|
||||
{ info: '手术操作目录', value: '1308', available: true },
|
||||
{ info: '门诊慢特病种目录', value: '1309', available: false },
|
||||
{ info: '按病种付费病种目录', value: '1310', available: false },
|
||||
{ info: '日间手术治疗病种', value: '1311', available: false },
|
||||
{ info: '医保目录信息查询', value: '1312', available: false },
|
||||
{ info: '肿瘤形态学目录', value: '1313', available: false },
|
||||
{ info: '中医疾病目录', value: '1314', available: true },
|
||||
{ info: '中医证候目录', value: '1315', available: true },
|
||||
{ info: '医疗目录与医保目录匹配信息', value: '1316', available: false },
|
||||
{ info: '医药机构目录匹配信息', value: '1317', available: false },
|
||||
{ info: '医保目录限价信息', value: '1318', available: false },
|
||||
{ info: '医保目录先自付比例信息', value: '1319', available: false },
|
||||
{ info: '中药配方颗粒目录', value: '1320', available: false },
|
||||
{ info: '医疗服务项目(新)目录', value: '1321', available: false },
|
||||
];
|
||||
|
||||
medicationOptions.value = catalogTypeOptions;
|
||||
// 添加全部选项,但设为不可用
|
||||
medicationOptions.value.unshift({ info: '全部', value: '', available: false });
|
||||
|
||||
// 确保默认选中1301
|
||||
setTimeout(() => {
|
||||
if (medicationTreeRef.value) {
|
||||
medicationTreeRef.value.setCurrentKey('1301');
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
function handleUpdateCatalog() {
|
||||
// proxy.$message.success('暂未实现目录更新功能');
|
||||
// loading.value = true;
|
||||
// 版本号默认传0
|
||||
getYbCatalog(queryParams.value.catalogType, '0').then((res) => {
|
||||
// loading.value = false;
|
||||
if (res && res.data) {
|
||||
proxy.$message.success('目录更新成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getYbCatalogResult(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
if (res && res.data.data && res.data.data.records) {
|
||||
medicationList.value = res.data.data.records;
|
||||
total.value = res.data.data.total || res.data.total || medicationList.value.length;
|
||||
}
|
||||
// 默认空数据
|
||||
else {
|
||||
medicationList.value = [];
|
||||
total.value = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 医保目录节点点击事件
|
||||
function handleNodeClick(data) {
|
||||
if (data.available) {
|
||||
queryParams.value.catalogType = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
// 切换目录类型时清空搜索框的值
|
||||
queryParams.value.searchKey = undefined;
|
||||
// 动态设置表格列配置
|
||||
if (catalogFieldConfigs[data.value]) {
|
||||
console.log('catalogFieldConfigs[data.value]', catalogFieldConfigs[data.value]);
|
||||
currentColumns.value = catalogFieldConfigs[data.value].columns;
|
||||
} else {
|
||||
currentColumns.value = []; // 无配置时显示空列
|
||||
}
|
||||
// 根据当前目录类型设置搜索提示
|
||||
setSearchPlaceholder(data.value);
|
||||
|
||||
handleQuery();
|
||||
}
|
||||
}
|
||||
|
||||
/** 根据目录类型设置搜索提示 */
|
||||
function setSearchPlaceholder(catalogType) {
|
||||
switch (catalogType) {
|
||||
case '1301': // 西药中成药目录
|
||||
searchPlaceholder.value = '医疗目录编码/注册名称/批准文号/唯一记录号';
|
||||
break;
|
||||
case '1302': // 中药饮片目录
|
||||
searchPlaceholder.value = '医疗服务名称/唯一记录号';
|
||||
break;
|
||||
case '1305': // 医疗服务目录
|
||||
searchPlaceholder.value = '医疗目录编码/医疗服务名称/唯一记录号';
|
||||
break;
|
||||
case '1306': // 医用耗材目录
|
||||
searchPlaceholder.value = '医疗目录编码/耗材名称/耗材类别/材质类型/规格';
|
||||
break;
|
||||
case '1307': // 疾病与诊断目录
|
||||
searchPlaceholder.value = '分类名称/子分类名称/章名称/节名称';
|
||||
break;
|
||||
case '1308': // 手术标准目录
|
||||
searchPlaceholder.value = '分类名称/子分类名称/项目名称/手术名称/手术代码';
|
||||
break;
|
||||
case '1314': // 中医疾病目录
|
||||
searchPlaceholder.value = '疾病分类名称/疾病分类代码/唯一记录号';
|
||||
break;
|
||||
case '1315': // 中医证候目录
|
||||
searchPlaceholder.value = '证候类型代码/证候类型名称/唯一记录号';
|
||||
break;
|
||||
default:
|
||||
searchPlaceholder.value = '请输入搜索关键词';
|
||||
}
|
||||
}
|
||||
// 初始化时设置默认列配置和搜索提示
|
||||
function initColumns() {
|
||||
const defaultType = '1301'; // 默认目录类型
|
||||
if (catalogFieldConfigs[defaultType]) {
|
||||
currentColumns.value = catalogFieldConfigs[defaultType].columns;
|
||||
}
|
||||
// 设置默认搜索提示
|
||||
setSearchPlaceholder(defaultType);
|
||||
}
|
||||
|
||||
// 计算列宽度函数
|
||||
function calculateColumnWidth(column) {
|
||||
const baseWidth = 40; // 增加基础边距宽度
|
||||
const charWidth = 16; // 增加每个字符的平均宽度,确保中文能更好地显示
|
||||
const textLength = column.label ? column.label.length : 0;
|
||||
const calculatedWidth = baseWidth + textLength * charWidth;
|
||||
|
||||
// 设置最小宽度,确保即使短文本也有良好的显示效果
|
||||
const minWidth = 120;
|
||||
|
||||
return Math.max(calculatedWidth, minWidth);
|
||||
}
|
||||
|
||||
// 在组件挂载时初始化
|
||||
initColumns();
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
getMedicationCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.el-select {
|
||||
width: 150px !important;
|
||||
}
|
||||
|
||||
/* 确保表格内容完整显示 */
|
||||
.el-table {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* 调整表格列样式,允许内容更好地显示 */
|
||||
.el-table__cell {
|
||||
padding: 12px 8px;
|
||||
}
|
||||
|
||||
/* 确保分页组件完整显示 */
|
||||
.pagination-container {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* 自定义样式:使不可用的目录类型文字颜色变浅 */
|
||||
.text-light-gray {
|
||||
color: #c0c4cc !important;
|
||||
}
|
||||
|
||||
/* 确保样式能正确应用到树节点 */
|
||||
:deep(.el-tree-node__label) {
|
||||
transition: color 0.3s;
|
||||
}
|
||||
</style>
|
||||
@@ -46,7 +46,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -175,17 +175,17 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
:show-overflow-tooltip="true"
|
||||
width="160"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
>
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -777,7 +777,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].locationInventoryList = locationList.value;
|
||||
@@ -985,7 +985,7 @@ function edit() {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.totalVolume,
|
||||
manufacturerText: item.supplierName,
|
||||
manufacturer: item.supplierName,
|
||||
quantity: item.totalQuantity,
|
||||
locationInventoryList: locationList.value,
|
||||
startTime: formatDate(item.startTime),
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column label="编码" align="center" prop="ybNo" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">导出</el-button>
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
@@ -211,17 +210,17 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
>
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -911,7 +910,7 @@ function handleReject() {
|
||||
store.clearCurrentDataLYCK();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/billapproval',
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
query: { type: 'requisitionManagement' },
|
||||
});
|
||||
}
|
||||
@@ -927,7 +926,7 @@ function handelApply() {
|
||||
store.clearCurrentDataLYCK();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/billapproval',
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
query: { type: 'requisitionManagement' },
|
||||
});
|
||||
}
|
||||
@@ -982,7 +981,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber;
|
||||
@@ -1460,7 +1459,7 @@ function edit() {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.volume,
|
||||
manufacturerText: item.supplierName,
|
||||
manufacturer: item.supplierName,
|
||||
totalQuantity: item.totalQuantity,
|
||||
// totalQuantity: item.totalQuantity,
|
||||
startTime: formatDate(item.startTime),
|
||||
@@ -1580,21 +1579,6 @@ getTransferProductDetails();
|
||||
// show,
|
||||
// edit,
|
||||
// });
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/issue-manage/requisition/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`领用单据明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
<el-button type="primary" plain icon="Plus" @click="handleSave">批量保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-button type="primary" plain @click="handleExport" v-if="viewStatus == 'view'">导出</el-button>
|
||||
<el-form
|
||||
:model="receiptHeaderForm"
|
||||
ref="receiptHeaderRef"
|
||||
@@ -226,17 +225,17 @@
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
key="manufacturerText"
|
||||
prop="manufacturerText"
|
||||
key="manufacturer"
|
||||
prop="manufacturer"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-form-item
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturerText`"
|
||||
:rules="tableRules.manufacturerText"
|
||||
:prop="`purchaseinventoryList.${scope.$index}.manufacturer`"
|
||||
:rules="tableRules.manufacturer"
|
||||
>
|
||||
<el-input v-model="scope.row.manufacturerText" placeholder="" disabled />
|
||||
<el-input v-model="scope.row.manufacturer" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -982,7 +981,7 @@ function handleReject() {
|
||||
store.clearCurrentDataLYTK();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/billapproval',
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
query: { type: 'returningInventory' },
|
||||
});
|
||||
}
|
||||
@@ -998,7 +997,7 @@ function handelApply() {
|
||||
store.clearCurrentDataLYTK();
|
||||
// 跳转到审核页面
|
||||
router.replace({
|
||||
path: '/aaaa/billapproval',
|
||||
path: '/aaaa/medicationmanagement/billapproval',
|
||||
query: { type: 'returningInventory' },
|
||||
});
|
||||
}
|
||||
@@ -1054,7 +1053,7 @@ function selectRow(rowValue, index) {
|
||||
form.purchaseinventoryList[index].volume = rowValue.volume;
|
||||
form.purchaseinventoryList[index].minUnitCode = rowValue.minUnitCode;
|
||||
form.purchaseinventoryList[index].unitCode = rowValue.unitCode;
|
||||
form.purchaseinventoryList[index].manufacturerText = rowValue.manufacturerText;
|
||||
form.purchaseinventoryList[index].manufacturer = rowValue.manufacturer;
|
||||
form.purchaseinventoryList[index].partPercent = rowValue.partPercent;
|
||||
form.purchaseinventoryList[index].unitList = rowValue.unitList[0];
|
||||
form.purchaseinventoryList[index].lotNumber = rowValue.lotNumber;
|
||||
@@ -1519,7 +1518,7 @@ function edit() {
|
||||
...item,
|
||||
name: item.itemName,
|
||||
volume: item.totalVolume,
|
||||
manufacturerText: item.supplierName,
|
||||
manufacturer: item.supplierName,
|
||||
totalSourceQuantity: item.itemQuantity,
|
||||
totalPurposeQuantity: item.totalPurposeQuantity,
|
||||
startTime: formatDate(item.startTime),
|
||||
@@ -1615,22 +1614,6 @@ getTransferProductDetails();
|
||||
// show,
|
||||
// edit,
|
||||
// });
|
||||
|
||||
// 导出
|
||||
const exportRequiredParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
busNo: route.query.supplyBusNo
|
||||
});
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/issue-manage/return/excel-out',
|
||||
{
|
||||
...exportRequiredParams.value,
|
||||
},
|
||||
`退库单据明细_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,230 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="姓名:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="序号/姓名"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊日期:">
|
||||
<el-date-picker
|
||||
v-model="approvalTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="diseaseList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
key="supplyBusno"
|
||||
prop="supplyBusno"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="性别"
|
||||
align="center"
|
||||
key="genderEnum"
|
||||
prop="genderEnum"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="年龄"
|
||||
align="center"
|
||||
key="age"
|
||||
prop="age"
|
||||
width="140px"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室"
|
||||
align="center"
|
||||
key="locationId"
|
||||
prop="locationId"
|
||||
width="140"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="就诊时间"
|
||||
align="center"
|
||||
key="encounterStartTime"
|
||||
prop="encounterStartTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="身份证号"
|
||||
align="center"
|
||||
key="idCard"
|
||||
prop="idCard"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="电话"
|
||||
align="center"
|
||||
key="phone"
|
||||
prop="phone"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="诊断"
|
||||
align="center"
|
||||
key="conditionId"
|
||||
prop="conditionId"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="diseaseDetails">
|
||||
import {
|
||||
getDiseaseDetails,
|
||||
} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDiseaseDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
diseaseList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,224 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="产品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/机构名称/产品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationInboundList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="医疗机构代码"
|
||||
align="center"
|
||||
key="medinsCode"
|
||||
prop="medinsCode"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="组织机构名称"
|
||||
align="center"
|
||||
key="orgCode"
|
||||
prop="orgCode"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="国家药品编码(YPID)"
|
||||
align="center"
|
||||
key="ypNo"
|
||||
prop="ypNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="院内药品唯一码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="省级药品集中采购平台药品编码"
|
||||
align="center"
|
||||
key="itemTableText"
|
||||
prop="itemTableText"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
align="center"
|
||||
key="productNmae"
|
||||
prop="productNmae"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库总金额(元)"
|
||||
align="center"
|
||||
key="totalPrice"
|
||||
prop="totalPrice"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库数量(最小销售包装单位)"
|
||||
align="center"
|
||||
key="minUnitSale"
|
||||
prop="minUnitSale"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库数量(最小制剂单位)"
|
||||
align="center"
|
||||
key="minDoseQuantity"
|
||||
prop="minDoseQuantity"
|
||||
width="250"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationInboundDetails">
|
||||
import {
|
||||
getMedicationInboundDetails,
|
||||
} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const medicationInboundList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getMedicationInboundDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
medicationInboundList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,274 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="药品名称:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="编码/序号/药品名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商:" prop="supplierId">
|
||||
<el-select v-model="queryParams.supplierId" placeholder="" clearable style="width: 150px">
|
||||
<el-option
|
||||
v-for="supplierList in supplierListOptions"
|
||||
:key="supplierList.value"
|
||||
:label="supplierList.label"
|
||||
:value="supplierList.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationSaleList"
|
||||
@selection-change="handleSelectionChange"
|
||||
height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="定点编码"
|
||||
align="center"
|
||||
key="fixmedinsCode"
|
||||
prop="fixmedinsCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="定点名称"
|
||||
align="center"
|
||||
key="fixmedinsName"
|
||||
prop="fixmedinsName"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医疗目录编码"
|
||||
align="center"
|
||||
key="ybOrgNo"
|
||||
prop="ybOrgNo"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品通用名称"
|
||||
align="center"
|
||||
key="ypName"
|
||||
prop="ypName"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品69码"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品类型"
|
||||
align="center"
|
||||
key="categoryCode"
|
||||
prop="categoryCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品剂型"
|
||||
align="center"
|
||||
key="doseFromCode"
|
||||
prop="doseFromCode"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品规格"
|
||||
align="center"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小包装数量"
|
||||
align="center"
|
||||
key="minUnitSum"
|
||||
prop="minUnitSum"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小包装单位"
|
||||
align="center"
|
||||
key="minUnitCode"
|
||||
prop="minUnitCode"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生产企业"
|
||||
align="center"
|
||||
key="supplyName"
|
||||
prop="supplyName"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="批准文号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
width="150"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="年度销售量(盒/瓶/支)"
|
||||
align="center"
|
||||
key="annualSales"
|
||||
prop="annualSales"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="medicationSaleDetails">
|
||||
import {
|
||||
getMedicationSaleDetails,
|
||||
} from './statisticalManagent';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const route = useRoute();
|
||||
|
||||
const medicationSaleList = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const approvalTime = ref([]);
|
||||
const supplierListOptions = ref([]);
|
||||
const locationIdList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
medicationDefId: undefined,
|
||||
department: undefined,
|
||||
purposeLocationId: undefined,
|
||||
categoryType: undefined,
|
||||
supplierId: undefined,
|
||||
occurrenceTimeSTime: undefined,
|
||||
occurrenceTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
getPharmacyCabinetList().then((response) => {
|
||||
locationIdList.value = response.data;
|
||||
});
|
||||
getInboundInit().then((response) => {
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.$download.downloadGet(
|
||||
'report-manage/inbound/excel-out',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`dict_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getMedicationSaleDetails(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
medicationSaleList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[0] + ' 00:00:00' : '';
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
approvalTime.value && approvalTime.value.length == 2 ? approvalTime.value[1] + ' 23:59:59' : '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.occurrenceTimeSTime = '';
|
||||
queryParams.value.occurrenceTimeETime = '';
|
||||
approvalTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,451 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="100px">
|
||||
<el-form-item label="统计时间:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD" />
|
||||
</el-form-item>
|
||||
<el-form-item label="统计类型:" prop="statisticsType">
|
||||
<el-select
|
||||
v-model="queryParams.statisticsType"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option label="门诊收入分类" value="outpatientIncome" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="医院:" prop="hospital">
|
||||
<el-select
|
||||
v-model="queryParams.hospital"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px">
|
||||
<el-option label="长春市朝阳区中医院" value="sameHospital" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="科室:" prop="department">
|
||||
<el-select
|
||||
v-model="queryParams.department"
|
||||
placeholder="请选择科室"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@change="handleDepartmentChange"
|
||||
>
|
||||
<el-option label="全部" value="all" />
|
||||
<el-option
|
||||
v-for="dept in departmentOptions"
|
||||
:key="dept.value"
|
||||
:label="dept.label"
|
||||
:value="dept.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类型:" prop="itemType">
|
||||
<el-select
|
||||
v-model="queryParams.itemType"
|
||||
placeholder="请选择项目类型"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
:disabled="!queryParams.department || queryParams.department === 'all'"
|
||||
>
|
||||
<el-option label="全部" value="all" />
|
||||
<el-option
|
||||
v-for="item in filteredItemTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="processedTableData" @selection-change="handleSelectionChange"
|
||||
:span-method="spanMethod" height="calc(100vh - 300px)" border>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="科室" align="center" key="department" prop="department" width="120"
|
||||
:show-overflow-tooltip="true" />
|
||||
<el-table-column label="类别" align="center" key="category" prop="category" width="120" />
|
||||
<el-table-column label="金额" align="center" key="amount" prop="amount" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDisplayValue(scope.row.amount, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="药品成本" align="center" prop="drugCost" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDrugCostDisplay(scope.row.drugCost, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="净收入" align="center" prop="netIncome" width="120">
|
||||
<template #default="scope">
|
||||
<span :class="{
|
||||
'subtotal-text': scope.row.rowType === 'subtotal',
|
||||
'drug-text': scope.row.rowType === 'drug',
|
||||
'total-text': scope.row.rowType === 'total'
|
||||
}">
|
||||
{{ formatDisplayValue(scope.row.netIncome, scope.row.rowType) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="OutpatientDepartmentMetrics">
|
||||
import {
|
||||
getOutpatientDepartmentMetrics
|
||||
} from './statisticalManagent';
|
||||
import { ref, reactive, computed, toRefs, watch } from 'vue';
|
||||
|
||||
const loading = ref(true);
|
||||
const total = ref(0);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
statisticsType: undefined,
|
||||
hospital: undefined,
|
||||
department: undefined,
|
||||
itemType: undefined
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
// 原始数据
|
||||
const originalData = ref([
|
||||
{ department: '内科门诊', category: '西药', amount: 115.64, drugCost: 100.56, netIncome: 15.084 },
|
||||
{ department: '内科门诊', category: '医用耗材', amount: 6.00, drugCost: 0, netIncome: 6 },
|
||||
{ department: '内科门诊', category: '护理', amount: 30.00, drugCost: 0, netIncome: 30 },
|
||||
{ department: '妇科', category: '西药', amount: 148.70, drugCost: 112.44, netIncome: 36.255 },
|
||||
{ department: '妇科', category: '治疗', amount: 18.00, drugCost: 0, netIncome: 18 },
|
||||
]);
|
||||
|
||||
// 动态生成科室选项
|
||||
const departmentOptions = computed(() => {
|
||||
const departments = [...new Set(originalData.value.map(item => item.department))];
|
||||
return departments.map(dept => ({
|
||||
label: dept,
|
||||
value: dept
|
||||
}));
|
||||
});
|
||||
|
||||
// 所有项目类型选项
|
||||
const allItemTypeOptions = computed(() => {
|
||||
const categories = [...new Set(originalData.value.map(item => item.category))];
|
||||
return categories.map(category => ({
|
||||
label: category,
|
||||
value: category
|
||||
}));
|
||||
});
|
||||
|
||||
// 根据选择的科室过滤项目类型选项
|
||||
const filteredItemTypeOptions = computed(() => {
|
||||
if (!queryParams.value.department || queryParams.value.department === 'all') {
|
||||
return allItemTypeOptions.value;
|
||||
}
|
||||
|
||||
// 获取该科室下的所有项目类型
|
||||
const deptCategories = [...new Set(
|
||||
originalData.value
|
||||
.filter(item => item.department === queryParams.value.department)
|
||||
.map(item => item.category)
|
||||
)];
|
||||
|
||||
return allItemTypeOptions.value.filter(item =>
|
||||
deptCategories.includes(item.value)
|
||||
);
|
||||
});
|
||||
|
||||
// 科室变化时的处理
|
||||
const handleDepartmentChange = (value) => {
|
||||
// 如果选择了具体科室,重置项目类型为"全部"
|
||||
if (value && value !== 'all') {
|
||||
queryParams.value.itemType = 'all';
|
||||
}
|
||||
};
|
||||
|
||||
// 过滤后的数据(根据查询条件)
|
||||
const filteredData = computed(() => {
|
||||
let data = [...originalData.value];
|
||||
|
||||
// 科室筛选
|
||||
if (queryParams.value.department && queryParams.value.department !== 'all') {
|
||||
data = data.filter(item => item.department === queryParams.value.department);
|
||||
}
|
||||
|
||||
// 项目类型筛选
|
||||
if (queryParams.value.itemType && queryParams.value.itemType !== 'all') {
|
||||
data = data.filter(item => item.category === queryParams.value.itemType);
|
||||
}
|
||||
|
||||
return data;
|
||||
});
|
||||
|
||||
const formatCurrency = (value) => {
|
||||
return value ? value.toFixed(2) : '0.00';
|
||||
}
|
||||
|
||||
const formatDisplayValue = (value, rowType) => {
|
||||
if (rowType === 'drug' && typeof value === 'string') {
|
||||
return value; // 药品占比行显示百分比字符串
|
||||
}
|
||||
return formatCurrency(value);
|
||||
}
|
||||
|
||||
const formatDrugCostDisplay = (value, rowType) => {
|
||||
if (rowType === 'drug') {
|
||||
return '药品占比'; // 药品占比行显示文字"药品占比"
|
||||
}
|
||||
return formatCurrency(value);
|
||||
}
|
||||
|
||||
// 动态获取所有科室(基于过滤后的数据)
|
||||
const departments = computed(() => {
|
||||
return [...new Set(filteredData.value.map(item => item.department))];
|
||||
})
|
||||
|
||||
// 构建完整的表格数据(包含小计、药品金额和占比、总计)
|
||||
const processedTableData = computed(() => {
|
||||
const data = [];
|
||||
|
||||
// 处理每个科室
|
||||
departments.value.forEach(dept => {
|
||||
const deptData = filteredData.value.filter(item => item.department === dept);
|
||||
|
||||
// 添加详细数据
|
||||
data.push(...deptData.map(item => ({
|
||||
...item,
|
||||
rowType: 'detail'
|
||||
})));
|
||||
|
||||
// 计算小计
|
||||
const subtotal = deptData.reduce((sum, item) => ({
|
||||
amount: sum.amount + item.amount,
|
||||
drugCost: sum.drugCost + item.drugCost,
|
||||
netIncome: sum.netIncome + item.netIncome
|
||||
}), { amount: 0, drugCost: 0, netIncome: 0 });
|
||||
|
||||
// 添加小计行
|
||||
data.push({
|
||||
department: dept,
|
||||
category: '小计',
|
||||
amount: Number(subtotal.amount.toFixed(2)),
|
||||
drugCost: Number(subtotal.drugCost.toFixed(2)),
|
||||
netIncome: Number(subtotal.netIncome.toFixed(2)),
|
||||
rowType: 'subtotal'
|
||||
});
|
||||
|
||||
// 计算药品金额和占比
|
||||
const drugAmount = deptData
|
||||
.filter(item => item.category.includes('药'))
|
||||
.reduce((sum, item) => sum + item.amount, 0);
|
||||
|
||||
const totalAmount = subtotal.amount;
|
||||
const drugRatio = totalAmount > 0 ? ((drugAmount / totalAmount) * 100).toFixed(2) + '%' : '0.00%';
|
||||
|
||||
// 添加药品金额和占比行
|
||||
data.push({
|
||||
department: dept,
|
||||
category: '药品金额',
|
||||
amount: Number(drugAmount.toFixed(2)), // 在金额列显示药品金额
|
||||
drugCost: '药品占比', // 在药品成本列显示文字"药品占比"
|
||||
netIncome: drugRatio, // 在净收入列显示占比值
|
||||
rowType: 'drug'
|
||||
});
|
||||
});
|
||||
|
||||
// 计算合计
|
||||
const totalData = filteredData.value.reduce((sum, item) => ({
|
||||
amount: sum.amount + item.amount,
|
||||
drugCost: sum.drugCost + item.drugCost,
|
||||
netIncome: sum.netIncome + item.netIncome
|
||||
}), { amount: 0, drugCost: 0, netIncome: 0 });
|
||||
|
||||
|
||||
// 计算合计的药品金额和占比
|
||||
const totalDrugAmount = filteredData.value.filter(item => item.category.includes('药')).reduce((sum, item) => sum + item.amount, 0);
|
||||
const totalDrugRatio = totalData.amount > 0 ?
|
||||
((totalDrugAmount / totalData.amount) * 100).toFixed(2) + '%' : '0.00%';
|
||||
|
||||
// 添加合计行
|
||||
data.push({
|
||||
department: '合计',
|
||||
category: '合计',
|
||||
amount: Number(totalData.amount.toFixed(2)),
|
||||
drugCost: Number(totalData.drugCost.toFixed(2)),
|
||||
netIncome: Number(totalData.netIncome.toFixed(2)),
|
||||
rowType: 'total'
|
||||
});
|
||||
|
||||
// 添加总计的药品占比行
|
||||
data.push({
|
||||
department: '药品金额',
|
||||
category: '药品金额',
|
||||
amount: Number(totalDrugAmount.toFixed(2)),
|
||||
drugCost: '药品占比',
|
||||
netIncome: totalDrugRatio,
|
||||
rowType: 'drug'
|
||||
});
|
||||
|
||||
return data;
|
||||
});
|
||||
|
||||
// 预计算合并信息
|
||||
const spanInfo = computed(() => {
|
||||
const info = [];
|
||||
let currentDept = null;
|
||||
let startIndex = 0;
|
||||
let rowCount = 0;
|
||||
|
||||
for (let i = 0; i < processedTableData.value.length; i++) {
|
||||
const row = processedTableData.value[i];
|
||||
|
||||
if (row.department !== currentDept) {
|
||||
if (currentDept !== null) {
|
||||
info.push({ startIndex: startIndex, rowCount: rowCount });
|
||||
}
|
||||
currentDept = row.department;
|
||||
startIndex = i;
|
||||
rowCount = 1;
|
||||
} else {
|
||||
rowCount++;
|
||||
}
|
||||
|
||||
// 最后一个元素
|
||||
if (i === processedTableData.value.length - 1) {
|
||||
info.push({ startIndex: startIndex, rowCount: rowCount });
|
||||
}
|
||||
}
|
||||
|
||||
return info;
|
||||
});
|
||||
|
||||
const spanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
// 合并科室列(第一列)
|
||||
if (columnIndex === 1) {
|
||||
for (const info of spanInfo.value) {
|
||||
if (rowIndex >= info.startIndex && rowIndex < info.startIndex + info.rowCount) {
|
||||
if (rowIndex === info.startIndex) {
|
||||
// 该科室的第一行,合并所有行
|
||||
return { rowspan: info.rowCount, colspan: 1 };
|
||||
} else {
|
||||
// 该科室的其他行隐藏
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getOutpatientDepartmentMetrics(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
// 这里将接口返回的数据赋值给 originalData
|
||||
if (res.data && res.data.records) {
|
||||
originalData.value = res.data.records;
|
||||
}
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function handleClear() {
|
||||
// 重置查询参数
|
||||
queryParams.value = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
statisticsType: undefined,
|
||||
hospital: undefined,
|
||||
department: undefined,
|
||||
itemType: undefined
|
||||
};
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 多选框选中数据 */
|
||||
function handleSelectionChange(selection) {
|
||||
// 处理选中数据
|
||||
console.log('选中数据:', selection);
|
||||
}
|
||||
|
||||
// 初始化加载
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.subtotal-text {
|
||||
font-weight: bold;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.drug-text {
|
||||
font-weight: bold;
|
||||
color: #67C23A;
|
||||
}
|
||||
|
||||
.total-text {
|
||||
font-weight: bold;
|
||||
color: #F56C6C;
|
||||
}
|
||||
|
||||
/* 行样式 */
|
||||
:deep(.el-table .el-table__row) {
|
||||
&[data-row-type="subtotal"] td {
|
||||
background-color: #f0f9ff;
|
||||
}
|
||||
&[data-row-type="drug"] td {
|
||||
background-color: #f0f9ff;
|
||||
}
|
||||
&[data-row-type="total"] td {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
}
|
||||
|
||||
/* 禁用状态样式 */
|
||||
:deep(.el-select .el-input.is-disabled .el-input__inner) {
|
||||
background-color: #f5f7fa;
|
||||
border-color: #e4e7ed;
|
||||
color: #c0c4cc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
@@ -1,52 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table border :data="tableData" style="width: 100%" class="el-table">
|
||||
<el-table-column prop="name" label="姓名" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" />
|
||||
<el-table-column prop="age" label="年龄" show-overflow-tooltip />
|
||||
<el-table-column prop="phone" label="电话" show-overflow-tooltip />
|
||||
<el-table-column label="挂号时间" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
{{ filterDate(scope.row.registerTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import moment from 'moment';
|
||||
import { tracePatient } from './statisticalManagent';
|
||||
const tableData = ref([]);
|
||||
const props = defineProps({
|
||||
infoIdParams: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
// 格式化时间
|
||||
const filterDate = (date) => {
|
||||
return moment(date).format('YYYY - MM- DD HH:mm:ss');
|
||||
};
|
||||
// 查询接口
|
||||
const getList = async () => {
|
||||
try {
|
||||
const res = await tracePatient(props.infoIdParams);
|
||||
tableData.value = res.data;
|
||||
} catch (error) {}
|
||||
};
|
||||
watch(
|
||||
() => props.infoIdParams,
|
||||
(newValue) => {
|
||||
console.log('newValue========>', newValue);
|
||||
getList();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-table {
|
||||
height: calc(100vh - 400px);
|
||||
}
|
||||
</style>
|
||||
@@ -86,7 +86,6 @@
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-if="viewStatus == 'view'"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 获取库房对账列表
|
||||
export function getStoreReconciliationList (query) {
|
||||
return request ({
|
||||
url: '/inventory-manage/dynamic/dynamic-inventory',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 获取库房列表// 药房药库列表
|
||||
export function getPharmacyCabinetList () {
|
||||
return request ({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 查询备份单号
|
||||
export function getBackupList () {
|
||||
return request ({
|
||||
url: '/app-common/backup-list',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -1,372 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form ref="queryForm" :model="queryParams" label-width="120px" :inline="true">
|
||||
<el-form-item label="药品名称/编码/拼音/五笔码" prop="searchKey" label-width="200px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 350px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="期初备份单据号" prop="startBusNo">
|
||||
<el-select
|
||||
v-model="queryParams.startBusNo"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in backUpOptions"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="期末备份单据号" prop="endBusNo">
|
||||
<el-select
|
||||
v-model="queryParams.endBusNo"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in backUpOptions"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="库房" prop="locationId">
|
||||
<el-select
|
||||
v-model="queryParams.locationId"
|
||||
placeholder="请选择库房"
|
||||
@change="handleQuery"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in locationOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否发生过业务" prop="isBus">
|
||||
<el-select v-model="queryParams.isBus" filterable clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ id: 1, name: '已发生业务' },
|
||||
{ id: 0, name: '未发生业务' },
|
||||
]"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否账平" prop="isBalance">
|
||||
<el-select v-model="queryParams.isBalance" filterable clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="item in [
|
||||
{ id: 1, name: '已平账' },
|
||||
{ id: 0, name: '未平账' },
|
||||
]"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
stripe
|
||||
v-loading="loading"
|
||||
element-loading-text="数据加载中..."
|
||||
:header-cell-style="{ backgroundColor: '#f5f7fa', color: '#303133' }"
|
||||
empty-text="暂无数据"
|
||||
>
|
||||
<el-table-column type="expand" width="48">
|
||||
<template #default="{ row }">
|
||||
<el-row :gutter="10" style="width: 100%">
|
||||
<el-form label-width="100px" :inline="true">
|
||||
<el-form-item label="发药单据数" :class="computedClass(row)">
|
||||
{{ row.dispenseOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="退药单据数" :class="computedClass(row)">
|
||||
{{ row.returnOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="采购单据数" :class="computedClass(row)">
|
||||
{{ row.purchaseOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="退库单据数" :class="computedClass(row)">
|
||||
{{ row.purchaseReturnOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="调拨进单据数" :class="computedClass(row)">
|
||||
{{ row.transferInOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="调拨出单据数" :class="computedClass(row)">
|
||||
{{ row.transferOutOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="报损单据数" :class="computedClass(row)">
|
||||
{{ row.lossOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="盘点单据数" :class="computedClass(row)">
|
||||
{{ row.stocktakeOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="领用单据数" :class="computedClass(row)">
|
||||
{{ row.issueOrderCount }}
|
||||
</el-form-item>
|
||||
<el-form-item label="退领单据数" :class="computedClass(row)">
|
||||
{{ row.returnIssueOrderCount }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row :gutter="40" style="width: 100%">
|
||||
<el-col :span="16" class="formula-wrapper">
|
||||
<div class="formula">
|
||||
<template v-for="segment in balanceSegments" :key="segment.label">
|
||||
<span v-if="segment.operator" class="formula-operator">
|
||||
{{ segment.operator }}
|
||||
</span>
|
||||
<span class="formula-label">{{ segment.label }}</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">
|
||||
{{ formatInventoryUnit(row[segment.field], row) }}
|
||||
</span>
|
||||
<span>)</span>
|
||||
</template>
|
||||
<span class="formula-operator">=</span>
|
||||
<span class="formula-label">推算期末数</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">{{ computedEndNum(row) }}</span>
|
||||
<span>)</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="formula-wrapper">
|
||||
<span>期末数量</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">
|
||||
{{ formatInventoryUnit(row.endCount, row) }}
|
||||
</span>
|
||||
<span>)</span>
|
||||
<span class="formula-operator">-</span>
|
||||
<span>推测期末数量</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">{{ computedEndNum(row) }}</span>
|
||||
<span>)</span>
|
||||
<span class="formula-operator">=</span>
|
||||
<span>盈亏数量</span>
|
||||
<span>(</span>
|
||||
<span :class="computedClass(row)">
|
||||
{{ formatInventoryUnit(row.profitLossDiff, row) }}</span
|
||||
>
|
||||
<span>)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="itemName" label="药品名称" align="center" width="200" />
|
||||
<el-table-column prop="itemNo" label="项目编号" align="center" />
|
||||
<el-table-column prop="unitCode_dictText" label="单位" align="center" />
|
||||
<el-table-column prop="minUnitCode_dictText" label="最小单位" align="center" />
|
||||
<el-table-column prop="totalVolume" label="规格" align="center" />
|
||||
<el-table-column prop="categoryCode_dictText" label="药品分类" align="center" />
|
||||
<el-table-column prop="manufacturerText" label="生产厂家" align="center" width="300" />
|
||||
<el-table-column prop="partPercent" label="拆零比" align="center" />
|
||||
<el-table-column prop="isBalance" label="是否账平" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.isBalance == 1" type="success">已平账</el-tag>
|
||||
<el-tag v-else-if="scope.row.isBalance == 0" type="danger">未平账</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="storeReconciliation">
|
||||
import { ref, reactive, onMounted, watch, computed } from 'vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import {
|
||||
getStoreReconciliationList,
|
||||
getPharmacyCabinetList,
|
||||
getBackupList,
|
||||
} from './components/api.js';
|
||||
import { formatInventory } from '@/utils/his.js';
|
||||
const loading = ref(false);
|
||||
const total = ref(0);
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: '',
|
||||
startBusNo: '',
|
||||
endBusNo: '',
|
||||
locationId: '',
|
||||
isBus: 1,
|
||||
isBalance: 0,
|
||||
});
|
||||
// 获取库存单位
|
||||
function formatInventoryUnit(num, row) {
|
||||
return formatInventory(num, row.partPercent, row.unitCode_dictText, row.minUnitCode_dictText);
|
||||
}
|
||||
// 推算期末数
|
||||
function computedEndNum(row) {
|
||||
if (!row) return '';
|
||||
|
||||
const {
|
||||
startCount = 0,
|
||||
dispenseCount = 0,
|
||||
returnCount = 0,
|
||||
purchaseCount = 0,
|
||||
purchaseReturnCount = 0,
|
||||
transferInCount = 0,
|
||||
transferOutCount = 0,
|
||||
lossCount = 0,
|
||||
stocktakeCount = 0,
|
||||
issueCount = 0,
|
||||
returnIssueCount = 0,
|
||||
} = row;
|
||||
|
||||
const endCount =
|
||||
Number(startCount || 0) -
|
||||
Number(dispenseCount || 0) +
|
||||
Number(returnCount || 0) +
|
||||
Number(purchaseCount || 0) -
|
||||
Number(purchaseReturnCount || 0) +
|
||||
Number(transferInCount || 0) -
|
||||
Number(transferOutCount || 0) -
|
||||
Number(lossCount || 0) +
|
||||
Number(stocktakeCount || 0) -
|
||||
Number(issueCount || 0) +
|
||||
Number(returnIssueCount || 0);
|
||||
|
||||
return formatInventoryUnit(endCount, row);
|
||||
}
|
||||
function computedClass(row) {
|
||||
if (row.isBalance == 1) {
|
||||
return 'label-green';
|
||||
}
|
||||
if (row.isBalance == 0) {
|
||||
return 'label-red';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
// function
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
const resetQuery = () => {
|
||||
queryParams.locationId = '';
|
||||
queryParams.startBusNo = '';
|
||||
queryParams.endBusNo = '';
|
||||
queryParams.isBus = 1;
|
||||
queryParams.isBalance = 0;
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
const tableData = ref([]);
|
||||
const getList = async () => {
|
||||
const response = await getStoreReconciliationList(queryParams);
|
||||
tableData.value = response?.data?.records || [];
|
||||
total.value = response?.data?.total || 0;
|
||||
};
|
||||
const locationOptions = ref([]);
|
||||
const getLocationList = async () => {
|
||||
try {
|
||||
const response = await getPharmacyCabinetList();
|
||||
locationOptions.value = response?.data || [];
|
||||
queryParams.locationId = response?.data[0].id;
|
||||
} catch (error) {
|
||||
ElMessage.error('获取库房列表失败,请稍后重试');
|
||||
}
|
||||
};
|
||||
const backUpOptions = ref([]);
|
||||
const getBackupOptionsList = async () => {
|
||||
try {
|
||||
const response = await getBackupList();
|
||||
backUpOptions.value = response?.data || [];
|
||||
queryParams.startBusNo = response?.data[backUpOptions.value.length - 1];
|
||||
} catch (error) {
|
||||
ElMessage.error('获取备份单号失败,请稍后重试');
|
||||
}
|
||||
};
|
||||
const balanceSegments = [
|
||||
{ label: '期初数', field: 'startCount', operator: null },
|
||||
{ label: '发药数', field: 'dispenseCount', operator: '-' },
|
||||
{ label: '退药数', field: 'returnCount', operator: '+' },
|
||||
{ label: '入库数', field: 'purchaseCount', operator: '+' },
|
||||
{ label: '退库数', field: 'purchaseReturnCount', operator: '-' },
|
||||
{ label: '调拨进数', field: 'transferInCount', operator: '+' },
|
||||
{ label: '调拨出数', field: 'transferOutCount', operator: '-' },
|
||||
{ label: '报损数', field: 'lossCount', operator: '-' },
|
||||
{ label: '盘点数', field: 'stocktakeCount', operator: '+' },
|
||||
{ label: '领用数', field: 'issueCount', operator: '-' },
|
||||
{ label: '领用退数', field: 'returnIssueCount', operator: '+' },
|
||||
];
|
||||
watch(
|
||||
[() => queryParams.locationId, () => queryParams.startBusNo],
|
||||
([newLocationId, newStartBusNo]) => {
|
||||
if (newLocationId && newStartBusNo) {
|
||||
getList();
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
getBackupOptionsList();
|
||||
getLocationList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.label-red {
|
||||
color: #f56c6c;
|
||||
}
|
||||
.label-green {
|
||||
color: #67c23a;
|
||||
}
|
||||
.formula-wrapper {
|
||||
margin-top: 8px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
.formula-wrapper span {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.formula {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
}
|
||||
.formula-label {
|
||||
font-weight: 500;
|
||||
}
|
||||
.formula-operator {
|
||||
padding: 0 2px;
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
@@ -1,310 +0,0 @@
|
||||
{
|
||||
"panels": [
|
||||
{
|
||||
"index": 0,
|
||||
"name": 1,
|
||||
"paperType": "A4",
|
||||
"height": 297,
|
||||
"width": 210,
|
||||
"paperHeader": 73.5,
|
||||
"paperFooter": 817.5,
|
||||
"paperNumberContinue": true,
|
||||
"overPrintOptions": {},
|
||||
"watermarkOptions": {},
|
||||
"panelLayoutOptions": {},
|
||||
"printElements": [
|
||||
{
|
||||
"options": {
|
||||
"left": 249,
|
||||
"top": 12,
|
||||
"height": 12,
|
||||
"width": 70.5,
|
||||
"title": "调拨单据",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 16.5,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 10.5,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 120,
|
||||
"title": "单据号",
|
||||
"field": "busNo",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 141,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 97.5,
|
||||
"title": "源仓库",
|
||||
"field": "sourceLocationName",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 249,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 97.5,
|
||||
"title": "目的仓库",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "purposeLocationName"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 360.99609375,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 78,
|
||||
"title": "项目类型",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0,
|
||||
"field": "itemType_dictText"
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 445.5,
|
||||
"top": 46.5,
|
||||
"height": 9.75,
|
||||
"width": 136.5,
|
||||
"title": "制单日期",
|
||||
"field": "occurrenceTime",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"qrCodeLevel": 0
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "文本",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"left": 9,
|
||||
"top": 88.5,
|
||||
"height": 36,
|
||||
"width": 573,
|
||||
"title": "undefined+beforeDragIn",
|
||||
"field": "detailsList",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"columns": [
|
||||
[
|
||||
{
|
||||
"title": "项目名称",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 86.67519359101631,
|
||||
"field": "name",
|
||||
"checked": true,
|
||||
"columnId": "name",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "规格",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 80.21549132169478,
|
||||
"field": "totalVolume",
|
||||
"checked": true,
|
||||
"columnId": "totalVolume",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "厂家",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 75.93737727220328,
|
||||
"field": "manufacturerText",
|
||||
"checked": true,
|
||||
"columnId": "manufacturerText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "批号",
|
||||
"titleSync": false,
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 67.21760769186436,
|
||||
"field": "lotNumber",
|
||||
"checked": true,
|
||||
"columnId": "lotNumber",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "单价",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 60.17562958542372,
|
||||
"field": "price",
|
||||
"checked": true,
|
||||
"columnId": "price",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "调拨单位",
|
||||
"titleSync": false,
|
||||
"align": "center",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 30.9839942645893,
|
||||
"field": "measurementUnitCode_dictText",
|
||||
"checked": true,
|
||||
"columnId": "measurementUnitCode_dictText",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "源库存数",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 55.062860531575446,
|
||||
"field": "totalSourceQuantity",
|
||||
"checked": true,
|
||||
"columnId": "totalSourceQuantity",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "调拨数",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 63.064593526717786,
|
||||
"field": "itemQuantity",
|
||||
"checked": true,
|
||||
"columnId": "itemQuantity",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"title": "合计金额",
|
||||
"titleSync": false,
|
||||
"align": "right",
|
||||
"halign": "center",
|
||||
"tableQRCodeLevel": 0,
|
||||
"tableSummaryTitle": true,
|
||||
"tableSummary": "",
|
||||
"width": 53.66725221491505,
|
||||
"field": "totalPrice",
|
||||
"checked": true,
|
||||
"columnId": "totalPrice",
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"width": 85.25,
|
||||
"checked": false,
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
},
|
||||
{
|
||||
"width": 85.25,
|
||||
"checked": false,
|
||||
"fixed": false,
|
||||
"rowspan": 1,
|
||||
"colspan": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"printElementType": {
|
||||
"title": "表格",
|
||||
"type": "table",
|
||||
"editable": true,
|
||||
"columnDisplayEditable": true,
|
||||
"columnDisplayIndexEditable": true,
|
||||
"columnTitleEditable": true,
|
||||
"columnResizable": true,
|
||||
"columnAlignEditable": true,
|
||||
"isEnableEditField": true,
|
||||
"isEnableContextMenu": true,
|
||||
"isEnableInsertRow": true,
|
||||
"isEnableDeleteRow": true,
|
||||
"isEnableInsertColumn": true,
|
||||
"isEnableDeleteColumn": true,
|
||||
"isEnableMergeCell": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"paperNumberLeft": 565,
|
||||
"paperNumberTop": 819
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,264 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="批量调拨单明细"
|
||||
width="90%"
|
||||
:destroy-on-close="true"
|
||||
@close="close"
|
||||
>
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<template v-if="props.isApply">
|
||||
<el-button plain type="primary" icon="Edit" @click="handelApply"> 审批通过 </el-button>
|
||||
<el-button type="primary" plain icon="Edit" @click="handleReject"> 驳回 </el-button>
|
||||
</template>
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport"> 导出 </el-button>
|
||||
<el-button type="warning" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
|
||||
</el-row>
|
||||
<el-descriptions :column="5" style="margin-bottom: 10px">
|
||||
<el-descriptions-item label="单据号:">
|
||||
{{ detailsList[0]?.busNo || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="源仓库:">
|
||||
{{ detailsList[0]?.sourceLocationName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="目的仓库:">
|
||||
{{ detailsList[0]?.purposeLocationName || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目类型:">
|
||||
{{ detailsList[0]?.itemType_dictText || '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="制单日期:">
|
||||
{{ proxy.formatDateStr(detailsList[0]?.occurrenceTime, 'YYYY-MM-DD HH:mm:ss') || '-' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table :data="detailsList" border max-height="650" v-loading="loading">
|
||||
<el-table-column label="序号" width="60" type="index" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="name" />
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家/产地"
|
||||
align="center"
|
||||
prop="manufacturerText"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="产品批号" align="center" prop="lotNumber" />
|
||||
<el-table-column label="单价" align="right" header-align="center" prop="price" width="120">
|
||||
<template #default="scope">
|
||||
{{ scope.row.price?.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调拨单位"
|
||||
align="center"
|
||||
prop="measurementUnitCode_dictText"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
label="源库存数"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemName"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(Number(scope.row.totalSourceQuantity), scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="目的库存数"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="itemName"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
formatQuantity(
|
||||
Number(scope.row.itemQuantity) - Number(scope.row.totalSourceQuantity),
|
||||
scope.row
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="调拨数量"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalQuitemQuantityantity"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ formatQuantity(scope.row.itemQuantity, scope.row) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合计金额"
|
||||
align="right"
|
||||
header-align="center"
|
||||
prop="totalPrice"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice?.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产日期" align="center" prop="startTime" width="120">
|
||||
<template #default="scope">
|
||||
{{ proxy.formatDateStr(scope.row.startTime, 'YYYY-MM-DD') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效期至" align="center" prop="endTime" width="120">
|
||||
<template #default="scope">
|
||||
{{ proxy.formatDateStr(scope.row.endTime, 'YYYY-MM-DD') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getTransferProductDetail, productTransferApproved, reject } from './transferManagement';
|
||||
import templateJson from './template.json';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const detailsList = ref([]);
|
||||
const dialogVisible = ref(false);
|
||||
const loading = ref(false);
|
||||
const supplyBusNo = ref('');
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
isApply: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
function open(busNo) {
|
||||
dialogVisible.value = true;
|
||||
supplyBusNo.value = busNo;
|
||||
loading.value = true;
|
||||
getTransferProductDetail({ busNo: busNo, pageSize: 1000, pageNo: 1 }).then((res) => {
|
||||
detailsList.value = res.data.records;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function formatQuantity(quantity, row) {
|
||||
if (row.measurementUnitCode == row.unitCode) {
|
||||
return formatInventory(
|
||||
quantity,
|
||||
row.partPercent,
|
||||
row.unitCode_dictText,
|
||||
row.minUnitCode_dictText
|
||||
);
|
||||
} else {
|
||||
return quantity + row.minUnitCode_dictText;
|
||||
}
|
||||
}
|
||||
|
||||
function handelApply() {
|
||||
loading.value = true;
|
||||
productTransferApproved(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleReject() {
|
||||
reject(supplyBusNo.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化库存数量显示(大单位情况)
|
||||
* @param quantity 小单位库存数量
|
||||
* @param partPercent 拆零比
|
||||
* @param unitCode 大单位
|
||||
* @param minUnitCode 小单位
|
||||
*/
|
||||
function formatInventory(quantity, partPercent, unitCode, minUnitCode) {
|
||||
// 处理负数情况
|
||||
const isNegative = quantity < 0;
|
||||
const absQuantity = Math.abs(quantity);
|
||||
|
||||
if (absQuantity % partPercent !== 0) {
|
||||
const integerPart = Math.floor(absQuantity / partPercent);
|
||||
const decimalPart = absQuantity % partPercent;
|
||||
|
||||
let result = integerPart.toString() + ' ' + unitCode;
|
||||
if (decimalPart > 0) {
|
||||
result += decimalPart.toString() + ' ' + minUnitCode;
|
||||
}
|
||||
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 整除情况
|
||||
const result = absQuantity / partPercent + ' ' + unitCode;
|
||||
return isNegative ? '-' + result : result;
|
||||
}
|
||||
|
||||
// 打印盘点单
|
||||
function handlePrint() {
|
||||
const result = [];
|
||||
const printList = detailsList.value.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
volume: item.totalVolume,
|
||||
price: Number(item.price).toFixed(2) + ' 元',
|
||||
totalPrice: Number(item.totalPrice).toFixed(2) + ' 元',
|
||||
totalSourceQuantity: formatQuantity(Number(item.totalSourceQuantity), item),
|
||||
itemQuantity: formatQuantity(Number(item.itemQuantity), item),
|
||||
profitAmount: ((item.itemQuantity * item.price) / item.partPercent).toFixed(2),
|
||||
};
|
||||
});
|
||||
result.push({
|
||||
purposeLocationName: printList[0].purposeLocationName,
|
||||
sourceLocationName: printList[0].sourceLocationName,
|
||||
itemType_dictText: printList[0].itemType_dictText,
|
||||
name: userStore.name,
|
||||
occurrenceTime: proxy.formatDateStr(printList[0].occurrenceTime, 'YYYY-MM-DD HH:mm:ss'),
|
||||
busNo: printList[0].busNo,
|
||||
detailsList: printList,
|
||||
});
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
hiprintTemplate.print2(result, {
|
||||
title: '打印标题',
|
||||
}); //开始打印
|
||||
}
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'/inventory-manage/transfer/excel-out',
|
||||
{
|
||||
busNo: supplyBusNo.value,
|
||||
},
|
||||
`批量调拨单据明细记录_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
});
|
||||
</script>
|
||||
@@ -54,7 +54,7 @@
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,18 +7,23 @@
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<!-- supplyBusNo searchKey-->
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
style="width: 220px;"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型:" prop="typeEnum">
|
||||
<el-select v-model="queryParams.typeEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyTypeOptions"
|
||||
:key="supplyStatus.value"
|
||||
@@ -66,10 +71,15 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum">
|
||||
<el-select v-model="queryParams.statusEnum" placeholder="" clearable style="width: 150px">
|
||||
<el-form-item label="审批状态:" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
@@ -91,28 +101,49 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddaddTransferProductDialog"
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProductDialog"
|
||||
|
||||
>新增调拨单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="openAddaddTransferProducts"
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddaddTransferProducts"
|
||||
|
||||
>新增批量调拨单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
@@ -121,7 +152,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column
|
||||
<!-- <el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
@@ -134,7 +165,7 @@
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- itemTable -->
|
||||
@@ -221,11 +252,7 @@
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="
|
||||
() => {
|
||||
proxy.$refs['detailsDialogRef'].open(scope.row.supplyBusNo);
|
||||
}
|
||||
"
|
||||
@click="handleUpdate(scope.row,'view')"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
@@ -233,10 +260,9 @@
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
:disabled="
|
||||
scope.row.statusEnum != '1' &&
|
||||
scope.row.statusEnum != '9' &&
|
||||
scope.row.statusEnum != '4'
|
||||
scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'
|
||||
"
|
||||
>编辑</el-button
|
||||
>
|
||||
@@ -246,6 +272,7 @@
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
@@ -255,6 +282,7 @@
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
@@ -269,7 +297,6 @@
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<TransferDetailsDialog ref="detailsDialogRef" />
|
||||
<!-- <Dialog
|
||||
ref="transferProductRef"
|
||||
:supplyTypeOptions="supplyTypeOptions"
|
||||
@@ -290,10 +317,9 @@ import {
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delTransferProduct,
|
||||
getpharmacyCabinetList,
|
||||
} from '../components/transferManagement';
|
||||
getpharmacyCabinetList
|
||||
} from "../components/transferManagement";
|
||||
import { useStore } from '@/store/store';
|
||||
import TransferDetailsDialog from '../components/transferDetailsDialog.vue';
|
||||
const store = useStore();
|
||||
// import Dialog from "./components/Dialog";
|
||||
|
||||
@@ -301,7 +327,7 @@ const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const getpharmacyCabinetOptions = ref([]);
|
||||
const getpharmacyCabinetOptions = ref([])
|
||||
const purchaseinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
@@ -310,12 +336,12 @@ const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const title = ref("");
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(''); // 单据号新增
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const purposeTypeListOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceTypeListOptions = ref(undefined)
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const sourceLocationIdListOptions = ref(undefined); // 源仓库
|
||||
const purposeLocationIdListOptions = ref(undefined); //目的仓库
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
@@ -328,13 +354,13 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
typeEnum: undefined, // 单据类型
|
||||
sourceLocationId: undefined, //源仓库
|
||||
purposeLocationId: undefined, // 目的仓库
|
||||
searchKey: undefined,
|
||||
typeEnum:undefined, // 单据类型
|
||||
sourceLocationId:undefined,//源仓库
|
||||
purposeLocationId:undefined,// 目的仓库
|
||||
statusEnum: undefined, // 单据状态
|
||||
createTimeSTime: undefined,
|
||||
createTimeETime: undefined,
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
@@ -344,14 +370,14 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
/** 调拨管理查询下拉树结构 */
|
||||
function getTransferProductTypeList() {
|
||||
getInit().then((response) => {
|
||||
purposeTypeListOptions.value = response.data.purposeTypeListOptions;
|
||||
purposeTypeListOptions.value = response.data.purposeTypeListOptions;
|
||||
sourceTypeListOptions.value = response.data.sourceTypeListOptions;
|
||||
supplyTypeOptions.value = response.data.supplyTypeOptions;
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
supplyTypeOptions.value = response.data.supplyTypeOptions ;
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions;
|
||||
});
|
||||
getpharmacyCabinetList().then((response) => {
|
||||
getpharmacyCabinetOptions.value = response.data;
|
||||
});
|
||||
getpharmacyCabinetOptions.value = response.data
|
||||
})
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
@@ -368,12 +394,12 @@ function getList() {
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
@@ -381,10 +407,10 @@ function handleQuery() {
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = '';
|
||||
queryParams.value.createTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
@@ -395,8 +421,8 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 打开批量新增 */
|
||||
function openAddaddTransferProducts() {
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer' });
|
||||
function openAddaddTransferProducts(){
|
||||
router.push({ path: '/medicationmanagement/transferManagement/batchTransfer'})
|
||||
}
|
||||
/** 打开新增 */
|
||||
function openAddaddTransferProductDialog() {
|
||||
@@ -408,31 +434,32 @@ function openAddaddTransferProductDialog() {
|
||||
// const partItem = {partFlg: 'add',rowData: []}
|
||||
// item: JSON.stringify(partItem)
|
||||
// ,query:{item: JSON.stringify(partItem)}
|
||||
sessionStorage.setItem('busNo', '');
|
||||
store.clearCurrentDataDB();
|
||||
router.push({ path: '/medicationmanagement/transferManagement/transferManagent' });
|
||||
sessionStorage.setItem('busNo',"")
|
||||
store.clearCurrentDataDB()
|
||||
router.push({ path: '/medicationmanagement/transferManagement/transferManagent'})
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row, view) {
|
||||
function handleUpdate(row,view) {
|
||||
editRow.value = row;
|
||||
if (row.typeEnum == 8) {
|
||||
// 批量调拨
|
||||
router.replace({
|
||||
path: '/medicationmanagement/transferManagement/batchTransfer',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
});
|
||||
} else {
|
||||
router.replace({
|
||||
path: '/medicationmanagement/transferManagement/transferManagent',
|
||||
query: { supplyBusNo: editRow.value.supplyBusNo, isEdit: true },
|
||||
});
|
||||
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('提交审批成功');
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@@ -441,7 +468,7 @@ function handleSubmitApproval(row) {
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess('撤销审批成功');
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
@@ -451,25 +478,16 @@ function handleWithdrawApproval(row) {
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据?')
|
||||
.confirm("是否确认删除以上数据?")
|
||||
.then(function () {
|
||||
return delTransferProduct({ ids: delId.join(',') });
|
||||
return delTransferProduct({ ids: delId.join(",") });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
function handleExport() {
|
||||
proxy.downloadGet(
|
||||
'inventory-manage/transfer/export-excel',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`调拨单_${proxy.formatDateStr(new Date(), 'YYYY-MM-DD')}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
getTransferProductTypeList();
|
||||
getList();
|
||||
|
||||
Reference in New Issue
Block a user