fix: BUG修改
This commit is contained in:
parent
0c72b61f65
commit
8cd4882179
@ -82,11 +82,19 @@ const addMarker = () => {
|
||||
// map.value?.setFitView();
|
||||
// });
|
||||
};
|
||||
// 设置地图图层
|
||||
const setMap = () => {
|
||||
// 构造官方卫星、路网图层
|
||||
var layers = [new AMapRef.value.TileLayer.Satellite(), new AMapRef.value.TileLayer.RoadNet()];
|
||||
// 地图上设置图层
|
||||
map.value.setLayers(layers);
|
||||
};
|
||||
onMounted(async () => {
|
||||
console.log("onMounted");
|
||||
await mapData();
|
||||
createArea();
|
||||
addMarker();
|
||||
setMap();
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div class="change-btn">
|
||||
<el-button type="primary" @click="changeScreen">切换大屏</el-button>
|
||||
</div>
|
||||
<!-- <div class="main-content"> -->
|
||||
<div class="orderBgc" v-if="screenValue == 0">
|
||||
<div class="change-btn">
|
||||
<el-button type="primary" @click="changeScreen">切换驾驶舱</el-button>
|
||||
</div>
|
||||
<!-- <Map2D class="mapStyle" v-if="mapValue == 0"></Map2D> -->
|
||||
<!-- <Map3DStyle class="mapStyle" v-if="mapValue == 1"></Map3DStyle> -->
|
||||
<maps class="mapStyle" :projectData="projectData" v-if="mapValue == 0"></maps>
|
||||
@ -20,8 +21,12 @@
|
||||
<!-- <div class="borderBottom"></div> -->
|
||||
</div>
|
||||
<div class="screenTwo" v-if="screenValue == 1">
|
||||
<div class="change-btn">
|
||||
<el-button type="primary" @click="changeScreen">切换驾驶舱</el-button>
|
||||
</div>
|
||||
<largeScreenTwo></largeScreenTwo>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@ -53,13 +58,20 @@ const changeScreen = () => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.change-btn {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.orderBgc {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
.change-btn {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
:deep(.el-button) {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
.mapStyle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@ -124,4 +136,16 @@ const changeScreen = () => {
|
||||
background-size: 100%;
|
||||
}
|
||||
}
|
||||
.screenTwo {
|
||||
position: relative;
|
||||
.change-btn {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
:deep(.el-button) {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -72,7 +72,12 @@
|
||||
>
|
||||
</DialogForm>
|
||||
<!-- 投资支付详情 -->
|
||||
<transformInfo2 v-model:payVisible="payVisible" :relativeId="relativeId" :active="active" :snValue="snValue"></transformInfo2>
|
||||
<transformInfo2
|
||||
v-model:payVisible="payVisible"
|
||||
:relativeId="relativeRowId"
|
||||
:active="active"
|
||||
:snValue="snValue"
|
||||
></transformInfo2>
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
@ -196,6 +201,7 @@ const transformDialog = ref(false); // 整改记录对话框
|
||||
const recordData = ref([]); // 整改记录表格数据
|
||||
const recordItemData = ref([]); // 整改记录表格数据
|
||||
const basicData = ref(); // 基础信息
|
||||
const relativeRowId = ref("");
|
||||
const getApplyTimeData = async () => {
|
||||
let requestData = {};
|
||||
if (props.active == 0) {
|
||||
@ -239,7 +245,6 @@ const openAdd = () => {
|
||||
unPayAmount: "",
|
||||
payRatio: ""
|
||||
});
|
||||
formConfig.formItemConfig[5].data = [];
|
||||
addVisible.value = true;
|
||||
};
|
||||
// 页面的分页
|
||||
@ -271,6 +276,7 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
const handleEditItem = async (row: any) => {
|
||||
console.log(row);
|
||||
// getSubDetailList(row.id);
|
||||
relativeRowId.value = row.id;
|
||||
payVisible.value = true;
|
||||
};
|
||||
const getSubDetailList = async (id: any) => {
|
||||
@ -292,6 +298,7 @@ watch(
|
||||
(n, o) => {
|
||||
visible1.value = n;
|
||||
if (n) {
|
||||
formConfig.formItemConfig[5].data = [];
|
||||
getApplyTimeData();
|
||||
getSubItemList();
|
||||
} else {
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
disabled
|
||||
v-if="scope.row.symbolSum"
|
||||
v-if="scope.row.symbolSum && countData"
|
||||
v-model.number="countData[scope.row.key]"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
@ -183,31 +183,31 @@ const getSubItemList = async () => {
|
||||
let responseArr2 = [
|
||||
{
|
||||
reportContent: "合计:本期完成含税造价",
|
||||
amount: +res2.result.constructionCost,
|
||||
amount: res2.result ? +res2.result.constructionCost : 0,
|
||||
key: "constructionCost",
|
||||
symbolSum: true
|
||||
},
|
||||
{
|
||||
reportContent: "按合同约定进度款按每月实际完成工程造价的80%支付=(11)*80%",
|
||||
amount: +res2.result.payment,
|
||||
amount: res2.result ? +res2.result.payment : 0,
|
||||
key: "payment",
|
||||
symbolSum: true
|
||||
},
|
||||
{
|
||||
reportContent: "预付款(依据合同要求,当工程款(含预付款)达到合同价的50%时开始对预付款进行一次性抵扣)。",
|
||||
amount: +res2.result.advanceCharge,
|
||||
amount: res2.result ? +res2.result.advanceCharge : 0,
|
||||
key: "advanceCharge",
|
||||
symbolSum: true
|
||||
},
|
||||
{
|
||||
reportContent: "上期未支付工程款为",
|
||||
amount: +res2.result.unPayment,
|
||||
amount: res2.result ? +res2.result.unPayment : 0,
|
||||
key: "unPayment",
|
||||
symbolSum: true
|
||||
},
|
||||
{
|
||||
reportContent: "本期实际申请拨付的进度款",
|
||||
amount: +res2.result.applyPayment,
|
||||
amount: res2.result ? +res2.result.applyPayment : 0,
|
||||
key: "applyPayment",
|
||||
symbolSum: true
|
||||
}
|
||||
@ -273,6 +273,7 @@ watch(
|
||||
(n, o) => {
|
||||
visible1.value = n;
|
||||
if (n) {
|
||||
searchParams.value.applyId = "";
|
||||
getApplyTimeList();
|
||||
} else {
|
||||
emits("confirm");
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
<el-table-column prop="totalAmount" label="总工程造价(元)">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
disabled
|
||||
v-if="scope.row.symbolSum && countData"
|
||||
v-model.number="countData[scope.row.key]"
|
||||
placeholder="请输入"
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
.annex {
|
||||
.el-table {
|
||||
width: 80%;
|
||||
margin: 4% auto;
|
||||
}
|
||||
.footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 10%;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<div class="annex">
|
||||
<el-table
|
||||
:data="annexFiles"
|
||||
border
|
||||
class="el-table"
|
||||
:header-cell-style="{ textAlign: 'center' }"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="200" />
|
||||
<el-table-column prop="dictValue" label="附件名称" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link size="small" @click="addAnnexFile(row)">添加</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<footer class="footer">
|
||||
<el-button class="btnStyle" @click="emit('prev')">上一步</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">提交</el-button>
|
||||
</footer>
|
||||
|
||||
<FileUpload v-model="showFilesUpload" @update:files="handlechange" :files="current.files" :reset="true" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { getDicList } from "@/api/modules/jxjview";
|
||||
import FileUpload from "@/components/FilesUpload/FilesUpload.vue";
|
||||
import type { Options } from "@/views/goverment/approve/company/components/unit-table.vue";
|
||||
import type { UploadFile } from "@/components/FilesUpload/FilesUpload.vue";
|
||||
import type { AnnexFile } from "@/api/types";
|
||||
import { GlobalStore } from "@/stores";
|
||||
const store = GlobalStore();
|
||||
|
||||
type AnnexFilesOptions = Options & {
|
||||
files: UploadFile[];
|
||||
};
|
||||
|
||||
const showFilesUpload = ref(false);
|
||||
|
||||
// const annexFiles = ref<Array<AnnexFile>>([]);
|
||||
const annexFiles = ref<AnnexFilesOptions[]>([]);
|
||||
|
||||
const current = ref<AnnexFilesOptions>({} as AnnexFilesOptions);
|
||||
|
||||
const dictLabel = ref<undefined | number>(undefined);
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: "next", data: { annexFiles: Array<AnnexFile> }): void;
|
||||
(e: "prev", data: void): void;
|
||||
}>();
|
||||
|
||||
const addAnnexFile = (row: AnnexFilesOptions) => {
|
||||
// console.log(row);
|
||||
|
||||
showFilesUpload.value = true;
|
||||
current.value = row;
|
||||
dictLabel.value = row.dictLabel;
|
||||
};
|
||||
|
||||
const handlechange = e => {
|
||||
current.value.files = e.map(item => {
|
||||
item.label = current.value.dictLabel;
|
||||
return item;
|
||||
});
|
||||
};
|
||||
|
||||
const handleSubmit = () => {
|
||||
const fileList: AnnexFile[] = [];
|
||||
|
||||
annexFiles.value.forEach(item => {
|
||||
const files = item.files;
|
||||
|
||||
files.forEach(file => {
|
||||
const curr: AnnexFile = {};
|
||||
|
||||
curr.createTime = file.response?.createTime;
|
||||
curr.extendName = file.response?.ext;
|
||||
|
||||
// TODO: 上传文件后, 后端返回两个 name 字段, 一个后端存储的 filename, 一个文件本身的 originalFilename
|
||||
curr.fileName = file.response?.originalFilename;
|
||||
// curr.fileName = file.response?.filename;
|
||||
|
||||
// curr.fileId = file.response && +file.response.id;
|
||||
curr.fileSize = `${file.response?.size || ""}`;
|
||||
curr.fileUrl = file.response?.url;
|
||||
|
||||
curr.label = file.label;
|
||||
|
||||
fileList.push(curr);
|
||||
});
|
||||
|
||||
item.files = files;
|
||||
});
|
||||
|
||||
emit("next", { annexFiles: fileList });
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
const res = await getDicList({ dictType: "attachment_name" });
|
||||
annexFiles.value = res.result.map(item => ({ ...item, files: [] }));
|
||||
// console.log(annexFiles.value);
|
||||
|
||||
if (store.Message && store.Message.annexFiles.length) {
|
||||
annexFiles.value.forEach(item => {
|
||||
const currFiles = store.Message.annexFiles.filter(j => {
|
||||
// console.log("file", j);
|
||||
// console.log("dict", item);
|
||||
return j.label == item.dictLabel;
|
||||
});
|
||||
const files = [];
|
||||
|
||||
currFiles.forEach(curr => {
|
||||
files.push({
|
||||
id: curr.fileId,
|
||||
name: curr.fileName,
|
||||
size: +curr.fileSize,
|
||||
type: "image/png",
|
||||
response: { ...curr, contentType: "image/png" }
|
||||
});
|
||||
});
|
||||
|
||||
item.files = files;
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./annex.scss";
|
||||
</style>
|
||||
@ -0,0 +1,36 @@
|
||||
.duty {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
.steps {
|
||||
padding: 2% 6%;
|
||||
}
|
||||
v-deep {
|
||||
.is-process {
|
||||
color: #018bfe;
|
||||
font-size: 16px;
|
||||
border-color: #018bfe;
|
||||
|
||||
// .el-step__line {
|
||||
// background-color: #018bfe;
|
||||
// }
|
||||
}
|
||||
.is-finish {
|
||||
.el-step__line {
|
||||
background-color: #018bfe;
|
||||
}
|
||||
}
|
||||
.el-step__title {
|
||||
font-weight: 400;
|
||||
}
|
||||
.is-text {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
import { FormRules } from "element-plus";
|
||||
import { ref } from "vue";
|
||||
import type { EngineeringMain } from "@/api/types";
|
||||
|
||||
export interface FormData {
|
||||
enterpriseSn?: string;
|
||||
creditCode?: string;
|
||||
legalPerson?: string;
|
||||
legalPersonTel?: string;
|
||||
contractType?: string;
|
||||
type?: undefined | number;
|
||||
}
|
||||
|
||||
export type EngineeringMainList = Array<FormData & EngineeringMain>;
|
||||
|
||||
export const formData = ref<EngineeringMainList>([
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
},
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
},
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
contractType: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
},
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
},
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
}
|
||||
]);
|
||||
|
||||
export const datas = ref<EngineeringMainList[number]>({
|
||||
enterpriseSn: "建设单位名称",
|
||||
creditCode: "统一社会信用代码",
|
||||
legalPerson: "联系人",
|
||||
legalPersonTel: "联系人手机号",
|
||||
contractType: "承包类型"
|
||||
});
|
||||
|
||||
export const rules = ref<FormRules>({
|
||||
enterpriseSn: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入单位名称"
|
||||
},
|
||||
creditCode: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入统一社会信用代码"
|
||||
},
|
||||
contractType: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入承包类型"
|
||||
}
|
||||
});
|
||||
|
||||
export const reset = () => {
|
||||
formData.value = [
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
},
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
},
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
contractType: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
},
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
},
|
||||
{
|
||||
enterpriseSn: "",
|
||||
creditCode: "",
|
||||
legalPerson: "",
|
||||
legalPersonTel: "",
|
||||
type: undefined,
|
||||
engineeringMainPersonList: []
|
||||
}
|
||||
];
|
||||
};
|
||||
@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div class="duty">
|
||||
<el-steps class="steps" :active="active" align-center>
|
||||
<el-step
|
||||
style="cursor: pointer"
|
||||
v-for="(item, i) in stepOptions"
|
||||
:key="item.dictCode"
|
||||
:title="item.dictValue?.slice(0, 2)"
|
||||
@click="active = i"
|
||||
/>
|
||||
</el-steps>
|
||||
|
||||
<duty-form :form-config="formConfig" />
|
||||
|
||||
<footer class="footer">
|
||||
<el-button class="btnStyle" :type="isAllowNext ? 'primary' : 'default'" @click="handleToPrevOrNext">{{
|
||||
isAllowNext ? "下一步" : "上一步"
|
||||
}}</el-button>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, watch, computed, onMounted, onUnmounted } from "vue";
|
||||
import dutyForm from "./dutyForm.vue";
|
||||
import { formData, datas, rules, reset } from "./duty";
|
||||
import { getDicList } from "@/api/modules/jxjview";
|
||||
import type { ResDictData } from "@/api/types";
|
||||
import type { EngineeringMainList } from "./duty";
|
||||
import type { Type } from "./overview";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { ElMessage } from "element-plus";
|
||||
const store = GlobalStore();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: "next", data: { engineeringMains: EngineeringMainList }): void;
|
||||
(e: "prev", data: void): void;
|
||||
}>();
|
||||
|
||||
const active = ref(0),
|
||||
stepOptions = ref<ResDictData["result"]>([]);
|
||||
|
||||
const formConfig = reactive({
|
||||
formData: formData.value[active.value],
|
||||
datas,
|
||||
rules
|
||||
});
|
||||
|
||||
const isAllowNext = computed(() => active.value >= stepOptions.value.length - 1);
|
||||
|
||||
const handleToPrevOrNext = () => {
|
||||
if (isAllowNext.value) {
|
||||
// const isInValid = formData.value.find(item => {
|
||||
// return !item.enterpriseSn || !item.creditCode || ("contractType" in item && !item.contractType);
|
||||
// });
|
||||
|
||||
// if (isInValid) return ElMessage.warning("请输入必填项");
|
||||
emit("next", { engineeringMains: formData.value });
|
||||
} else {
|
||||
emit("prev");
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => active.value,
|
||||
() => {
|
||||
console.log("datas", formData.value);
|
||||
formConfig.formData = formData.value[active.value];
|
||||
formConfig.datas.enterpriseSn = stepOptions.value[active.value].dictValue + "名称";
|
||||
}
|
||||
);
|
||||
|
||||
onMounted(async () => {
|
||||
const data = await getDicList({ dictType: "enterprise_main", status: 1 });
|
||||
stepOptions.value = data.result;
|
||||
formData.value = formData.value.map((item, index) => ({
|
||||
...item,
|
||||
type: data.result[index].dictLabel as Type
|
||||
}));
|
||||
formConfig.formData = formData.value[active.value];
|
||||
formConfig.datas.enterpriseSn = stepOptions.value[active.value].dictValue + "名称";
|
||||
|
||||
if (store.Message && store.Message.engineeringMains.length) {
|
||||
formData.value = formData.value.map(item => {
|
||||
// console.log("main", store.Message.engineeringMains);
|
||||
let curr = store.Message.engineeringMains.find(main => item.type == main.type);
|
||||
if ("contractType" in item) {
|
||||
return (curr = {
|
||||
enterpriseSn: curr.enterpriseName,
|
||||
creditCode: curr.creditCode,
|
||||
legalPerson: curr.legalPerson,
|
||||
legalPersonTel: curr.legalPersonTel,
|
||||
contractType: curr.contractType
|
||||
});
|
||||
} else {
|
||||
delete curr["contractType"];
|
||||
return curr;
|
||||
}
|
||||
});
|
||||
|
||||
formConfig.formData = formData.value[active.value];
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => reset());
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./duty.scss";
|
||||
</style>
|
||||
@ -0,0 +1,73 @@
|
||||
.duty-form {
|
||||
flex: 1;
|
||||
padding: 0 6%;
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
> .form-item {
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
.search {
|
||||
position: absolute;
|
||||
inset-block: 1px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 45px;
|
||||
cursor: pointer;
|
||||
background-color: #008dff;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
inset-inline-end: 1px;
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.select {
|
||||
width: -webkit-fill-avaiable;
|
||||
width: -moz-avaiable;
|
||||
width: stretch;
|
||||
}
|
||||
}
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
.el-input-number__increase {
|
||||
background-color: #09405f;
|
||||
color: #3f6ab0;
|
||||
font-size: 16px;
|
||||
border: 0 !important;
|
||||
border-bottom: 1px solid #087ba4 !important;
|
||||
border-left: 1px solid #087ba4 !important;
|
||||
}
|
||||
.el-input-number__decrease {
|
||||
background-color: #09405f;
|
||||
color: #3f6ab0;
|
||||
font-size: 16px;
|
||||
border: 0 !important;
|
||||
border-top: 1px solid #087ba4 !important;
|
||||
border-left: 1px solid #087ba4 !important;
|
||||
}
|
||||
.el-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
:deep(.el-form-item__label) {
|
||||
color: var(--el-menu-text-color);
|
||||
font-size: 16px;
|
||||
}
|
||||
:deep(.el-input__wrapper),
|
||||
:deep(.el-textarea__inner),
|
||||
:deep(.el-input.is-disabled .el-input__wrapper) {
|
||||
background-color: transparent;
|
||||
box-shadow: 0 0 0 1px #087ba4 inset;
|
||||
}
|
||||
:deep(.el-input__inner),
|
||||
:deep(.el-textarea__inner),
|
||||
:deep(.el-range-input) {
|
||||
color: var(--el-menu-text-color);
|
||||
font-size: 16px;
|
||||
}
|
||||
@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div class="duty-form">
|
||||
<el-form class="form" ref="formRef" :model="formData" :rules="formConfig.rules" label-width="150px">
|
||||
<div class="row">
|
||||
<template v-for="(val, key) in formData" :key="datas[key]">
|
||||
<el-form-item v-if="Object.keys(datas).includes(key)" class="form-item" :prop="key" :label="datas[key]">
|
||||
<el-select class="select" v-if="key === 'enterpriseSn'" @change="onChange" v-model="formData[key]">
|
||||
<el-option
|
||||
v-for="item in nameOptions"
|
||||
:key="item.enterpriseSn"
|
||||
:label="item.enterpriseName"
|
||||
:value="item.enterpriseSn"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <div v-if="key === 'enterpriseSn'" class="search">
|
||||
<el-icon class="icon"><Search /></el-icon>
|
||||
</div> -->
|
||||
<el-input v-else v-model="formData[key]" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<!-- <el-table
|
||||
:data="formData.engineeringMainPersonList"
|
||||
border
|
||||
max-height="500"
|
||||
class="el-table"
|
||||
:header-cell-style="{ textAlign: 'center' }"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
>
|
||||
<el-table-column prop="name" label="姓名">
|
||||
<template #default="{ row }">
|
||||
<el-input style="text-align: center" class="test" v-model="row.name" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="jobId" label="职务">
|
||||
<template #default="{ row }">
|
||||
<el-select class="select" v-model="row.jobId" size="small">
|
||||
<el-option v-for="item in jobOptions" :key="item.dictCode" :label="item.dictValue" :value="item.dictLabel" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="station" label="职称/岗位">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.station" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="stationCode" label="职称证号/岗位证号">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.stationCode" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="idCard" label="身份证号">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.idCard" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phone" label="联系电话">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.phone" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" width="100">
|
||||
<template #header>
|
||||
<el-button type="primary" round @click="addEngineeringMainPerson">新增</el-button>
|
||||
</template>
|
||||
|
||||
<template #default="{ row }">
|
||||
<el-button type="danger" link @click="removeEngineeringMainPerson(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, watch, onMounted } from "vue";
|
||||
import { Search } from "@element-plus/icons-vue";
|
||||
import { queryMainType } from "@/api/modules/project";
|
||||
import { getDicList } from "@/api/modules/jxjview";
|
||||
import type { FormRules } from "element-plus";
|
||||
import type { EngineeringMainPerson } from "@/api/types";
|
||||
import type { EngineeringMainList } from "./duty";
|
||||
|
||||
export interface formConfig {
|
||||
formData: EngineeringMainList[number];
|
||||
rules: FormRules;
|
||||
datas: EngineeringMainList[number];
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
formConfig: formConfig;
|
||||
}>();
|
||||
|
||||
const formData = computed(() => props.formConfig.formData),
|
||||
datas = computed(() => props.formConfig.datas);
|
||||
|
||||
const nameOptions = ref([{ enterpriseSn: "", enterpriseName: "", creditCode: "", legalPerson: "", legalPersonTel: "" }]),
|
||||
jobOptions = ref([{ dictCode: "", dictValue: "", dictLabel: undefined }]);
|
||||
|
||||
watch(
|
||||
() => formData.value.type,
|
||||
async (n, o) => {
|
||||
// const data = await queryMainType({ mainType: formData.value.type });
|
||||
// // @ts-expect-error
|
||||
// nameOptions.value = data.result;
|
||||
}
|
||||
);
|
||||
|
||||
const onChange = option => {
|
||||
const value = nameOptions.value.find(item => item.enterpriseSn == option);
|
||||
if (!value) return;
|
||||
formData.value.creditCode = value.creditCode;
|
||||
formData.value.legalPerson = value.legalPerson;
|
||||
formData.value.legalPersonTel = value.legalPersonTel;
|
||||
};
|
||||
|
||||
const addEngineeringMainPerson = () => {
|
||||
formData.value.engineeringMainPersonList?.push({
|
||||
name: "",
|
||||
jobId: "",
|
||||
station: "",
|
||||
stationCode: "",
|
||||
idCard: "",
|
||||
phone: ""
|
||||
});
|
||||
};
|
||||
|
||||
const removeEngineeringMainPerson = (row: EngineeringMainPerson) => {
|
||||
const index = formData.value.engineeringMainPersonList?.indexOf(row);
|
||||
// index && index >= 0 && formData.value.engineeringMainPersonList?.splice(index, 1);
|
||||
!index >= 0 && formData.value.engineeringMainPersonList?.splice(index, 1);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
const res = await getDicList({ dictType: "engineering_post" });
|
||||
jobOptions.value = res.result;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./dutyForm.scss";
|
||||
|
||||
.test :deep(.el-input__wrapper) {
|
||||
box-shadow: 0 0 0 0;
|
||||
}
|
||||
.test :deep(.el-input__inner) {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,19 @@
|
||||
.report {
|
||||
// width: 99%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// padding: 2% 4%;
|
||||
margin: 0 auto;
|
||||
border-radius: 8px;
|
||||
.common {
|
||||
padding-bottom: 30px;
|
||||
margin-top: 3%;
|
||||
// margin: 3% 8% 0 8%;
|
||||
}
|
||||
.steps {
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<!-- <div class="report"> -->
|
||||
<el-dialog class="report" :title="title" style="min-width: 1680px" v-model="visible1" @close="closeMain">
|
||||
<Steps class="steps" :datas="datas" :active="active" />
|
||||
|
||||
<keep-alive>
|
||||
<component :is="Components[active]" @next="next" @prev="active--"></component>
|
||||
</keep-alive>
|
||||
</el-dialog>
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="ProjectSupervision">
|
||||
import { ref, onMounted, onUnmounted, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import Steps from "@/components/Steps/setps.vue";
|
||||
import Overview from "./overview.vue";
|
||||
import Duty from "./duty.vue";
|
||||
import Annnex from "./annex.vue";
|
||||
import { Reports as datas } from "@/enums/project/ReportEnum";
|
||||
import { addEngineering, editEngineering } from "@/api/modules/project";
|
||||
import type { AnnexFile, ReqAddReport } from "@/api/types";
|
||||
import type { OverviewForm } from "./overview";
|
||||
import { EngineeringMainList } from "./duty";
|
||||
// import router from "@/routers";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { ElMessage } from "element-plus";
|
||||
const visible1 = ref(false);
|
||||
const props = defineProps({
|
||||
detailsDialog: Boolean,
|
||||
relativeId: String,
|
||||
title: String
|
||||
});
|
||||
const emits = defineEmits(["update:detailsDialog", "confirm"]);
|
||||
const store = GlobalStore();
|
||||
const router = useRouter();
|
||||
|
||||
const active = ref(0);
|
||||
const Components = [Overview, Duty, Annnex];
|
||||
|
||||
const addRepostData = ref<ReqAddReport>({});
|
||||
// 关闭两个对话框
|
||||
const closeMain = () => {
|
||||
visible1.value = false;
|
||||
// transformDialog.value = false;
|
||||
// dialogStyle.value = {
|
||||
// "min-width": "824px",
|
||||
// transform: "translateX(0px)"
|
||||
// };
|
||||
};
|
||||
// 全部整改完成,提交
|
||||
const allSubmit = async () => {
|
||||
// const res = await submitAll({ id: basicData.value.id });
|
||||
ElMessage.success("提交成功");
|
||||
};
|
||||
const next = async (data: OverviewForm | { engineeringMains: EngineeringMainList } | { annexFiles: Array<AnnexFile> }) => {
|
||||
// addRepostData.value = Object.assign({}, addRepostData.value, data);
|
||||
|
||||
if (active.value >= datas.length - 1) {
|
||||
// await submit();
|
||||
// router.push("/project/supervision/SupervisionRecord/index");
|
||||
visible1.value = false;
|
||||
}
|
||||
active.value++;
|
||||
};
|
||||
|
||||
const submit = async () => {
|
||||
if (!store.Message) {
|
||||
const data = await addEngineering(addRepostData.value);
|
||||
ElMessage.success(data.message);
|
||||
} else {
|
||||
const res = await editEngineering(addRepostData.value);
|
||||
ElMessage.success(res.message);
|
||||
}
|
||||
|
||||
// console.log(data);
|
||||
active.value++;
|
||||
};
|
||||
// 监听父组件的visible,用来简介控制el-dialog的弹框开关,一般是用于开
|
||||
watch(
|
||||
() => props.detailsDialog,
|
||||
(n, o) => {
|
||||
visible1.value = n;
|
||||
emits("confirm");
|
||||
if (n) {
|
||||
active.value = 0;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
);
|
||||
// 监听el-dialog显示状态,再通过@update:visible 通知父组件,一般是用于关
|
||||
watch(visible1, (n, o) => {
|
||||
emits("update:detailsDialog", n);
|
||||
});
|
||||
onMounted(() => {
|
||||
// console.log(router.params);
|
||||
});
|
||||
onUnmounted(() => {
|
||||
store.Message = null;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
@ -0,0 +1,136 @@
|
||||
@mixin fullwidth {
|
||||
width: -webkit-fill-available;
|
||||
width: -moz-available;
|
||||
width: stretch;
|
||||
}
|
||||
.overview {
|
||||
// background-color: #fff;
|
||||
flex: 1;
|
||||
.form {
|
||||
padding: 40px 10% 0 10%;
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
> :first-child,
|
||||
> :last-child {
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
:deep(.el-input--default) {
|
||||
width: 100%;
|
||||
}
|
||||
.select {
|
||||
width: 100%;
|
||||
}
|
||||
.continuous {
|
||||
@include fullwidth;
|
||||
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
width: 90%;
|
||||
min-height: 40px;
|
||||
padding-inline: 10px;
|
||||
border: 1px solid #dddddd;
|
||||
border-radius: 5px;
|
||||
.label {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
span {
|
||||
flex-shrink: 0;
|
||||
margin-right: 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.calendar {
|
||||
position: absolute;
|
||||
inset-block: 1px;
|
||||
right: 1px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 41px;
|
||||
height: 31px;
|
||||
cursor: pointer;
|
||||
background-color: #008aff;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
v-deep {
|
||||
.date {
|
||||
@include fullwidth;
|
||||
}
|
||||
.el-input__prefix {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 2% 8% 0 6%;
|
||||
h4 {
|
||||
position: relative;
|
||||
padding-left: 6px;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
color: var(--el-menu-text-color);
|
||||
border-left: 3px solid #008bff;
|
||||
}
|
||||
.el-table {
|
||||
width: calc(100% - 20px);
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 40px;
|
||||
}
|
||||
}
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
.el-input-number__increase {
|
||||
background-color: #09405f;
|
||||
color: #3f6ab0;
|
||||
font-size: 16px;
|
||||
border: 0 !important;
|
||||
border-bottom: 1px solid #087ba4 !important;
|
||||
border-left: 1px solid #087ba4 !important;
|
||||
}
|
||||
.el-input-number__decrease {
|
||||
background-color: #09405f;
|
||||
color: #3f6ab0;
|
||||
font-size: 16px;
|
||||
border: 0 !important;
|
||||
border-top: 1px solid #087ba4 !important;
|
||||
border-left: 1px solid #087ba4 !important;
|
||||
}
|
||||
.el-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
:deep(.el-form-item__label) {
|
||||
color: var(--el-menu-text-color);
|
||||
font-size: 16px;
|
||||
}
|
||||
:deep(.el-input__wrapper),
|
||||
:deep(.el-textarea__inner),
|
||||
:deep(.el-input.is-disabled .el-input__wrapper) {
|
||||
background-color: transparent;
|
||||
box-shadow: 0 0 0 1px #087ba4 inset;
|
||||
}
|
||||
:deep(.el-input__inner),
|
||||
:deep(.el-textarea__inner),
|
||||
:deep(.el-range-input) {
|
||||
color: var(--el-menu-text-color);
|
||||
font-size: 16px;
|
||||
}
|
||||
@ -0,0 +1,230 @@
|
||||
import { ref } from "vue";
|
||||
import type { ReqAddReport } from "@/api/types/index";
|
||||
import { FormRules } from "element-plus";
|
||||
|
||||
export enum Type {
|
||||
One = 1,
|
||||
Two = 2,
|
||||
Three = 3,
|
||||
Four = 4,
|
||||
Five = 5
|
||||
}
|
||||
|
||||
export enum Important {
|
||||
Zero = 0,
|
||||
One = 1
|
||||
}
|
||||
|
||||
const data = {
|
||||
projectName: "",
|
||||
engineeringName: "",
|
||||
engineeringCode: "",
|
||||
engineeringType: Type["One"],
|
||||
engineeringUse: Type["One"],
|
||||
engineeringCost: "",
|
||||
engineeringArea: "",
|
||||
engineeringLength: "",
|
||||
isImportant: Important["One"],
|
||||
longitude: "",
|
||||
latitude: "",
|
||||
province: "",
|
||||
city: "",
|
||||
district: "",
|
||||
address: "",
|
||||
licenseKey: "",
|
||||
licenseCreateTime: "",
|
||||
safetySupervision: "",
|
||||
qualitySupervision: "",
|
||||
safetySupervisionCode: "",
|
||||
qualitySupervisionCode: "",
|
||||
safetySupervisionPerson: "",
|
||||
qualitySupervisionPerson: "",
|
||||
safetySupervisionState: "",
|
||||
qualitySupervisionState: "",
|
||||
safetySupervisionPlan: "",
|
||||
qualitySupervisionPlan: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
position: "",
|
||||
engineeringSingles: []
|
||||
};
|
||||
|
||||
export type OverviewForm = Pick<ReqAddReport, keyof typeof data>;
|
||||
|
||||
export const form = ref<OverviewForm>(data);
|
||||
|
||||
export const reset = () => {
|
||||
form.value = {
|
||||
projectName: "",
|
||||
engineeringName: "",
|
||||
engineeringCode: "",
|
||||
engineeringType: Type["One"],
|
||||
engineeringUse: Type["One"],
|
||||
engineeringCost: "",
|
||||
engineeringArea: "",
|
||||
engineeringLength: "",
|
||||
isImportant: Important["One"],
|
||||
longitude: "",
|
||||
latitude: "",
|
||||
province: "",
|
||||
city: "",
|
||||
district: "",
|
||||
address: "",
|
||||
licenseKey: "",
|
||||
licenseCreateTime: "",
|
||||
safetySupervision: "",
|
||||
qualitySupervision: "",
|
||||
safetySupervisionCode: "",
|
||||
qualitySupervisionCode: "",
|
||||
safetySupervisionPerson: "",
|
||||
qualitySupervisionPerson: "",
|
||||
safetySupervisionState: "",
|
||||
qualitySupervisionState: "",
|
||||
safetySupervisionPlan: "",
|
||||
qualitySupervisionPlan: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
engineeringSingles: []
|
||||
};
|
||||
};
|
||||
|
||||
export const rules = ref<FormRules>({
|
||||
projectName: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入项目名称"
|
||||
},
|
||||
engineeringName: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入工程名称"
|
||||
},
|
||||
engineeringCode: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入工程编码"
|
||||
},
|
||||
engineeringType: {
|
||||
type: "number",
|
||||
required: true,
|
||||
message: "请输入工程类别"
|
||||
},
|
||||
engineeringUse: {
|
||||
type: "number",
|
||||
required: true,
|
||||
message: "请选择工程用途"
|
||||
},
|
||||
engineeringCost: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入工程造价"
|
||||
},
|
||||
engineeringArea: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入工程总面积"
|
||||
},
|
||||
engineeringLength: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入工程总长度(m)"
|
||||
},
|
||||
isImportant: {
|
||||
type: "number",
|
||||
required: true,
|
||||
message: "请选择"
|
||||
},
|
||||
position: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择工程位置"
|
||||
},
|
||||
// district: {
|
||||
// type: "string",
|
||||
// required: true,
|
||||
// message: "请输入所属管辖区域"
|
||||
// },
|
||||
addressList: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入所属管辖区域"
|
||||
},
|
||||
address: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入建设地址"
|
||||
},
|
||||
licenseKey: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入施工许可证号"
|
||||
},
|
||||
licenseCreateTime: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择施工许可发放时间"
|
||||
},
|
||||
safetySupervision: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入安全监督站"
|
||||
},
|
||||
qualitySupervision: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入质量监督站"
|
||||
},
|
||||
|
||||
safetySupervisionCode: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入监督编号(安全)"
|
||||
},
|
||||
qualitySupervisionCode: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入监督编号(质量)"
|
||||
},
|
||||
safetySupervisionPerson: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入安全监督员"
|
||||
},
|
||||
qualitySupervisionPerson: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入质量监督员"
|
||||
},
|
||||
|
||||
safetySupervisionState: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入安全监督工程状态"
|
||||
},
|
||||
qualitySupervisionState: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入质量监督工程状态"
|
||||
},
|
||||
safetySupervisionPlan: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入安全监督形象进度"
|
||||
},
|
||||
qualitySupervisionPlan: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请输入质量监督形象进度"
|
||||
},
|
||||
startTime: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择日期"
|
||||
},
|
||||
|
||||
endTime: {
|
||||
type: "string",
|
||||
required: true,
|
||||
message: "请选择日期"
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,367 @@
|
||||
<template>
|
||||
<div class="overview">
|
||||
<el-form ref="ruleFormRef" :model="form" label-width="160px" :rules="rules" class="form" size="default">
|
||||
<!-- <el-form ref="ruleFormRef" :model="form" label-width="150px" class="form" size="default"> -->
|
||||
<el-form-item label="项目名称:" prop="projectName">
|
||||
<el-input placeholder="请输入" v-model="form.projectName" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称:" prop="engineeringName">
|
||||
<el-input placeholder="请输入" v-model="form.engineeringName" />
|
||||
</el-form-item>
|
||||
<div class="row">
|
||||
<el-form-item label="工程编码:" prop="engineeringCode">
|
||||
<el-input placeholder="请输入" v-model="form.engineeringCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工程类别:" prop="engineeringType">
|
||||
<el-select class="select" placeholder="请选择" v-model="form.engineeringType">
|
||||
<el-option
|
||||
v-for="item in engineeringTypeOptions"
|
||||
:key="item.dictCode"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictLabel"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="工程用途:" prop="engineeringUse">
|
||||
<el-select class="select" placeholder="请选择" v-model="form.engineeringUse">
|
||||
<el-option v-for="item in engineeringPurpose" :key="item.dictCode" :label="item.dictValue" :value="item.dictLabel" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程造价(万元):" prop="engineeringCost">
|
||||
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="工程总面积(㎡):" prop="engineeringArea">
|
||||
<el-input placeholder="请输入" v-model="form.engineeringArea" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工程总长度(m):" prop="engineeringLength">
|
||||
<el-input placeholder="请输入" v-model="form.engineeringLength" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="是否重点工程:" prop="isImportant">
|
||||
<el-radio-group placeholder="请选择" v-model="form.isImportant">
|
||||
<el-radio :label="1">是</el-radio>
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程位置:" prop="position">
|
||||
<!-- <label class="label"><span>经度</span> <el-input disabled v-model="form.longitude" size="small" /></label>
|
||||
<label class="label"><span>纬度</span> <el-input disabled v-model="form.latitude" size="small" /></label> -->
|
||||
<el-input placeholder="请选择" v-model="form.position">
|
||||
<template #append>
|
||||
<el-icon size="22" @click="openMap"><Location /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
|
||||
<!-- <el-icon style="background-color: #008bff; color: #fff; height: 42px; width: 36px" size="22" @click="openMap"
|
||||
><Location
|
||||
/></el-icon> -->
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- 标记校验 -->
|
||||
<el-form-item label="所属管辖区域:">
|
||||
<area-selected v-model="addressList" @get-address="handleGetAdress"></area-selected>
|
||||
</el-form-item>
|
||||
<el-form-item label="建设地址:" prop="address">
|
||||
<el-input placeholder="请输入" v-model="form.address" />
|
||||
</el-form-item>
|
||||
<div class="row">
|
||||
<el-form-item label="施工许可证号:" prop="licenseKey">
|
||||
<el-input placeholder="请输入" v-model="form.licenseKey" />
|
||||
</el-form-item>
|
||||
<el-form-item label="施工许可发放时间:" prop="licenseCreateTime">
|
||||
<el-date-picker
|
||||
ref="licenseCreateTimeRef"
|
||||
class="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-model="form.licenseCreateTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
style="wdith: 100%"
|
||||
/>
|
||||
<div class="calendar" @click="licenseCreateTimeRef?.focus()">
|
||||
<el-icon class="icon"><Calendar /></el-icon>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="安全监督站:" prop="safetySupervision">
|
||||
<el-input placeholder="请输入" v-model="form.safetySupervision" />
|
||||
</el-form-item>
|
||||
<el-form-item label="质量监督站:" prop="qualitySupervision">
|
||||
<el-input placeholder="请输入" v-model="form.qualitySupervision" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="监督编号(安全):" prop="safetySupervisionCode">
|
||||
<el-input placeholder="请输入" v-model="form.safetySupervisionCode" />
|
||||
</el-form-item>
|
||||
<el-form-item label="监督编号(质量):" prop="qualitySupervisionCode">
|
||||
<el-input placeholder="请输入" v-model="form.qualitySupervisionCode" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="安全监督员:" prop="safetySupervisionPerson">
|
||||
<el-input placeholder="请输入" v-model="form.safetySupervisionPerson" />
|
||||
</el-form-item>
|
||||
<el-form-item label="质量监督员:" prop="qualitySupervisionPerson">
|
||||
<el-input placeholder="请输入" v-model="form.qualitySupervisionPerson" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="安全监督工程状态:" prop="safetySupervisionState">
|
||||
<el-input placeholder="请输入" v-model="form.safetySupervisionState"> </el-input>
|
||||
<!-- <el-select class="select" v-model="form.safetySupervisionState">
|
||||
<el-option
|
||||
v-for="item in engineeringUseOptions"
|
||||
:key="item.dictCode"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictLabel"
|
||||
/>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="质量监督工程状态:" prop="qualitySupervisionState">
|
||||
<el-input placeholder="请输入" v-model="form.qualitySupervisionState"> </el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="安全监督形象进度:" prop="safetySupervisionPlan">
|
||||
<el-input placeholder="请输入" v-model="form.safetySupervisionPlan"> </el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="质量监督形象进度:" prop="qualitySupervisionPlan">
|
||||
<el-input placeholder="请输入" v-model="form.qualitySupervisionPlan"> </el-input>
|
||||
<!-- <el-select class="select" v-model="form.qualitySupervisionPlan">
|
||||
<el-option
|
||||
v-for="item in engineeringUseOptions"
|
||||
:key="item.dictCode"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictLabel"
|
||||
/>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="合同开工日期:" prop="startTime">
|
||||
<el-date-picker
|
||||
ref="startTimeRef"
|
||||
class="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-model="form.startTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
<div class="calendar" @click="startTimeRef?.focus()">
|
||||
<el-icon class="icon"><Calendar /></el-icon>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同竣工日期:" prop="endTime">
|
||||
<el-date-picker
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
ref="endTimeRef"
|
||||
class="date"
|
||||
v-model="form.endTime"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
/>
|
||||
<div class="calendar" @click="endTimeRef?.focus()">
|
||||
<el-icon class="icon"><Calendar /></el-icon>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<!-- <div class="table">
|
||||
<h4>单体工程</h4>
|
||||
<el-table
|
||||
:data="form.engineeringSingles"
|
||||
border
|
||||
max-height="340"
|
||||
class="el-table"
|
||||
:header-cell-style="{ textAlign: 'center' }"
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
>
|
||||
<el-table-column prop="name" label="单体工程名称">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.name" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="shape" label="结构形式">
|
||||
<template #default="{ row }">
|
||||
<el-select class="select" v-model="row.shape" size="small">
|
||||
<el-option v-for="item in structuralStyle" :key="item.dictCode" :label="item.dictValue" :value="item.dictLabel" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="area" label="工程面积(㎡)">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.area" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="floorNum" label="地面层数">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.floorNum" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="underNum" label="地下层数">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.underNum" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注">
|
||||
<template #default="{ row }">
|
||||
<el-input class="test" v-model="row.remark" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right">
|
||||
<template #header>
|
||||
<el-button type="primary" round @click="addEngineeringSingle"> 新增 </el-button>
|
||||
</template>
|
||||
|
||||
<template #default="{ row }">
|
||||
<el-button type="danger" link @click="removeEngineeringSingle(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div> -->
|
||||
<footer class="footer">
|
||||
<el-button type="primary" @click="next(ruleFormRef)">下一步</el-button>
|
||||
</footer>
|
||||
<AMap v-model="isOpen" @get-address="getAddress" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
import { form, reset, rules } from "./overview";
|
||||
import { getDicList } from "@/api/modules/jxjview";
|
||||
import { getEngineeringName } from "@/api/modules/project";
|
||||
import { ElDatePicker } from "element-plus";
|
||||
import type { ReqQueryDictData, EngineeringSingle } from "@/api/types";
|
||||
import { ElMessage, FormInstance, ElForm } from "element-plus";
|
||||
import type { OverviewForm } from "./overview";
|
||||
import AreaSelected from "@/components/ChinaAreaData/index.vue";
|
||||
import AMap from "@/components/AMap/AMap.vue";
|
||||
import { GlobalStore } from "@/stores";
|
||||
|
||||
const ruleFormRef = ref<FormInstance>();
|
||||
|
||||
const store = GlobalStore();
|
||||
const isOpen = ref(false);
|
||||
const addressList = ref({
|
||||
province: "",
|
||||
city: "",
|
||||
area: "",
|
||||
district: ""
|
||||
});
|
||||
const emit = defineEmits<{
|
||||
(e: "next", data: OverviewForm): void;
|
||||
}>();
|
||||
|
||||
type DictDataList = Array<ReqQueryDictData>;
|
||||
type ElDatePickerType = typeof ElDatePicker;
|
||||
|
||||
const licenseCreateTimeRef = ref<ElDatePickerType>(),
|
||||
startTimeRef = ref<ElDatePickerType>(),
|
||||
endTimeRef = ref<ElDatePickerType>();
|
||||
|
||||
const engineeringTypeOptions = ref<DictDataList>([]),
|
||||
engineeringUseOptions = ref<DictDataList>([]);
|
||||
|
||||
const engineeringPurpose = ref<DictDataList>([]);
|
||||
const structuralStyle = ref<DictDataList>([]);
|
||||
const addEngineeringSingle = () => {
|
||||
form.value.engineeringSingles?.push({
|
||||
area: "",
|
||||
engineeringSn: "",
|
||||
floorNum: "",
|
||||
name: "",
|
||||
remark: "",
|
||||
shape: undefined,
|
||||
underNum: ""
|
||||
});
|
||||
};
|
||||
const projectName = ref("");
|
||||
|
||||
const handleGetAdress = (data: any) => {
|
||||
// form.value.address = data;
|
||||
form.value.province = data.name[0];
|
||||
form.value.city = data.name[1];
|
||||
form.value.district = data.name[2];
|
||||
};
|
||||
|
||||
const openMap = () => {
|
||||
isOpen.value = true;
|
||||
};
|
||||
|
||||
const getAddress = (e: any) => {
|
||||
isOpen.value = false;
|
||||
form.value.position = "经度:" + e.lng + " 纬度:" + e.lat;
|
||||
form.value.latitude = e.lat;
|
||||
form.value.longitude = e.lng;
|
||||
ElMessage.success("已获取地址");
|
||||
};
|
||||
|
||||
const removeEngineeringSingle = (row: EngineeringSingle) => {
|
||||
const i = form.value.engineeringSingles?.indexOf(row);
|
||||
i != null && form.value.engineeringSingles?.splice(i, 1);
|
||||
};
|
||||
|
||||
const next = async (formEl: FormInstance | undefined, params: any) => {
|
||||
if (!formEl) return;
|
||||
// await formEl.validate(async (valid, fields) => {
|
||||
// if (valid) {
|
||||
// emit("next", form.value);
|
||||
// } else {
|
||||
// console.log("error submit!", fields);
|
||||
// ElMessage({
|
||||
// showClose: true,
|
||||
// message: "请完善表单信息!",
|
||||
// type: "error"
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
emit("next", form.value);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
// const res2 = await getEngineeringName();
|
||||
// form.value.projectName = res2.result.projectName; //获取项目名称
|
||||
const data = await getDicList({ dictType: "engineering_type" });
|
||||
engineeringTypeOptions.value = data.result;
|
||||
const res = await getDicList({ dictType: "engineering_purpose" }); //工程用途
|
||||
engineeringPurpose.value = res.result;
|
||||
const res1 = await getDicList({ dictType: "structural_style" });
|
||||
structuralStyle.value = res1.result;
|
||||
|
||||
if (store.Message) {
|
||||
form.value = store.Message;
|
||||
addressList.value = store.Message;
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => reset());
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./overview.scss";
|
||||
.test :deep(.el-input__wrapper) {
|
||||
box-shadow: 0 0 0 0;
|
||||
}
|
||||
.test :deep(.el-input__inner) {
|
||||
text-align: center;
|
||||
}
|
||||
:deep(.el-table__empty-text) {
|
||||
min-height: 200px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@ -11,12 +11,12 @@
|
||||
:tool-button="false"
|
||||
:pagination="true"
|
||||
background
|
||||
:isShowSearch="false"
|
||||
:onReset="false"
|
||||
:isShowSearch="true"
|
||||
:onReset="true"
|
||||
>
|
||||
<!-- <template #formButton="scope">
|
||||
<el-button class="addButtonStyle" @click="handleAddItem">新增</el-button>
|
||||
</template> -->
|
||||
<template #formButton="scope">
|
||||
<el-button class="btnStyle" @click="handleAddItem">新增</el-button>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="handleLookItem(row)">
|
||||
<img src="@/assets/images/tableIcon/look.png" alt="" class="configureIcon" />
|
||||
@ -41,6 +41,12 @@
|
||||
</ProTable>
|
||||
</div>
|
||||
</div>
|
||||
<ProjectSupervision
|
||||
v-model:detailsDialog="detailsDialog"
|
||||
:relativeId="relativeId"
|
||||
:title="approvalTitle"
|
||||
@confirm="confirmReform"
|
||||
></ProjectSupervision>
|
||||
<!-- 审核弹框 -->
|
||||
<auditDialog v-model:auditDialogVisible="auditDialogVisible" :relativeId="relativeId" @confirm="allConfirm"></auditDialog>
|
||||
</div>
|
||||
@ -53,13 +59,15 @@ import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import { statisticsTable } from "@/api/modules/goverment";
|
||||
import auditDialog from "./components/auditDialog.vue";
|
||||
import ProjectSupervision from "./components/ProjectSupervision/index.vue";
|
||||
const auditDialogVisible = ref(false);
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
{
|
||||
prop: "engineeringName",
|
||||
label: "项目名称"
|
||||
label: "项目名称",
|
||||
search: { el: "input" }
|
||||
},
|
||||
{
|
||||
prop: "inspectUserName",
|
||||
@ -84,8 +92,19 @@ const columns: ColumnProps[] = [
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 100 }
|
||||
];
|
||||
const relativeId = ref("");
|
||||
const detailsDialog = ref(false);
|
||||
const approvalTitle = ref("");
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTable = ref();
|
||||
// 整改完成,全部已提交审核
|
||||
const confirmReform = () => {
|
||||
proTable.value.getTableList();
|
||||
};
|
||||
// 新增项目
|
||||
const handleAddItem = () => {
|
||||
approvalTitle.value = "新增";
|
||||
detailsDialog.value = true;
|
||||
};
|
||||
// 子组件弹框确认回调
|
||||
const allConfirm = val => {
|
||||
console.log(val);
|
||||
|
||||
@ -31,9 +31,15 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
.middleSize {
|
||||
font-size: 14px;
|
||||
color: #c4c4c4;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.video {
|
||||
display: flex;
|
||||
|
||||
@ -246,6 +246,11 @@ const getTableList = (params: any) => {
|
||||
newParams.createTime_end = newParams.createTime[1];
|
||||
delete newParams.createTime;
|
||||
}
|
||||
if (active.value === 0) {
|
||||
newParams.projectSn = searchSn.value;
|
||||
} else {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
}
|
||||
newParams.type = 2;
|
||||
return statisticsTable(newParams);
|
||||
};
|
||||
|
||||
@ -31,9 +31,15 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
.middleSize {
|
||||
font-size: 14px;
|
||||
color: #c4c4c4;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.video {
|
||||
display: flex;
|
||||
|
||||
@ -214,6 +214,11 @@ const getTableList = (params: any) => {
|
||||
newParams.createTime_end = newParams.createTime[1];
|
||||
delete newParams.createTime;
|
||||
}
|
||||
if (active.value === 0) {
|
||||
newParams.projectSn = searchSn.value;
|
||||
} else {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
}
|
||||
newParams.type = 1;
|
||||
return statisticsTable(newParams);
|
||||
};
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="name">项目剩余天数</span>
|
||||
<div class="numBox">-</div>
|
||||
<div class="numBox">{{ props.projectData.residueDay }}</div>
|
||||
<span class="unit">天</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -181,6 +181,17 @@ const getPayMentData = async () => {
|
||||
console.log(res);
|
||||
if (res && res.result) {
|
||||
dataObj.value = res.result;
|
||||
payRatio.value = res.result.payRatio;
|
||||
payData.value = reactive([
|
||||
{
|
||||
name: "支付",
|
||||
value: res.result.payAmount
|
||||
},
|
||||
{
|
||||
name: "总和",
|
||||
value: res.result.totalAmount
|
||||
}
|
||||
]);
|
||||
}
|
||||
};
|
||||
// 视频弹框 --- start
|
||||
@ -194,15 +205,15 @@ const closeProjectDialog = () => {
|
||||
// 视频弹框 --- end
|
||||
|
||||
// 支付管理 --- start
|
||||
const payRatio = ref("97%");
|
||||
const payRatio = ref("");
|
||||
let payData = ref([
|
||||
{
|
||||
name: "审批支付",
|
||||
value: 6
|
||||
name: "支付",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: "实际支付",
|
||||
value: 200
|
||||
name: "总和",
|
||||
value: 0
|
||||
}
|
||||
]);
|
||||
// 支付管理 --- end
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 投资支付详情 -->
|
||||
<transformInfo2 v-model:payVisible="payVisible" :relativeId="relativeId"></transformInfo2>
|
||||
<transformInfo2 v-model:payVisible="payVisible" :relativeId="relativeRowId"></transformInfo2>
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
@ -96,6 +96,7 @@ const reformInfo = ref({
|
||||
solveDesc: "",
|
||||
solveImage: []
|
||||
});
|
||||
const relativeRowId = ref("");
|
||||
// 页面的分页
|
||||
const handleCurrentChange = async (page: number) => {
|
||||
pageable.value.pageNo = page;
|
||||
@ -125,6 +126,8 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
const handleEditItem = async (row: any) => {
|
||||
console.log(row);
|
||||
// getSubDetailList(row.id);
|
||||
relativeRowId.value = row.id;
|
||||
console.log(row);
|
||||
payVisible.value = true;
|
||||
};
|
||||
const getSubDetailList = async (id: any) => {
|
||||
|
||||
@ -102,11 +102,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注"> </el-table-column>
|
||||
<el-table-column align="left" label="操作">
|
||||
<template #default="scope">
|
||||
<!-- <template #default="scope">
|
||||
<el-button v-if="scope.row.parentId == 0" type="primary" link :icon="CirclePlus" @click="openAdd2(scope.row)"
|
||||
>子分项</el-button
|
||||
>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<!-- 表格无数据情况 -->
|
||||
<template #empty>
|
||||
|
||||
@ -476,21 +476,16 @@ const submitCount = async () => {
|
||||
// 数据提交
|
||||
console.log(countData.value);
|
||||
console.log(recordData.value);
|
||||
let isAdd = true;
|
||||
for (let i in countData.value) {
|
||||
if (i == "constructionCost" || i == "payment" || i == "advanceCharge" || i == "unPayment" || i == "applyPayment") {
|
||||
if (countData.value[i] || countData.value[i] != 0) {
|
||||
isAdd = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAdd) {
|
||||
const res = await payCountAdd(countData.value);
|
||||
let requestData = {
|
||||
...countData.value,
|
||||
investmentApplyId: props.relativeId
|
||||
};
|
||||
if (!countData.value.id) {
|
||||
const res = await payCountAdd(requestData);
|
||||
ElMessage.success("新增成功");
|
||||
getSubItemList();
|
||||
} else {
|
||||
const res = await payCountEdit(countData.value);
|
||||
const res = await payCountEdit(requestData);
|
||||
ElMessage.success("编辑成功");
|
||||
getSubItemList();
|
||||
}
|
||||
@ -522,12 +517,24 @@ const getSubItemList = async () => {
|
||||
const res2 = await payCountList({ investmentApplyId: props.relativeId });
|
||||
console.log(res, "-----子项数据");
|
||||
console.log(res2, "-----子项统计数据");
|
||||
if (!res.result || !res2.result) {
|
||||
symbolArr.value = JSON.parse(JSON.stringify(res.result.records));
|
||||
if (res2.result) {
|
||||
countData.value = JSON.parse(JSON.stringify(res2.result));
|
||||
} else {
|
||||
countData.value = reactive({
|
||||
constructionCost: 0,
|
||||
payment: 0,
|
||||
advanceCharge: 0,
|
||||
unPayment: 0,
|
||||
applyPayment: 0,
|
||||
scheduleRatio: 0,
|
||||
completeScheduleRatio: 0
|
||||
});
|
||||
}
|
||||
if (!res.result || res.result.records.length == 0) {
|
||||
recordData.value = [];
|
||||
return;
|
||||
}
|
||||
symbolArr.value = JSON.parse(JSON.stringify(res.result.records));
|
||||
countData.value = JSON.parse(JSON.stringify(res2.result));
|
||||
let sumRowData = {
|
||||
// 自定义表格合计行
|
||||
reportContent: "合计:",
|
||||
|
||||
@ -22,6 +22,18 @@
|
||||
</el-date-picker>
|
||||
<el-button type="primary" style="margin-left: 20px" @click="getDataList()">查询</el-button>
|
||||
<el-button type="primary" style="margin-left: 20px" @click="handleAddItem()">新增</el-button>
|
||||
<el-upload
|
||||
accept=".mpp"
|
||||
:headers="headers"
|
||||
:action="`${baseUrl}` + '/project/projectSubItem/importMpp'"
|
||||
:on-success="uploadFileSuccess"
|
||||
multiple
|
||||
:limit="1"
|
||||
style="margin-left: 20px"
|
||||
:show-file-list="false"
|
||||
>
|
||||
<el-button type="primary">导入</el-button>
|
||||
</el-upload>
|
||||
</el-card>
|
||||
</div>
|
||||
<div class="statistics-table">
|
||||
@ -326,6 +338,13 @@ const childrenConfirm = async (formEl: FormInstance | undefined, form: any) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
// 导入文件
|
||||
const uploadFileSuccess = (response: any) => {
|
||||
console.log(response);
|
||||
if (response.result) {
|
||||
getDataList();
|
||||
}
|
||||
};
|
||||
const uploadSuccess1 = (response: any) => {
|
||||
ElMessage.success("上传成功");
|
||||
childrenFormData.value.overdueIssueFile = response.result.url;
|
||||
@ -369,6 +388,7 @@ const handleAddSubItem = (row: any) => {
|
||||
fileList1.value = reactive([]);
|
||||
childrenVisible.value = true;
|
||||
};
|
||||
const importData = () => {};
|
||||
const handleAddItem = () => {
|
||||
childrenFormData.value = reactive({
|
||||
name: "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user