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

@ -21,7 +21,7 @@ export const totalsupplyplan = (params: any): AxiosPromise => {
export const totalSupplyplanDetails = (id: any): AxiosPromise => { export const totalSupplyplanDetails = (id: any): AxiosPromise => {
return request({ return request({
url: '/design/totalsupplyplan/' + id, url: '/design/totalsupplyplan/' + id,
method: 'get', method: 'get'
}); });
}; };
// 修改物资-总供应计划 // 修改物资-总供应计划
@ -33,4 +33,11 @@ export const materialChangeSupplyplan = (data: any): AxiosPromise => {
}); });
}; };
// 总供应计划-批量编辑
export const totalSupplyplanBatchEdit = (data: any): AxiosPromise => {
return request({
url: '/design/totalsupplyplan/batchEdit',
method: 'put',
data
});
};

View File

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