This commit is contained in:
Teo
2025-08-16 00:06:06 +08:00
parent c7e0486528
commit 23e3460853
4 changed files with 564 additions and 543 deletions

View File

@ -7,10 +7,26 @@
<template #header>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" :offset="0"
><el-button type="primary" size="default" @click="handleAdd" icon="FolderAdd" plain>新增</el-button></el-col
><el-button
type="primary"
v-hasPermi="['cailiaoshebei:materialbatchdemandplan:add']"
size="default"
@click="handleAdd"
icon="FolderAdd"
plain
>新增</el-button
></el-col
>
<el-col :span="1.5" :offset="0"
><el-button type="danger" size="default" @click="handleDeleteBatch" icon="FolderDelete" plain>删除</el-button></el-col
><el-button
type="danger"
size="default"
v-hasPermi="['cailiaoshebei:batchPlan:remove']"
@click="handleDeleteBatch"
icon="FolderDelete"
plain
>删除</el-button
></el-col
>
</el-row>
</template>
@ -159,17 +175,7 @@
</template>
<script setup name="Cailiaoshebei" lang="ts">
import {
listCailiaoshebei,
getCailiaoshebei,
delCailiaoshebei,
addCailiaoshebei,
updateCailiaoshebei,
listBatch,
getBatch,
delBatch,
listSelectCailiaoshebei
} from '@/api/materials/batchPlan';
import { getCailiaoshebei, updateCailiaoshebei, listBatch, getBatch, delBatch, listSelectCailiaoshebei } from '@/api/materials/batchPlan';
import { CailiaoshebeiVO, CailiaoshebeiQuery, CailiaoshebeiForm } from '@/api/materials/batchPlan/types';
import { useUserStoreHook } from '@/store/modules/user';
@ -374,23 +380,6 @@ const handleUpdata = () => {
dialog.title = '修改物资-需求';
};
/** 提交按钮 */
const submitForm = async () => {
buttonLoading.value = true;
cailiaoshebeiList.value.forEach((item) => {
if (item.id) {
delete item.id;
}
});
await addCailiaoshebei({
addDataList: cailiaoshebeiList.value,
batchNumber: form.value.batchNumber,
projectId: currentProject.value?.id
} as any).finally(() => (buttonLoading.value = false));
proxy?.$modal.msgSuccess('操作成功');
dialog.visible = false;
};
/** 提交数据 */
const submitTransferForm = async () => {
const result = validateAndClean(form.value.planList);