版本更新
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 药库订货单初始化
|
||||
export function getInit () {
|
||||
return request ({
|
||||
url: '/pharmacy-warehouse/purchase-order/init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
// 订货单单据列表:显示所有单据 左边框
|
||||
export function getOrderList (query) {
|
||||
return request ({
|
||||
url: '/pharmacy-warehouse/purchase-order/purchase-order-page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 根据供应商获取药品:对应添加/编辑时加下一行数据后,点击项目时调用的接口
|
||||
export function getMedicineList (query) {
|
||||
return request ({
|
||||
url: '/pharmacy-warehouse/purchase-order/medication-info',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
// 获取单据号:添加时,获取新单据号。编辑的逻辑是先删除后新增。
|
||||
export function getBusNo () {
|
||||
return request ({
|
||||
url: '/pharmacy-warehouse/purchase-order/busNo-init',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
// 添加/编辑采购单:添加/编辑采购单
|
||||
export function addOrEditOrder (data) {
|
||||
return request ({
|
||||
url: '/pharmacy-warehouse/purchase-order/addOrEdit-purchaseOrder',
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
// 删除单据
|
||||
export function deleteOrder (data) {
|
||||
return request ({
|
||||
url: '/pharmacy-warehouse/purchase-order/delete-purchaseOrder?busNo=' +
|
||||
data,
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
// 同意审批
|
||||
export function agreeApproval (data) {
|
||||
return request ({
|
||||
url: '/pharmacy-warehouse/purchase-order/agree-approval?busNo=' + data,
|
||||
method: 'PUT',
|
||||
});
|
||||
}
|
||||
// 获取单据详情
|
||||
export function getOrderDetail (query) {
|
||||
return request ({
|
||||
url: '/pharmacy-warehouse/purchase-order/purchase-order-detail-page',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="medicineRef" height="400" :data="medicineList" @cell-click="clickRow">
|
||||
<el-table-column label="项目编码" align="center" prop="busNo" width="150" />
|
||||
<el-table-column label="项目名称" align="center" prop="name" width="180" />
|
||||
<el-table-column label="进货价" align="center" prop="price" />
|
||||
<el-table-column label="零售价" align="center" prop="retailPrice" />
|
||||
<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="totalVolume" />
|
||||
<el-table-column label="规格库存" align="center" prop="specificationInventory" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerText" />
|
||||
<el-table-column label="批准文号" align="center" prop="approvalNumber" />
|
||||
</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: '',
|
||||
},
|
||||
});
|
||||
// 选择药品
|
||||
const emit = defineEmits(['selectRow']);
|
||||
//
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
searchKey: props.searchKey,
|
||||
// 13 药品
|
||||
typeEnum: 13,
|
||||
});
|
||||
// 药品列表
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
// 获取药品列表
|
||||
const getList = (query) => {
|
||||
getMedicineList(query || queryParams.value).then((res) => {
|
||||
medicineList.value = res.data.records;
|
||||
});
|
||||
};
|
||||
|
||||
// 点击行
|
||||
const clickRow = (row) => {
|
||||
// console.log(row, 'row');
|
||||
emit('selectRow', row);
|
||||
};
|
||||
|
||||
// 监听搜索关键字
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
// 获取药品列表
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
1008
openhis-ui-vue3/src/views/medicineStorage/purchaseOrder/index.vue
Normal file
1008
openhis-ui-vue3/src/views/medicineStorage/purchaseOrder/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user