优化
This commit is contained in:
@ -79,10 +79,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="变更内容" align="center" prop="changeContent" width="150" />
|
<el-table-column label="变更内容" align="center" prop="changeContent" width="150" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
||||||
<el-table-column label="操作" fixed="right" width="300">
|
<el-table-column label="操作" fixed="right" width="340">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" icon="Upload" @click="handleAddChange(scope.row)" v-if="!scope.row.fileId">上传</el-button>
|
<el-button type="primary" icon="Upload" @click="handleAddChange(scope.row)" v-if="!scope.row.fileId">上传</el-button>
|
||||||
<el-button type="success" icon="View" @click="handleViewInfo(scope.row)">查看</el-button>
|
<el-button type="success" icon="View" @click="handleViewInfo(scope.row)">查看</el-button>
|
||||||
|
<el-button type="success" icon="View" @click="handleViewDetail(scope.row)">通知单</el-button>
|
||||||
<!-- <el-tooltip content="查看文档" placement="top">
|
<!-- <el-tooltip content="查看文档" placement="top">
|
||||||
<el-button link type="primary" icon="Document" @click="handleView(scope.row)"></el-button>
|
<el-button link type="primary" icon="Document" @click="handleView(scope.row)"></el-button>
|
||||||
</el-tooltip> -->
|
</el-tooltip> -->
|
||||||
@ -172,6 +173,17 @@ const handleAdd = () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
const handleViewDetail = (row) => {
|
||||||
|
proxy.$tab.closePage(proxy.$route);
|
||||||
|
proxy.$router.push({
|
||||||
|
path: `/design-management/designChange/indexEdit`,
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
type: 'view'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
// 变更图纸
|
// 变更图纸
|
||||||
const handleAddChange = (row) => {
|
const handleAddChange = (row) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
|
@ -149,6 +149,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="large"
|
size="large"
|
||||||
|
v-if="routeParams.type != 'view'"
|
||||||
@click="submitForm"
|
@click="submitForm"
|
||||||
class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
|
class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
|
||||||
>确认</el-button
|
>确认</el-button
|
||||||
@ -162,7 +163,7 @@
|
|||||||
<script setup name="Leave" lang="ts">
|
<script setup name="Leave" lang="ts">
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import { addDesignChange } from '@/api/design/designChange';
|
import { addDesignChange, getDesignChange } from '@/api/design/designChange';
|
||||||
import { listVolumeCatalog } from '@/api/design/volumeCatalog';
|
import { listVolumeCatalog } from '@/api/design/volumeCatalog';
|
||||||
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
|
const { design_change_reason_type } = toRefs<any>(proxy?.useDict('design_change_reason_type'));
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@ -280,10 +281,25 @@ const handleSelect = (val) => {
|
|||||||
form.value.specialty = obj.specialty;
|
form.value.specialty = obj.specialty;
|
||||||
form.value.extendDetail.subName = obj.designSubitem;
|
form.value.extendDetail.subName = obj.designSubitem;
|
||||||
};
|
};
|
||||||
|
/** 获取详情 */
|
||||||
|
const getInfo = () => {
|
||||||
|
buttonLoading.value = false;
|
||||||
|
nextTick(async () => {
|
||||||
|
const res = await getDesignChange(routeParams.value.id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
if (form.value.changeReason.length > 0) {
|
||||||
|
form.value.changeReason = form.value.changeReason.split(',');
|
||||||
|
}
|
||||||
|
buttonLoading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
|
routeParams.value = proxy.$route.query;
|
||||||
reset();
|
reset();
|
||||||
getList();
|
getList();
|
||||||
|
getInfo();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user