合并
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 煤科建管平台
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
# 开发环境
|
||||
VITE_APP_BASE_API = 'http://192.168.110.149:8899'
|
||||
VITE_APP_BASE_API = 'http://192.168.110.209:8899'
|
||||
|
||||
# 无人机接口地址
|
||||
|
||||
|
@ -121,3 +121,10 @@ export const logisticsDetial = (id) => {
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
export const getDetailBASE = (id) => {
|
||||
return request({
|
||||
url: '/cailiaoshebei/purchaseDoc/pic/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
@ -174,3 +174,15 @@ export const getChildProject = (id: string | number): AxiosPromise<childProjectQ
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传项目文件
|
||||
* @param data
|
||||
*/
|
||||
export const uploadProjectFile = (data: any) => {
|
||||
return request({
|
||||
url: '/project/project/save/tender/file',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
@ -8,6 +8,7 @@ export interface ProjectVO {
|
||||
* 项目名称
|
||||
*/
|
||||
projectName: string;
|
||||
tenderFiles: string;
|
||||
|
||||
/**
|
||||
* 项目简称
|
||||
@ -131,7 +132,7 @@ export interface locationType {
|
||||
export interface childProjectQuery {
|
||||
projectName: string;
|
||||
pid: string;
|
||||
id?:string
|
||||
id?: string;
|
||||
}
|
||||
|
||||
export interface ProjectForm extends BaseEntity {
|
||||
|
@ -48,12 +48,7 @@
|
||||
tag="ul"
|
||||
@click.stop
|
||||
>
|
||||
<li
|
||||
style="margin-top: 10px;"
|
||||
v-for="(file, index) in fileList"
|
||||
:key="file.uid"
|
||||
class="el-upload-list__item ele-upload-list__item-content"
|
||||
>
|
||||
<li style="margin-top: 10px" v-for="(file, index) in fileList" :key="file.uid" class="el-upload-list__item ele-upload-list__item-content">
|
||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||
</el-link>
|
||||
@ -314,11 +309,11 @@ const uploadedSuccessfully = (res: any) => {
|
||||
emit('update:modelValue', listToString(fileList.value));
|
||||
proxy?.$modal.closeLoading();
|
||||
}
|
||||
if (props.autoUpload && props.limit === fileList.value.length) {
|
||||
fileUploadRef.value?.clearFiles();
|
||||
fileList.value = [];
|
||||
emit('update:modelValue', ''); // 同步到外部 v-model
|
||||
}
|
||||
// if (props.autoUpload && props.limit === fileList.value.length) {
|
||||
// fileUploadRef.value?.clearFiles();
|
||||
// fileList.value = [];
|
||||
// emit('update:modelValue', ''); // 同步到外部 v-model
|
||||
// }
|
||||
props.onUploadSuccess?.(fileList.value, res);
|
||||
};
|
||||
|
||||
|
@ -293,4 +293,17 @@ const handleAddApp = (row) => {
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
getList();
|
||||
}
|
||||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
listeningProject();
|
||||
});
|
||||
</script>
|
||||
|
@ -68,7 +68,7 @@
|
||||
<el-button type="primary" plain icon="Edit" @click="handleUpdata" v-hasPermi="['cailiaoshebei:cailiaoshebei:add']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button plain type="warning" icon="Finished" @click="handleAudit()" v-hasPermi="['out:monthPlan:remove']">审核</el-button>
|
||||
<el-button plain type="warning" icon="Finished" @click="handleAudit()" v-hasPermi="['cailiaoshebei:mrpBase:query']">审核</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
|
@ -117,6 +117,9 @@
|
||||
v-hasPermi="['cailiaoshebei:purchaseDoc:remove']"
|
||||
>物流单分享</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['cailiaoshebei:purchaseDoc:remove']"
|
||||
>详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -238,13 +241,27 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog title="详情" v-model="detailBASEVisble" width="1000">
|
||||
<div class="text-center">
|
||||
<img :src="detailBASE" class="w200" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<logisticsDetail ref="logisticsDetailRef"></logisticsDetail>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="PurchaseDoc" lang="ts">
|
||||
import { getBatch, listBatch } from '@/api/materials/batchPlan';
|
||||
import { listPurchaseDoc, getPurchaseDoc, listLink, addPurchaseDoc, updatePurchaseDoc, logisticsDetial } from '@/api/materials/purchaseDoc';
|
||||
import {
|
||||
listPurchaseDoc,
|
||||
getPurchaseDoc,
|
||||
listLink,
|
||||
addPurchaseDoc,
|
||||
updatePurchaseDoc,
|
||||
logisticsDetial,
|
||||
getDetailBASE
|
||||
} from '@/api/materials/purchaseDoc';
|
||||
import { PurchaseDocVO, PurchaseDocQuery, PurchaseDocForm } from '@/api/materials/purchaseDoc/types';
|
||||
import { listContractor } from '@/api/project/contractor';
|
||||
import { useUserStoreHook } from '@/store/modules/user';
|
||||
@ -269,6 +286,9 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const feedbackUrl = ref('');
|
||||
const detailBASEVisble = ref(false);
|
||||
const detailBASE = ref<any>({});
|
||||
|
||||
// 组件
|
||||
const logisticsDetailRef = ref<InstanceType<typeof logisticsDetail>>();
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
@ -499,6 +519,15 @@ const handleShare = async (row?: PurchaseDocVO) => {
|
||||
ElMessage[success ? 'success' : 'error'](success ? '复制成功!' : '复制失败');
|
||||
};
|
||||
|
||||
const handleDetail = async (row?: PurchaseDocVO) => {
|
||||
detailBASEVisble.value = true;
|
||||
|
||||
const res = await getDetailBASE(row.id);
|
||||
detailBASE.value = res.data;
|
||||
|
||||
console.log('🚀 ~ handleDetail ~ res:', res);
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleUpload = (row?: PurchaseDocVO) => {
|
||||
form.value.feedbackUrl = '';
|
||||
|
@ -149,6 +149,9 @@
|
||||
|
||||
<el-button link type="success" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:project:edit']">修改 </el-button>
|
||||
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['project:project:remove']">删除 </el-button>
|
||||
<el-button link type="primary" icon="upload" @click="handleUpload(scope.row)" v-hasPermi="['project:project:saveTenderFile']"
|
||||
>招标文件上传
|
||||
</el-button>
|
||||
</el-space>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -190,9 +193,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="项目类别" prop="projectCategory" label-width="100px">
|
||||
<el-select v-model="form.projectCategory" placeholder="请选择项目类别" clearable>
|
||||
<el-option v-for="dict in project_category_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
<el-form-item label="项目阶段" prop="projectStage" label-width="100px">
|
||||
<el-select v-model="form.projectStage" placeholder="请选择项目类别" clearable>
|
||||
<el-option v-for="dict in project_stage" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -359,6 +362,15 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog title="上传文件" v-model="fileVisble" width="400">
|
||||
<file-upload v-model="fileForm.tenderFiles" :limit="10" :file-type="['pdf']" :file-size="50" />
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button v-loading="buttonLoading" type="primary" @click="uploadSubmit"> 提交</el-button>
|
||||
<el-button @click="fileVisble = false">取消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -370,7 +382,7 @@ import {
|
||||
addProjectPilePoint,
|
||||
addProjectSquare,
|
||||
delProject,
|
||||
getChildProject,
|
||||
uploadProjectFile,
|
||||
getProject,
|
||||
listProject,
|
||||
updateProject
|
||||
@ -378,8 +390,8 @@ import {
|
||||
import { ProjectForm, ProjectQuery, ProjectVO, childProjectQuery, locationType } from '@/api/project/project/types';
|
||||
import amap from '@/components/amap/index.vue';
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { sys_normal_disable, project_category_type, project_type } = toRefs<any>(
|
||||
proxy?.useDict('sys_normal_disable', 'project_category_type', 'project_type')
|
||||
const { sys_normal_disable, project_category_type, project_type, project_stage } = toRefs<any>(
|
||||
proxy?.useDict('sys_normal_disable', 'project_category_type', 'project_type', 'project_stage')
|
||||
);
|
||||
const projectList = ref<ProjectVO[]>([]);
|
||||
const buttonLoading = ref(false);
|
||||
@ -408,6 +420,11 @@ const dialog = reactive<DialogOption>({
|
||||
visible: false,
|
||||
title: ''
|
||||
});
|
||||
const fileVisble = ref(false);
|
||||
const fileForm = ref({
|
||||
id: '',
|
||||
tenderFiles: ''
|
||||
});
|
||||
const jsonData = ref(null);
|
||||
const fullscreenLoading = ref(false);
|
||||
|
||||
@ -521,48 +538,6 @@ const setPoi = (location: locationType) => {
|
||||
const setCheckedNodes = (nodeList: any) => {
|
||||
nodes.value = nodeList;
|
||||
};
|
||||
//上传节点
|
||||
// const addFacilities = async () => {
|
||||
// if (!layerType.value) {
|
||||
// return proxy?.$modal.msgError('请选择图层类型');
|
||||
// }
|
||||
// if (!nodes.value.length) {
|
||||
// return proxy?.$modal.msgError('请选择需要上传的图层');
|
||||
// }
|
||||
// const data = {
|
||||
// projectId: projectId.value,
|
||||
// nameGeoJson: null,
|
||||
// locationGeoJson: null,
|
||||
// pointGeoJson: null
|
||||
// };
|
||||
// loading.value = true;
|
||||
// if (layerType.value == 1) {
|
||||
// if (nodes.value[0].option == '名称') {
|
||||
// data.nameGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// data.locationGeoJson = jsonData.value[nodes.value[1].location.index];
|
||||
// } else {
|
||||
// data.nameGeoJson = jsonData.value[nodes.value[1].location.index];
|
||||
// data.locationGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// }
|
||||
// await addProjectFacilities(data);
|
||||
// await proxy?.$modal.msgSuccess('添加成功');
|
||||
// } else if (layerType.value == 2) {
|
||||
// data.pointGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// await addProjectPilePoint(data);
|
||||
// await proxy?.$modal.msgSuccess('添加成功');
|
||||
// } else if (layerType.value == 3) {
|
||||
// if (nodes.value[0].option == '名称') {
|
||||
// data.nameGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// data.locationGeoJson = jsonData.value[nodes.value[1].location.index];
|
||||
// } else {
|
||||
// data.nameGeoJson = jsonData.value[nodes.value[1].location.index];
|
||||
// data.locationGeoJson = jsonData.value[nodes.value[0].location.index];
|
||||
// }
|
||||
// await addProjectSquare(data);
|
||||
// await proxy?.$modal.msgSuccess('添加成功');
|
||||
// }
|
||||
// loading.value = false;
|
||||
// };
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
@ -643,6 +618,24 @@ const submitForm = () => {
|
||||
});
|
||||
};
|
||||
|
||||
/** 上传文件 */
|
||||
const handleUpload = async (row?: ProjectVO) => {
|
||||
fileForm.value.id = row.id;
|
||||
fileForm.value.tenderFiles = row.tenderFiles;
|
||||
|
||||
fileVisble.value = true;
|
||||
};
|
||||
|
||||
const uploadSubmit = async () => {
|
||||
if (!fileForm.value.tenderFiles) return proxy.$modal.msgError('请上传文件');
|
||||
let res = await uploadProjectFile(fileForm.value);
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('上传成功');
|
||||
fileVisble.value = false;
|
||||
await getList();
|
||||
}
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: ProjectVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
|
Reference in New Issue
Block a user