版本更新
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询调拨管理列表
|
||||
export function getTransferProductList(query) {
|
||||
return request({
|
||||
url:'/inventory-manage/transfer/product-transfer-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 调拨详情
|
||||
export function getTransferProductDetail(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer-detail',
|
||||
method: 'get',
|
||||
params: busNo // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑调拨单据
|
||||
export function addTransferProduct(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer',
|
||||
// product-transfer-edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 添加/编辑批量调拨单据
|
||||
export function addTransferProductBatch(data) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer-batch',
|
||||
// product-transfer-edit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 批量调拨详情
|
||||
export function getTransferProductDetails(params) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer-batch',
|
||||
method: 'get',
|
||||
params: params // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function getBusNoInit() { //单据号
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/bus-no-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 删除单据
|
||||
export function delTransferProduct(param) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/product-transfer-del?supplyRequestIds=' + param,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/submit-approval',
|
||||
// product-transfer-approved
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/transfer/withdraw-approval',
|
||||
method: 'put',
|
||||
data: busNo
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getMedicineList(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药品目录
|
||||
export function getCount(queryParams) {
|
||||
return request({
|
||||
url: '/app-common/inventory-item-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药房列表
|
||||
export function getPharmacyList() {
|
||||
return request({
|
||||
url: '/app-common/inventory-pharmacy-list',
|
||||
// '/app-common/pharmacy-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取药库列表
|
||||
export function getDispensaryList() {
|
||||
return request({
|
||||
url:'/app-common/inventory-cabinet-list',
|
||||
// '/app-common/cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 获取仓库药房列表
|
||||
export function getpharmacyCabinetList() {
|
||||
return request({
|
||||
url: '/app-common/pharmacy-cabinet-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批驳回
|
||||
*/
|
||||
export function reject(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/reject?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品调拨审批通过
|
||||
*/
|
||||
export function productTransferApproved(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/receipt/product-transfer-approved?busNo=' + busNo,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
ref="medicineRef"
|
||||
height="400"
|
||||
:data="medicineList"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目类型"
|
||||
align="center"
|
||||
prop="itemType_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="规格"
|
||||
align="center"
|
||||
prop="volume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品批号"
|
||||
align="center"
|
||||
prop="lotNumber"
|
||||
/>
|
||||
<el-table-column
|
||||
label="包装单位"
|
||||
align="center"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="ybNo"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getMedicineList } from "./transferManagement";
|
||||
import { watch } from "vue";
|
||||
import { throttle } from "lodash-es";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
sourceLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
sourceLocationId1:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
purposeLocationId1:{
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selectRow"]);
|
||||
const queryParams = ref({
|
||||
// pageNum: 1,
|
||||
// pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
// itemType1: props.itemType1,
|
||||
orgLocationId:props.sourceLocationId,
|
||||
// objLocationId:props.purposeLocationId,
|
||||
orgLocationId1:props.sourceLocationId1,
|
||||
objLocationId1:props.purposeLocationId1,
|
||||
purchaseFlag:0
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
console.log(newValue,"newValue")
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.itemType = newValue.itemType;
|
||||
// queryParams.value.itemType1 = newValue.itemType1;
|
||||
queryParams.value.orgLocationId=newValue.sourceLocationId;
|
||||
// queryParams.value.objLocationId=newValue.purposeLocationId;
|
||||
queryParams.value.orgLocationId1=newValue.sourceLocationId1;
|
||||
// queryParams.value.objLocationId1=newValue.purposeLocationId1;
|
||||
queryParams.value.purchaseFlag = 0
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
console.log(queryParams.value,"queryParams.value1")
|
||||
if(route.query.supplyBusNo){ // 编辑
|
||||
queryParams.value.itemType = queryParams.value.itemType;
|
||||
queryParams.value.orgLocationId = queryParams.value.orgLocationId1
|
||||
// queryParams.value.objLocationId = queryParams.value.objLocationId1
|
||||
console.log(queryParams.value,"queryParams.value1111111")
|
||||
}
|
||||
// delete queryParams.value.itemType
|
||||
delete queryParams.value.orgLocationId1
|
||||
delete queryParams.value.objLocationId1
|
||||
console.log(queryParams.value,"queryParams.value")
|
||||
getMedicineList(queryParams.value).then((res) => {
|
||||
medicineList.value = res.data;
|
||||
console.log(medicineList.value,"medicineList.value ")
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
console.log(row,"row--------------------")
|
||||
emit("selectRow", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep( .hover_row){
|
||||
width: 100vw!important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user