版本更新
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询盘点列表
|
||||
export function getStockinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询盘点列表初始化查询区数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点详情初始化查询区数据
|
||||
export function getDetailInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/detail-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成批量盘点
|
||||
export function getStocktakingReceiptBatch() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-batch',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//保存批量盘点
|
||||
export function addBatch(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-addBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
export function delProductStocktaking(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,130 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询盘点列表
|
||||
export function getStockinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addProductStocktaking(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询盘点列表初始化查询区数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点详情初始化查询区数据
|
||||
export function getDetailInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/detail-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成批量盘点
|
||||
export function getStocktakingReceiptBatch() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-batch',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
//保存批量盘点
|
||||
export function addBatch(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-addBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
export function delProductStocktaking(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function stocktakingReceiptAuto() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-auto',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="ybNo"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId1:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
itemType: props.itemType,
|
||||
orgLocationId:props.purposeLocationId,
|
||||
orgLocationId1:props.purposeLocationId1,
|
||||
purchaseFlag:0
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey
|
||||
queryParams.value.itemType = newValue.itemType
|
||||
queryParams.value.orgLocationId = newValue.sourceLocationId
|
||||
queryParams.value.orgLocationId1 = newValue.sourceLocationId1
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
if(route.query.supplyBusNo){ // 编辑
|
||||
queryParams.value.itemType = queryParams.value.itemType;
|
||||
queryParams.value.orgLocationId = queryParams.value.orgLocationId1
|
||||
}
|
||||
delete queryParams.value.orgLocationId1
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,107 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询盘点列表
|
||||
export function getStockinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt',
|
||||
method: 'get',
|
||||
params: { busNo } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addPurchaseinventory(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询盘点列表初始化查询区数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点详情初始化查询区数据
|
||||
export function getDetailInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/detail-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
export function delPurchaseinventory(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-receipt?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="300"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,452 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="单据号:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="单据号:"
|
||||
clearable
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批状态:" prop="statusEnum" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplyStatus in supplyStatusOptions"
|
||||
:key="supplyStatus.value"
|
||||
:label="supplyStatus.label"
|
||||
:value="supplyStatus.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单人:" prop="applicantId" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.applicantId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="practitioner in applicantListOptions"
|
||||
:key="practitioner.value"
|
||||
:label="practitioner.label"
|
||||
:value="practitioner.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="制单日期:">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
value-format="YYYY-MM-DD"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- 添加记录 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddStockPart"
|
||||
|
||||
>新增盘点单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddStockBatch"
|
||||
|
||||
>新增批量盘点单</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:add']" -->
|
||||
</el-col>
|
||||
<!-- 查询 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
</el-col>
|
||||
<!-- 重置 -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stockinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="单据号"
|
||||
align="center"
|
||||
key="supplyBusNo"
|
||||
prop="supplyBusNo"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单据类型"
|
||||
align="center"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审批状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
prop="statusEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盘点仓库"
|
||||
align="center"
|
||||
key="purposeLocationId_dictText"
|
||||
prop="purposeLocationId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="盈亏金额"
|
||||
align="center"
|
||||
key="breakevenPrice"
|
||||
prop="breakevenPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单人"
|
||||
align="center"
|
||||
key="applicantId_dictText"
|
||||
prop="applicantId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="审核人"
|
||||
align="center"
|
||||
key="approverId_dictText"
|
||||
prop="approverId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="制单日期"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审核日期 "
|
||||
align="center"
|
||||
key="approvalTime"
|
||||
prop="approvalTime"
|
||||
width="180"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
key="remake"
|
||||
prop="remake"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="230"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleUpdate(scope.row,'view')"
|
||||
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
:disabled="scope.row.statusEnum != '1' && scope.row.statusEnum != '9' && scope.row.statusEnum != '4'"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:edit']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '1' || scope.row.statusEnum == '9'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
<!-- v-hasPermi="['system:user:remove']" -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- <stock-receipt-dialog
|
||||
ref="stockReceiptRef"
|
||||
:cabinetListOptions="cabinetListOptions"
|
||||
:categoryListOptions ="categoryListOptions"
|
||||
:profitReasonOptions = "profitReasonOptions"
|
||||
:busNoAdd="busNoAdd"
|
||||
:item="currentData"
|
||||
:editRow="editRow"
|
||||
@refresh="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ChkstockRecord">
|
||||
// 导入onActivated钩子
|
||||
import { onMounted, onActivated } from 'vue';
|
||||
import {
|
||||
getStockinventoryList,
|
||||
getstocktakingDetail,
|
||||
getInit,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
getDetailInit,
|
||||
} from "../components/api";
|
||||
|
||||
// import stockReceiptDialog from "./components/stockReceiptDialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const stockinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const occurrenceTime = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const applicantListOptions = ref(undefined); // 制单人列表
|
||||
const cabinetListOptions = ref(undefined); // 仓库列表
|
||||
const categoryListOptions = ref(undefined); // 药品类型
|
||||
const pharmacyListOptions = ref(undefined); // 药房列表
|
||||
const supplyStatusOptions = ref(undefined); // 审批状态
|
||||
const profitReasonOptions = ref(undefined); // 盈亏原因
|
||||
const editRow = ref({});
|
||||
// 使用 ref 定义当前编辑的采购
|
||||
const currentData = ref({});
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
supplyBusNo: undefined, // 编码
|
||||
statusEnum: undefined, // 审批状态
|
||||
applicantId: undefined, // 制单人
|
||||
createTimeSTime:undefined,
|
||||
createTimeETime:undefined,
|
||||
pageNo:1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 列表页查询下拉树结构 */
|
||||
function getStockinventoryTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log('列表页下拉树response1111111',response)
|
||||
busNoAdd.value = response.data.busNo; // 单据号新增
|
||||
applicantListOptions.value = response.data.applicantListOptions; // 制单人列表
|
||||
|
||||
cabinetListOptions.value = response.data.cabinetListOptions; // 仓库列表
|
||||
categoryListOptions.value = response.data.categoryListOptions; // 药品类型列表
|
||||
pharmacyListOptions.value = response.data.pharmacyListOptions; // 药房列表
|
||||
profitReasonOptions.value = response.data.profitReasonOptions; // 盈亏类型列表
|
||||
|
||||
supplyStatusOptions.value = response.data.supplyStatusOptions; // 审批状态
|
||||
});
|
||||
}
|
||||
/** 详情页查询下拉树结构 */
|
||||
|
||||
/** 查询盘点列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getStockinventoryList(queryParams.value).then((res) => {
|
||||
console.log('查询盘点列表response1111111',res)
|
||||
loading.value = false;
|
||||
stockinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.createTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.createTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.createTimeSTime = ""
|
||||
queryParams.value.createTimeETime = ""
|
||||
occurrenceTime.value = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开商品盘点 */
|
||||
function openAddStockPart() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
|
||||
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart' })
|
||||
}
|
||||
/** 打开批量商品盘点 */
|
||||
function openAddStockBatch() {
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["stockReceiptRef"].show();
|
||||
// });
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch' })
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row,view) {
|
||||
editRow.value = row;
|
||||
if(row.typeEnum==4){ // 盘点
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/chkstock/chkstockPart',query:{supplyBusNo:row.supplyBusNo,view:view} })
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockPart',query:{supplyBusNo:editRow.value.supplyBusNo} })
|
||||
}
|
||||
}else{
|
||||
if(view){
|
||||
router.replace({ path: '/medicationmanagement/chkstock/chkstockBatch',query:{supplyBusNo:row.supplyBusNo,view:view} })
|
||||
}else{
|
||||
router.push({ path: '/medicationmanagement/chkstock/chkstockBatch',query:{supplyBusNo:editRow.value.supplyBusNo} })
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getStockinventoryTypeList();
|
||||
getList();
|
||||
});
|
||||
|
||||
// 添加组件被激活时的处理逻辑
|
||||
onActivated(() => {
|
||||
// 重新加载数据
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,143 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询盘点列表
|
||||
export function getStockinventoryList(query) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘点编辑页列表
|
||||
export function getstocktakingDetail(params) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt',
|
||||
method: 'get',
|
||||
params: params // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑入库单据
|
||||
export function addProductStocktaking(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询盘点列表初始化查询区数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询盘点详情初始化查询区数据
|
||||
export function getDetailInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/detail-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 生成批量盘点
|
||||
export function getStocktakingReceiptBatch(params) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-batch',
|
||||
method: 'get',
|
||||
params: params // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
//保存批量盘点
|
||||
export function addBatch(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/stocktaking-receipt-addBatch',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除单据
|
||||
export function delProductStocktaking(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/product-stocktaking?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/submit-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/stocktaking/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-pharmacy-list',
|
||||
// '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-cabinet-list',
|
||||
// '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 盘点审批通过
|
||||
*/
|
||||
export function productStocktakingApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/product-stocktaking-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="规格"
|
||||
align="center"
|
||||
prop="volume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品批号"
|
||||
align="center"
|
||||
prop="lotNumber"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="ybNo"
|
||||
/>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./api";
|
||||
import { ref, watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const total = ref(0)
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
// pageNum: 1,
|
||||
// pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
orgLocationId:props.purposeLocationId,
|
||||
purchaseFlag:0
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
queryParams.value.orgLocationId=newValue.purposeLocationId;
|
||||
queryParams.value.purchaseFlag = 0
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
console.log(queryParams.value,"queryParams.value")
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data.records?res.data.records:res.data
|
||||
total.value = res.data.total?res.data.total:medicineList.value.length
|
||||
console.log(medicineList.value,"medicineList.value ")
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
Reference in New Issue
Block a user