物资供应总计划
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台
|
|||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = 'http://192.168.110.159:8898'
|
VITE_APP_BASE_API = 'http://192.168.110.180:8898'
|
||||||
|
|
||||||
# 无人机接口地址
|
# 无人机接口地址
|
||||||
|
|
||||||
|
@ -24,3 +24,10 @@ export const extractDetail = (id) => {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 获取提取资料
|
||||||
|
export const getFileList = (id) => {
|
||||||
|
return request({
|
||||||
|
url: '/design/extract/fileList/' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -61,3 +61,24 @@ export const delDrawing = (id: string | number | Array<string | number>) => {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* 查阅
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const volumeFileViewer = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/design/volumeFileViewer',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 查阅记录列表
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
export const volumeFileViewerList = (id) => {
|
||||||
|
return request({
|
||||||
|
url: '/design/volumeFileViewer/list?volumeFileId=' + id,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -361,7 +361,7 @@ const handleBackProcess = async () => {
|
|||||||
await backProcess(backForm.value).finally(() => {
|
await backProcess(backForm.value).finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
buttonDisabled.value = false;
|
buttonDisabled.value = false;
|
||||||
if (isDrawing.value) {
|
if (isDrawing.value) {
|
||||||
detailFormRef.value.submit(businessId.value);
|
detailFormRef.value.submit(businessId.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -10,7 +10,7 @@ import useSettingsStore from '@/store/modules/settings';
|
|||||||
import usePermissionStore from '@/store/modules/permission';
|
import usePermissionStore from '@/store/modules/permission';
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false });
|
NProgress.configure({ showSpinner: false });
|
||||||
const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*'];
|
const whiteList = ['/login', '/register', '/social-callback', '/register*', '/register/*', '/materials/purchaseDoc/uploadCode'];
|
||||||
|
|
||||||
const isWhiteList = (path: string) => {
|
const isWhiteList = (path: string) => {
|
||||||
return whiteList.some((pattern) => isPathMatch(pattern, path));
|
return whiteList.some((pattern) => isPathMatch(pattern, path));
|
||||||
|
@ -118,6 +118,11 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
path: '/gis2D1',
|
path: '/gis2D1',
|
||||||
component: () => import('@/views/gis2D/index.vue'),
|
component: () => import('@/views/gis2D/index.vue'),
|
||||||
hidden: true
|
hidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/materials/purchaseDoc/uploadCode',
|
||||||
|
component: () => import('@/views/materials/purchaseDoc/uploadCode.vue'),
|
||||||
|
hidden: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -71,8 +71,8 @@
|
|||||||
{{ tableDetail.content }}
|
{{ tableDetail.content }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="附件" :span="2" label-class-name="white">
|
<el-descriptions-item label-align="center" label="附件" :span="2" label-class-name="white">
|
||||||
<el-link type="primary" :underline="false" :href="tableDetail.attachmentsList.url" target="_blank">{{
|
<el-link type="primary" :underline="false" :href="tableDetail.attachmentsList?.url" target="_blank">{{
|
||||||
tableDetail.attachmentsList.originalName
|
tableDetail.attachmentsList?.originalName
|
||||||
}}</el-link>
|
}}</el-link>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label-align="center" label="变更费用估算" :span="2" class-name="zebra">
|
<el-descriptions-item label-align="center" label="变更费用估算" :span="2" class-name="zebra">
|
||||||
@ -175,7 +175,8 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const tableDetail = ref<any>({});
|
const tableDetail = ref<any>({ attachmentsImgList: [], attachmentsList: [] });
|
||||||
|
|
||||||
const exportRef = ref<HTMLElement>();
|
const exportRef = ref<HTMLElement>();
|
||||||
const radioList = ref([
|
const radioList = ref([
|
||||||
{ value: 0, label: '设计漏项' },
|
{ value: 0, label: '设计漏项' },
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-6 bg-gray-50 condition">
|
<div class="p-6 bg-gray-50 Professional">
|
||||||
<transition>
|
<transition>
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
@ -39,15 +39,16 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
|
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
|
||||||
<el-button size="small" type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">审核</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5" v-if="scope.row.status === 'finish'">
|
<el-col :span="1.5" v-if="scope.row.status === 'finish'">
|
||||||
<el-button size="small" type="primary" icon="Download" @click="handleDownload(scope.row)">导出</el-button>
|
<el-button link type="primary" icon="Download" @click="handleDownload(scope.row)">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" size="small" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)"
|
<el-button link type="warning" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)">查看流程</el-button>
|
||||||
>查看流程</el-button
|
</el-col>
|
||||||
>
|
<el-col :span="1.5">
|
||||||
|
<el-button link type="warning" icon="View" v-if="scope.row.status != 'draft'" @click="handleFile(scope.row)">查看文件</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@ -55,6 +56,43 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog title="提取文件列表" v-model="viewVisible" width="500px">
|
||||||
|
<el-table :loading="loadingFlie" :data="fileList" style="width: 100%" border>
|
||||||
|
<el-table-column prop="fileName" label="文件名称" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link
|
||||||
|
:key="scope.row.fileId"
|
||||||
|
:href="scope.row.fileUrl"
|
||||||
|
target="_blank"
|
||||||
|
:type="scope.row.status == '1' ? 'primary' : 'info'"
|
||||||
|
:underline="false"
|
||||||
|
>
|
||||||
|
{{ scope.row.fileName }}
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否变更" align="center" width="120">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="scope.row.type == 1 ? 'success' : 'info'">{{ scope.row.type == 1 ? '否' : '是' }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" width="120" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="scope.row.status == 1 ? 'success' : 'info'">{{ scope.row.status == 1 ? '使用中' : '已作废' }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="170" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="success" link icon="View" @click="handleViewFile(scope.row)"> 查看 </el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<template #footer>
|
||||||
|
<span>
|
||||||
|
<el-button type="primary" @click="viewVisible = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -63,7 +101,7 @@ import { ref, reactive, computed, onMounted } from 'vue';
|
|||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
||||||
import { extractList } from '@/api/design/Professional';
|
import { extractList, getFileList } from '@/api/design/Professional';
|
||||||
|
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
@ -73,6 +111,9 @@ const currentProject = computed(() => userStore.selectedProject);
|
|||||||
const professionalList = ref([]);
|
const professionalList = ref([]);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
const loadingFlie = ref(false);
|
||||||
|
const viewVisible = ref(false); //文件列表展示
|
||||||
|
const fileList = ref([]);
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -145,7 +186,19 @@ const handleDownload = (row) => {
|
|||||||
`互提资料.zip`
|
`互提资料.zip`
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
const handleViewFile = (row) => {
|
||||||
|
window.open(row.docUrl, '_blank');
|
||||||
|
};
|
||||||
|
const handleFile = async (row) => {
|
||||||
|
// 查看文件
|
||||||
|
viewVisible.value = true;
|
||||||
|
loadingFlie.value = true;
|
||||||
|
let res = await getFileList(row.id);
|
||||||
|
if (res.code == 200) {
|
||||||
|
fileList.value = res.data;
|
||||||
|
}
|
||||||
|
loadingFlie.value = false;
|
||||||
|
};
|
||||||
// 页面挂载时初始化数据
|
// 页面挂载时初始化数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
@ -153,7 +206,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.condition {
|
.Professional {
|
||||||
.el-tabs__header {
|
.el-tabs__header {
|
||||||
height: 84vh !important;
|
height: 84vh !important;
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
>
|
>
|
||||||
<div class="flex justify-between items-start mb-2">
|
<div class="flex justify-between items-start mb-2">
|
||||||
<span class="text-sm font-medium text-gray-600">资料 {{ index + 1 }}</span>
|
<span class="text-sm font-medium text-gray-600">资料 {{ index + 1 }}</span>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
@ -85,7 +86,22 @@
|
|||||||
:rules="[{ required: true, message: '请输入文件资料名称', trigger: 'blur' }]"
|
:rules="[{ required: true, message: '请输入文件资料名称', trigger: 'blur' }]"
|
||||||
class="mb-4"
|
class="mb-4"
|
||||||
>
|
>
|
||||||
<el-input placeholder="请输入文件资料名称" v-model="item.catalogueName" autocomplete="off" />
|
<el-select
|
||||||
|
id="projectSelect"
|
||||||
|
v-model="item.volumeCatalogId"
|
||||||
|
placeholder="请选择资料"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="handleSelect($event, item)"
|
||||||
|
style="width: 150px; margin-right: 20px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="project in volumeCatalogList"
|
||||||
|
:key="project.design"
|
||||||
|
:label="project.documentName"
|
||||||
|
:value="project.design"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" :prop="`documents.${index}.remark`" class="mb-4">
|
<el-form-item label="备注" :prop="`documents.${index}.remark`" class="mb-4">
|
||||||
<el-input placeholder="请输入备注" v-model="item.remark" autocomplete="off" />
|
<el-input placeholder="请输入备注" v-model="item.remark" autocomplete="off" />
|
||||||
@ -142,6 +158,7 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import { systemUserList } from '@/api/design/appointment';
|
import { systemUserList } from '@/api/design/appointment';
|
||||||
import { extractBatch, extractDetail } from '@/api/design/Professional';
|
import { extractBatch, extractDetail } from '@/api/design/Professional';
|
||||||
|
import { listVolumeCatalog } from '@/api/design/volumeCatalog';
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
@ -150,6 +167,8 @@ const { des_user_major } = toRefs<any>(proxy?.useDict('des_user_major'));
|
|||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const disableAll = ref(false);
|
const disableAll = ref(false);
|
||||||
|
const volumeCatalogList = ref([]);
|
||||||
|
let volumeMap = new Map();
|
||||||
//路由参数
|
//路由参数
|
||||||
const routeParams = ref<Record<string, any>>({});
|
const routeParams = ref<Record<string, any>>({});
|
||||||
const flowCodeOptions = [
|
const flowCodeOptions = [
|
||||||
@ -206,13 +225,15 @@ const form = reactive({
|
|||||||
documents: [
|
documents: [
|
||||||
{
|
{
|
||||||
id: Date.now(),
|
id: Date.now(),
|
||||||
catalogueName: '', // 文件目录名称
|
catalogueName: '', // 卷册目录名称
|
||||||
remark: '' // 备注
|
remark: '', // 备注
|
||||||
|
volumeCatalogId: '' //卷册目录ID
|
||||||
}
|
}
|
||||||
] as Array<{
|
] as Array<{
|
||||||
id: number;
|
id: number;
|
||||||
catalogueName: string;
|
catalogueName: string;
|
||||||
remark: string;
|
remark: string;
|
||||||
|
volumeCatalogId: string;
|
||||||
}>
|
}>
|
||||||
});
|
});
|
||||||
// 主表单验证规则
|
// 主表单验证规则
|
||||||
@ -238,7 +259,8 @@ const reset = () => {
|
|||||||
{
|
{
|
||||||
id: Date.now(),
|
id: Date.now(),
|
||||||
catalogueName: '',
|
catalogueName: '',
|
||||||
remark: ''
|
remark: '',
|
||||||
|
volumeCatalogId: ''
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
leaveFormRef.value?.resetFields();
|
leaveFormRef.value?.resetFields();
|
||||||
@ -248,7 +270,8 @@ const addDocumentItem = () => {
|
|||||||
form.documents.push({
|
form.documents.push({
|
||||||
id: Date.now(),
|
id: Date.now(),
|
||||||
catalogueName: '',
|
catalogueName: '',
|
||||||
remark: ''
|
remark: '',
|
||||||
|
volumeCatalogId: ''
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -262,7 +285,6 @@ const submitForm = (status1: string) => {
|
|||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
// 验证表单数据
|
// 验证表单数据
|
||||||
// 验证表单数据(主要验证基本信息中的必填项)
|
|
||||||
mainFormRef.value.validate(async (valid) => {
|
mainFormRef.value.validate(async (valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log('验证成功');
|
console.log('验证成功');
|
||||||
@ -397,7 +419,8 @@ const byProjectIdAll = async () => {
|
|||||||
form.documents.push({
|
form.documents.push({
|
||||||
id: item.id || Date.now() + index, // 确保id唯一
|
id: item.id || Date.now() + index, // 确保id唯一
|
||||||
catalogueName: item.catalogueName || '',
|
catalogueName: item.catalogueName || '',
|
||||||
remark: item.remark || ''
|
remark: item.remark || '',
|
||||||
|
volumeCatalogId: item.volumeCatalogId
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -406,7 +429,8 @@ const byProjectIdAll = async () => {
|
|||||||
{
|
{
|
||||||
id: Date.now(),
|
id: Date.now(),
|
||||||
catalogueName: '',
|
catalogueName: '',
|
||||||
remark: ''
|
remark: '',
|
||||||
|
volumeCatalogId: ''
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -414,11 +438,23 @@ const byProjectIdAll = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
};
|
};
|
||||||
|
/** 查询卷册目录列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
const res = await listVolumeCatalog({ projectId: currentProject.value?.id, auditStatus: 'finish' });
|
||||||
|
volumeCatalogList.value = res.rows;
|
||||||
|
volumeCatalogList.value.forEach((e) => {
|
||||||
|
volumeMap.set(e.design, e);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const handleSelect = (val, item) => {
|
||||||
|
item.catalogueName = volumeMap.get(val).documentName;
|
||||||
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
routeParams.value = proxy.$route.query;
|
routeParams.value = proxy.$route.query;
|
||||||
reset();
|
reset();
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
getList(); // 获取卷册目录
|
||||||
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
||||||
getDeptAllUser(userStore.deptId).then(() => {
|
getDeptAllUser(userStore.deptId).then(() => {
|
||||||
byProjectIdAll();
|
byProjectIdAll();
|
||||||
|
@ -150,11 +150,9 @@ import { ref, reactive, computed, onMounted, toRefs } from 'vue';
|
|||||||
import { getCurrentInstance } from 'vue';
|
import { getCurrentInstance } from 'vue';
|
||||||
import type { ComponentInternalInstance } from 'vue';
|
import type { ComponentInternalInstance } from 'vue';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import { listUserByDeptId } from '@/api/system/user';
|
|
||||||
import { ElMessage, ElLoading } from 'element-plus';
|
import { ElMessage, ElLoading } from 'element-plus';
|
||||||
import { Delete } from '@element-plus/icons-vue';
|
import { Delete } from '@element-plus/icons-vue';
|
||||||
import { designUserAdd, designUserList, systemUserList } from '@/api/design/appointment';
|
import { designUserAdd, designUserList, systemUserList } from '@/api/design/appointment';
|
||||||
import { disable } from 'ol/rotationconstraint';
|
|
||||||
|
|
||||||
// 获取当前实例
|
// 获取当前实例
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@ -194,7 +192,6 @@ const getDeptAllUser = async (deptId: any) => {
|
|||||||
userList.value = res.rows;
|
userList.value = res.rows;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('获取用户列表失败');
|
ElMessage.error('获取用户列表失败');
|
||||||
} finally {
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -374,10 +371,21 @@ const resetForm = () => {
|
|||||||
ElMessage.info('表单已重置');
|
ElMessage.info('表单已重置');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
//监听项目id刷新数据
|
||||||
|
const listeningProject = watch(
|
||||||
|
() => currentProject.value?.id,
|
||||||
|
(nid, oid) => {
|
||||||
|
getDeptAllUser(userStore.deptId).then(() => {
|
||||||
|
designUser();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
listeningProject();
|
||||||
|
});
|
||||||
// 页面挂载时初始化数据
|
// 页面挂载时初始化数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log(userStore.deptId);
|
|
||||||
// 先获取用户列表,再加载表单数据
|
// 先获取用户列表,再加载表单数据
|
||||||
getDeptAllUser(userStore.deptId).then(() => {
|
getDeptAllUser(userStore.deptId).then(() => {
|
||||||
designUser();
|
designUser();
|
||||||
|
@ -25,11 +25,16 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作">
|
<el-table-column label="操作">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" icon="Download" @click="onExport(scope.row.fileUrl)">下载</el-button>
|
<el-button link type="primary" icon="Download" @click="onExport(scope.row.fileUrl)">下载</el-button>
|
||||||
<el-button type="success" icon="edit" v-show="scope.row.status == 'draft' || scope.row.status == 'waiting'" @click="onUpdate(scope.row)"
|
<el-button
|
||||||
|
type="success"
|
||||||
|
link
|
||||||
|
icon="edit"
|
||||||
|
v-show="scope.row.status == 'draft' || scope.row.status == 'waiting'"
|
||||||
|
@click="onUpdate(scope.row)"
|
||||||
>审核</el-button
|
>审核</el-button
|
||||||
>
|
>
|
||||||
<el-button type="warning" v-show="scope.row.status != 'draft'" icon="View" @click="onView(scope.row)">查看流程</el-button>
|
<el-button link type="warning" v-show="scope.row.status != 'draft'" icon="View" @click="onView(scope.row)">查看流程</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -57,13 +62,11 @@ const props = defineProps({
|
|||||||
type: Number
|
type: Number
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const uploadParams = computed(() => {
|
|
||||||
return {
|
|
||||||
catalogueId: props.catalogueId,
|
|
||||||
projectId: currentProject.value?.id
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
|
const uploadParams = ref({
|
||||||
|
catalogueId: '',
|
||||||
|
projectId: currentProject.value?.id
|
||||||
|
});
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -80,7 +83,7 @@ const data = reactive({
|
|||||||
changeReason: undefined,
|
changeReason: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
params: {},
|
params: {},
|
||||||
catalogueId: props.catalogueId
|
catalogueId: undefined
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
@ -148,6 +151,14 @@ const onExport = (fileUrl) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
const getInfo = (id) => {
|
||||||
|
queryParams.value.catalogueId = id;
|
||||||
|
uploadParams.value.catalogueId = id;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
defineExpose({
|
||||||
|
getInfo
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -1,40 +1,58 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-6 bg-gray-50 condition">
|
<div class="p-6 bg-gray-50 condition">
|
||||||
<el-tabs v-model="activeName" type="border-card" :tab-position="tabPosition" class="demo-tabs" @tab-click="handleClick">
|
<div class="file-category">
|
||||||
<el-tab-pane :label="item.catalogueName" :name="item.id" v-for="(item, i) of FolderList" :key="i">
|
<span style="color: #757575; display: inline-block; margin-bottom: 15px">文件分类</span>
|
||||||
<div style="height: 80vh; background: #f0f8ff9e">
|
<!-- 优化了图标与文字的对齐和间距 -->
|
||||||
<filePage :catalogueId="item.id"></filePage>
|
<div v-for="(item, i) of FolderList" :key="i" :class="{ active: currentActive === i }" @click="handleClick(item, i)" class="category-item">
|
||||||
</div>
|
<el-icon :size="20" class="folder-icon">
|
||||||
</el-tab-pane>
|
<Folder />
|
||||||
</el-tabs>
|
</el-icon>
|
||||||
|
<span class="folder-name">
|
||||||
|
{{ item.catalogueName }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="boxs">
|
||||||
|
<filePage :catalogueId="catalogueId" ref="filePageRef"></filePage>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="DataCollectionForm" lang="ts">
|
<script setup name="DataCollectionForm" lang="ts">
|
||||||
import { ref, reactive, computed, onMounted } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import type { TabsPaneContext, TabsInstance } from 'element-plus';
|
|
||||||
import { collectCatalogueList } from '@/api/design/condition';
|
import { collectCatalogueList } from '@/api/design/condition';
|
||||||
import filePage from './comm/filePage.vue';
|
import filePage from './comm/filePage.vue';
|
||||||
const tabPosition = ref<TabsInstance['tabPosition']>('left');
|
const filePageRef = ref<typeof filePage | null>(null);
|
||||||
const activeName = ref('');
|
const activeName = ref('');
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取当前选中的项目
|
// 从 store 中获取当前选中的项目
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
const FolderList = ref([]);
|
const FolderList = ref([]);
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const catalogueId = ref(0);
|
||||||
console.log(tab, event);
|
|
||||||
};
|
|
||||||
// 查询收资清单目录列表
|
// 查询收资清单目录列表
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
let res = await collectCatalogueList({ projectId: currentProject.value?.id });
|
let res = await collectCatalogueList({ projectId: currentProject.value?.id });
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
FolderList.value = res.rows;
|
FolderList.value = res.rows;
|
||||||
activeName.value = res.rows[0].id; //默认第一个
|
catalogueId.value = res.rows[0].id; //默认第一个
|
||||||
|
nextTick(() => {
|
||||||
|
filePageRef.value?.getInfo(catalogueId.value); //重新加载当前页
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// 当前激活项的索引
|
||||||
|
const currentActive = ref(0);
|
||||||
|
|
||||||
|
// 点击事件处理函数
|
||||||
|
const handleClick = (item, index) => {
|
||||||
|
currentActive.value = index;
|
||||||
|
catalogueId.value = item.id;
|
||||||
|
nextTick(() => {
|
||||||
|
filePageRef.value?.getInfo(item.id); //重新加载当前页
|
||||||
|
});
|
||||||
|
};
|
||||||
// 页面挂载时初始化数据
|
// 页面挂载时初始化数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
@ -43,8 +61,96 @@ onMounted(() => {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.condition {
|
.condition {
|
||||||
|
display: flex;
|
||||||
.el-tabs__header {
|
.el-tabs__header {
|
||||||
height: 84vh !important;
|
height: 90vh !important;
|
||||||
|
}
|
||||||
|
.file-category {
|
||||||
|
width: 200px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
/* 移除固定宽度,让容器根据内容自适应 */
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
/* 限制最大宽度,防止内容过长 */
|
||||||
|
/* max-width: 200px; */
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-category > div {
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 8px 12px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: flex;
|
||||||
|
/* 文本不换行,确保宽度由内容决定 */
|
||||||
|
white-space: nowrap;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
> span {
|
||||||
|
margin-left: 6px;
|
||||||
|
/* color: #676767;
|
||||||
|
font-size: 18px; */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-category {
|
||||||
|
width: 200px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-right: 10px;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分类项样式优化
|
||||||
|
.category-item {
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 10px 12px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
border-radius: 6px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center; /* 垂直居中对齐 */
|
||||||
|
white-space: nowrap;
|
||||||
|
transition: all 0.25s ease;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #334155;
|
||||||
|
line-height: 1; /* 确保行高一致 */
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #f1f5f9;
|
||||||
|
transform: translateX(2px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 图标样式
|
||||||
|
.folder-icon {
|
||||||
|
color: #94a3b8;
|
||||||
|
transition: color 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 文件夹名称样式
|
||||||
|
.folder-name {
|
||||||
|
margin-left: 8px; /* 增加图标与文字间距 */
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: calc(100% - 30px); /* 限制最大宽度,防止溢出 */
|
||||||
|
}
|
||||||
|
|
||||||
|
// 活跃状态样式
|
||||||
|
.category-item.active {
|
||||||
|
background-color: #eff6ff;
|
||||||
|
color: #2563eb;
|
||||||
|
font-weight: 500;
|
||||||
|
|
||||||
|
.folder-icon {
|
||||||
|
color: #2563eb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.boxs {
|
||||||
|
width: calc(100% - 220px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -44,10 +44,11 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
<el-table v-loading="loading" :data="designChangeList">
|
<el-table v-loading="loading" :data="designChangeList">
|
||||||
|
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||||
<el-table-column label="申请单编号" align="center" prop="formNo" width="150" />
|
<el-table-column label="申请单编号" align="center" prop="formNo" width="150" />
|
||||||
<el-table-column label="工程名称" align="center" prop="projectName" width="150" />
|
<el-table-column label="工程名称" align="center" prop="projectName" width="150" />
|
||||||
<el-table-column label="提出单位" align="center" prop="submitUnit" width="150" />
|
<el-table-column label="提出单位" align="center" prop="submitUnit" width="150" />
|
||||||
<el-table-column label="专业" align="center" prop="specialty" width="120" />
|
<el-table-column label="专业" align="center" prop="specialtyName" width="120" />
|
||||||
<el-table-column label="提出日期" align="center" prop="submitDate" width="150">
|
<el-table-column label="提出日期" align="center" prop="submitDate" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.submitDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.submitDate, '{y}-{m}-{d}') }}</span>
|
||||||
@ -78,21 +79,22 @@
|
|||||||
</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="340">
|
<el-table-column label="操作" fixed="right" width="300">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" link icon="Upload" @click="handleAddChange(scope.row)" v-if="!scope.row.fileId">上传</el-button>
|
<el-button type="primary" link icon="Upload" @click="handleAddChange(scope.row)" v-if="!scope.row.fileId">上传</el-button>
|
||||||
<el-button type="success" link icon="View" @click="handleViewInfo(scope.row)">查看</el-button>
|
<el-button type="success" link icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)">查看</el-button>
|
||||||
<el-button type="success" link icon="View" @click="handleViewDetail(scope.row)">通知单</el-button>
|
<el-button type="success" link 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> -->
|
||||||
|
<el-button type="warning" link icon="View" v-if="scope.row.status != 'draft'" @click="handleViewHistory(scope.row)">查看单据</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
<wordDetial ref="wordDetialRef"></wordDetial>
|
<wordDetial ref="wordDetialRef"></wordDetial>
|
||||||
<el-dialog title="文件列表" v-model="viewVisible" width="500px">
|
<el-dialog draggable title="文件列表" v-model="viewVisible" width="500px">
|
||||||
<el-table v-if="fileList.length > 0" :data="fileList" style="width: 100%" border>
|
<el-table v-if="fileList.length > 0" :data="fileList" style="width: 100%" border>
|
||||||
<el-table-column prop="fileName" label="文件名称" align="center">
|
<el-table-column prop="fileName" label="文件名称" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -120,6 +122,9 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="单据" v-model="viewDetailVisible" width="800px">
|
||||||
|
<histroy ref="histroyRef"></histroy>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -128,7 +133,7 @@ import { listDesignChange, delDesignChange } from '@/api/design/designChange';
|
|||||||
import { DesignChangeVO } from '@/api/design/designChange/types';
|
import { DesignChangeVO } from '@/api/design/designChange/types';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
import wordDetial from '@/components/wordDetial/index';
|
import wordDetial from '@/components/wordDetial/index';
|
||||||
|
import histroy from '../volumeCatalog/comm/histroy.vue';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
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'));
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
@ -137,11 +142,9 @@ const userStore = useUserStoreHook();
|
|||||||
const currentProject = computed(() => userStore.selectedProject);
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
const designChangeList = ref<DesignChangeVO[]>([]);
|
const designChangeList = ref<DesignChangeVO[]>([]);
|
||||||
const wordDetialRef = ref<InstanceType<typeof wordDetial>>();
|
const wordDetialRef = ref<InstanceType<typeof wordDetial>>();
|
||||||
|
const histroyRef = ref<InstanceType<typeof histroy>>();
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
const ids = ref<Array<string | number>>([]);
|
|
||||||
const single = ref(true);
|
|
||||||
const multiple = ref(true);
|
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
@ -151,6 +154,7 @@ const uploadUrl = computed(() => {
|
|||||||
const viewVisible = ref(false);
|
const viewVisible = ref(false);
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
const ossid = ref(null);
|
const ossid = ref(null);
|
||||||
|
const viewDetailVisible = ref(false);
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -182,7 +186,6 @@ const getList = async () => {
|
|||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
const handleQuery = () => {
|
const handleQuery = () => {
|
||||||
console.log(ossid.value);
|
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
@ -192,7 +195,7 @@ const resetQuery = () => {
|
|||||||
queryFormRef.value?.resetFields();
|
queryFormRef.value?.resetFields();
|
||||||
handleQuery();
|
handleQuery();
|
||||||
};
|
};
|
||||||
/** 新增按钮操作 */
|
/** 下发通知 */
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
@ -202,7 +205,7 @@ const handleAdd = () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/** 新增按钮操作 */
|
/** 查看详情 */
|
||||||
const handleViewDetail = (row) => {
|
const handleViewDetail = (row) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
@ -213,7 +216,7 @@ const handleViewDetail = (row) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 变更图纸
|
// 上传变更图纸
|
||||||
const handleAddChange = (row) => {
|
const handleAddChange = (row) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
@ -224,7 +227,7 @@ const handleAddChange = (row) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/** 查看按钮操作 */
|
/** 查看流程操作 */
|
||||||
const handleViewInfo = (row) => {
|
const handleViewInfo = (row) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.push({
|
proxy.$router.push({
|
||||||
@ -240,9 +243,12 @@ const handleDesignView = async (row?: DesignChangeVO) => {
|
|||||||
fileList.value = row.ossVoList;
|
fileList.value = row.ossVoList;
|
||||||
viewVisible.value = true;
|
viewVisible.value = true;
|
||||||
};
|
};
|
||||||
const handleView = (row) => {
|
const handleViewHistory = async (row) => {
|
||||||
// 查看详情
|
// 查看历史流程记录
|
||||||
wordDetialRef.value?.openDialog(row, design_change_reason_type.value);
|
viewDetailVisible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
histroyRef.value?.getList(row.id);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
// 预览
|
// 预览
|
||||||
const onOpen = (path: string) => {
|
const onOpen = (path: string) => {
|
||||||
|
@ -2,9 +2,14 @@
|
|||||||
<div class="p-4 bg-gray-50 designChangeForm">
|
<div class="p-4 bg-gray-50 designChangeForm">
|
||||||
<div class="max-w-4xl mx-auto">
|
<div class="max-w-4xl mx-auto">
|
||||||
<!-- 表单区域 -->
|
<!-- 表单区域 -->
|
||||||
|
<div v-if="routeParams.type == 'view'" style="width: 100%; text-align: right; margin-bottom: 10px">
|
||||||
|
<el-button @click="goBack" size="large" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
|
||||||
|
>返回</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<el-card class="rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md overflow-hidden">
|
<el-card class="rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md overflow-hidden">
|
||||||
<div class="p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100">
|
<div class="p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100">
|
||||||
<h3 class="text-lg font-semibold text-gray-800">设计变更信息</h3>
|
<h3 class="text-lg font-semibold text-gray-800">下发变更通知信息</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-6">
|
<div class="p-6">
|
||||||
<el-form ref="leaveFormRef" :disabled="routeParams.type === 'view'" :model="form" :rules="rules" label-width="100px" class="space-y-4">
|
<el-form ref="leaveFormRef" :disabled="routeParams.type === 'view'" :model="form" :rules="rules" label-width="100px" class="space-y-4">
|
||||||
@ -44,8 +49,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="专业" prop="specialty">
|
<el-form-item label="专业" prop="specialtyName">
|
||||||
<el-input disabled v-model="form.specialty" placeholder="请输入专业" />
|
<el-input disabled v-model="form.specialtyName" placeholder="请输入专业" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -143,7 +148,11 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-center gap-4 mt-8">
|
<div class="flex justify-center gap-4 mt-8">
|
||||||
<el-button @click="goBack" size="large" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
|
<el-button
|
||||||
|
v-if="routeParams.type != 'view'"
|
||||||
|
@click="goBack"
|
||||||
|
size="large"
|
||||||
|
class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
|
||||||
>返回</el-button
|
>返回</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
@ -191,6 +200,7 @@ const initFormData = {
|
|||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
submitUnit: undefined,
|
submitUnit: undefined,
|
||||||
specialty: undefined,
|
specialty: undefined,
|
||||||
|
specialtyName: undefined,
|
||||||
submitDate: undefined,
|
submitDate: undefined,
|
||||||
volumeName: undefined,
|
volumeName: undefined,
|
||||||
volumeNo: undefined,
|
volumeNo: undefined,
|
||||||
@ -279,6 +289,7 @@ const handleSelect = (val) => {
|
|||||||
fileVoList.value = obj.fileVoList;
|
fileVoList.value = obj.fileVoList;
|
||||||
form.value.volumeName = obj.volumeName;
|
form.value.volumeName = obj.volumeName;
|
||||||
form.value.specialty = obj.specialty;
|
form.value.specialty = obj.specialty;
|
||||||
|
form.value.specialtyName = obj.specialtyName;
|
||||||
form.value.extendDetail.subName = obj.designSubitem;
|
form.value.extendDetail.subName = obj.designSubitem;
|
||||||
};
|
};
|
||||||
/** 获取详情 */
|
/** 获取详情 */
|
||||||
|
@ -1,32 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-table v-loading="loading" :data="drawingList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="drawingList">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="index" label="序号" width="80" align="center" />
|
||||||
<!-- <el-table-column label="版本号" align="center" prop="versionNumber" width="100" />
|
|
||||||
<el-table-column label="文件名称" align="center" prop="fileName">
|
|
||||||
<template #default="scope">
|
|
||||||
<span style="color: #409eff" @click="handleView(scope.row)">{{ scope.row.fileName }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="图纸类型" align="center" prop="fileType" width="100">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="drawing_file_type" :value="scope.row.fileType" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="原文件名" align="center" prop="originalName" />
|
|
||||||
<el-table-column label="是否最新" align="center" prop="newest">
|
|
||||||
<template #default="scope">
|
|
||||||
<div>
|
|
||||||
<el-tag type="primary" v-if="scope.row.newest == '1'">是</el-tag>
|
|
||||||
<el-tag type="success" v-else>否</el-tag>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="流程状态" min-width="70">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="wf_business_status" :value="scope.row.status"></dict-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="上传时间" align="center" prop="createTime" /> -->
|
|
||||||
<el-table-column label="子项名称" align="center" prop="designSubitem" />
|
<el-table-column label="子项名称" align="center" prop="designSubitem" />
|
||||||
<el-table-column label="专业" align="center" prop="specialty">
|
<el-table-column label="专业" align="center" prop="specialty">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -43,39 +17,33 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding " width="240">
|
<el-table-column label="操作" align="center" class-name="small-padding " width="240">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-col :span="1.5">
|
<el-button v-hasPermi="['design:drawing:remove']" size="small" type="primary" icon="Download" @click="handleDownload(scope.row)"
|
||||||
<el-button v-hasPermi="['design:drawing:remove']" size="small" type="primary" icon="Download" @click="handleDownload(scope.row)"
|
>下载</el-button
|
||||||
>下载</el-button
|
>
|
||||||
>
|
<el-button size="small" type="primary" icon="view" @click="handleViewHis(scope.row)">查阅记录</el-button>
|
||||||
</el-col>
|
|
||||||
<!-- <el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
|
|
||||||
<el-button v-hasPermi="['design:drawing:edit']" size="small" type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5" v-if="scope.row.status === 'draft' || scope.row.status === 'cancel' || scope.row.status === 'back'">
|
|
||||||
<el-button v-hasPermi="['design:drawing:remove']" size="small" type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" size="small" icon="View" v-if="scope.row.status != 'draft'" @click="handleViewInfo(scope.row)">查看</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5" v-if="scope.row.status === 'waiting'">
|
|
||||||
<el-button size="small" type="primary" icon="Notification" @click="handleCancelProcessApply(scope.row.id)">撤销</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-dialog draggable title="文件列表" v-model="viewVisible" width="500px">
|
||||||
|
<el-table :data="histroyList" style="width: 100%" border>
|
||||||
|
<el-table-column type="index" label="序号" align="center" width="80"> </el-table-column>
|
||||||
|
<el-table-column prop="userName" label="用户名称" align="center"> </el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="查阅时间" align="center"> </el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<template #footer>
|
||||||
|
<span>
|
||||||
|
<el-button type="primary" @click="viewVisible = false">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, defineProps, defineEmits } from 'vue';
|
import { ref, defineProps, defineEmits } from 'vue';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
import { volumeFileViewer, volumeFileViewerList } from '@/api/design/drawing';
|
||||||
|
|
||||||
const { design_state, wf_business_status, des_user_major } = toRefs(proxy?.useDict('design_state', 'wf_business_status', 'des_user_major'));
|
const { des_user_major } = toRefs(proxy?.useDict('des_user_major'));
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
drawingList: {
|
drawingList: {
|
||||||
@ -95,6 +63,8 @@ const props = defineProps({
|
|||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const viewVisible = ref(false);
|
||||||
|
const histroyList = ref([]);
|
||||||
|
|
||||||
const emits = defineEmits(['selection-change', 'view', 'update', 'delete', 'view-info', 'cancel-process-apply']);
|
const emits = defineEmits(['selection-change', 'view', 'update', 'delete', 'view-info', 'cancel-process-apply']);
|
||||||
|
|
||||||
@ -121,8 +91,19 @@ const handleViewInfo = (row) => {
|
|||||||
const handleCancelProcessApply = (id) => {
|
const handleCancelProcessApply = (id) => {
|
||||||
emits('cancel-process-apply', id);
|
emits('cancel-process-apply', id);
|
||||||
};
|
};
|
||||||
|
const handleViewHis = async (row) => {
|
||||||
|
viewVisible.value = true;
|
||||||
|
let res = await volumeFileViewerList(row.volumeFileId);
|
||||||
|
if (res.code == 200) {
|
||||||
|
histroyList.value = res.rows;
|
||||||
|
}
|
||||||
|
};
|
||||||
const handleDownload = (row) => {
|
const handleDownload = (row) => {
|
||||||
|
getCheck(row);
|
||||||
proxy?.$download.oss(row.fileUrl);
|
proxy?.$download.oss(row.fileUrl);
|
||||||
};
|
};
|
||||||
|
// 调用查阅接口
|
||||||
|
const getCheck = async (row) => {
|
||||||
|
volumeFileViewer({ volumeFileId: row.volumeFileId });
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,11 +7,6 @@
|
|||||||
<el-form-item label="文件名称" prop="fileName">
|
<el-form-item label="文件名称" prop="fileName">
|
||||||
<el-input v-model="queryParams.fileName" placeholder="请输入文件名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.fileName" placeholder="请输入文件名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="文件类型" prop="fileType">
|
|
||||||
<el-select v-model="queryParams.fileType" placeholder="请选择文件类型" clearable>
|
|
||||||
<el-option v-for="dict in drawing_file_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="原文件名" prop="originalName">
|
<el-form-item label="原文件名" prop="originalName">
|
||||||
<el-input v-model="queryParams.originalName" placeholder="请输入原文件名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.originalName" placeholder="请输入原文件名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -32,56 +27,9 @@
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['design:drawing:add']">上传图纸</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
<!-- <el-tabs type="border-card" v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
|
||||||
<el-tab-pane label="过程图纸" name="1">
|
|
||||||
<DrawingTable
|
|
||||||
:drawingList="drawingList"
|
|
||||||
:loading="loading"
|
|
||||||
:drawing_file_type="drawing_file_type"
|
|
||||||
:wf_business_status="wf_business_status"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@view="handleView"
|
|
||||||
@update="handleUpdate"
|
|
||||||
@delete="handleDelete"
|
|
||||||
@view-info="handleViewInfo"
|
|
||||||
@cancel-process-apply="handleCancelProcessApply"
|
|
||||||
/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="蓝图" name="2">
|
|
||||||
<DrawingTable
|
|
||||||
:drawingList="drawingList"
|
|
||||||
:loading="loading"
|
|
||||||
:drawing_file_type="drawing_file_type"
|
|
||||||
:wf_business_status="wf_business_status"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@view="handleView"
|
|
||||||
@update="handleUpdate"
|
|
||||||
@delete="handleDelete"
|
|
||||||
@view-info="handleViewInfo"
|
|
||||||
@cancel-process-apply="handleCancelProcessApply"
|
|
||||||
/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="变更图纸" name="3">
|
|
||||||
<DrawingTable
|
|
||||||
:drawingList="drawingList"
|
|
||||||
:loading="loading"
|
|
||||||
:drawing_file_type="drawing_file_type"
|
|
||||||
:wf_business_status="wf_business_status"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@view="handleView"
|
|
||||||
@update="handleUpdate"
|
|
||||||
@delete="handleDelete"
|
|
||||||
@view-info="handleViewInfo"
|
|
||||||
@cancel-process-apply="handleCancelProcessApply"
|
|
||||||
/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs> -->
|
|
||||||
<DrawingTable
|
<DrawingTable
|
||||||
:drawingList="drawingList"
|
:drawingList="drawingList"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@ -168,17 +116,6 @@ const handleSelectionChange = (selection: DrawingVO[]) => {
|
|||||||
multiple.value = !selection.length;
|
multiple.value = !selection.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
const handleAdd = () => {
|
|
||||||
proxy.$tab.closePage(proxy.$route);
|
|
||||||
proxy.$router.push({
|
|
||||||
path: `/design-management/drawing/indexEdit`,
|
|
||||||
query: {
|
|
||||||
type: 'add'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: DrawingVO) => {
|
const handleUpdate = async (row?: DrawingVO) => {
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<el-form ref="leaveFormRef" :disabled="routeParams.type === 'view'" :model="form" :rules="rules" label-width="100px" class="space-y-4">
|
<el-form ref="leaveFormRef" :disabled="routeParams.type === 'view'" :model="form" :rules="rules" label-width="100px" class="space-y-4">
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<el-form-item label="图纸文件" prop="fileId" class="mb-2 md:col-span-2">
|
<el-form-item label="图纸文件" prop="fileId" class="mb-2 md:col-span-2">
|
||||||
<file-upload :limit="10" :fileSize="100" v-model="form.fileId" class="w-full"></file-upload>
|
<file-upload :fileType="['pdf']" :fileSize="''" v-model="form.fileId" class="w-full"></file-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
<el-form-item label="校审时间" prop="proofreadingDate">
|
<el-form-item label="校审时间" prop="proofreadingDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.proofreadingDate"
|
v-model="formData.proofreadingDate"
|
||||||
type="datetime"
|
type="date"
|
||||||
placeholder="选择校审时间"
|
placeholder="选择校审时间"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
@ -100,7 +100,7 @@
|
|||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="审核时间" prop="auditDate">
|
<el-form-item label="审核时间" prop="auditDate">
|
||||||
<el-date-picker v-model="formData.auditDate" type="datetime" placeholder="选择审核时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
|
<el-date-picker v-model="formData.auditDate" type="date" placeholder="选择审核时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -115,13 +115,7 @@
|
|||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="执行时间" prop="executorDate">
|
<el-form-item label="执行时间" prop="executorDate">
|
||||||
<el-date-picker
|
<el-date-picker v-model="formData.executorDate" type="date" placeholder="选择执行时间" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
|
||||||
v-model="formData.executorDate"
|
|
||||||
type="datetime"
|
|
||||||
placeholder="选择执行时间"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -42,6 +42,15 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
v-if="scope.row.status !== 'draft'"
|
||||||
|
icon="Edit"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['design:PrelimScheme:edit']"
|
||||||
|
>查看流程</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -198,14 +207,12 @@ const handleDelete = async (row?: PrelimSchemeVO) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = () => {
|
const handleView = (row?: PrelimSchemeVO) => {
|
||||||
proxy?.download(
|
proxy.$tab.closePage(route);
|
||||||
'design/scheme/export',
|
proxy.$tab.openPage(`/design-management/prelimScheme/indexEdit`, '', {
|
||||||
{
|
id: row.id,
|
||||||
...queryParams.value
|
type: 'view'
|
||||||
},
|
});
|
||||||
`scheme_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -42,6 +42,15 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
v-if="scope.row.status !== 'draft'"
|
||||||
|
icon="Edit"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['design:PrelimScheme:edit']"
|
||||||
|
>查看流程</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -196,15 +205,12 @@ const handleDelete = async (row?: SchemeVO) => {
|
|||||||
await getList();
|
await getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
const handleView = (row?: SchemeVO) => {
|
||||||
const handleExport = () => {
|
proxy.$tab.closePage(route);
|
||||||
proxy?.download(
|
proxy.$tab.openPage(`/design-management/scheme/indexEdit`, '', {
|
||||||
'design/scheme/export',
|
id: row.id,
|
||||||
{
|
type: 'view'
|
||||||
...queryParams.value
|
});
|
||||||
},
|
|
||||||
`scheme_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
253
src/views/design/volumeCatalog/comm/histroy.vue
Normal file
253
src/views/design/volumeCatalog/comm/histroy.vue
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
<template>
|
||||||
|
<div class="volume-catalog-container">
|
||||||
|
<div class="history-selector">
|
||||||
|
<span>选择历史退回记录:</span>
|
||||||
|
<el-select v-model="hisId" placeholder="请选择" style="width: 240px" @change="handleShowInfo">
|
||||||
|
<el-option v-for="item in hisList" :key="item.id" :label="item.createTime" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="volumeCatalog_box" style="margin-top: 20px">
|
||||||
|
<!-- <span style="color: #0d9df5">查看excel文件</span> -->
|
||||||
|
<div class="table-content" id="table-content" style="margin-top: 20px">
|
||||||
|
<el-row class="mb20" style="display: flex; justify-content: center">
|
||||||
|
<h2>设计验证表</h2>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row class="mb10" style="display: flex; justify-content: space-between">
|
||||||
|
<div class="head-text">
|
||||||
|
<span>编号:</span>
|
||||||
|
<span>{{ examineForm.num }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="head-text"></div>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<table style="width: 100%" border="1" cellspacing="1">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">工程名称</th>
|
||||||
|
<td class="th-bg" colspan="10">{{ examineForm.projectName }}</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">子项名称</th>
|
||||||
|
<td class="th-bg" colspan="6">{{ examineForm.subprojectName }}</td>
|
||||||
|
<th colspan="2">设计阶段</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ examineForm.stage }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">专业</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ examineForm.professional }}</td>
|
||||||
|
<th colspan="2">卷册</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ examineForm.volume }}</td>
|
||||||
|
<th colspan="2">设计人</th>
|
||||||
|
<td class="th-bg" colspan="2">{{ examineForm.designer }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">验证内容</th>
|
||||||
|
<td class="th-bg" colspan="10">{{ examineForm.verificationContent }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="6">验证意见</th>
|
||||||
|
<th class="th-bg" colspan="6">执行意见</th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6">
|
||||||
|
<div style="height: 400px; padding: 8px; box-sizing: border-box">
|
||||||
|
{{ examineForm.verificationOpinion }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="th-bg" colspan="6">
|
||||||
|
<div style="height: 400px; padding: 8px; box-sizing: border-box">
|
||||||
|
{{ examineForm.executionOpinion }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td colspan="6">
|
||||||
|
<div style="display: flex; align-items: center; justify-content: space-between; padding: 8px">
|
||||||
|
<span>校审: {{ examineForm.proofreading }}</span>
|
||||||
|
<span>{{ dateFormat(examineForm.proofreadingDate) }}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td rowspan="2" colspan="6" class="th-bg">
|
||||||
|
<div style="padding: 8px">执行人: {{ examineForm.executor }}</div>
|
||||||
|
<div style="display: flex; align-items: center; justify-content: flex-end; padding: 8px">
|
||||||
|
{{ dateFormat(examineForm.executorDate) }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="th-bg" colspan="6">
|
||||||
|
<div style="display: flex; align-items: center; justify-content: space-between; padding: 8px">
|
||||||
|
<span>审核: {{ examineForm.audit }}</span>
|
||||||
|
<span>{{ dateFormat(examineForm.auditDate) }}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="VolumeCatalog" lang="ts">
|
||||||
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
|
import { ElSelect, ElOption, ElRow } from 'element-plus';
|
||||||
|
import { drawingreviewReceiptsDetail, drawingreviewReceiptsList } from '@/api/design/drawingreview';
|
||||||
|
|
||||||
|
// 定义历史记录项类型
|
||||||
|
interface HistoryItem {
|
||||||
|
id: string | number;
|
||||||
|
createTime: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 定义表单数据类型
|
||||||
|
interface ExamineForm {
|
||||||
|
num: string;
|
||||||
|
projectName: string;
|
||||||
|
subprojectName: string;
|
||||||
|
stage: string;
|
||||||
|
professional: string;
|
||||||
|
volume: string;
|
||||||
|
designer: string;
|
||||||
|
verificationContent: string;
|
||||||
|
verificationOpinion: string;
|
||||||
|
executionOpinion: string;
|
||||||
|
proofreading: string;
|
||||||
|
proofreadingDate: string | Date | null;
|
||||||
|
executor: string;
|
||||||
|
executorDate: string | Date | null;
|
||||||
|
audit: string;
|
||||||
|
auditDate: string | Date | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 响应式变量
|
||||||
|
const hisId = ref<string | number>('');
|
||||||
|
const hisList = ref<HistoryItem[]>([]);
|
||||||
|
|
||||||
|
const examineForm = reactive<ExamineForm>({
|
||||||
|
num: '',
|
||||||
|
projectName: '',
|
||||||
|
subprojectName: '',
|
||||||
|
stage: '',
|
||||||
|
professional: '',
|
||||||
|
volume: '',
|
||||||
|
designer: '',
|
||||||
|
verificationContent: '',
|
||||||
|
verificationOpinion: '',
|
||||||
|
executionOpinion: '',
|
||||||
|
proofreading: '',
|
||||||
|
proofreadingDate: null,
|
||||||
|
executor: '',
|
||||||
|
executorDate: null,
|
||||||
|
audit: '',
|
||||||
|
auditDate: null
|
||||||
|
});
|
||||||
|
|
||||||
|
// 处理历史记录选择变化
|
||||||
|
const handleShowInfo = async (value: string | number) => {
|
||||||
|
getDetails(value);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 日期格式化方法
|
||||||
|
const dateFormat = (date: string | Date | null): string => {
|
||||||
|
if (!date) return '';
|
||||||
|
|
||||||
|
// 处理字符串类型的日期
|
||||||
|
if (typeof date === 'string') {
|
||||||
|
date = new Date(date);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查日期是否有效
|
||||||
|
if (isNaN(date.getTime())) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
const year = date.getFullYear();
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
const hours = String(date.getHours()).padStart(2, '0');
|
||||||
|
const minutes = String(date.getMinutes()).padStart(2, '0');
|
||||||
|
|
||||||
|
return `${year}-${month}-${day} ${hours}:${minutes}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取详情
|
||||||
|
const getList = async (drawingreviewId) => {
|
||||||
|
let res = await drawingreviewReceiptsList({ drawingreviewId });
|
||||||
|
hisList.value = res.rows;
|
||||||
|
if (hisList.value.length > 0) {
|
||||||
|
hisId.value = hisList.value[0].id;
|
||||||
|
getDetails(hisId.value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const getDetails = async (id) => {
|
||||||
|
let res = await drawingreviewReceiptsDetail(id);
|
||||||
|
Object.assign(examineForm, res.data);
|
||||||
|
};
|
||||||
|
// 抛出
|
||||||
|
defineExpose({ getList });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.volume-catalog-container {
|
||||||
|
padding: 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
table {
|
||||||
|
border-collapse: collapse; //合并为一个单一的边框
|
||||||
|
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
||||||
|
}
|
||||||
|
thead {
|
||||||
|
tr {
|
||||||
|
th {
|
||||||
|
background-color: rgba(247, 247, 247, 1); //设置表格标题背景色
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.th-bg {
|
||||||
|
background-color: rgba(247, 247, 247, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
td {
|
||||||
|
text-align: left;
|
||||||
|
height: 40px; //设置单元格最小高度
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
height: 35px; //设置单元格最小高度
|
||||||
|
text-align: center;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.table-content {
|
||||||
|
box-shadow: 0px 0px 10px #ddd;
|
||||||
|
padding: 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -46,18 +46,15 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
<el-table v-loading="loading" :data="volumeCatalogList">
|
<el-table v-loading="loading" :data="volumeCatalogList">
|
||||||
|
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||||
<el-table-column label="子项名称" align="center" prop="designSubitem" />
|
<el-table-column label="子项名称" align="center" prop="designSubitem" />
|
||||||
<el-table-column label="设计状态" align="center" prop="designState">
|
<el-table-column label="设计状态" align="center" prop="designState">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="design_state" :value="scope.row.designState" />
|
<dict-tag :options="design_state" :value="scope.row.designState" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="专业" align="center" prop="specialty">
|
<el-table-column label="专业" align="center" prop="specialtyName"> </el-table-column>
|
||||||
<template #default="scope">
|
<el-table-column label="设计人员" align="center" prop="principalName" />
|
||||||
<dict-tag :options="des_user_major" :value="scope.row.specialty" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="设计人员" align="center" prop="principal" />
|
|
||||||
<el-table-column label="卷册号" align="center" prop="volumeNumber" />
|
<el-table-column label="卷册号" align="center" prop="volumeNumber" />
|
||||||
<el-table-column label="资料名称" align="center" prop="documentName" />
|
<el-table-column label="资料名称" align="center" prop="documentName" />
|
||||||
<el-table-column label="计划出图时间" align="center" prop="plannedCompletion" width="200" />
|
<el-table-column label="计划出图时间" align="center" prop="plannedCompletion" width="200" />
|
||||||
@ -109,12 +106,12 @@
|
|||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="View"
|
icon="View"
|
||||||
v-if="scope.row.auditStatus != 'draft' && scope.row.auditStatus != 'finish'"
|
v-if="scope.row.auditStatus != 'draft'"
|
||||||
@click="handleAuditView(scope.row)"
|
@click="handleAuditView(scope.row)"
|
||||||
v-hasPermi="['out:monthPlan:remove']"
|
v-hasPermi="['out:monthPlan:remove']"
|
||||||
>查看流程</el-button
|
>查看流程</el-button
|
||||||
>
|
>
|
||||||
<el-button type="warning" link size="small" icon="View" v-if="scope.row.auditType != 'draft'" @click="handleViewHistory(scope.row)"
|
<el-button type="warning" link icon="View" v-if="scope.row.auditType != 'draft'" @click="handleViewHistory(scope.row)"
|
||||||
>查看单据</el-button
|
>查看单据</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@ -134,7 +131,9 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设计人员" prop="principal">
|
<el-form-item label="设计人员" prop="principal">
|
||||||
<el-input v-model="form.principal" placeholder="请输入设计人员" />
|
<el-select v-model="form.principal" placeholder="请选择设计人员" class="transition-all duration-300 border-gray-300">
|
||||||
|
<el-option v-for="item in userAppList" :key="item.userId" :label="item.userName" :value="item.userId" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设计状态" prop="designState">
|
<el-form-item label="设计状态" prop="designState">
|
||||||
<el-select v-model="form.designState" placeholder="请选择设计状态">
|
<el-select v-model="form.designState" placeholder="请选择设计状态">
|
||||||
@ -164,7 +163,7 @@
|
|||||||
<el-dialog draggable title="上传图纸卷册文件" v-model="uploadVisible" width="500px" append-to-body>
|
<el-dialog draggable title="上传图纸卷册文件" v-model="uploadVisible" width="500px" append-to-body>
|
||||||
<el-form :model="uploadForm" label-width="80px" :inline="false">
|
<el-form :model="uploadForm" label-width="80px" :inline="false">
|
||||||
<el-form-item label="上传文件" prop="fileId">
|
<el-form-item label="上传文件" prop="fileId">
|
||||||
<file-upload v-model="uploadForm.fileId"></file-upload>
|
<file-upload :fileType="['pdf']" :fileSize="''" v-model="uploadForm.fileId"></file-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit" :loading="buttonLoading">确定</el-button>
|
<el-button type="primary" @click="onSubmit" :loading="buttonLoading">确定</el-button>
|
||||||
@ -173,7 +172,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 查看文件列表 -->
|
<!-- 查看文件列表 -->
|
||||||
<el-dialog title="文件列表" v-model="viewVisible" width="45%">
|
<el-dialog draggable title="文件列表" v-model="viewVisible" width="45%">
|
||||||
<el-table v-if="fileList.length > 0" :data="fileList" style="width: 100%" border>
|
<el-table v-if="fileList.length > 0" :data="fileList" style="width: 100%" border>
|
||||||
<el-table-column prop="fileName" label="文件" align="center">
|
<el-table-column prop="fileName" label="文件" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -188,12 +187,12 @@
|
|||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="size" label="是否变更" align="center">
|
<el-table-column prop="size" label="是否变更" align="center" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag :type="scope.row.type == 1 ? 'success' : 'info'">{{ scope.row.type == 1 ? '否' : '是' }}</el-tag>
|
<el-tag :type="scope.row.type == 1 ? 'success' : 'info'">{{ scope.row.type == 1 ? '否' : '是' }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="size" label="状态" width="170" align="center">
|
<el-table-column prop="size" label="状态" width="120" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag :type="scope.row.status == 1 ? 'success' : 'info'">{{ scope.row.status == 1 ? '使用中' : '已作废' }}</el-tag>
|
<el-tag :type="scope.row.status == 1 ? 'success' : 'info'">{{ scope.row.status == 1 ? '使用中' : '已作废' }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
@ -211,100 +210,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog draggable title="查看历史" v-model="dialogHistory" width="800px" append-to-body>
|
<el-dialog draggable title="单据" v-model="dialogHistory" width="800px">
|
||||||
<div>
|
<histroy ref="histroyRef"></histroy>
|
||||||
<span>选择历史退回记录:</span>
|
|
||||||
<el-select v-model="hisId" placeholder="请选择" style="width: 240px" @change="handleShowInfo">
|
|
||||||
<el-option v-for="item in hisList" :key="item.id" :label="item.createTime" :value="item.id" />
|
|
||||||
</el-select>
|
|
||||||
<div style="margin-top: 20px" class="volumeCatalog_box">
|
|
||||||
<span style="color: #0d9df5">查看excel文件</span>
|
|
||||||
<div style="margin-top: 20px" class="table-content" id="table-content">
|
|
||||||
<el-row class="mb20" style="display: flex; justify-content: center">
|
|
||||||
<h2>设计验证表</h2>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="mb10" style="display: flex; justify-content: space-between">
|
|
||||||
<div class="head-text">
|
|
||||||
<span>编号:</span>
|
|
||||||
<span>{{ examineForm.num }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="head-text"></div>
|
|
||||||
</el-row>
|
|
||||||
<table style="width: 100%" border="1" cellspacing="1">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">工程名称</th>
|
|
||||||
<td class="th-bg" colspan="10">{{ examineForm.projectName }}</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">子项名称</th>
|
|
||||||
<td class="th-bg" colspan="6">{{ examineForm.subprojectName }}</td>
|
|
||||||
<th colspan="2">设计阶段</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ examineForm.stage }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">专业</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ examineForm.professional }}</td>
|
|
||||||
<th colspan="2">卷册</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ examineForm.volume }}</td>
|
|
||||||
<th colspan="2">设计人</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ examineForm.designer }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">验证内容</th>
|
|
||||||
<td class="th-bg" colspan="10">{{ examineForm.verificationContent }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th colspan="6">验证意见</th>
|
|
||||||
<th class="th-bg" colspan="6">执行意见</th>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td colspan="6">
|
|
||||||
<div style="height: 400px">{{ examineForm.verificationOpinion }}</div>
|
|
||||||
</td>
|
|
||||||
<td class="th-bg" colspan="6">
|
|
||||||
<div style="height: 400px">{{ examineForm.executionOpinion }}</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td colspan="6">
|
|
||||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
|
||||||
<span> 校审: {{ examineForm.proofreading }} </span>
|
|
||||||
<span> {{ dateFormat(examineForm.proofreadingDate) }}</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td rowspan="2" colspan="6">
|
|
||||||
<div>执行人: {{ examineForm.executor }}</div>
|
|
||||||
<div style="display: flex; align-items: center; justify-content: flex-end">
|
|
||||||
{{ dateFormat(examineForm.executorDate) }}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="th-bg" colspan="6">
|
|
||||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
|
||||||
<span>审核 : {{ examineForm.audit }}</span>
|
|
||||||
<span> {{ dateFormat(examineForm.auditDate) }}</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -322,7 +229,9 @@ import {
|
|||||||
} from '@/api/design/volumeCatalog';
|
} from '@/api/design/volumeCatalog';
|
||||||
import { VolumeCatalogVO } from '@/api/design/volumeCatalog/types';
|
import { VolumeCatalogVO } from '@/api/design/volumeCatalog/types';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
import histroy from './comm/histroy.vue';
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
|
import { designUserList } from '@/api/design/appointment';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { design_state, wf_business_status, des_user_major } = toRefs(proxy?.useDict('design_state', 'wf_business_status', 'des_user_major'));
|
const { design_state, wf_business_status, des_user_major } = toRefs(proxy?.useDict('design_state', 'wf_business_status', 'des_user_major'));
|
||||||
import { drawingreviewReceiptsDetail, drawingreviewReceiptsList } from '@/api/design/drawingreview';
|
import { drawingreviewReceiptsDetail, drawingreviewReceiptsList } from '@/api/design/drawingreview';
|
||||||
@ -331,12 +240,11 @@ const buttonLoading = ref(false);
|
|||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
const ids = ref<Array<string | number>>([]);
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const histroyRef = ref<InstanceType<typeof histroy>>();
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const hisId = ref('');
|
|
||||||
const dialogHistory = ref(false);
|
const dialogHistory = ref(false);
|
||||||
const hisList = ref([]);
|
|
||||||
// 获取用户 store
|
// 获取用户 store
|
||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
@ -382,7 +290,7 @@ const examineForm = ref({
|
|||||||
volume: ''
|
volume: ''
|
||||||
});
|
});
|
||||||
const userList = ref([]);
|
const userList = ref([]);
|
||||||
|
const userAppList = ref([]); //人事任命的用户
|
||||||
const initFormData: any = {
|
const initFormData: any = {
|
||||||
design: undefined,
|
design: undefined,
|
||||||
projectId: currentProject.value?.id || '',
|
projectId: currentProject.value?.id || '',
|
||||||
@ -425,26 +333,26 @@ const getList = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const dateFormat = (v) => {
|
const getUserAppList = async () => {
|
||||||
if (!v) return '-';
|
const res = await designUserList({ projectId: currentProject.value?.id });
|
||||||
let time = new Date(v);
|
if (res.code === 200) {
|
||||||
let y = time.getFullYear();
|
console.log(res.rows);
|
||||||
let MM = time.getMonth() + 1;
|
|
||||||
MM = MM < 10 ? '0' + MM : MM;
|
res.rows.forEach((item: any) => {
|
||||||
let d = time.getDate();
|
if (item.userType == 2) {
|
||||||
d = d < 10 ? '0' + d : d;
|
//设计人员
|
||||||
return y + '年' + MM + '月' + d + '日';
|
userAppList.value.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const handleViewHistory = async (row) => {
|
const handleViewHistory = async (row) => {
|
||||||
// 查看历史流程记录
|
// 查看历史流程记录
|
||||||
dialogHistory.value = true;
|
dialogHistory.value = true;
|
||||||
hisId.value = '';
|
// 查看历史流程记录
|
||||||
let res = await drawingreviewReceiptsList({ drawingreviewId: row.design });
|
nextTick(() => {
|
||||||
hisList.value = res.rows;
|
histroyRef.value?.getList(row.design);
|
||||||
if (hisList.value.length > 0) {
|
});
|
||||||
hisId.value = hisList.value[0].id;
|
|
||||||
getDetails(hisId.value);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
const handleShowInfo = (val) => {
|
const handleShowInfo = (val) => {
|
||||||
getDetails(val);
|
getDetails(val);
|
||||||
@ -508,12 +416,6 @@ const handleUpload = async (row?: any) => {
|
|||||||
uploadForm.fileList = res.data.filter((item) => item.status == '1') || [];
|
uploadForm.fileList = res.data.filter((item) => item.status == '1') || [];
|
||||||
uploadVisible.value = true;
|
uploadVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 查看文件 */
|
|
||||||
const lookFile = (fileId: string) => {
|
|
||||||
// lookViewerFile(fileId);
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 重置上传表单 */
|
/** 重置上传表单 */
|
||||||
const resetUploadForm = () => {
|
const resetUploadForm = () => {
|
||||||
uploadForm.userIds = [];
|
uploadForm.userIds = [];
|
||||||
@ -612,6 +514,7 @@ const handleUpdate = async (row?: VolumeCatalogVO) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
getUserAppList();
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -621,6 +524,7 @@ const listeningProject = watch(
|
|||||||
(nid, oid) => {
|
(nid, oid) => {
|
||||||
queryParams.value.projectId = nid;
|
queryParams.value.projectId = nid;
|
||||||
form.value.projectId = nid;
|
form.value.projectId = nid;
|
||||||
|
getUserAppList();
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Before Width: | Height: | Size: 922 B After Width: | Height: | Size: 922 B |
@ -92,6 +92,14 @@
|
|||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="800px" append-to-body>
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="800px" append-to-body>
|
||||||
<el-form ref="materialReceiveFormRef" :model="form" :rules="rules" label-width="110px">
|
<el-form ref="materialReceiveFormRef" :model="form" :rules="rules" label-width="110px">
|
||||||
<el-row>
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="材料来源" prop="materialSource">
|
||||||
|
<el-select v-model="form.materialSource" filterable placeholder="请选择材料来源" style="width: 100%">
|
||||||
|
<el-option label="甲供材料" value="1"></el-option>
|
||||||
|
<el-option label="已供材料" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="表单编号" prop="formCode">
|
<el-form-item label="表单编号" prop="formCode">
|
||||||
<el-input v-model="form.formCode" placeholder="请输入表单编号" />
|
<el-input v-model="form.formCode" placeholder="请输入表单编号" />
|
Before Width: | Height: | Size: 922 B After Width: | Height: | Size: 922 B |
@ -1,498 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="p-2">
|
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
|
||||||
<el-card shadow="hover">
|
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
||||||
<el-form-item label="表单编号" prop="formCode">
|
|
||||||
<el-input v-model="queryParams.formCode" placeholder="请输入表单编号" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="工程名称" prop="projectName">
|
|
||||||
<el-input v-model="queryParams.projectName" placeholder="请输入工程名称" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="材料名称" prop="materialName">
|
|
||||||
<el-input v-model="queryParams.materialName" placeholder="请输入设备材料名称" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="订货单位" prop="orderingUnit">
|
|
||||||
<el-input v-model="queryParams.orderingUnit" placeholder="请输入订货单位" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="供货单位" prop="supplierUnit">
|
|
||||||
<el-input v-model="queryParams.supplierUnit" placeholder="请输入供货单位" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="领料单位" prop="issueUnit">
|
|
||||||
<el-input v-model="queryParams.issueUnit" placeholder="请输入领料单位" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="保管单位" prop="storageUnit">
|
|
||||||
<el-input v-model="queryParams.storageUnit" placeholder="请输入保管单位" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</transition>
|
|
||||||
<el-card shadow="never">
|
|
||||||
<template #header>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:materialIssue:add']">新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['materials:materialIssue:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
<el-table v-loading="loading" :data="materialIssueList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="表单编号" align="center" prop="formCode" />
|
|
||||||
<el-table-column label="工程名称" align="center" prop="projectName" />
|
|
||||||
<el-table-column label="设备材料名称" align="center" prop="materialName" />
|
|
||||||
<el-table-column label="订货单位" align="center" prop="orderingUnit" />
|
|
||||||
<el-table-column label="供货单位" align="center" prop="supplierUnit" />
|
|
||||||
<el-table-column label="领料单位" align="center" prop="issueUnit" />
|
|
||||||
<el-table-column label="保管单位" align="center" prop="storageUnit" />
|
|
||||||
<el-table-column label="缺陷情况" align="center" prop="defectDescription" />
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-tooltip content="查看" placement="top">
|
|
||||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="修改" placement="top">
|
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materialIssue:edit']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['materials:materialIssue:remove']"
|
|
||||||
></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
||||||
</el-card>
|
|
||||||
<el-dialog
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
:close-on-press-escape="false"
|
|
||||||
:title="dialog.title"
|
|
||||||
v-model="dialog.visible"
|
|
||||||
width="800px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-form ref="materialIssueFormRef" :model="form" :rules="rules" label-width="110px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="表单编号" prop="formCode">
|
|
||||||
<el-input v-model="form.formCode" placeholder="请输入表单编号" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工程名称" prop="projectName">
|
|
||||||
<el-input v-model="form.projectName" placeholder="请输入工程名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="设备材料名称" prop="materialName">
|
|
||||||
<el-input v-model="form.materialName" placeholder="请输入设备材料名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="订货单位" prop="orderingUnit">
|
|
||||||
<el-input v-model="form.orderingUnit" placeholder="请输入订货单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="供货单位" prop="supplierUnit">
|
|
||||||
<el-input v-model="form.supplierUnit" placeholder="请输入供货单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="领料单位" prop="issueUnit">
|
|
||||||
<el-input v-model="form.issueUnit" placeholder="请输入领料单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="保管单位" prop="storageUnit">
|
|
||||||
<el-input v-model="form.storageUnit" placeholder="请输入保管单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="缺陷情况" prop="defectDescription">
|
|
||||||
<el-input v-model="form.defectDescription" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<div class="detail">
|
|
||||||
<div class="detail-header">
|
|
||||||
<span>数量验收</span>
|
|
||||||
<el-button type="primary" link @click="addItem" icon="Plus">添加一行</el-button>
|
|
||||||
</div>
|
|
||||||
<div v-for="(item, index) in form.itemList" :key="index" class="detail-item">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '名称' : ''"
|
|
||||||
:prop="`itemList.${index}.name`"
|
|
||||||
:rules="[{ required: true, message: '名称不能为空', trigger: 'blur' }]"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.name" placeholder="请输入名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '规格' : ''"
|
|
||||||
:prop="`itemList.${index}.specification`"
|
|
||||||
:rules="[{ required: true, message: '规格不能为空', trigger: 'blur' }]"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.specification" placeholder="请输入规格" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '单位' : ''"
|
|
||||||
:prop="`itemList.${index}.unit`"
|
|
||||||
:rules="[{ required: true, message: '单位不能为空', trigger: 'blur' }]"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.unit" placeholder="请输入单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '库存' : ''"
|
|
||||||
:prop="`itemList.${index}.stockQuantity`"
|
|
||||||
:rules="[{ required: true, message: '库存不能为空', trigger: 'blur' }]"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.stockQuantity" placeholder="请输入库存" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '领取' : ''"
|
|
||||||
:prop="`itemList.${index}.issuedQuantity`"
|
|
||||||
:rules="[{ required: true, message: '领取数量不能为空', trigger: 'blur' }]"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.issuedQuantity" placeholder="请输入领取数量" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '剩余' : ''"
|
|
||||||
:prop="`itemList.${index}.remainingQuantity`"
|
|
||||||
:rules="[{ required: true, message: '剩余数量不能为空', trigger: 'blur' }]"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.remainingQuantity" placeholder="请输入剩余数量" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item :label="index === 0 ? '备注' : ''" prop="remark">
|
|
||||||
<el-input v-model="item.remark" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" v-if="form.itemList.length > 1">
|
|
||||||
<div class="item-actions">
|
|
||||||
<el-button type="danger" link @click="removeItem(index)" icon="Delete">删除</el-button>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="合格证文件" prop="certCountFileId">
|
|
||||||
<file-upload :isShowTip="false" v-model="form.certCountFileId" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="出厂报告文件" prop="reportCountFileId">
|
|
||||||
<file-upload :isShowTip="false" v-model="form.reportCountFileId" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="技术资料文件" prop="techDocCountFileId">
|
|
||||||
<file-upload :isShowTip="false" v-model="form.techDocCountFileId" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="厂家资质文件" prop="licenseCountFileId">
|
|
||||||
<file-upload :isShowTip="false" v-model="form.licenseCountFileId" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<span style="color: #ff0000ab; margin-bottom: 10px; display: block"
|
|
||||||
>注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span
|
|
||||||
> </el-col
|
|
||||||
><el-col :span="24">
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<wordllssue ref="wordllssueRef"></wordllssue>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="MaterialIssue" lang="ts">
|
|
||||||
import { listMaterialIssue, getMaterialIssue, delMaterialIssue, addMaterialIssue, updateMaterialIssue } from '@/api/materials/materialIssue';
|
|
||||||
import { MaterialIssueVO, MaterialIssueQuery, MaterialIssueForm } from '@/api/materials/materialIssue/types';
|
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
|
||||||
import wordllssue from './word/index.vue';
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
// 获取用户 store
|
|
||||||
const userStore = useUserStoreHook();
|
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
|
||||||
|
|
||||||
const materialIssueList = ref<MaterialIssueVO[]>([]);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
const showSearch = ref(true);
|
|
||||||
const ids = ref<Array<string | number>>([]);
|
|
||||||
const single = ref(true);
|
|
||||||
const multiple = ref(true);
|
|
||||||
const total = ref(0);
|
|
||||||
const wordllssueRef = ref<InstanceType<typeof wordllssue>>();
|
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
|
||||||
const materialIssueFormRef = ref<ElFormInstance>();
|
|
||||||
|
|
||||||
const dialog = reactive<DialogOption>({
|
|
||||||
visible: false,
|
|
||||||
title: ''
|
|
||||||
});
|
|
||||||
const getInitFormData = () => {
|
|
||||||
return {
|
|
||||||
id: undefined,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
materialSource: '2',
|
|
||||||
formCode: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
materialName: undefined,
|
|
||||||
orderingUnit: undefined,
|
|
||||||
supplierUnit: undefined,
|
|
||||||
issueUnit: undefined,
|
|
||||||
storageUnit: undefined,
|
|
||||||
defectDescription: undefined,
|
|
||||||
certCount: undefined,
|
|
||||||
certCountFileId: undefined,
|
|
||||||
reportCount: undefined,
|
|
||||||
reportCountFileId: undefined,
|
|
||||||
techDocCount: undefined,
|
|
||||||
techDocCountFileId: undefined,
|
|
||||||
licenseCount: undefined,
|
|
||||||
licenseCountFileId: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
itemList: [
|
|
||||||
{
|
|
||||||
id: undefined,
|
|
||||||
specification: undefined,
|
|
||||||
unit: undefined,
|
|
||||||
stockQuantity: undefined,
|
|
||||||
issuedQuantity: undefined,
|
|
||||||
remainingQuantity: undefined,
|
|
||||||
name: undefined,
|
|
||||||
remark: undefined
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
};
|
|
||||||
const initFormData: MaterialIssueForm = {};
|
|
||||||
const data = reactive<PageData<MaterialIssueForm, MaterialIssueQuery>>({
|
|
||||||
form: getInitFormData(),
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
materialSource: '2',
|
|
||||||
formCode: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
materialName: undefined,
|
|
||||||
orderingUnit: undefined,
|
|
||||||
supplierUnit: undefined,
|
|
||||||
issueUnit: undefined,
|
|
||||||
storageUnit: undefined,
|
|
||||||
defectDescription: undefined,
|
|
||||||
params: {}
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
id: [{ required: true, message: '主键id不能为空', trigger: 'blur' }]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 查询物料领料单列表 */
|
|
||||||
const getList = async () => {
|
|
||||||
loading.value = true;
|
|
||||||
const res = await listMaterialIssue(queryParams.value);
|
|
||||||
materialIssueList.value = res.rows;
|
|
||||||
total.value = res.total;
|
|
||||||
loading.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 取消按钮 */
|
|
||||||
const cancel = () => {
|
|
||||||
reset();
|
|
||||||
dialog.visible = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 表单重置 */
|
|
||||||
const reset = () => {
|
|
||||||
form.value = getInitFormData();
|
|
||||||
materialIssueFormRef.value?.resetFields();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
const handleQuery = () => {
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
const resetQuery = () => {
|
|
||||||
queryFormRef.value?.resetFields();
|
|
||||||
handleQuery();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 多选框选中数据 */
|
|
||||||
const handleSelectionChange = (selection: MaterialIssueVO[]) => {
|
|
||||||
ids.value = selection.map((item) => item.id);
|
|
||||||
single.value = selection.length != 1;
|
|
||||||
multiple.value = !selection.length;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
const handleAdd = () => {
|
|
||||||
reset();
|
|
||||||
dialog.visible = true;
|
|
||||||
dialog.title = '添加物料领料单';
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
const handleUpdate = async (row?: MaterialIssueVO) => {
|
|
||||||
reset();
|
|
||||||
const _id = row?.id || ids.value[0];
|
|
||||||
const res = await getMaterialIssue(_id);
|
|
||||||
Object.assign(form.value, res.data);
|
|
||||||
dialog.visible = true;
|
|
||||||
dialog.title = '修改物料领料单';
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
const submitForm = () => {
|
|
||||||
materialIssueFormRef.value?.validate(async (valid: boolean) => {
|
|
||||||
if (valid) {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
if (form.value.id) {
|
|
||||||
await updateMaterialIssue(form.value).finally(() => (buttonLoading.value = false));
|
|
||||||
} else {
|
|
||||||
await addMaterialIssue(form.value).finally(() => (buttonLoading.value = false));
|
|
||||||
}
|
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
|
||||||
dialog.visible = false;
|
|
||||||
await getList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 添加数量验收条目
|
|
||||||
const addItem = () => {
|
|
||||||
form.value.itemList.push({
|
|
||||||
id: undefined,
|
|
||||||
specification: undefined,
|
|
||||||
unit: undefined,
|
|
||||||
stockQuantity: undefined,
|
|
||||||
issuedQuantity: undefined,
|
|
||||||
remainingQuantity: undefined,
|
|
||||||
name: undefined,
|
|
||||||
remark: undefined
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 删除数量验收条目
|
|
||||||
const removeItem = (index: number) => {
|
|
||||||
if (form.value.itemList.length > 1) {
|
|
||||||
form.value.itemList.splice(index, 1);
|
|
||||||
} else {
|
|
||||||
proxy?.$modal.msgWarning('至少需要保留一条数量验收记录');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
const handleDelete = async (row?: MaterialIssueVO) => {
|
|
||||||
const _ids = row?.id || ids.value;
|
|
||||||
await proxy?.$modal.confirm('是否确认删除物料领料单编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
|
||||||
await delMaterialIssue(_ids);
|
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
|
||||||
await getList();
|
|
||||||
};
|
|
||||||
const handleView = (row) => {
|
|
||||||
// 查看详情
|
|
||||||
wordllssueRef.value?.openDialog(row);
|
|
||||||
};
|
|
||||||
onMounted(() => {
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
//监听项目id刷新数据
|
|
||||||
const listeningProject = watch(
|
|
||||||
() => currentProject.value?.id,
|
|
||||||
(nid, oid) => {
|
|
||||||
queryParams.value.projectId = nid;
|
|
||||||
form.value.projectId = nid;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
listeningProject();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.detail {
|
|
||||||
border-bottom: 1px solid #ececec;
|
|
||||||
border-top: 1px solid #ececec;
|
|
||||||
margin: 10px 0;
|
|
||||||
padding: 10px 0;
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #1eaaff;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-item {
|
|
||||||
padding: 10px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
border-radius: 4px;
|
|
||||||
background-color: #f8f9fa;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-actions {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding-top: 6px;
|
|
||||||
}
|
|
||||||
</style>
|
|
Binary file not shown.
Before Width: | Height: | Size: 922 B |
@ -1,301 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-model="isShowDialog" title="变更单详情" draggable width="60vw" :close-on-click-modal="false" :destroy-on-close="true">
|
|
||||||
<el-card :body-style="{ padding: '20px' }" style="border: none; box-shadow: none">
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<div class="btn-item" @click="onLoad">
|
|
||||||
<img src="./icon/down.png" />
|
|
||||||
<span>导出</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="100px" id="formContent" style="width: 75%; margin-left: 10%">
|
|
||||||
<div class="table-content" id="table-content">
|
|
||||||
<el-row class="mb20" style="display: flex; justify-content: center">
|
|
||||||
<h2>设计材料设备领料单</h2>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="mb10" style="display: flex; justify-content: space-between">
|
|
||||||
<div class="head-text">
|
|
||||||
<span>工程名称:</span>
|
|
||||||
<span>{{ formData.projectName }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="head-text">
|
|
||||||
<span>编号:</span>
|
|
||||||
<span>{{ formData.formCode }}</span>
|
|
||||||
</div>
|
|
||||||
</el-row>
|
|
||||||
<table style="width: 100%" border="1" cellspacing="1">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">设备材料名称</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.materialName }}</td>
|
|
||||||
<th colspan="2">规格及数量</th>
|
|
||||||
<td class="th-bg" colspan="2">见下表</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">供货单位</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.supplierUnit }}</td>
|
|
||||||
<th colspan="2">订货单位</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.orderingUnit }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">领料单位</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.placeholder }}</td>
|
|
||||||
<th colspan="2">保管单位</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.storageUnit }}</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th width="150" colspan="8">数量验收</th>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th width="150">序号</th>
|
|
||||||
<th width="150">名称</th>
|
|
||||||
<th width="150">规格</th>
|
|
||||||
<th width="150">单位</th>
|
|
||||||
<th width="150">库存</th>
|
|
||||||
<th width="150">领取</th>
|
|
||||||
<th width="150">剩余</th>
|
|
||||||
<th width="150">备注</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="(item, i) of formData.itemList" :key="i">
|
|
||||||
<th width="150">{{ i + 1 }}</th>
|
|
||||||
<th width="150">{{ item.name }}</th>
|
|
||||||
<th width="150">{{ item.specification }}</th>
|
|
||||||
<th width="150">{{ item.unit }}</th>
|
|
||||||
<th width="150">{{ item.stockQuantity }}</th>
|
|
||||||
<th width="150">{{ item.issuedQuantity }}</th>
|
|
||||||
<th width="150">{{ item.remainingQuantity }}</th>
|
|
||||||
<th width="150">{{ item.remark }}</th>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td colspan="7">
|
|
||||||
<div style="margin-bottom: 10px;">缺陷情况:</div>
|
|
||||||
{{ formData.defectDescription }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<!-- <th width="150"></th> -->
|
|
||||||
<td colspan="8">
|
|
||||||
<span>是否附带以下随机资料</span>
|
|
||||||
<div class="file_detail">
|
|
||||||
<span>(1) 合格证 {{ formData.certCountFile ? formData.certCountFile.length : 0 }} 份</span>
|
|
||||||
<span>(2) 出厂报告 {{ formData.reportCountFileId ? formData.reportCountFileId.length : 0 }} 份</span>
|
|
||||||
<span>(3) 技术资料文件 {{ formData.techDocCountFileId ? formData.techDocCountFileId.length : 0 }} 份</span>
|
|
||||||
<span>(4) 厂家资质文件 {{ formData.licenseCountFileId ? formData.licenseCountFileId.length : 0 }} 份</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, reactive } from 'vue';
|
|
||||||
import { getMaterialIssue } from '@/api/materials/materialIssue';
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
import { downLoadOss } from '@/api/system/oss';
|
|
||||||
// 响应式状态
|
|
||||||
const isShowDialog = ref(false);
|
|
||||||
const initFormData = {
|
|
||||||
id: undefined,
|
|
||||||
materialSource: '1',
|
|
||||||
formCode: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
materialName: undefined,
|
|
||||||
orderingUnit: undefined,
|
|
||||||
supplierUnit: undefined,
|
|
||||||
issueUnit: undefined,
|
|
||||||
storageUnit: undefined,
|
|
||||||
defectDescription: undefined,
|
|
||||||
certCount: undefined,
|
|
||||||
certCountFileId: undefined,
|
|
||||||
reportCount: undefined,
|
|
||||||
reportCountFileId: undefined,
|
|
||||||
techDocCount: undefined,
|
|
||||||
techDocCountFileId: undefined,
|
|
||||||
licenseCount: undefined,
|
|
||||||
licenseCountFileId: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
itemList: [
|
|
||||||
{
|
|
||||||
id: undefined,
|
|
||||||
specification: undefined,
|
|
||||||
unit: undefined,
|
|
||||||
stockQuantity: undefined,
|
|
||||||
issuedQuantity: undefined,
|
|
||||||
remainingQuantity: undefined,
|
|
||||||
name: undefined,
|
|
||||||
remark: undefined
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
const data = reactive({
|
|
||||||
formData: { ...initFormData }
|
|
||||||
});
|
|
||||||
const design_change_reason_type = ref([]);
|
|
||||||
const { formData } = toRefs(data);
|
|
||||||
// 打开弹窗
|
|
||||||
const openDialog = (row?: any, types) => {
|
|
||||||
resetForm();
|
|
||||||
design_change_reason_type.value = types;
|
|
||||||
if (row?.id) {
|
|
||||||
getInfos(row.id, types);
|
|
||||||
}
|
|
||||||
isShowDialog.value = true;
|
|
||||||
};
|
|
||||||
// 获取详情数据
|
|
||||||
const getInfos = async (id: string, types) => {
|
|
||||||
const res = await getMaterialIssue(id);
|
|
||||||
Object.assign(formData.value, res.data);
|
|
||||||
// 数据处理
|
|
||||||
if (formData.value.changeReason) {
|
|
||||||
let arr = formData.value.changeReason.split(',');
|
|
||||||
var changeReason = types.filter((item) => arr.includes(item.value.toString())).map((item) => item.label);
|
|
||||||
formData.value.changeReason = changeReason.join(',');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// 重置表单
|
|
||||||
const resetForm = () => {
|
|
||||||
Object.keys(formData.value).forEach((key) => {
|
|
||||||
formData[key] = undefined;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// 下载文件
|
|
||||||
const onOpen = (path: string) => {
|
|
||||||
window.open(path, '_blank');
|
|
||||||
};
|
|
||||||
// 导出
|
|
||||||
const onLoad = async () => {
|
|
||||||
await downLoadOss({ id: formData.value.id }, '/materials/materialIssue/export/word', '设计材料设备领料单.zip');
|
|
||||||
};
|
|
||||||
|
|
||||||
// 关闭弹窗
|
|
||||||
const closeDialog = () => {
|
|
||||||
isShowDialog.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 暴露方法给父组件
|
|
||||||
defineExpose({
|
|
||||||
openDialog,
|
|
||||||
closeDialog
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.pic-block {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
.file-block {
|
|
||||||
width: 100%;
|
|
||||||
border: 1px solid var(--el-border-color);
|
|
||||||
border-radius: 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
transition: var(--el-transition-duration-fast);
|
|
||||||
margin-bottom: 5px;
|
|
||||||
padding: 3px 6px;
|
|
||||||
}
|
|
||||||
.ml-2 {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
::v-deep .el-icon svg {
|
|
||||||
height: 100% !important;
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
::v-deep .el-step__icon-inner {
|
|
||||||
font-size: 14px !important;
|
|
||||||
font-weight: 700 !important;
|
|
||||||
}
|
|
||||||
.dialog-footer {
|
|
||||||
height: 100px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
position: absolute;
|
|
||||||
top: 14%;
|
|
||||||
right: 10%;
|
|
||||||
background: #fff;
|
|
||||||
box-shadow: 0px 0px 10px #ddd;
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px 10px;
|
|
||||||
.btn-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
> span {
|
|
||||||
padding-top: 5px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: rgba(51, 51, 51, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.file_detail{
|
|
||||||
|
|
||||||
>span{
|
|
||||||
width: 40%;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
border-collapse: collapse; //合并为一个单一的边框
|
|
||||||
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
|
||||||
}
|
|
||||||
thead {
|
|
||||||
tr {
|
|
||||||
th {
|
|
||||||
background-color: rgba(247, 247, 247, 1); //设置表格标题背景色
|
|
||||||
height: 35px; //设置单元格最小高度
|
|
||||||
text-align: center;
|
|
||||||
letter-spacing: 5px;
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
td {
|
|
||||||
text-align: left;
|
|
||||||
height: 35px; //设置单元格最小高度
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
.th-bg {
|
|
||||||
background-color: rgba(247, 247, 247, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tbody {
|
|
||||||
tr {
|
|
||||||
td {
|
|
||||||
text-align: left;
|
|
||||||
height: 40px; //设置单元格最小高度
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
th {
|
|
||||||
height: 35px; //设置单元格最小高度
|
|
||||||
text-align: center;
|
|
||||||
letter-spacing: 5px;
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.table-content {
|
|
||||||
box-shadow: 0px 0px 10px #ddd;
|
|
||||||
padding: 20px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,502 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="p-2">
|
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
|
||||||
<el-card shadow="hover">
|
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
|
||||||
<el-form-item label="表单编号" prop="formCode">
|
|
||||||
<el-input v-model="queryParams.formCode" placeholder="请输入表单编号" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="工程名称" prop="projectName">
|
|
||||||
<el-input v-model="queryParams.projectName" placeholder="请输入工程名称" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="材料名称" prop="materialName">
|
|
||||||
<el-input v-model="queryParams.materialName" placeholder="请输入设备材料名称" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="合同名称" prop="contractName">
|
|
||||||
<el-input v-model="queryParams.contractName" placeholder="请输入合同名称" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="订货单位" prop="orderingUnit">
|
|
||||||
<el-input v-model="queryParams.orderingUnit" placeholder="请输入订货单位" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="供货单位" prop="supplierUnit">
|
|
||||||
<el-input v-model="queryParams.supplierUnit" placeholder="请输入供货单位" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</transition>
|
|
||||||
|
|
||||||
<el-card shadow="never">
|
|
||||||
<template #header>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['materials:materialReceive:add']">新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete()"
|
|
||||||
v-hasPermi="['materials:materialReceive:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="materialReceiveList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="表单编号" align="center" prop="formCode" />
|
|
||||||
<el-table-column label="工程名称" align="center" prop="projectName" />
|
|
||||||
<el-table-column label="设备材料名称" align="center" prop="materialName" />
|
|
||||||
<el-table-column label="合同名称" align="center" prop="contractName" />
|
|
||||||
<el-table-column label="订货单位" align="center" prop="orderingUnit" />
|
|
||||||
<el-table-column label="供货单位" align="center" prop="supplierUnit" />
|
|
||||||
<el-table-column label="设备材料入库/移交" align="center" prop="storageType">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="storage_type" :value="scope.row.storageType ? scope.row.storageType.split(',') : []" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-tooltip content="查看" placement="top">
|
|
||||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="修改" placement="top">
|
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['materials:materialReceive:edit']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['materials:materialReceive:remove']"
|
|
||||||
></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
||||||
</el-card>
|
|
||||||
<!-- 添加或修改物料接收单对话框 -->
|
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="800px" append-to-body>
|
|
||||||
<el-form ref="materialReceiveFormRef" :model="form" :rules="rules" label-width="110px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="表单编号" prop="formCode">
|
|
||||||
<el-input v-model="form.formCode" placeholder="请输入表单编号" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12"
|
|
||||||
><el-form-item label="工程名称" prop="projectName">
|
|
||||||
<el-input v-model="form.projectName" placeholder="请输入工程名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="设备材料名称" prop="materialName">
|
|
||||||
<el-input v-model="form.materialName" placeholder="请输入设备材料名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="合同名称" prop="contractName">
|
|
||||||
<el-input v-model="form.contractName" placeholder="请输入合同名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="订货单位" prop="orderingUnit">
|
|
||||||
<el-input v-model="form.orderingUnit" placeholder="请输入订货单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="供货单位" prop="supplierUnit">
|
|
||||||
<el-input v-model="form.supplierUnit" placeholder="请输入供货单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="缺陷情况" prop="defectDescription">
|
|
||||||
<el-input v-model="form.defectDescription" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<div class="detail">
|
|
||||||
<div class="detail-header">
|
|
||||||
<span>数量验收</span>
|
|
||||||
<el-button type="primary" link @click="addItem" icon="Plus">添加一行</el-button>
|
|
||||||
</div>
|
|
||||||
<div v-for="(item, index) in form.itemList" :key="index" class="detail-item">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '名称' : ''"
|
|
||||||
:prop="`itemList.${index}.name`"
|
|
||||||
:rules="{ required: true, message: '名称不能为空', trigger: 'blur' }"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.name" placeholder="请输入名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '规格' : ''"
|
|
||||||
:prop="`itemList.${index}.specification`"
|
|
||||||
:rules="{ required: true, message: '规格不能为空', trigger: 'blur' }"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.specification" placeholder="请输入规格" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '单位' : ''"
|
|
||||||
:prop="`itemList.${index}.unit`"
|
|
||||||
:rules="{ required: true, message: '单位不能为空', trigger: 'blur' }"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.unit" placeholder="请输入单位" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '数量' : ''"
|
|
||||||
:prop="`itemList.${index}.quantity`"
|
|
||||||
:rules="{ required: true, message: '数量不能为空', trigger: 'blur' }"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.quantity" placeholder="请输入数量" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '验收' : ''"
|
|
||||||
:prop="`itemList.${index}.acceptedQuantity`"
|
|
||||||
:rules="{ required: true, message: '验收数量不能为空', trigger: 'blur' }"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.acceptedQuantity" placeholder="请输入验收" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item
|
|
||||||
:label="index === 0 ? '缺件' : ''"
|
|
||||||
:prop="`itemList.${index}.shortageQuantity`"
|
|
||||||
:rules="{ required: true, message: '缺件数量不能为空', trigger: 'blur' }"
|
|
||||||
>
|
|
||||||
<el-input v-model="item.shortageQuantity" placeholder="请输入缺件" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item :label="index === 0 ? '备注' : ''" prop="remark">
|
|
||||||
<el-input v-model="item.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" v-if="form.itemList.length > 1">
|
|
||||||
<div class="item-actions">
|
|
||||||
<el-button type="danger" link @click="removeItem(index)" icon="Delete">删除</el-button>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="合格证文件" prop="certCountFileId">
|
|
||||||
<file-upload :isShowTip="false" v-model="form.certCountFileId" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="出厂报告文件" prop="reportCountFileId">
|
|
||||||
<file-upload :isShowTip="false" v-model="form.reportCountFileId" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="技术资料文件" prop="techDocCountFileId">
|
|
||||||
<file-upload :isShowTip="false" v-model="form.techDocCountFileId" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="厂家资质文件" prop="licenseCountFileId">
|
|
||||||
<file-upload :isShowTip="false" v-model="form.licenseCountFileId" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<span style="color: #ff0000ab; margin-bottom: 10px; display: block"
|
|
||||||
>注意:请上传doc/xls/ppt/txt/pdf/png/jpg/jpeg/zip格式文件</span
|
|
||||||
> </el-col
|
|
||||||
><el-col :span="24"
|
|
||||||
><el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
<wordllReceive ref="wordllReceiveRef"></wordllReceive>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="MaterialReceive" lang="ts">
|
|
||||||
import {
|
|
||||||
listMaterialReceive,
|
|
||||||
getMaterialReceive,
|
|
||||||
delMaterialReceive,
|
|
||||||
addMaterialReceive,
|
|
||||||
updateMaterialReceive
|
|
||||||
} from '@/api/materials/materialReceive';
|
|
||||||
import { MaterialReceiveVO, MaterialReceiveQuery, MaterialReceiveForm } from '@/api/materials/materialReceive/types';
|
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
|
||||||
import wordllReceive from './word/index.vue';
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
const { storage_type } = toRefs<any>(proxy?.useDict('storage_type'));
|
|
||||||
// 获取用户 store
|
|
||||||
const userStore = useUserStoreHook();
|
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
|
||||||
const wordllReceiveRef = ref<InstanceType<typeof wordllReceive>>();
|
|
||||||
const materialReceiveList = ref<MaterialReceiveVO[]>([]);
|
|
||||||
const buttonLoading = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
const showSearch = ref(true);
|
|
||||||
const ids = ref<Array<string | number>>([]);
|
|
||||||
const single = ref(true);
|
|
||||||
const multiple = ref(true);
|
|
||||||
const total = ref(0);
|
|
||||||
|
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
|
||||||
const materialReceiveFormRef = ref<ElFormInstance>();
|
|
||||||
|
|
||||||
const dialog = reactive<DialogOption>({
|
|
||||||
visible: false,
|
|
||||||
title: ''
|
|
||||||
});
|
|
||||||
const getInitFormData = () => {
|
|
||||||
return {
|
|
||||||
id: undefined,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
materialSource: '2',
|
|
||||||
formCode: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
materialName: undefined,
|
|
||||||
contractName: undefined,
|
|
||||||
orderingUnit: undefined,
|
|
||||||
supplierUnit: undefined,
|
|
||||||
defectDescription: undefined,
|
|
||||||
certCount: undefined,
|
|
||||||
certCountFileId: undefined,
|
|
||||||
reportCount: undefined,
|
|
||||||
reportCountFileId: undefined,
|
|
||||||
techDocCount: undefined,
|
|
||||||
techDocCountFileId: undefined,
|
|
||||||
licenseCount: undefined,
|
|
||||||
licenseCountFileId: undefined,
|
|
||||||
storageType: [],
|
|
||||||
remark: undefined,
|
|
||||||
itemList: [
|
|
||||||
{
|
|
||||||
name: undefined,
|
|
||||||
specification: undefined,
|
|
||||||
unit: undefined,
|
|
||||||
quantity: undefined,
|
|
||||||
acceptedQuantity: undefined,
|
|
||||||
shortageQuantity: undefined,
|
|
||||||
remark: undefined
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
};
|
|
||||||
const data = reactive<PageData<MaterialReceiveForm, MaterialReceiveQuery>>({
|
|
||||||
form: getInitFormData(),
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
projectId: currentProject.value?.id,
|
|
||||||
materialSource: '2',
|
|
||||||
formCode: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
materialName: undefined,
|
|
||||||
contractName: undefined,
|
|
||||||
orderingUnit: undefined,
|
|
||||||
supplierUnit: undefined,
|
|
||||||
params: {}
|
|
||||||
},
|
|
||||||
rules: {}
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 查询物料接收单列表 */
|
|
||||||
const getList = async () => {
|
|
||||||
loading.value = true;
|
|
||||||
const res = await listMaterialReceive(queryParams.value);
|
|
||||||
materialReceiveList.value = res.rows;
|
|
||||||
total.value = res.total;
|
|
||||||
loading.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 取消按钮 */
|
|
||||||
const cancel = () => {
|
|
||||||
reset();
|
|
||||||
dialog.visible = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 表单重置 */
|
|
||||||
const reset = () => {
|
|
||||||
form.value = getInitFormData();
|
|
||||||
materialReceiveFormRef.value?.resetFields();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
const handleQuery = () => {
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
getList();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
const resetQuery = () => {
|
|
||||||
queryFormRef.value?.resetFields();
|
|
||||||
handleQuery();
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 多选框选中数据 */
|
|
||||||
const handleSelectionChange = (selection: MaterialReceiveVO[]) => {
|
|
||||||
ids.value = selection.map((item) => item.id);
|
|
||||||
single.value = selection.length != 1;
|
|
||||||
multiple.value = !selection.length;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
const handleAdd = () => {
|
|
||||||
reset();
|
|
||||||
dialog.visible = true;
|
|
||||||
dialog.title = '添加物料接收单';
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
const handleUpdate = async (row?: MaterialReceiveVO) => {
|
|
||||||
reset();
|
|
||||||
const _id = row?.id || ids.value[0];
|
|
||||||
const res = await getMaterialReceive(_id);
|
|
||||||
Object.assign(form.value, res.data);
|
|
||||||
if (form.value.storageType.length) {
|
|
||||||
form.value.storageType = form.value.storageType.split(',');
|
|
||||||
} else {
|
|
||||||
form.value.storageType = [];
|
|
||||||
}
|
|
||||||
dialog.visible = true;
|
|
||||||
dialog.title = '修改物料接收单';
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
const submitForm = () => {
|
|
||||||
materialReceiveFormRef.value?.validate(async (valid: boolean) => {
|
|
||||||
if (valid) {
|
|
||||||
buttonLoading.value = true;
|
|
||||||
form.value.storageType = form.value.storageType.join(',');
|
|
||||||
if (form.value.id) {
|
|
||||||
await updateMaterialReceive(form.value).finally(() => (buttonLoading.value = false));
|
|
||||||
} else {
|
|
||||||
await addMaterialReceive(form.value).finally(() => (buttonLoading.value = false));
|
|
||||||
}
|
|
||||||
proxy?.$modal.msgSuccess('操作成功');
|
|
||||||
dialog.visible = false;
|
|
||||||
await getList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
const handleDelete = async (row?: MaterialReceiveVO) => {
|
|
||||||
const _ids = row?.id || ids.value;
|
|
||||||
await proxy?.$modal.confirm('是否确认删除物料接收单编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
|
||||||
await delMaterialReceive(_ids);
|
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
|
||||||
await getList();
|
|
||||||
};
|
|
||||||
// 添加数量验收条目
|
|
||||||
const addItem = () => {
|
|
||||||
form.value.itemList.push({
|
|
||||||
name: undefined,
|
|
||||||
specification: undefined,
|
|
||||||
unit: undefined,
|
|
||||||
quantity: undefined,
|
|
||||||
acceptedQuantity: undefined,
|
|
||||||
shortageQuantity: undefined,
|
|
||||||
remark: undefined
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 删除数量验收条目
|
|
||||||
const removeItem = (index: number) => {
|
|
||||||
if (form.value.itemList.length > 1) {
|
|
||||||
form.value.itemList.splice(index, 1);
|
|
||||||
} else {
|
|
||||||
proxy?.$modal.msgWarning('至少需要保留一条数量验收记录');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const handleView = (row) => {
|
|
||||||
// 查看详情
|
|
||||||
wordllReceiveRef.value?.openDialog(row);
|
|
||||||
};
|
|
||||||
onMounted(() => {
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
//监听项目id刷新数据
|
|
||||||
const listeningProject = watch(
|
|
||||||
() => currentProject.value?.id,
|
|
||||||
(nid, oid) => {
|
|
||||||
queryParams.value.projectId = nid;
|
|
||||||
form.value.projectId = nid;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
listeningProject();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.detail {
|
|
||||||
border-bottom: 1px solid #ececec;
|
|
||||||
border-top: 1px solid #ececec;
|
|
||||||
margin: 10px 0;
|
|
||||||
padding: 10px 0;
|
|
||||||
|
|
||||||
&-header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #1eaaff;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-item {
|
|
||||||
padding: 10px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
border-radius: 4px;
|
|
||||||
background-color: #f8f9fa;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-actions {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding-top: 6px;
|
|
||||||
}
|
|
||||||
</style>
|
|
Binary file not shown.
Before Width: | Height: | Size: 922 B |
@ -1,290 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-model="isShowDialog" title="变更单详情" draggable width="60vw" :close-on-click-modal="false" :destroy-on-close="true">
|
|
||||||
<el-card :body-style="{ padding: '20px' }" style="border: none; box-shadow: none">
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<div class="btn-item" @click="onLoad">
|
|
||||||
<img src="./icon/down.png" />
|
|
||||||
<span>导出</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="100px" id="formContent" style="width: 75%; margin-left: 10%">
|
|
||||||
<div class="table-content" id="table-content">
|
|
||||||
<el-row class="mb20" style="display: flex; justify-content: center">
|
|
||||||
<h2>材料设备验收单</h2>
|
|
||||||
</el-row>
|
|
||||||
<el-row class="mb10" style="display: flex; justify-content: space-between">
|
|
||||||
<div class="head-text">
|
|
||||||
<span>工程名称:</span>
|
|
||||||
<span>{{ formData.projectName }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="head-text">
|
|
||||||
<span>编号:</span>
|
|
||||||
<span>{{ formData.formCode }}</span>
|
|
||||||
</div>
|
|
||||||
</el-row>
|
|
||||||
<table style="width: 100%" border="1" cellspacing="1">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">设备材料名称</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.materialName }}</td>
|
|
||||||
<th colspan="2">合同名称</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.contractName }}</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th colspan="2">订货单位</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.orderingUnit }}</td>
|
|
||||||
<th colspan="2">供货单位</th>
|
|
||||||
<td class="th-bg" colspan="2">{{ formData.supplierUnit }}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<th width="150" colspan="8">数量验收(验收、缺件数量由承包单位填写)</th>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th width="150">序号</th>
|
|
||||||
<th width="150">名称</th>
|
|
||||||
<th width="150">规格</th>
|
|
||||||
<th width="150">单位</th>
|
|
||||||
<th width="150">数量</th>
|
|
||||||
<th width="150">验收</th>
|
|
||||||
<th width="150">缺件</th>
|
|
||||||
<th width="150">备注</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="(item, i) of formData.itemList" :key="i">
|
|
||||||
<th width="150">{{ i + 1 }}</th>
|
|
||||||
<th width="150">{{ item.name }}</th>
|
|
||||||
<th width="150">{{ item.specification }}</th>
|
|
||||||
<th width="150">{{ item.unit }}</th>
|
|
||||||
<th width="150">{{ item.quantity }}</th>
|
|
||||||
<th width="150">{{ item.acceptedQuantity }}</th>
|
|
||||||
<th width="150">{{ item.shortageQuantity }}</th>
|
|
||||||
<th width="150">{{ item.remark }}</th>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td colspan="7">
|
|
||||||
<div style="margin-bottom: 10px">缺陷情况:</div>
|
|
||||||
{{ formData.defectDescription }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td colspan="8">
|
|
||||||
<span>是否附带以下随机资料</span>
|
|
||||||
<div class="file_detail">
|
|
||||||
<span>(1) 合格证 {{ formData.certCountFile ? formData.certCountFile.length : 0 }} 份</span>
|
|
||||||
<span>(2) 出厂报告 {{ formData.reportCountFileId ? formData.reportCountFileId.length : 0 }} 份</span>
|
|
||||||
<span>(3) 技术资料文件 {{ formData.techDocCountFileId ? formData.techDocCountFileId.length : 0 }} 份</span>
|
|
||||||
<span>(4) 厂家资质文件 {{ formData.licenseCountFileId ? formData.licenseCountFileId.length : 0 }} 份</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</el-card>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, reactive } from 'vue';
|
|
||||||
import { getMaterialReceive } from '@/api/materials/materialReceive';
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
||||||
import { downLoadOss } from '@/api/system/oss';
|
|
||||||
// 响应式状态
|
|
||||||
const isShowDialog = ref(false);
|
|
||||||
const initFormData = {
|
|
||||||
id: undefined,
|
|
||||||
materialSource: '1',
|
|
||||||
formCode: undefined,
|
|
||||||
projectName: undefined,
|
|
||||||
materialName: undefined,
|
|
||||||
contractName: undefined,
|
|
||||||
orderingUnit: undefined,
|
|
||||||
supplierUnit: undefined,
|
|
||||||
defectDescription: undefined,
|
|
||||||
certCount: undefined,
|
|
||||||
certCountFileId: undefined,
|
|
||||||
reportCount: undefined,
|
|
||||||
reportCountFileId: undefined,
|
|
||||||
techDocCount: undefined,
|
|
||||||
techDocCountFileId: undefined,
|
|
||||||
licenseCount: undefined,
|
|
||||||
licenseCountFileId: undefined,
|
|
||||||
storageType: [],
|
|
||||||
remark: undefined,
|
|
||||||
itemList: [
|
|
||||||
{
|
|
||||||
name: undefined,
|
|
||||||
specification: undefined,
|
|
||||||
unit: undefined,
|
|
||||||
quantity: undefined,
|
|
||||||
acceptedQuantity: undefined,
|
|
||||||
shortageQuantity: undefined,
|
|
||||||
remark: undefined
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
const data = reactive({
|
|
||||||
formData: { ...initFormData }
|
|
||||||
});
|
|
||||||
const design_change_reason_type = ref([]);
|
|
||||||
const { formData } = toRefs(data);
|
|
||||||
// 打开弹窗
|
|
||||||
const openDialog = (row?: any, types) => {
|
|
||||||
resetForm();
|
|
||||||
design_change_reason_type.value = types;
|
|
||||||
if (row?.id) {
|
|
||||||
getInfos(row.id, types);
|
|
||||||
}
|
|
||||||
isShowDialog.value = true;
|
|
||||||
};
|
|
||||||
// 获取详情数据
|
|
||||||
const getInfos = async (id: string, types) => {
|
|
||||||
const res = await getMaterialReceive(id);
|
|
||||||
Object.assign(formData.value, res.data);
|
|
||||||
// 数据处理
|
|
||||||
if (formData.value.changeReason) {
|
|
||||||
let arr = formData.value.changeReason.split(',');
|
|
||||||
var changeReason = types.filter((item) => arr.includes(item.value.toString())).map((item) => item.label);
|
|
||||||
formData.value.changeReason = changeReason.join(',');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// 重置表单
|
|
||||||
const resetForm = () => {
|
|
||||||
Object.keys(formData.value).forEach((key) => {
|
|
||||||
formData[key] = undefined;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// 下载文件
|
|
||||||
const onOpen = (path: string) => {
|
|
||||||
window.open(path, '_blank');
|
|
||||||
};
|
|
||||||
// 导出
|
|
||||||
const onLoad = async () => {
|
|
||||||
await downLoadOss({ id: formData.value.id }, '/materials/materialReceive/export/word', '材料设备验收单.zip');
|
|
||||||
};
|
|
||||||
|
|
||||||
// 关闭弹窗
|
|
||||||
const closeDialog = () => {
|
|
||||||
isShowDialog.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 暴露方法给父组件
|
|
||||||
defineExpose({
|
|
||||||
openDialog,
|
|
||||||
closeDialog
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.pic-block {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
.file-block {
|
|
||||||
width: 100%;
|
|
||||||
border: 1px solid var(--el-border-color);
|
|
||||||
border-radius: 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
transition: var(--el-transition-duration-fast);
|
|
||||||
margin-bottom: 5px;
|
|
||||||
padding: 3px 6px;
|
|
||||||
}
|
|
||||||
.ml-2 {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
::v-deep .el-icon svg {
|
|
||||||
height: 100% !important;
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
::v-deep .el-step__icon-inner {
|
|
||||||
font-size: 14px !important;
|
|
||||||
font-weight: 700 !important;
|
|
||||||
}
|
|
||||||
.dialog-footer {
|
|
||||||
height: 100px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
position: absolute;
|
|
||||||
top: 14%;
|
|
||||||
right: 10%;
|
|
||||||
background: #fff;
|
|
||||||
box-shadow: 0px 0px 10px #ddd;
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px 10px;
|
|
||||||
.btn-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
> span {
|
|
||||||
padding-top: 5px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: rgba(51, 51, 51, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.file_detail {
|
|
||||||
> span {
|
|
||||||
width: 40%;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
border-collapse: collapse; //合并为一个单一的边框
|
|
||||||
border-color: rgba(199, 199, 199, 1); //边框颜色按实际自定义即可
|
|
||||||
}
|
|
||||||
thead {
|
|
||||||
tr {
|
|
||||||
th {
|
|
||||||
background-color: rgba(247, 247, 247, 1); //设置表格标题背景色
|
|
||||||
height: 35px; //设置单元格最小高度
|
|
||||||
text-align: center;
|
|
||||||
letter-spacing: 5px;
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
td {
|
|
||||||
text-align: left;
|
|
||||||
height: 35px; //设置单元格最小高度
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
.th-bg {
|
|
||||||
background-color: rgba(247, 247, 247, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tbody {
|
|
||||||
tr {
|
|
||||||
td {
|
|
||||||
text-align: left;
|
|
||||||
height: 40px; //设置单元格最小高度
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
th {
|
|
||||||
height: 35px; //设置单元格最小高度
|
|
||||||
text-align: center;
|
|
||||||
letter-spacing: 5px;
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.table-content {
|
|
||||||
box-shadow: 0px 0px 10px #ddd;
|
|
||||||
padding: 20px;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -31,7 +31,8 @@
|
|||||||
<el-table v-loading="loading" :data="materialsInventoryList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="materialsInventoryList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||||
<el-table-column label="材料名称" align="center" prop="materialsName" />
|
<el-table-column label="物资名称" align="center" prop="materialsName" />
|
||||||
|
<el-table-column label="计划数量" align="center" prop="quantityCount" />
|
||||||
<el-table-column label="入库登记" align="center">
|
<el-table-column label="入库登记" align="center">
|
||||||
<el-table-column label="数量" align="center" prop="number">
|
<el-table-column label="数量" align="center" prop="number">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
@ -441,6 +441,7 @@ const getSupplierList = async () => {
|
|||||||
pageSize: 10000
|
pageSize: 10000
|
||||||
});
|
});
|
||||||
supplierOptions.value = res.rows;
|
supplierOptions.value = res.rows;
|
||||||
|
console.log('🚀 ~ getSupplierList ~ res.rows:', res.rows);
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<<<<<<< HEAD
|
||||||
<div class="overall-plan-material-supply">
|
<div class="overall-plan-material-supply">
|
||||||
<!-- tabPosition="left" -->
|
<!-- tabPosition="left" -->
|
||||||
<el-card shadow="always">
|
<el-card shadow="always">
|
||||||
@ -313,3 +314,20 @@ onMounted(() => {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
=======
|
||||||
|
<div>init</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
setup() {
|
||||||
|
// todo
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped></style>
|
||||||
|
>>>>>>> 90e6ddc21241aecd8dcdfb84d82b9283ab193ccf
|
||||||
|
@ -4,9 +4,6 @@
|
|||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="项目ID" prop="projectId">
|
|
||||||
<el-input v-model="queryParams.projectId" placeholder="请输入项目ID" clearable @keyup.enter="handleQuery" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="采购单编号" prop="docCode">
|
<el-form-item label="采购单编号" prop="docCode">
|
||||||
<el-input v-model="queryParams.docCode" placeholder="请输入采购单编号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.docCode" placeholder="请输入采购单编号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -86,18 +83,13 @@
|
|||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['cailiaoshebei:purchaseDoc:export']">导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="purchaseDocList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="purchaseDocList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="主键ID" align="center" prop="id" v-if="true" />
|
<el-table-column label="采购单编号" align="center" prop="docCode" width="90" />
|
||||||
<el-table-column label="项目ID" align="center" prop="projectId" />
|
|
||||||
<el-table-column label="采购单编号" align="center" prop="docCode" />
|
|
||||||
<el-table-column label="供应商" align="center" prop="supplier" />
|
<el-table-column label="供应商" align="center" prop="supplier" />
|
||||||
<el-table-column label="事由" align="center" prop="reason" />
|
<el-table-column label="事由" align="center" prop="reason" />
|
||||||
<el-table-column label="设备统称" align="center" prop="name" />
|
<el-table-column label="设备统称" align="center" prop="name" />
|
||||||
@ -106,40 +98,50 @@
|
|||||||
<span>{{ parseTime(scope.row.arrivalDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.arrivalDate, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="设计负责人联系方式" align="center" prop="designDirectorTel" />
|
<el-table-column label="负责人联系方式" align="center" prop="designDirectorTel" width="130" />
|
||||||
<el-table-column label="现场技术负责人联系方式" align="center" prop="technicalDirectorTel" />
|
<el-table-column label="现场联系方式" align="center" prop="technicalDirectorTel" width="130" />
|
||||||
<el-table-column label="收货地址" align="center" prop="receivingAddress" />
|
<el-table-column label="收货地址" align="center" prop="receivingAddress" />
|
||||||
<el-table-column label="联系人" align="center" prop="contacts" />
|
<el-table-column label="联系人" align="center" prop="contacts" />
|
||||||
<el-table-column label="项目负责人" align="center" prop="projectDirector" />
|
<el-table-column label="项目负责人" align="center" prop="projectDirector" width="90" />
|
||||||
<el-table-column label="采购经办人" align="center" prop="purchasingAgent" />
|
|
||||||
|
<el-table-column label="采购经办人" align="center" prop="purchasingAgent" width="90" />
|
||||||
<el-table-column label="日期" align="center" prop="preparedDate" width="180">
|
<el-table-column label="日期" align="center" prop="preparedDate" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.preparedDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.preparedDate, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="反馈文件地址" align="center" prop="feedbackUrl" />
|
<el-table-column label="文件地址" align="center" prop="feedbackUrl" width="130">
|
||||||
<el-table-column label="签收单位" align="center" prop="signingUnit" />
|
|
||||||
<el-table-column label="签收人" align="center" prop="signingPerson" />
|
|
||||||
<el-table-column label="签收日期" align="center" prop="signingDate" width="180">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.signingDate, '{y}-{m}-{d}') }}</span>
|
<el-link :href="scope.row.feedbackUrl" target="_blank" type="primary" v-if="scope.row.feedbackUrl">回单</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审核状态" align="center" prop="status" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="审核状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<dict-tag :options="wf_business_status" :value="scope.row.status"></dict-tag>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['cailiaoshebei:purchaseDoc:edit']"></el-button>
|
</template>
|
||||||
</el-tooltip>
|
</el-table-column>
|
||||||
<el-tooltip content="删除" placement="top">
|
<el-table-column label="操作" align="center" fixed="right" width="160">
|
||||||
<el-button
|
<template #default="scope">
|
||||||
link
|
<div class="flex flex-wrap">
|
||||||
type="primary"
|
<div class="flex">
|
||||||
icon="Delete"
|
<div class="w3"></div>
|
||||||
@click="handleDelete(scope.row)"
|
<el-button link type="primary" icon="Finished" @click="handleAudit(scope.row)" v-hasPermi="['cailiaoshebei:purchaseDoc:edit']">
|
||||||
v-hasPermi="['cailiaoshebei:purchaseDoc:remove']"
|
审核</el-button
|
||||||
></el-button>
|
>
|
||||||
</el-tooltip>
|
<el-button link type="primary" icon="Upload" @click="handleUpload(scope.row)" v-hasPermi="['cailiaoshebei:purchaseDoc:edit']"
|
||||||
|
>上传</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="w3"></div>
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['cailiaoshebei:purchaseDoc:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['cailiaoshebei:purchaseDoc:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -147,62 +149,71 @@
|
|||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 添加或修改物资-采购联系单对话框 -->
|
<!-- 添加或修改物资-采购联系单对话框 -->
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="800px" append-to-body>
|
||||||
<el-form ref="purchaseDocFormRef" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="purchaseDocFormRef" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="项目ID" prop="projectId">
|
<el-row :gutter="20">
|
||||||
<el-input v-model="form.projectId" placeholder="请输入项目ID" />
|
<el-col :span="12" :offset="0"
|
||||||
</el-form-item>
|
><el-form-item label="采购单编号" prop="docCode"> <el-input v-model="form.docCode" placeholder="请输入采购单编号" /> </el-form-item
|
||||||
<el-form-item label="采购单编号" prop="docCode">
|
></el-col>
|
||||||
<el-input v-model="form.docCode" placeholder="请输入采购单编号" />
|
<el-col :span="12" :offset="0"
|
||||||
</el-form-item>
|
><el-form-item label="供应商" prop="supplier">
|
||||||
<el-form-item label="供应商" prop="supplier">
|
<!-- <el-input v-model="form.supplier" placeholder="请输入供应商" /> -->
|
||||||
<el-input v-model="form.supplier" placeholder="请输入供应商" />
|
<el-select v-model="form.supplier" value-key="id" placeholder="请选择供应商" clearable filterable @change="">
|
||||||
</el-form-item>
|
<el-option v-for="item in supplierOptions" :key="item.id" :label="item.name" :value="item.name"> </el-option>
|
||||||
<el-form-item label="事由" prop="reason">
|
</el-select> </el-form-item
|
||||||
<el-input v-model="form.reason" placeholder="请输入事由" />
|
></el-col>
|
||||||
</el-form-item>
|
<el-col :span="12" :offset="0"
|
||||||
<el-form-item label="设备统称" prop="name">
|
><el-form-item label="需求批次号" prop="mrpBaseId">
|
||||||
<el-input v-model="form.name" placeholder="请输入设备统称" />
|
<el-select v-model="form.mrpBaseId" value-key="id" placeholder="请选择需求批次号" filterable @change="getPlanList">
|
||||||
</el-form-item>
|
<el-option v-for="item in batchOptions" :key="item.id" :label="item.planCode" :value="item.id"> </el-option>
|
||||||
<el-form-item label="到货日期" prop="arrivalDate">
|
</el-select> </el-form-item
|
||||||
<el-date-picker clearable v-model="form.arrivalDate" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择到货日期">
|
></el-col>
|
||||||
</el-date-picker>
|
<el-col :span="12" :offset="0">
|
||||||
</el-form-item>
|
<el-form-item label="需求计划" prop="planId">
|
||||||
<el-form-item label="设计负责人联系方式" prop="designDirectorTel">
|
<el-select v-model="form.planId" value-key="id" placeholder="请选择需求计划" multiple filterable :disabled="!form.mrpBaseId">
|
||||||
<el-input v-model="form.designDirectorTel" placeholder="请输入设计负责人联系方式" />
|
<el-option v-for="item in planList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
||||||
</el-form-item>
|
</el-select> </el-form-item
|
||||||
<el-form-item label="现场技术负责人联系方式" prop="technicalDirectorTel">
|
></el-col>
|
||||||
<el-input v-model="form.technicalDirectorTel" placeholder="请输入现场技术负责人联系方式" />
|
<el-col :span="12" :offset="0"
|
||||||
</el-form-item>
|
><el-form-item label="事由" prop="reason"> <el-input v-model="form.reason" placeholder="请输入事由" /> </el-form-item
|
||||||
<el-form-item label="收货地址" prop="receivingAddress">
|
></el-col>
|
||||||
<el-input v-model="form.receivingAddress" placeholder="请输入收货地址" />
|
<el-col :span="12" :offset="0">
|
||||||
</el-form-item>
|
<el-form-item label="设备统称" prop="name"> <el-input v-model="form.name" placeholder="请输入设备统称" /> </el-form-item
|
||||||
<el-form-item label="联系人" prop="contacts">
|
></el-col>
|
||||||
<el-input v-model="form.contacts" placeholder="请输入联系人" />
|
<el-col :span="12" :offset="0"
|
||||||
</el-form-item>
|
><el-form-item label="到货日期" prop="arrivalDate">
|
||||||
<el-form-item label="项目负责人" prop="projectDirector">
|
<el-date-picker clearable v-model="form.arrivalDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择到货日期">
|
||||||
<el-input v-model="form.projectDirector" placeholder="请输入项目负责人" />
|
</el-date-picker> </el-form-item
|
||||||
</el-form-item>
|
></el-col>
|
||||||
<el-form-item label="采购经办人" prop="purchasingAgent">
|
<el-col :span="12" :offset="0"
|
||||||
<el-input v-model="form.purchasingAgent" placeholder="请输入采购经办人" />
|
><el-form-item label="负责人联系方式" prop="designDirectorTel">
|
||||||
</el-form-item>
|
<el-input v-model="form.designDirectorTel" placeholder="请输入设计负责人联系方式" type="number" /> </el-form-item
|
||||||
<el-form-item label="日期" prop="preparedDate">
|
></el-col>
|
||||||
<el-date-picker clearable v-model="form.preparedDate" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择日期">
|
<el-col :span="12" :offset="0"
|
||||||
</el-date-picker>
|
><el-form-item label="现场联系方式" prop="technicalDirectorTel">
|
||||||
</el-form-item>
|
<el-input v-model="form.technicalDirectorTel" placeholder="请输入现场技术负责人联系方式" type="number" /> </el-form-item
|
||||||
<el-form-item label="反馈文件地址" prop="feedbackUrl">
|
></el-col>
|
||||||
<el-input v-model="form.feedbackUrl" placeholder="请输入反馈文件地址" />
|
<el-col :span="12" :offset="0">
|
||||||
</el-form-item>
|
<el-form-item label="收货地址" prop="receivingAddress">
|
||||||
<el-form-item label="签收单位" prop="signingUnit">
|
<el-input v-model="form.receivingAddress" placeholder="请输入收货地址" /> </el-form-item
|
||||||
<el-input v-model="form.signingUnit" placeholder="请输入签收单位" />
|
></el-col>
|
||||||
</el-form-item>
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="签收人" prop="signingPerson">
|
<el-form-item label="联系人" prop="contacts"> <el-input v-model="form.contacts" placeholder="请输入联系人" /> </el-form-item
|
||||||
<el-input v-model="form.signingPerson" placeholder="请输入签收人" />
|
></el-col>
|
||||||
</el-form-item>
|
<el-col :span="12" :offset="0"
|
||||||
<el-form-item label="签收日期" prop="signingDate">
|
><el-form-item label="项目负责人" prop="projectDirector">
|
||||||
<el-date-picker clearable v-model="form.signingDate" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择签收日期">
|
<el-input v-model="form.projectDirector" placeholder="请输入项目负责人" /> </el-form-item
|
||||||
</el-date-picker>
|
></el-col>
|
||||||
</el-form-item>
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="采购经办人" prop="purchasingAgent">
|
||||||
|
<el-input v-model="form.purchasingAgent" placeholder="请输入采购经办人" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="日期" prop="preparedDate">
|
||||||
|
<el-date-picker clearable v-model="form.preparedDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择日期">
|
||||||
|
</el-date-picker> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@ -211,17 +222,34 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="上传文件" v-model="uploadDialogVisible" width="30%">
|
||||||
|
<file-upload v-model="feedbackUrl" :file-type="['pdf']" :onUploadSuccess="handleSuccess" />
|
||||||
|
<template #footer>
|
||||||
|
<span>
|
||||||
|
<el-button @click="uploadDialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="uploadFile">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="PurchaseDoc" lang="ts">
|
<script setup name="PurchaseDoc" lang="ts">
|
||||||
|
import { getBatch, listBatch } from '@/api/materials/batchPlan';
|
||||||
import { listPurchaseDoc, getPurchaseDoc, delPurchaseDoc, addPurchaseDoc, updatePurchaseDoc } from '@/api/materials/purchaseDoc';
|
import { listPurchaseDoc, getPurchaseDoc, delPurchaseDoc, addPurchaseDoc, updatePurchaseDoc } from '@/api/materials/purchaseDoc';
|
||||||
import { PurchaseDocVO, PurchaseDocQuery, PurchaseDocForm } from '@/api/materials/purchaseDoc/types';
|
import { PurchaseDocVO, PurchaseDocQuery, PurchaseDocForm } from '@/api/materials/purchaseDoc/types';
|
||||||
|
import { listContractor } from '@/api/project/contractor';
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { supply, wf_business_status } = toRefs<any>(proxy?.useDict('supply', 'wf_business_status'));
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
const uploadDialogVisible = ref(false);
|
||||||
const purchaseDocList = ref<PurchaseDocVO[]>([]);
|
const purchaseDocList = ref<PurchaseDocVO[]>([]);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
@ -230,7 +258,7 @@ const ids = ref<Array<string | number>>([]);
|
|||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
const feedbackUrl = ref('');
|
||||||
const queryFormRef = ref<ElFormInstance>();
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
const purchaseDocFormRef = ref<ElFormInstance>();
|
const purchaseDocFormRef = ref<ElFormInstance>();
|
||||||
|
|
||||||
@ -238,10 +266,14 @@ const dialog = reactive<DialogOption>({
|
|||||||
visible: false,
|
visible: false,
|
||||||
title: ''
|
title: ''
|
||||||
});
|
});
|
||||||
|
const batchOptions = ref([]);
|
||||||
|
const supplierOptions = ref([]);
|
||||||
|
|
||||||
const initFormData: PurchaseDocForm = {
|
const planList = ref([]);
|
||||||
|
const initFormData: any = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectId: undefined,
|
projectId: currentProject.value?.id,
|
||||||
|
|
||||||
docCode: undefined,
|
docCode: undefined,
|
||||||
supplier: undefined,
|
supplier: undefined,
|
||||||
reason: undefined,
|
reason: undefined,
|
||||||
@ -251,6 +283,8 @@ const initFormData: PurchaseDocForm = {
|
|||||||
technicalDirectorTel: undefined,
|
technicalDirectorTel: undefined,
|
||||||
receivingAddress: undefined,
|
receivingAddress: undefined,
|
||||||
contacts: undefined,
|
contacts: undefined,
|
||||||
|
associationList: [],
|
||||||
|
|
||||||
projectDirector: undefined,
|
projectDirector: undefined,
|
||||||
purchasingAgent: undefined,
|
purchasingAgent: undefined,
|
||||||
preparedDate: undefined,
|
preparedDate: undefined,
|
||||||
@ -260,12 +294,13 @@ const initFormData: PurchaseDocForm = {
|
|||||||
signingDate: undefined,
|
signingDate: undefined,
|
||||||
status: undefined
|
status: undefined
|
||||||
};
|
};
|
||||||
const data = reactive<PageData<PurchaseDocForm, PurchaseDocQuery>>({
|
const data = reactive({
|
||||||
form: { ...initFormData },
|
form: { ...initFormData },
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
projectId: undefined,
|
projectId: currentProject.value?.id,
|
||||||
|
|
||||||
docCode: undefined,
|
docCode: undefined,
|
||||||
supplier: undefined,
|
supplier: undefined,
|
||||||
reason: undefined,
|
reason: undefined,
|
||||||
@ -311,6 +346,7 @@ const cancel = () => {
|
|||||||
const reset = () => {
|
const reset = () => {
|
||||||
form.value = { ...initFormData };
|
form.value = { ...initFormData };
|
||||||
purchaseDocFormRef.value?.resetFields();
|
purchaseDocFormRef.value?.resetFields();
|
||||||
|
form.value.projectId = currentProject.value?.id;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -345,6 +381,9 @@ const handleUpdate = async (row?: PurchaseDocVO) => {
|
|||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
const res = await getPurchaseDoc(_id);
|
const res = await getPurchaseDoc(_id);
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
|
getPlanList();
|
||||||
|
form.value.planId = form.value.associationList?.map((item: any) => item.planId);
|
||||||
|
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '修改物资-采购联系单';
|
dialog.title = '修改物资-采购联系单';
|
||||||
};
|
};
|
||||||
@ -354,6 +393,10 @@ const submitForm = () => {
|
|||||||
purchaseDocFormRef.value?.validate(async (valid: boolean) => {
|
purchaseDocFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
|
form.value.associationList = form.value.planId?.map((item: any) => ({
|
||||||
|
planId: item
|
||||||
|
}));
|
||||||
|
|
||||||
if (form.value.id) {
|
if (form.value.id) {
|
||||||
await updatePurchaseDoc(form.value).finally(() => (buttonLoading.value = false));
|
await updatePurchaseDoc(form.value).finally(() => (buttonLoading.value = false));
|
||||||
} else {
|
} else {
|
||||||
@ -366,6 +409,38 @@ const submitForm = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getPlanList = async () => {
|
||||||
|
form.value.planId = '';
|
||||||
|
const res = await getBatch({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
mrpBaseId: undefined,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
mrpBaseId: form.value.mrpBaseId
|
||||||
|
});
|
||||||
|
planList.value = res.rows;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getBatchList = async () => {
|
||||||
|
const res = await listBatch({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
planCode: undefined,
|
||||||
|
projectId: currentProject.value?.id
|
||||||
|
});
|
||||||
|
batchOptions.value = res.rows.filter((item) => item.status == 'finish');
|
||||||
|
};
|
||||||
|
|
||||||
|
const getSupplierList = async () => {
|
||||||
|
const res = await listContractor({
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
pageNum: 1,
|
||||||
|
contractorType: 4,
|
||||||
|
pageSize: 10000
|
||||||
|
});
|
||||||
|
supplierOptions.value = res.rows;
|
||||||
|
};
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: PurchaseDocVO) => {
|
const handleDelete = async (row?: PurchaseDocVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
const _ids = row?.id || ids.value;
|
||||||
@ -376,17 +451,54 @@ const handleDelete = async (row?: PurchaseDocVO) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = () => {
|
const handleUpload = (row?: PurchaseDocVO) => {
|
||||||
proxy?.download(
|
form.value.feedbackUrl = '';
|
||||||
'cailiaoshebei/purchaseDoc/export',
|
form.value.id = row.id;
|
||||||
{
|
uploadDialogVisible.value = true;
|
||||||
...queryParams.value
|
};
|
||||||
},
|
|
||||||
`purchaseDoc_${new Date().getTime()}.xlsx`
|
const uploadFile = async () => {
|
||||||
);
|
if (!feedbackUrl.value) {
|
||||||
|
proxy?.$modal.msgError('请上传文件');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await updatePurchaseDoc(form.value).finally(() => (buttonLoading.value = false));
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
uploadDialogVisible.value = false;
|
||||||
|
|
||||||
|
await getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSuccess = (list, res: any) => {
|
||||||
|
form.value.feedbackUrl = res.data.url;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 审核按钮操作 */
|
||||||
|
const handleAudit = async (row?: PurchaseDocVO) => {
|
||||||
|
proxy?.$tab.closePage(route);
|
||||||
|
proxy?.$tab.openPage('/materials/purchaseDoc/indexEdit', '审核采购联系单', {
|
||||||
|
id: row.id,
|
||||||
|
type: 'update'
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
|
getSupplierList();
|
||||||
|
getBatchList();
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听项目id刷新数据
|
||||||
|
const listeningProject = watch(
|
||||||
|
() => currentProject.value?.id,
|
||||||
|
(nid, oid) => {
|
||||||
|
queryParams.value.projectId = nid;
|
||||||
|
form.value.projectId = nid;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
listeningProject();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
439
src/views/materials/purchaseDoc/indexEdit.vue
Normal file
439
src/views/materials/purchaseDoc/indexEdit.vue
Normal file
@ -0,0 +1,439 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-4 bg-gray-50">
|
||||||
|
<div class="max-w-4xl mx-auto">
|
||||||
|
<!-- 顶部按钮区域 -->
|
||||||
|
<el-card class="mb-4 rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md">
|
||||||
|
<approvalButton
|
||||||
|
@submitForm="submitForm"
|
||||||
|
@approvalVerifyOpen="approvalVerifyOpen"
|
||||||
|
@handleApprovalRecord="handleApprovalRecord"
|
||||||
|
:buttonLoading="buttonLoading"
|
||||||
|
:id="form.id"
|
||||||
|
:status="form.status"
|
||||||
|
:pageType="routeParams.type"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<el-card class="rounded-lg shadow-sm bg-white border border-gray-100 transition-all hover:shadow-md overflow-hidden">
|
||||||
|
<div class="p-4 bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100">
|
||||||
|
<h3 class="text-lg font-semibold text-gray-800">采购单信息</h3>
|
||||||
|
</div>
|
||||||
|
<div class="p-6">
|
||||||
|
<el-form ref="leaveFormRef" disabled :model="form" label-width="100px" class="space-y-4">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="采购单编号" prop="docCode"> <el-input v-model="form.docCode" placeholder="请输入采购单编号" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="供应商" prop="supplier">
|
||||||
|
<el-select v-model="form.supplier" value-key="id" placeholder="请选择供应商" clearable filterable @change="">
|
||||||
|
<el-option v-for="item in supplierOptions" :key="item.id" :label="item.name" :value="item.name"> </el-option>
|
||||||
|
</el-select> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="需求批次号" prop="mrpBaseId">
|
||||||
|
<el-select v-model="form.mrpBaseId" value-key="id" placeholder="请选择需求批次号" filterable @change="getPlanList">
|
||||||
|
<el-option v-for="item in batchOptions" :key="item.id" :label="item.planCode" :value="item.id"> </el-option>
|
||||||
|
</el-select> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="需求计划" prop="planId">
|
||||||
|
<el-select v-model="form.planId" value-key="id" placeholder="请选择需求计划" multiple filterable :disabled="!form.mrpBaseId">
|
||||||
|
<el-option v-for="item in planList" :key="item.id" :label="item.name" :value="item.id"> </el-option>
|
||||||
|
</el-select> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="事由" prop="reason"> <el-input v-model="form.reason" placeholder="请输入事由" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="设备统称" prop="name"> <el-input v-model="form.name" placeholder="请输入设备统称" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="到货日期" prop="arrivalDate">
|
||||||
|
<el-date-picker clearable v-model="form.arrivalDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择到货日期">
|
||||||
|
</el-date-picker> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="负责人联系方式" prop="designDirectorTel">
|
||||||
|
<el-input v-model="form.designDirectorTel" placeholder="请输入设计负责人联系方式" type="number" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="现场联系方式" prop="technicalDirectorTel">
|
||||||
|
<el-input v-model="form.technicalDirectorTel" placeholder="请输入现场技术负责人联系方式" type="number" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="收货地址" prop="receivingAddress">
|
||||||
|
<el-input v-model="form.receivingAddress" placeholder="请输入收货地址" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="联系人" prop="contacts"> <el-input v-model="form.contacts" placeholder="请输入联系人" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="项目负责人" prop="projectDirector">
|
||||||
|
<el-input v-model="form.projectDirector" placeholder="请输入项目负责人" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="采购经办人" prop="purchasingAgent">
|
||||||
|
<el-input v-model="form.purchasingAgent" placeholder="请输入采购经办人" /> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
<el-col :span="12" :offset="0"
|
||||||
|
><el-form-item label="日期" prop="preparedDate">
|
||||||
|
<el-date-picker clearable v-model="form.preparedDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择日期">
|
||||||
|
</el-date-picker> </el-form-item
|
||||||
|
></el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<!-- 提交组件 -->
|
||||||
|
<submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" />
|
||||||
|
<approvalRecord ref="approvalRecordRef"></approvalRecord>
|
||||||
|
<!-- 流程选择对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
draggable
|
||||||
|
v-model="dialogVisible.visible"
|
||||||
|
:title="dialogVisible.title"
|
||||||
|
:before-close="handleClose"
|
||||||
|
width="500"
|
||||||
|
class="rounded-lg shadow-lg"
|
||||||
|
>
|
||||||
|
<div class="p-4">
|
||||||
|
<p class="text-gray-600 mb-4">请选择要启动的流程:</p>
|
||||||
|
<el-select v-model="flowCode" placeholder="请选择流程" style="width: 100%">
|
||||||
|
<el-option v-for="item in flowCodeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer p-4 border-t border-gray-100 flex justify-end space-x-3">
|
||||||
|
<el-button @click="handleClose" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 transition-colors"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="submitFlow()" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
|
||||||
|
>确认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Leave" lang="ts">
|
||||||
|
import { LeaveForm } from '@/api/workflow/leave/types';
|
||||||
|
import { startWorkFlow } from '@/api/workflow/task';
|
||||||
|
import SubmitVerify from '@/components/Process/submitVerify.vue';
|
||||||
|
import ApprovalRecord from '@/components/Process/approvalRecord.vue';
|
||||||
|
import ApprovalButton from '@/components/Process/approvalButton.vue';
|
||||||
|
import { StartProcessBo } from '@/api/workflow/workflowCommon/types';
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
|
import { getDrawing } from '@/api/design/drawing';
|
||||||
|
import { updateDesignChange, getDesignChange } from '@/api/design/designChange';
|
||||||
|
import { getPurchaseDoc } from '@/api/materials/purchaseDoc';
|
||||||
|
import { getBatch } from '@/api/materials/batchPlan';
|
||||||
|
|
||||||
|
// 获取用户 store
|
||||||
|
const userStore = useUserStoreHook();
|
||||||
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
//路由参数
|
||||||
|
const routeParams = ref<Record<string, any>>({});
|
||||||
|
const flowCodeOptions = [
|
||||||
|
{
|
||||||
|
value: currentProject.value?.id + '_purchaseDoc',
|
||||||
|
label: '采购单审批'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const flowCode = ref<string>('');
|
||||||
|
const status = ref<string>('');
|
||||||
|
const dialogVisible = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '流程定义'
|
||||||
|
});
|
||||||
|
//提交组件
|
||||||
|
const submitVerifyRef = ref<InstanceType<typeof SubmitVerify>>();
|
||||||
|
//审批记录组件
|
||||||
|
const approvalRecordRef = ref<InstanceType<typeof ApprovalRecord>>();
|
||||||
|
//按钮组件
|
||||||
|
const approvalButtonRef = ref<InstanceType<typeof ApprovalButton>>();
|
||||||
|
|
||||||
|
const leaveFormRef = ref<ElFormInstance>();
|
||||||
|
const dialog = reactive({
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
isEdit: false
|
||||||
|
});
|
||||||
|
const submitFormData = ref<StartProcessBo>({
|
||||||
|
businessId: '',
|
||||||
|
flowCode: '',
|
||||||
|
variables: {}
|
||||||
|
});
|
||||||
|
const taskVariables = ref<Record<string, any>>({});
|
||||||
|
|
||||||
|
const initFormData = {
|
||||||
|
id: undefined,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
|
||||||
|
docCode: undefined,
|
||||||
|
supplier: undefined,
|
||||||
|
reason: undefined,
|
||||||
|
name: undefined,
|
||||||
|
arrivalDate: undefined,
|
||||||
|
designDirectorTel: undefined,
|
||||||
|
technicalDirectorTel: undefined,
|
||||||
|
receivingAddress: undefined,
|
||||||
|
contacts: undefined,
|
||||||
|
associationList: [],
|
||||||
|
|
||||||
|
projectDirector: undefined,
|
||||||
|
purchasingAgent: undefined,
|
||||||
|
preparedDate: undefined,
|
||||||
|
feedbackUrl: undefined,
|
||||||
|
signingUnit: undefined,
|
||||||
|
signingPerson: undefined,
|
||||||
|
signingDate: undefined,
|
||||||
|
status: undefined
|
||||||
|
};
|
||||||
|
const data = reactive({
|
||||||
|
form: { ...initFormData },
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
fileName: undefined,
|
||||||
|
fileType: undefined,
|
||||||
|
fileSuffix: undefined,
|
||||||
|
fileStatus: undefined,
|
||||||
|
originalName: undefined,
|
||||||
|
newest: undefined,
|
||||||
|
params: {}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleClose = () => {
|
||||||
|
dialogVisible.visible = false;
|
||||||
|
flowCode.value = '';
|
||||||
|
buttonLoading.value = false;
|
||||||
|
};
|
||||||
|
const { form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 表单重置 */
|
||||||
|
const reset = () => {
|
||||||
|
form.value = { ...initFormData };
|
||||||
|
leaveFormRef.value?.resetFields();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 获取详情 */
|
||||||
|
const getInfo = () => {
|
||||||
|
loading.value = true;
|
||||||
|
buttonLoading.value = false;
|
||||||
|
nextTick(async () => {
|
||||||
|
const res = await getPurchaseDoc(routeParams.value.id);
|
||||||
|
Object.assign(form.value, res.data);
|
||||||
|
getPlanList();
|
||||||
|
form.value.planId = form.value.associationList?.map((item: any) => item.planId);
|
||||||
|
loading.value = false;
|
||||||
|
buttonLoading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const planList = ref([]);
|
||||||
|
|
||||||
|
const getPlanList = async () => {
|
||||||
|
form.value.planId = '';
|
||||||
|
const res = await getBatch({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
mrpBaseId: undefined,
|
||||||
|
projectId: currentProject.value?.id,
|
||||||
|
mrpBaseId: form.value.mrpBaseId
|
||||||
|
});
|
||||||
|
planList.value = res.rows;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = (status1: string) => {
|
||||||
|
status.value = status1;
|
||||||
|
dialog.visible = false;
|
||||||
|
submit(status.value, form.value);
|
||||||
|
};
|
||||||
|
|
||||||
|
const submitFlow = async () => {
|
||||||
|
handleStartWorkFlow(form.value);
|
||||||
|
dialogVisible.visible = false;
|
||||||
|
};
|
||||||
|
//提交申请
|
||||||
|
const handleStartWorkFlow = async (data: LeaveForm) => {
|
||||||
|
try {
|
||||||
|
submitFormData.value.flowCode = flowCode.value;
|
||||||
|
submitFormData.value.businessId = data.id;
|
||||||
|
//流程变量
|
||||||
|
taskVariables.value = {
|
||||||
|
// leave4/5 使用的流程变量
|
||||||
|
userList: ['1', '3', '4']
|
||||||
|
};
|
||||||
|
submitFormData.value.variables = taskVariables.value;
|
||||||
|
const resp = await startWorkFlow(submitFormData.value);
|
||||||
|
if (submitVerifyRef.value) {
|
||||||
|
buttonLoading.value = false;
|
||||||
|
submitVerifyRef.value.openDialog(resp.data.taskId);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
buttonLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//审批记录
|
||||||
|
const handleApprovalRecord = () => {
|
||||||
|
approvalRecordRef.value.init(form.value.id);
|
||||||
|
};
|
||||||
|
//提交回调
|
||||||
|
const submitCallback = async () => {
|
||||||
|
await proxy.$tab.closePage(proxy.$route);
|
||||||
|
proxy.$router.go(-1);
|
||||||
|
};
|
||||||
|
//审批
|
||||||
|
const approvalVerifyOpen = async () => {
|
||||||
|
submitVerifyRef.value.openDialog(routeParams.value.taskId, true, routeParams.value.businessId);
|
||||||
|
// submitVerifyRef.value.openDialog(routeParams.value.taskId);
|
||||||
|
};
|
||||||
|
// 图纸上传成功之后 开始提交
|
||||||
|
const submit = async (status, data) => {
|
||||||
|
form.value = data;
|
||||||
|
if (status === 'draft') {
|
||||||
|
buttonLoading.value = false;
|
||||||
|
proxy?.$modal.msgSuccess('暂存成功');
|
||||||
|
proxy.$tab.closePage(proxy.$route);
|
||||||
|
proxy.$router.go(-1);
|
||||||
|
} else {
|
||||||
|
if ((form.value.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
||||||
|
flowCode.value = flowCodeOptions[0].value;
|
||||||
|
dialogVisible.visible = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//说明启动过先随意穿个参数
|
||||||
|
if (flowCode.value === '' || flowCode.value === null) {
|
||||||
|
flowCode.value = 'xx';
|
||||||
|
}
|
||||||
|
console.log(data);
|
||||||
|
await handleStartWorkFlow(data);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
nextTick(async () => {
|
||||||
|
routeParams.value = proxy.$route.query;
|
||||||
|
reset();
|
||||||
|
loading.value = false;
|
||||||
|
if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') {
|
||||||
|
getInfo();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
/* 全局样式 */
|
||||||
|
:root {
|
||||||
|
--primary: #409eff;
|
||||||
|
--primary-light: #66b1ff;
|
||||||
|
--primary-dark: #3a8ee6;
|
||||||
|
--success: #67c23a;
|
||||||
|
--warning: #e6a23c;
|
||||||
|
--danger: #f56c6c;
|
||||||
|
--info: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表单样式优化 */
|
||||||
|
.el-form-item {
|
||||||
|
.el-form-item__label {
|
||||||
|
color: #606266;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input__inner,
|
||||||
|
.el-select .el-input__inner {
|
||||||
|
border-radius: 4px;
|
||||||
|
transition:
|
||||||
|
border-color 0.2s,
|
||||||
|
box-shadow 0.2s;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: var(--primary-light);
|
||||||
|
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-textarea__inner {
|
||||||
|
border-radius: 4px;
|
||||||
|
transition:
|
||||||
|
border-color 0.2s,
|
||||||
|
box-shadow 0.2s;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: var(--primary-light);
|
||||||
|
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 按钮样式优化 */
|
||||||
|
.el-button {
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
|
||||||
|
&.is-primary {
|
||||||
|
background-color: var(--primary);
|
||||||
|
border-color: var(--primary);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--primary-light);
|
||||||
|
border-color: var(--primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: var(--primary-dark);
|
||||||
|
border-color: var(--primary-dark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-text {
|
||||||
|
color: var(--primary);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--primary-light);
|
||||||
|
background-color: rgba(64, 158, 255, 0.05);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 卡片样式优化 */
|
||||||
|
.el-card {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
/* transform: translateY(-2px); */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 对话框样式优化 */
|
||||||
|
.el-dialog {
|
||||||
|
.el-dialog__header {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
padding: 15px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog__footer {
|
||||||
|
padding: 15px 20px;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
54
src/views/materials/purchaseDoc/uploadCode.vue
Normal file
54
src/views/materials/purchaseDoc/uploadCode.vue
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2">
|
||||||
|
<el-card shadow="always" :body-style="{ padding: '20px' }">
|
||||||
|
<template #header>
|
||||||
|
<div>
|
||||||
|
<span><!-- card title --></span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<!-- card body -->
|
||||||
|
<el-form :model="form" ref="form" :rules="rules" label-width="80px" :inline="false" size="normal">
|
||||||
|
<el-row :gutter="20" v-for="item in form.list">
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<el-form-item label="计划">
|
||||||
|
<el-input v-model="item.planId"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<el-form-item label="数量">
|
||||||
|
<el-input v-model="item.num"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<el-form-item label="物流单号">
|
||||||
|
<el-input v-model="item.ltn"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit">立即提交</el-button>
|
||||||
|
<el-button>取消</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
const route = useRoute();
|
||||||
|
const form = reactive({
|
||||||
|
docId: '',
|
||||||
|
supplier: '',
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
planId: '',
|
||||||
|
num: '',
|
||||||
|
ltn: ''
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped></style>
|
Reference in New Issue
Block a user