|
|
@@ -19,21 +19,25 @@
|
|
|
</div>
|
|
|
</el-form>
|
|
|
|
|
|
- <el-alert v-if="projName" :title="'当前项目:' + projName" type="info" :closable="false" class="proj-alert"/>
|
|
|
-
|
|
|
<div class="table-wrapper">
|
|
|
<el-table :height="tableHeight" v-loading="loading" :data="objTendList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="50" align="center"/>
|
|
|
<el-table-column label="标段名称" align="center" prop="tendName" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="所属工程" align="center" prop="engName" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="所属单位" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="负责人" align="center" prop="legPers" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="联系电话" align="center" prop="legTel" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="合同金额" align="center" prop="conAmout" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="完工状态" align="center" prop="stat" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="备注" align="center" prop="note" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="所属工程" align="center" prop="engName" :show-overflow-tooltip="true" min-width="140"/>
|
|
|
+ <el-table-column label="所属单位" align="center" prop="orgName" :show-overflow-tooltip="true" min-width="140"/>
|
|
|
+ <el-table-column label="负责人" align="center" prop="legPers" :show-overflow-tooltip="true" min-width="100"/>
|
|
|
+ <el-table-column label="联系电话" align="center" prop="legTel" :show-overflow-tooltip="true" min-width="120"/>
|
|
|
+ <el-table-column label="合同金额" align="center" prop="conAmout" :show-overflow-tooltip="true" min-width="120"/>
|
|
|
+ <el-table-column label="完工状态" align="center" prop="stat" min-width="90">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag v-if="scope.row.stat === '1'" type="warning">在建</el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.stat === '2'" type="success">已完工</el-tag>
|
|
|
+ <span v-else>{{ scope.row.stat }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备注" align="center" prop="note" :show-overflow-tooltip="true" min-width="120"/>
|
|
|
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220">
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="260">
|
|
|
<template #default="scope">
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['business:objtend:edit']">修改
|
|
|
@@ -52,7 +56,8 @@
|
|
|
<pagination v-show="total>0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
|
|
@pagination="getList"/>
|
|
|
|
|
|
- <el-dialog :title="title" v-model="open" width="760px" append-to-body>
|
|
|
+ <!-- ====== 标段新增/编辑 Dialog ====== -->
|
|
|
+ <el-dialog :title="title" v-model="open" width="760px" append-to-body @closed="cancel">
|
|
|
<el-form ref="objTendRef" :model="form" :rules="rules" label-width="120px" class="tend-form">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
|
@@ -61,33 +66,13 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="所属工程" prop="engGuid">
|
|
|
- <el-select
|
|
|
- v-model="form.engGuid"
|
|
|
- filterable remote clearable reserve-keyword
|
|
|
- :remote-method="remoteSearchEng"
|
|
|
- :loading="engLoading"
|
|
|
- placeholder="请输入工程名称搜索"
|
|
|
- style="width:100%">
|
|
|
- <el-option v-for="item in engOptions" :key="item.guid" :label="item.engName" :value="item.guid"/>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <EngSelect v-model="form.engGuid" label="关联工程" prop="engGuid" placeholder="请输入工程名称搜索" required />
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <OrgSelect v-model="form.orgGuid" label="所属单位" placeholder="请输入单位名称搜索"/>
|
|
|
+ <ProjSelect v-model="form.orgProjDeptGuid" label="关联项目" prop="orgProjDeptGuid" placeholder="请输入项目名称搜索" required />
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="项目部" prop="orgProjDeptGuid">
|
|
|
- <el-select
|
|
|
- v-model="form.orgProjDeptGuid"
|
|
|
- filterable remote clearable reserve-keyword
|
|
|
- :remote-method="remoteSearchProjDept"
|
|
|
- :loading="projDeptLoading"
|
|
|
- placeholder="请输入参建单位名称搜索"
|
|
|
- style="width:100%">
|
|
|
- <el-option v-for="item in projDeptOptions" :key="item.guid" :label="item.orgName" :value="item.guid"/>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <OrgSelect v-model="form.orgGuid" label="关联单位" placeholder="请输入单位名称搜索"/>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="负责人" prop="legPers">
|
|
|
@@ -138,7 +123,7 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- ====== 标段参建单位关系 Dialog ====== -->
|
|
|
- <el-dialog title="标段参建单位" v-model="relOpen" width="760px" append-to-body>
|
|
|
+ <el-dialog title="标段参建单位" v-model="relOpen" width="900px" append-to-body>
|
|
|
<el-alert v-if="relTendRow.tendName" :title="'当前标段:' + relTendRow.tendName" type="info" :closable="false" style="margin-bottom:12px"/>
|
|
|
<el-row class="mb8">
|
|
|
<el-col :span="24">
|
|
|
@@ -151,22 +136,23 @@
|
|
|
:loading="relOrgLoading"
|
|
|
placeholder="请输入参建单位名称搜索"
|
|
|
style="width:240px">
|
|
|
- <el-option v-for="item in relOrgOptions" :key="item.guid" :label="item.orgName" :value="item.guid"/>
|
|
|
+ <el-option v-for="item in relOrgOptions" :key="item.guid" :label="item.orgCode + ' - ' + item.orgName" :value="item.guid"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="建立时间">
|
|
|
- <el-date-picker v-model="relForm.fromDate" type="date" value-format="YYYY-MM-DD" style="width:150px"/>
|
|
|
- </el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="Plus" @click="submitRelForm">添加关系</el-button>
|
|
|
+ <el-button type="primary" icon="Plus" @click="submitRelForm">添加参建单位</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-table v-loading="relLoading" :data="relOrgList" border>
|
|
|
- <el-table-column label="参建单位名称" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="关系建立时间" align="center" prop="fromDate" width="160"/>
|
|
|
- <el-table-column label="关系终止时间" align="center" prop="toDate" width="160"/>
|
|
|
+ <el-table-column label="参建单位代码" align="center" prop="orgCode" :show-overflow-tooltip="true" min-width="120"/>
|
|
|
+ <el-table-column label="参建单位名称" align="center" prop="orgName" :show-overflow-tooltip="true" min-width="150"/>
|
|
|
+ <el-table-column label="参建单位类型" align="center" prop="orgType" :show-overflow-tooltip="true" min-width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="slaj_uwat_org_type" :value="scope.row.orgType"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="100">
|
|
|
<template #default="scope">
|
|
|
<el-button link type="danger" icon="Delete" @click="handleRelDelete(scope.row)">解除</el-button>
|
|
|
@@ -180,19 +166,19 @@
|
|
|
<script setup name="ProjBaseTend">
|
|
|
import { useRoute } from 'vue-router'
|
|
|
import { listObjTend, getObjTend, delObjTend, addObjTend, updateObjTend } from "@/api/system/objTend"
|
|
|
-import { getAttProjBase } from "@/api/system/attProjBase"
|
|
|
-import { listEngBase, getEngBase } from "@/api/slaj/eng"
|
|
|
-import { listAttOrgUwatBase, getAttOrgUwatBase } from "@/api/system/attOrgUwatBase"
|
|
|
+import { listAttOrgUwatBase } from "@/api/system/attOrgUwatBase"
|
|
|
import { listRelTendOrg, addRelTendOrg, delRelTendOrg } from "@/api/system/relTendOrg"
|
|
|
import OrgSelect from "@/components/OrgSelect"
|
|
|
+import EngSelect from "@/components/EngSelect"
|
|
|
+import ProjSelect from "@/components/ProjSelect"
|
|
|
import { useTableHeight } from '@/hooks/useTableHeight'
|
|
|
|
|
|
const { tableHeight, containerRef } = useTableHeight()
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
+const { slaj_uwat_org_type } = proxy.useDict("slaj_uwat_org_type")
|
|
|
const route = useRoute()
|
|
|
|
|
|
-const projGuid = ref(route.params.projGuid)
|
|
|
-const projName = ref("")
|
|
|
+const projGuid = ref(route.params.projGuid || undefined)
|
|
|
|
|
|
const objTendList = ref([])
|
|
|
const open = ref(false)
|
|
|
@@ -204,13 +190,6 @@ const multiple = ref(true)
|
|
|
const total = ref(0)
|
|
|
const title = ref("")
|
|
|
|
|
|
-// 所属工程远程搜索(OBJ_ENG)
|
|
|
-const engOptions = ref([])
|
|
|
-const engLoading = ref(false)
|
|
|
-// 项目部远程搜索(参建单位 att_org_uwat_base)
|
|
|
-const projDeptOptions = ref([])
|
|
|
-const projDeptLoading = ref(false)
|
|
|
-
|
|
|
const data = reactive({
|
|
|
form: {
|
|
|
tendName: undefined,
|
|
|
@@ -227,8 +206,6 @@ const data = reactive({
|
|
|
},
|
|
|
queryParams: {
|
|
|
tendName: undefined,
|
|
|
- projGuid: undefined,
|
|
|
- engGuid: undefined,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
},
|
|
|
@@ -239,60 +216,9 @@ const data = reactive({
|
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data)
|
|
|
|
|
|
-/** 远程搜索所属工程(限当前项目下,按 projGuid 过滤) */
|
|
|
-function remoteSearchEng(query) {
|
|
|
- if (!query) { engOptions.value = []; return }
|
|
|
- engLoading.value = true
|
|
|
- listEngBase({ projGuid: projGuid.value, engName: query, pageNum: 1, pageSize: 20 }).then(res => {
|
|
|
- engOptions.value = (res.rows || []).map(r => ({ guid: r.guid, engName: r.engName }))
|
|
|
- }).finally(() => { engLoading.value = false })
|
|
|
-}
|
|
|
-
|
|
|
-/** 编辑回显:根据 engGuid 预加载工程名称 */
|
|
|
-function loadEngOption(guid) {
|
|
|
- if (!guid) return
|
|
|
- getEngBase(guid).then(res => {
|
|
|
- const d = res.data
|
|
|
- if (d && d.guid) engOptions.value = [{ guid: d.guid, engName: d.engName }, ...engOptions.value]
|
|
|
- }).catch(() => {})
|
|
|
-}
|
|
|
-
|
|
|
-/** 远程搜索项目部(参建单位) */
|
|
|
-function remoteSearchProjDept(query) {
|
|
|
- if (!query) { projDeptOptions.value = []; return }
|
|
|
- projDeptLoading.value = true
|
|
|
- listAttOrgUwatBase({ orgName: query, pageNum: 1, pageSize: 20 }).then(res => {
|
|
|
- projDeptOptions.value = (res.rows || []).map(r => ({ guid: r.guid, orgName: r.orgName }))
|
|
|
- }).finally(() => { projDeptLoading.value = false })
|
|
|
-}
|
|
|
-
|
|
|
-/** 编辑回显:根据 orgProjDeptGuid 预加载参建单位名称 */
|
|
|
-function loadProjDeptOption(guid) {
|
|
|
- if (!guid) return
|
|
|
- getAttOrgUwatBase(guid).then(res => {
|
|
|
- const d = res.data
|
|
|
- if (d && d.guid) projDeptOptions.value = [{ guid: d.guid, orgName: d.orgName }, ...projDeptOptions.value]
|
|
|
- }).catch(() => {})
|
|
|
-}
|
|
|
-
|
|
|
-function loadProj() {
|
|
|
- if (!projGuid.value) return
|
|
|
- getAttProjBase(projGuid.value).then(res => {
|
|
|
- projName.value = res.data && res.data.projName ? res.data.projName : ""
|
|
|
- }).catch(() => {})
|
|
|
-}
|
|
|
-
|
|
|
function getList() {
|
|
|
loading.value = true
|
|
|
- // 工程页跳转时带 engGuid 查询参数,直接按工程筛选
|
|
|
- if (route.query.engGuid) {
|
|
|
- queryParams.value.engGuid = route.query.engGuid
|
|
|
- queryParams.value.projGuid = undefined
|
|
|
- } else {
|
|
|
- queryParams.value.projGuid = projGuid.value
|
|
|
- queryParams.value.engGuid = undefined
|
|
|
- }
|
|
|
- listObjTend(queryParams.value).then(response => {
|
|
|
+ listObjTend({ ...queryParams.value, projGuid: projGuid.value }).then(response => {
|
|
|
objTendList.value = response.rows
|
|
|
total.value = response.total
|
|
|
loading.value = false
|
|
|
@@ -318,8 +244,6 @@ function reset() {
|
|
|
note: undefined,
|
|
|
stat: undefined
|
|
|
}
|
|
|
- engOptions.value = []
|
|
|
- projDeptOptions.value = []
|
|
|
proxy.resetForm("objTendRef")
|
|
|
}
|
|
|
|
|
|
@@ -350,9 +274,6 @@ function handleUpdate(row) {
|
|
|
const guid = row.guid || ids.value
|
|
|
getObjTend(guid).then(response => {
|
|
|
form.value = response.data
|
|
|
- // 回显所属工程、项目部名称
|
|
|
- if (form.value.engGuid) engOptions.value = [{ guid: form.value.engGuid, engName: form.value.engName }]
|
|
|
- loadProjDeptOption(form.value.orgProjDeptGuid)
|
|
|
open.value = true
|
|
|
title.value = "修改标段"
|
|
|
})
|
|
|
@@ -420,7 +341,7 @@ function loadRelOrgList() {
|
|
|
}).finally(() => { relLoading.value = false })
|
|
|
}
|
|
|
|
|
|
-/** 远程搜索参建单位(复用 att_org_uwat_base) */
|
|
|
+/** 远程搜索参建单位 */
|
|
|
function remoteSearchRelOrg(query) {
|
|
|
if (!query) { relOrgOptions.value = []; return }
|
|
|
relOrgLoading.value = true
|
|
|
@@ -444,6 +365,8 @@ function submitRelForm() {
|
|
|
relForm.value = { orgUwatGuid: undefined, fromDate: undefined }
|
|
|
relOrgOptions.value = []
|
|
|
loadRelOrgList()
|
|
|
+ }).catch(() => {
|
|
|
+ proxy.$modal.msgError("添加失败,请重试")
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -455,7 +378,6 @@ function handleRelDelete(row) {
|
|
|
}).catch(() => {})
|
|
|
}
|
|
|
|
|
|
-loadProj()
|
|
|
getList()
|
|
|
</script>
|
|
|
|
|
|
@@ -463,7 +385,5 @@ getList()
|
|
|
.search-form { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
|
|
|
.search-form-left { display: flex; align-items: center; flex-wrap: wrap; flex: 1; }
|
|
|
.search-form-right { display: flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
|
|
|
-.proj-alert { margin-bottom: 12px; }
|
|
|
.tend-form .el-textarea__inner { resize: none; }
|
|
|
-
|
|
|
</style>
|