材料管理 变更清单
This commit is contained in:
@ -47,6 +47,9 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Check" @click="submitForm" v-hasPermi="['cailiaoshebei:cailiaoshebei:delete']">保存</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button plain type="warning" icon="Finished" @click="handleAudit()" v-hasPermi="['out:monthPlan:remove']">审核</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@ -78,11 +81,6 @@
|
||||
<dict-tag :options="wf_business_status" :value="scope.row.planAuditStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Finished" @click="handleAudit(scope.row)" v-hasPermi="['out:monthPlan:remove']">审核</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
@ -205,6 +203,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询物资-材料设备列表 */
|
||||
const getList = async () => {
|
||||
if (!queryParams.value.batchNumber) return;
|
||||
loading.value = true;
|
||||
const res = await listCailiaoshebei(queryParams.value);
|
||||
cailiaoshebeiList.value = res.rows;
|
||||
@ -215,15 +214,16 @@ const getList = async () => {
|
||||
//查询批次列表
|
||||
const getBatchList = async () => {
|
||||
const res = await listBatch(queryParams.value);
|
||||
console.log('🚀 ~ getBatchList ~ res:', res);
|
||||
batchOptions.value = res.rows;
|
||||
total.value = res.total;
|
||||
try {
|
||||
queryParams.value.batchNumber = res.rows[0].batchNumber;
|
||||
batchTreeRef.value.setCurrentKey(res.rows[0].batchNumber);
|
||||
form.value.batchNumber = res.rows[0].batchNumber;
|
||||
form.value.approvalProject = res.rows[0].approvalProject;
|
||||
} catch (error) {
|
||||
form.value.batchNumber = '';
|
||||
queryParams.value.batchNumber = '';
|
||||
}
|
||||
getList();
|
||||
};
|
||||
@ -286,17 +286,6 @@ const handleAdd = () => {
|
||||
dialog.title = '选择物资-材料设备';
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
// const handleUpdate = async (row?: CailiaoshebeiVO) => {
|
||||
// reset();
|
||||
// const _id = row?.id || ids.value[0];
|
||||
// const res = await getCailiaoshebei(_id);
|
||||
// Object.assign(form.value, res.data);
|
||||
// selectValue.value = (form.value.supplierId as string).split(',');
|
||||
// dialog.visible = true;
|
||||
// dialog.title = '修改物资-材料设备';
|
||||
// };
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = async () => {
|
||||
buttonLoading.value = true;
|
||||
@ -351,14 +340,15 @@ const handleDelete = async (row?: CailiaoshebeiVO) => {
|
||||
};
|
||||
|
||||
/** 审核按钮操作 */
|
||||
const handleAudit = async (row?: CailiaoshebeiVO) => {
|
||||
const data = {
|
||||
...row,
|
||||
approvalProject: form.value.approvalProject
|
||||
};
|
||||
const handleAudit = async () => {
|
||||
if (!form.value.approvalProject) {
|
||||
proxy?.$modal.msgError('请选择批次号');
|
||||
return;
|
||||
}
|
||||
proxy?.$tab.closePage(proxy.$route);
|
||||
proxy?.$tab.openPage('/materials-management/batchPlan/indexEdit', '审核物资设备批次需求计划', {
|
||||
id: row?.id,
|
||||
data: JSON.stringify(data),
|
||||
id: form.value.batchNumber,
|
||||
approvalProject: form.value.approvalProject + '_batchRequirements',
|
||||
type: 'update'
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user