材料管理 变更清单
This commit is contained in:
@ -333,6 +333,8 @@ 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;
|
||||
@ -347,14 +349,13 @@ const getBatchList = async () => {
|
||||
batchOptions.value = res.rows;
|
||||
total.value = res.total;
|
||||
try {
|
||||
batchTreeRef.value.setCurrentKey(res.rows[0].batchNumber);
|
||||
queryParams.value.batchNumber = res.rows[0].batchNumber;
|
||||
batchTreeRef.value.setCurrentKey(res.rows[0].batchNumber);
|
||||
form.value.batchNumber = res.rows[0].batchNumber;
|
||||
form.value.batchId = res.rows[0].id;
|
||||
form.value.approvalDesign = res.rows[0].approvalDesign;
|
||||
} catch (error) {
|
||||
form.value.batchNumber = '';
|
||||
}
|
||||
|
||||
getList();
|
||||
};
|
||||
|
||||
@ -362,7 +363,8 @@ const getBatchList = async () => {
|
||||
const handleNodeClick = (data: any) => {
|
||||
queryParams.value.batchNumber = data.batchNumber;
|
||||
form.value.batchNumber = data.batchNumber;
|
||||
form.value.batchId = data.id;
|
||||
form.value.approvalDesign = data.approvalDesign;
|
||||
|
||||
if (data.batchNumber === '0') {
|
||||
queryParams.value.batchNumber = '';
|
||||
}
|
||||
@ -378,7 +380,9 @@ const cancel = () => {
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
const preservedBatchId = form.value.batchNumber; // 先保存当前的 batchNumber
|
||||
form.value = { ...initFormData, batchNumber: preservedBatchId }; // 重置但保留
|
||||
const approvalDesigndBatchId = form.value.approvalDesign; // 先保存当前的 batchNumber
|
||||
|
||||
form.value = { ...initFormData, batchNumber: preservedBatchId, approvalDesign: approvalDesigndBatchId }; // 重置但保留
|
||||
cailiaoshebeiFormRef.value?.resetFields();
|
||||
};
|
||||
|
||||
@ -421,9 +425,14 @@ const handleUpdate = async (row?: CailiaoshebeiVO) => {
|
||||
|
||||
/** 审核按钮操作 */
|
||||
const handleAudit = async () => {
|
||||
if (!form.value.batchNumber) {
|
||||
proxy?.$modal.msgError('请选择批次');
|
||||
return;
|
||||
}
|
||||
proxy?.$tab.closePage(proxy.$route);
|
||||
proxy?.$tab.openPage('/materials-management/cailiaoshebei/indexEdit', '审核材料设备设计', {
|
||||
id: form.value.batchId,
|
||||
number: form.value.batchNumber,
|
||||
id: form.value.batchNumber + '_materialDesign',
|
||||
approvalDesign: form.value.approvalDesign,
|
||||
type: 'update'
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user