hse修改接口

This commit is contained in:
Teo
2025-08-29 18:06:42 +08:00
parent d3317b0e32
commit c1b891b4b2
2 changed files with 75 additions and 17 deletions

View File

@ -9,7 +9,24 @@
<el-button type="primary" icon="edit" @click="clickApprovalSheet1()">审批</el-button>
</el-form-item>
<el-form-item v-if="state.masterData.status == 'waiting' || state.masterData.status == 'finish'">
<el-button icon="view" @click="lookApprovalFlow()" type="warning">查看流程</el-button>
<el-button icon="view" @click="lookApprovalFlow()" type="warning">查看流程</el-button>
</el-form-item>
<el-form-item>
<el-button icon="Finished" @click="editApprovalSheet()" type="success">保存</el-button>
</el-form-item>
<el-form-item>
<file-upload
upload-url="/design/totalsupplyplan/import"
v-model="file"
:limit="1"
:file-type="['xls', 'xlsx']"
:on-upload-success="handleSuccess"
>
<el-button type="primary" plain icon="Compass">导入</el-button>
</file-upload>
</el-form-item>
<el-form-item>
<el-button type="primary" plain icon="Filter" @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
<right-toolbar @queryTable="getMasterDataList"></right-toolbar>
@ -30,18 +47,38 @@
<el-table-column prop="specification" label="规格型号" />
<el-table-column prop="quantity" label="数量" width="60" />
<el-table-column prop="batchNumber" label="批次号" width="200" />
<el-table-column prop="brand" label="品牌" />
<el-table-column prop="texture" label="材质" />
<el-table-column prop="qualityStandard" label="质量标准" />
<el-table-column prop="partUsed" label="使用部位" />
<el-table-column prop="deliveryPoints" label="交货地点" />
<el-table-column prop="brand" label="品牌">
<template #default="{ row }">
<el-input v-model="row.brand" placeholder="" clearable />
</template>
</el-table-column>
<el-table-column prop="texture" label="材质">
<template #default="{ row }">
<el-input v-model="row.texture" placeholder="" clearable />
</template>
</el-table-column>
<el-table-column prop="qualityStandard" label="质量标准">
<template #default="{ row }">
<el-input v-model="row.qualityStandard" placeholder="" clearable />
</template>
</el-table-column>
<el-table-column prop="partUsed" label="使用部位">
<template #default="{ row }">
<el-input v-model="row.partUsed" placeholder="" clearable />
</template>
</el-table-column>
<el-table-column prop="deliveryPoints" label="交货地点">
<template #default="{ row }">
<el-input v-model="row.deliveryPoints" placeholder="" clearable />
</template>
</el-table-column>
<el-table-column label="预计使用日期">
<template #default="{ row }">
<span>{{ row.dateService ? row.dateService.split(' ')[0] : '' }}</span>
<el-date-picker v-model="row.dateService" type="date" value-format="YYYY-MM-DD" placeholder="" />
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" />
<el-table-column label="操作">
<!-- <el-table-column label="操作">
<template #default="{ row }">
<el-button
:disabled="state.masterData.status == 'waiting' || state.masterData.status == 'finish'"
@ -51,7 +88,7 @@
>修改</el-button
>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<!-- 编辑 -->
<el-dialog v-model="visible" title="修改物料信息" :width="800" :close-on-click-modal="false" @close="handleClose">
@ -124,7 +161,8 @@ import {
obtainMasterDataList,
totalsupplyplan,
totalSupplyplanDetails,
materialChangeSupplyplan
materialChangeSupplyplan,
totalSupplyplanBatchEdit
} from '@/api/materials/overallPlanMaterialSupply/index';
import { useUserStoreHook } from '@/store/modules/user';
const userStore = useUserStoreHook();
@ -261,11 +299,13 @@ async function totalSupplyplanDetail(id) {
}
}
// 修改
function editApprovalSheet(row) {
console.log(row);
totalSupplyplanDetail(row.id);
visible.value = true;
}
const editApprovalSheet = async () => {
state.loading.list = true;
await totalSupplyplanBatchEdit(state.tableData);
proxy.$modal.msgSuccess('修改成功');
state.loading.list = false;
};
// 提交表单
const handleSubmit = async () => {
try {
@ -292,6 +332,17 @@ function editMaterialSupply(formData) {
});
}
const handleExport = async () => {
proxy?.download(
'/design/totalsupplyplan/export',
{
projectId: currentProject.value?.id
},
`物资供应总计划.xlsx`,
true
);
};
// 关闭弹窗
const handleClose = () => {
visible.value = false;