采购入库 单据审批画面 目录管理画面重新调试 up by dh

This commit is contained in:
duhe
2025-03-24 19:48:43 +08:00
parent bb68ba8989
commit 9f4ea53d31
9 changed files with 284 additions and 302 deletions

View File

@@ -98,7 +98,7 @@ public class PurchaseInventoryController {
* @return 操作结果 * @return 操作结果
*/ */
@PutMapping("/submit-approval") @PutMapping("/submit-approval")
public R<?> submitApproval(@RequestParam String busNo) { public R<?> submitApproval(@RequestBody String busNo) {
return purchaseInventoryAppService.submitApproval(busNo); return purchaseInventoryAppService.submitApproval(busNo);
} }
@@ -109,7 +109,7 @@ public class PurchaseInventoryController {
* @return 操作结果 * @return 操作结果
*/ */
@PutMapping("/withdraw-approval") @PutMapping("/withdraw-approval")
public R<?> withdrawApproval(@RequestParam String busNo) { public R<?> withdrawApproval(@RequestBody String busNo) {
return purchaseInventoryAppService.withdrawApproval(busNo); return purchaseInventoryAppService.withdrawApproval(busNo);
} }
} }

View File

@@ -71,7 +71,7 @@ public class PurchaseInventoryDto {
private Long purposeLocationStoreId; private Long purposeLocationStoreId;
/** 申请人 */ /** 申请人 */
@NotNull // @NotNull
private Long applicantId; private Long applicantId;
/** 经手人 */ /** 经手人 */

View File

@@ -72,3 +72,21 @@ export function startDevice(ids) {
data: ids data: ids
}) })
} }
// 查询部门树形数据
export function deptTreeSelect(queryParams) {
return request({
url: '/base-data-manage/organization/organization',
method: 'get',
param: queryParams
})
}
// 查询地点树形数据
export function locationTreeSelect(queryParams) {
return request({
url: '/base-data-manage/cabinet-location/cabinet-location',
method: 'get',
param: queryParams
})
}

View File

@@ -24,7 +24,7 @@
<el-input v-model="form.name" placeholder="请输入器材名称" /> <el-input v-model="form.name" placeholder="请输入器材名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item <el-form-item
label="拼音码(器材名称)" label="拼音码(器材名称)"
prop="pyStr" prop="pyStr"
@@ -32,29 +32,74 @@
> >
<el-input v-model="form.pyStr" placeholder="" /> <el-input v-model="form.pyStr" placeholder="" />
</el-form-item> </el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="地点" prop="locationId">
<el-tree-select
v-model="form.locationId"
:data="locationOptions"
:props="{ value: 'id', label: 'name', children: 'children' }"
value-key="id"
placeholder="请选择地点"
check-strictly
/>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="器材五笔拼音" prop="wbStr"> <el-form-item label="器材五笔拼音" prop="wbStr">
<el-input v-model="form.wbStr" placeholder="" /> <el-input v-model="form.wbStr" placeholder="" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="器材分类" prop="categoryEnum"> <el-form-item label="器材分类" prop="categoryEnum">
<el-input v-model="form.categoryEnum" placeholder="" /> <el-tree-select
v-model="form.categoryEnum"
:data="deviceCategories"
:props="{ value: 'value', label: 'info', children: 'children' }"
value-key="value"
placeholder=""
check-strictly
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="器材种类" prop="typeCode"> <el-form-item label="器材种类" prop="typeCode">
<el-input v-model="form.typeCode" placeholder="" /> <el-select v-model="form.typeCode" placeholder="请选择">
<el-option
v-for="dict in device_type_code"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="提供部门" prop="orgId">
<el-tree-select
v-model="form.orgId"
:data="deptOptions"
:props="{ value: 'id', label: 'name', children: 'children' }"
value-key="id"
placeholder="请选择提供部门"
check-strictly
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="包装单位" prop="unitCode"> <el-form-item label="包装单位" prop="unitCode">
<el-input v-model="form.unitCode" placeholder="" /> <el-select v-model="form.unitCode" placeholder="请选择">
<el-option
v-for="dict in unit_code"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@@ -64,7 +109,14 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="最小单位" prop="minUnitCode"> <el-form-item label="最小单位" prop="minUnitCode">
<el-input v-model="form.minUnitCode" placeholder="" /> <el-select v-model="form.minUnitCode" placeholder="请选择">
<el-option
v-for="dict in unit_code"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -93,7 +145,14 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="销售单位" prop="salesUnitCode"> <el-form-item label="销售单位" prop="salesUnitCode">
<el-input v-model="form.salesUnitCode" placeholder="" /> <el-select v-model="form.salesUnitCode" placeholder="请选择">
<el-option
v-for="dict in unit_code"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@@ -121,19 +180,39 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="状态" prop="statusEnum"> <el-form-item label="状态" prop="statusEnum">
<el-input v-model="form.statusEnum" placeholder="" /> <el-select v-model="form.statusEnum" placeholder="请选择">
<el-option
v-for="dict in statusFlagOptions"
:key="dict.value"
:label="dict.info"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="生产厂家" prop="manufacturerId"> <el-form-item label="生产厂家" prop="manufacturerText">
<el-input v-model="form.manufacturerId" placeholder="" /> <el-input v-model="form.manufacturerText" placeholder="" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="供应商" prop="supplyId"> <el-form-item label="供应商" prop="supplyId">
<el-input v-model="form.supplyId" placeholder="" /> <!-- <el-input v-model="form.supplyId" placeholder="" /> -->
<el-select
v-model="form.supplierId"
placeholder=""
clearable
style="width: 150px"
>
<el-option
v-for="supplier in supplierListOptions"
:key="supplier.value"
:label="supplier.label"
:value="supplier.value"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@@ -143,11 +222,11 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="执行科室" prop="ruleId"> <el-form-item label="执行科室" prop="ruleId">
<el-input v-model="form.ruleId" placeholder="" /> <el-input v-model="form.ruleId" placeholder="" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="器材版本" prop="version"> <el-form-item label="器材版本" prop="version">
<el-input v-model="form.version" placeholder="" /> <el-input v-model="form.version" placeholder="" />
@@ -196,18 +275,25 @@ import {
addDevice, addDevice,
getDiseaseTreatmentInit, getDiseaseTreatmentInit,
getDeviceOne, getDeviceOne,
deptTreeSelect,
locationTreeSelect,
} from "./device"; } from "./device";
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { sys_normal_disable, sys_user_sex } = proxy.useDict( const { device_type_code, unit_code } = proxy.useDict(
"sys_normal_disable", "device_type_code",
"sys_user_sex" "unit_code"
); );
const title = ref(""); const title = ref("");
const visible = ref(false); const visible = ref(false);
const emits = defineEmits(["submit"]); // 声明自定义事件 const emits = defineEmits(["submit"]); // 声明自定义事件
const deptOptions = ref(undefined); // 部门树选项
const locationOptions = ref(undefined); // 地点树选项
const deviceCategories = ref([]); // 器材分类
const statusFlagOptions = ref([]); // 状态标记
const supplierListOptions = ref([]); // 供应商列表
const data = reactive({ const data = reactive({
form: {}, form: {},
@@ -264,6 +350,8 @@ const data = reactive({
allergenFlag: [ allergenFlag: [
{ required: true, message: "过敏标记不能为空", trigger: "blur" }, { required: true, message: "过敏标记不能为空", trigger: "blur" },
], ],
orgId: [{ required: true, message: "提供部门不能为空", trigger: "blur" }],
locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
}, },
}); });
@@ -278,6 +366,14 @@ const props = defineProps({
type: String, type: String,
required: false, required: false,
}, },
deviceCategories: {
type: Object,
required: false,
},
statusFlagOptions: {
type: Object,
required: false,
},
}); });
// 显示弹框 // 显示弹框
@@ -287,9 +383,30 @@ function show() {
// getList(); // getList();
title.value = ""; title.value = "";
title.value = props.title; title.value = props.title;
console.log(props, "22222", title.value); deviceCategories.value = props.deviceCategories;
statusFlagOptions.value = props.statusFlagOptions;
console.log(props, "22222", title.value, props.deviceCategories);
getDeptTree();
getLocationTree();
visible.value = true; visible.value = true;
} }
/** 查询部门下拉树结构 */
function getDeptTree() {
deptTreeSelect().then((response) => {
console.log(response, "response查询部门下拉树结构");
deptOptions.value = response.data.records;
console.log(deptOptions.value, "部门下拉树结构");
});
}
/** 查询地点下拉树结构 */
function getLocationTree() {
locationTreeSelect().then((response) => {
console.log(response, "response查询部门下拉树结构");
locationOptions.value = response.data.records;
console.log(locationOptions.value, "部门下拉树结构");
});
}
// 显示弹框 // 显示弹框
function edit() { function edit() {
// queryParams.roleId = props.roleId; // queryParams.roleId = props.roleId;
@@ -298,6 +415,10 @@ function edit() {
title.value = ""; title.value = "";
title.value = props.title; title.value = props.title;
form.value = props.item; form.value = props.item;
deviceCategories.value = props.deviceCategories;
statusFlagOptions.value = props.statusFlagOptions;
getDeptTree();
getLocationTree();
visible.value = true; visible.value = true;
} }
/** 重置操作表单 */ /** 重置操作表单 */
@@ -330,6 +451,8 @@ function reset() {
version: undefined, // 器材版本 version: undefined, // 器材版本
substanceText: undefined, // 主要成分 substanceText: undefined, // 主要成分
allergenFlag: undefined, // 过敏标记 allergenFlag: undefined, // 过敏标记
orgId: undefined, // 科室ID
locationId: undefined, // 地点ID
}; };
proxy.resetForm("medicationRef"); proxy.resetForm("medicationRef");
} }

View File

@@ -33,7 +33,7 @@
v-model="queryParams.searchKey" v-model="queryParams.searchKey"
placeholder="品名/商品名/英文品名/编码/拼音" placeholder="品名/商品名/英文品名/编码/拼音"
clearable clearable
style="width: 240px" style="width: 220px"
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
@@ -231,8 +231,8 @@
<el-table-column <el-table-column
label="高值器材标志" label="高值器材标志"
align="center" align="center"
key="hvcmFlag" key="hvcmFlag_enumText"
prop="hvcmFlag" prop="hvcmFlag_enumText"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
@@ -254,8 +254,8 @@
<el-table-column <el-table-column
label="医保标记" label="医保标记"
align="center" align="center"
key="ybFlag" key="ybFlag_enumText"
prop="ybFlag" prop="ybFlag_enumText"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
width="110" width="110"
/> />
@@ -270,8 +270,8 @@
<el-table-column <el-table-column
label="医保对码标记" label="医保对码标记"
align="center" align="center"
key="ybMatchFlag" key="ybMatchFlag_enumText"
prop="ybMatchFlag" prop="ybMatchFlag_enumText"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
@@ -338,8 +338,8 @@
<el-table-column <el-table-column
label="过敏标记" label="过敏标记"
align="center" align="center"
key="allergenFlag" key="allergenFlag_enumText"
prop="allergenFlag" prop="allergenFlag_enumText"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
width="90" width="90"
/> />
@@ -383,6 +383,8 @@
ref="deviceRef" ref="deviceRef"
:title="title" :title="title"
:item="currentData" :item="currentData"
:deviceCategories="deviceCategories"
:statusFlagOptions="statusFlagOptions"
@submit="getList()" @submit="getList()"
/> />
<!-- <device-view-dialog <!-- <device-view-dialog

View File

@@ -269,11 +269,11 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="拼音" prop="pyStr"> <el-form-item label="拼音" prop="pyStr">
<el-input v-model="form.pyStr" maxlength="11" /> <el-input v-model="form.pyStr" maxlength="11" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<!-- <el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="停用" prop="status"> <el-form-item label="停用" prop="status">
<el-checkbox v-model="form.status"></el-checkbox> <el-checkbox v-model="form.status"></el-checkbox>

View File

@@ -205,6 +205,8 @@
v-loading="loading" v-loading="loading"
:data="purchaseinventoryList" :data="purchaseinventoryList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@row-click="handleRowClick"
ref="tableRef"
> >
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column <el-table-column
@@ -591,8 +593,6 @@ import {
getPurchaseinventoryList, getPurchaseinventoryList,
addPurchaseinventory, addPurchaseinventory,
getInit, getInit,
deptTreeSelect,
locationTreeSelect,
delPurchaseinventory, delPurchaseinventory,
} from "./purchaseinventory"; } from "./purchaseinventory";
@@ -748,8 +748,21 @@ const practitionerListOptions = ref(undefined); // 查询经手人列表
const supplierListOptions = ref(undefined); // 供应商列表 const supplierListOptions = ref(undefined); // 供应商列表
const selectedRows = ref([]); // 用于存储选中的行 const selectedRows = ref([]); // 用于存储选中的行
const emit = defineEmits(["new-item-added"]); const emit = defineEmits(["new-item-added"]);
const tableRef = ref(undefined); // 表格引用
const currentRow = ref(undefined); // 当前操作的行
const addNewRow = () => {
// 挂载时绑定事件
onMounted(() => {
document.addEventListener('click', handleClickOutside);
});
// 卸载时移除事件
onUnmounted(() => {
document.removeEventListener('click', handleClickOutside);
});
function addNewRow() {
if (data.isAdding) { if (data.isAdding) {
proxy.$message.warning("请先保存当前行后再新增!"); proxy.$message.warning("请先保存当前行后再新增!");
return; return;
@@ -778,8 +791,9 @@ const addNewRow = () => {
error: false, // 新增 error 字段 error: false, // 新增 error 字段
}; };
purchaseinventoryList.value.push(newRow); purchaseinventoryList.value.push(newRow);
total.value = purchaseinventoryList.value.length;
data.isAdding = true; // 设置标志位为 true表示有未保存的 data.isAdding = true; // 设置标志位为 true表示有未保存的
}; }
function handleBlur(row, index) { function handleBlur(row, index) {
let hasError = false; let hasError = false;
@@ -832,7 +846,22 @@ function handleBlur(row, index) {
// } // }
} }
const saveRow = (row, index) => { // 点击行时记录当前行
function handleRowClick(row) {
currentRow.value = row;
}
// 监听表格外的点击事件
function handleClickOutside(event) {
if (tableRef.value && !tableRef.value.$el.contains(event.target)) {
if (currentRow.value) {
handleSave(currentRow.value);
currentRow.value = null; // 清空当前行
}
}
}
function saveRow(row, index) {
console.log(row, "saveRowsaveRowsaveRowsaveRowsaveRowsaveRow"); console.log(row, "saveRowsaveRowsaveRowsaveRowsaveRowsaveRow");
// 保存当前行的逻辑... // 保存当前行的逻辑...
// 例如:调用 API 保存数据 // 例如:调用 API 保存数据
@@ -865,15 +894,15 @@ const saveRow = (row, index) => {
} }
// proxy.$message.success("保存成功!"); // proxy.$message.success("保存成功!");
}; }
function handleSave( row , index ) { function handleSave(row, index) {
let hasError = false; let hasError = false;
// this.purchaseinventoryList.forEach((row) => { // this.purchaseinventoryList.forEach((row) => {
handleBlur(row); handleBlur(row);
if (row.error) { if (row.error) {
hasError = true; hasError = true;
} }
// }); // });
if (hasError) { if (hasError) {
@@ -918,7 +947,7 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length; multiple.value = !selection.length;
} }
const deleteSelectedRows = () => { function deleteSelectedRows() {
if (selectedRows.value.length === 0) { if (selectedRows.value.length === 0) {
alert("请先选择要删除的行"); alert("请先选择要删除的行");
return; return;
@@ -929,7 +958,7 @@ const deleteSelectedRows = () => {
); );
selectedRows.value = []; // 清空选中行 selectedRows.value = []; // 清空选中行
}; }
/** 重置操作表单 */ /** 重置操作表单 */
function reset() { function reset() {
@@ -994,6 +1023,7 @@ function edit() {
receiptHeaderForm.value = props.item.length > 0 ? props.item[0] : {}; receiptHeaderForm.value = props.item.length > 0 ? props.item[0] : {};
// receiptHeaderForm.value.busNo = props.item.supplyBusNo; // receiptHeaderForm.value.busNo = props.item.supplyBusNo;
purchaseinventoryList.value = props.item; purchaseinventoryList.value = props.item;
total.value = purchaseinventoryList.value.length;
console.log(purchaseinventoryList.value, "purchaseinventoryList.value"); console.log(purchaseinventoryList.value, "purchaseinventoryList.value");
console.log(receiptHeaderForm.value, "receiptHeaderForm.value"); console.log(receiptHeaderForm.value, "receiptHeaderForm.value");
loading.value = false; loading.value = false;

View File

@@ -29,7 +29,7 @@ export function addPurchaseinventory(data) {
} }
// 查询厂商类型 // 查询采购入库单据初始化数据
export function getInit() { export function getInit() {
return request({ return request({
url: '/inventory-manage/purchase/init', url: '/inventory-manage/purchase/init',
@@ -37,30 +37,31 @@ export function getInit() {
}) })
} }
// 查询部门树形数据
export function deptTreeSelect(queryParams) {
return request({
url: '/base-data-manage/organization/organization',
method: 'get',
param: queryParams
})
}
// 查询地点树形数 // 删除单
export function locationTreeSelect(queryParams) {
return request({
url: '/base-data-manage/cabinet-location/cabinet-location',
method: 'get',
param: queryParams
})
}
// 删除收费挂号项目
export function delPurchaseinventory(param) { export function delPurchaseinventory(param) {
console.log(param,'aaaa') console.log(param,'aaaa')
return request({ return request({
url: '/basic-service/healthcare/healthcare-service', url: '/inventory-manage/purchase/inventory-receipt',
method: 'delete', method: 'delete',
params: param params: param
}) })
} }
// 提交审批
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 }
})
}

View File

@@ -186,7 +186,7 @@
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
width="140" width="180"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template #default="scope"> <template #default="scope">
@@ -202,9 +202,19 @@
link link
type="primary" type="primary"
icon="View" icon="View"
@click="handleView(scope.row)" @click="handleSubmitApproval(scope.row)"
v-hasPermi="['system:user:remove']" v-hasPermi="['system:user:remove']"
>查看</el-button v-if="scope.row.statusEnum == '1'"
>提交审批</el-button
>
<el-button
link
type="primary"
icon="View"
@click="handleWithdrawApproval(scope.row)"
v-hasPermi="['system:user:remove']"
v-if="scope.row.statusEnum == '2'"
>撤销审批</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
@@ -234,8 +244,8 @@ import {
addPurchaseinventory, addPurchaseinventory,
getpurchaseInventoryDetail, getpurchaseInventoryDetail,
getInit, getInit,
deptTreeSelect, submitApproval,
locationTreeSelect, withdrawApproval,
delPurchaseinventory, delPurchaseinventory,
} from "./components/purchaseinventory"; } from "./components/purchaseinventory";
@@ -244,21 +254,6 @@ import inventoryReceiptDialog from "./components/inventoryReceiptDialog";
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const purchaseinventoryRef = ref(null); // 初始化 ref const purchaseinventoryRef = ref(null); // 初始化 ref
const {
adm_location,
category_code,
service_type_code,
specialty_code,
med_chrgitm_type,
financial_type_code,
} = proxy.useDict(
"adm_location",
"category_code",
"service_type_code",
"specialty_code",
"med_chrgitm_type",
"financial_type_code"
);
const purchaseinventoryList = ref([]); const purchaseinventoryList = ref([]);
const open = ref(false); const open = ref(false);
@@ -269,10 +264,6 @@ const single = ref(true);
const multiple = ref(true); const multiple = ref(true);
const total = ref(0); const total = ref(0);
const title = ref(""); const title = ref("");
const activeFlagOptions = ref(undefined);
const appointmentRequiredFlagOptions = ref(undefined);
const deptOptions = ref(undefined); // 部门树选项
const locationOptions = ref(undefined); // 地点树选项
const dateRange = ref([]); const dateRange = ref([]);
const busNoAdd = ref(""); // 单据号新增 const busNoAdd = ref(""); // 单据号新增
const itemTypeOptions = ref(undefined); // 入库项目类型 const itemTypeOptions = ref(undefined); // 入库项目类型
@@ -312,25 +303,6 @@ function getPurchaseinventoryTypeList() {
}); });
} }
/** 查询部门下拉树结构 */
function getDeptTree() {
deptTreeSelect().then((response) => {
console.log(response, "response查询部门下拉树结构");
deptOptions.value = response.data.records;
console.log(deptOptions.value, "部门下拉树结构");
});
}
/** 查询地点下拉树结构 */
function getLocationTree() {
locationTreeSelect().then((response) => {
console.log(response, "response查询部门下拉树结构");
locationOptions.value = response.data.records;
console.log(locationOptions.value, "部门下拉树结构");
});
}
/** 查询采购入库项目列表 */ /** 查询采购入库项目列表 */
function getList() { function getList() {
loading.value = true; loading.value = true;
@@ -348,8 +320,14 @@ function getList() {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
queryParams.value.S_TIME = dateRange.value[0] + " 00:00:00"; queryParams.value.occurrenceTimeSTime =
queryParams.value.E_TIME = dateRange.value[1] + " 23:59:59"; dateRange.value && dateRange.value.length == 2
? dateRange.value[0] + " 00:00:00"
: "";
queryParams.value.occurrenceTimeETime =
dateRange.value && dateRange.value.length == 2
? dateRange.value[1] + " 23:59:59"
: "";
queryParams.value.pageNo = 1; queryParams.value.pageNo = 1;
getList(); getList();
} }
@@ -363,8 +341,6 @@ function handleClear() {
/** 选择条数 */ /** 选择条数 */
function handleSelectionChange(selection) { function handleSelectionChange(selection) {
console.log(selection, "selection");
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
ids.value = selection.map((item) => item.id); ids.value = selection.map((item) => item.id);
single.value = selection.length != 1; single.value = selection.length != 1;
multiple.value = !selection.length; multiple.value = !selection.length;
@@ -372,43 +348,16 @@ function handleSelectionChange(selection) {
/** 打开新增弹窗 */ /** 打开新增弹窗 */
function openAddInventoryReceiptDialog() { function openAddInventoryReceiptDialog() {
proxy.$refs["inventoryReceiptRef"].show(); getPurchaseinventoryTypeList();
} nextTick(() => {
/** 重置操作表单 */ proxy.$refs["inventoryReceiptRef"].show();
function reset() { });
form.value = {
id: undefined,
name: undefined,
categoryCode: undefined,
cwTypeCode: undefined,
fwTypeCode: undefined,
specialtyCode: undefined,
locationId: undefined,
offeredOrgId: undefined,
activeFlag: undefined,
extraDetails: undefined,
contact: undefined,
appointmentRequiredFlag: undefined,
chargeName: undefined,
price: undefined,
description: undefined,
ybType: undefined,
title: undefined,
comment: undefined,
};
proxy.resetForm("purchaseinventoryRef");
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
} }
/** 修改按钮操作 */ /** 修改按钮操作 */
function handleUpdate(row) { function handleUpdate(row) {
console.log(typeof(row.supplyBusNo), "row",row); console.log(typeof row.supplyBusNo, "row", row);
getpurchaseInventoryDetail(row.supplyBusNo).then((response) => { getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
currentData.value = response.data; currentData.value = response.data;
console.log(response, "response采购入库编辑按钮", currentData.value); console.log(response, "response采购入库编辑按钮", currentData.value);
nextTick(() => { nextTick(() => {
@@ -417,70 +366,23 @@ function handleUpdate(row) {
getList(); getList();
}); });
} }
// /** 提交按钮 */ /** 提交审核按钮 */
// function submitForm() { function handleSubmitApproval(row) {
// // // 调用转换函数 submitApproval(row.supplyBusNo).then((response) => {
// // const transformedData = transformFormData(form); proxy.$modal.msgSuccess("提交审批成功");
// // console.log(transformedData, "transformedData"); open.value = false;
// // addPurchaseinventory(transformedData).then((response) => { getList();
// // proxy.$modal.msgSuccess("新增成功"); });
// // open.value = false; }
// getList();
// // }); /** 撤回审批按钮 */
// } function handleWithdrawApproval(row) {
withdrawApproval(row.supplyBusNo).then((response) => {
// 获取完整地址字符串 proxy.$modal.msgSuccess("撤销审批成功");
function getName() { open.value = false;
console.log(service_type_code.value, "service_type_code.value"); getList();
// 服务类型 });
const serviceTypeText = proxy.selectDictLabel(
service_type_code.value,
form.value.fwTypeCode
);
// 服务分类
const categoryCodeText = proxy.selectDictLabel(
category_code.value,
form.value.categoryCode
);
// 服务专业
const specialtyCodeText = proxy.selectDictLabel(
specialty_code.value,
form.value.specialtyCode
);
console.log(
serviceTypeText,
"serviceTypeText",
categoryCodeText,
specialtyCodeText
);
const nameParts = [
serviceTypeText,
form.value.addressCity,
categoryCodeText,
specialtyCodeText,
];
// 使用 reduce 方法拼接地址,非空字段之间用 '-' 连接
return nameParts.reduce((acc, part) => {
if (part) {
if (acc) {
acc += " - "; // 在非空字段之间添加 '-'
}
acc += part;
}
return acc;
}, "");
} }
// /** 详细按钮操作 */
// function handleView(row) {
// reset();
// title.value = "查看";
// open.value = true;
// getPurchaseinventoryOne(row.id).then((response) => {
// console.log(response, "responsebbbb", row.id);
// form.value = response.data;
// });
// }
/** 删除按钮操作 */ /** 删除按钮操作 */
function handleDelete(row) { function handleDelete(row) {
@@ -496,102 +398,8 @@ function handleDelete(row) {
}) })
.catch(() => {}); .catch(() => {});
} }
// 转换insert参数函数
const transformFormData = (form) => {
const {
id,
name,
categoryCode,
// typeCode,
cwTypeCode,
fwTypeCode,
specialtyCode,
locationId,
offeredOrgId,
activeFlag,
extraDetails,
contact,
appointmentRequiredFlag,
chargeName,
price,
description,
ybType,
title,
comment,
} = form.value;
return {
healthcareServiceFormData: {
id,
activeFlag,
offeredOrgId,
categoryCode,
typeCode: fwTypeCode,
specialtyCode,
locationId,
name,
contact,
appointmentRequiredFlag,
extraDetails,
comment,
},
chargeItemDefinitionFormData: {
id,
chargeName,
title,
orgId: offeredOrgId,
description,
typeCode: cwTypeCode,
ybType,
price,
},
};
};
// 转换insert参数函数
const transformFormEditData = (form) => {
const {
id,
name,
categoryCode,
// typeCode,
cwTypeCode,
fwTypeCode,
specialtyCode,
locationId,
offeredOrgId,
activeFlag,
extraDetails,
contact,
appointmentRequiredFlag,
chargeName,
price,
description,
ybType,
title,
comment,
} = form.value;
return {
healthcareServiceFormData: {
id,
activeFlag,
offeredOrgId,
categoryCode,
typeCode: fwTypeCode,
specialtyCode,
locationId,
name,
contact,
appointmentRequiredFlag,
extraDetails,
comment,
},
};
};
getPurchaseinventoryTypeList(); getPurchaseinventoryTypeList();
getDeptTree();
getLocationTree();
getList(); getList();
</script> </script>
<style scoped> <style scoped>