This commit is contained in:
weiz 2024-06-13 14:18:35 +08:00
parent 849298a55d
commit a40947d1c0
4 changed files with 113 additions and 69 deletions

View File

@ -16,8 +16,8 @@
<el-col :span="8">
<el-form-item label="行业" prop="industry">
<el-select class="flex-1" v-model="formData.industry" clearable placeholder="请选择行业">
<el-option v-for="(item, index) in dictData.supervision_project_industry" :key="index" :label="item.name"
:value="item.value" />
<el-option v-for="(item, index) in dictData.supervision_project_industry" :key="index"
:label="item.name" :value="item.value" />
</el-select>
</el-form-item>
</el-col>
@ -62,14 +62,15 @@
</el-col>
<el-col :span="8">
<el-form-item label="立项日期">
<el-date-picker class="flex-1 !flex" v-model="formData.initiation_date" clearable value-format="YYYY-MM-DD"
placeholder="选择咨询结束日期">
<el-date-picker class="flex-1 !flex" v-model="formData.initiation_date" clearable
value-format="YYYY-MM-DD" placeholder="选择咨询结束日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="关联合同">
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" disabled />
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" @click="showDialog = true"
readonly />
</el-form-item>
</el-col>
<el-col :span="8">
@ -106,8 +107,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="咨询结束日期" prop="consult_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.consult_end_date" clearable value-format="YYYY-MM-DD"
placeholder="选择咨询结束日期">
<el-date-picker class="flex-1 !flex" v-model="formData.consult_end_date" clearable
value-format="YYYY-MM-DD" placeholder="选择咨询结束日期">
</el-date-picker>
</el-form-item>
</el-col>
@ -219,6 +220,11 @@
<el-dialog v-model="showDialog2" title="选择甲方单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent2"></dialogTable>
</el-dialog>
<el-dialog v-model="showDialog" title="选择合同" width="70%">
<dialogTable :config="cost_approved_projects" @customEvent="customEvent333"
:query="{ status: 0, business_nature: 3 }">
</dialogTable>
</el-dialog>
</popup>
</div>
</template>
@ -226,6 +232,7 @@
<script lang="ts" setup name="consultProjectEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { cost_approved_projects } from "@/components/dialogTable/dialogTableConfig";
import { apiConsultProjectAdd, apiConsultProjectEdit, apiConsultProjectDetail } from '@/api/consult_project'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
@ -260,6 +267,14 @@ const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑项目咨询--基本信息' : '新增项目咨询--基本信息'
})
const customEvent333 = (e) => {
formData.contract = e.id;
formData.contract_name = e.contract_name;
// formData.Acontact = e.part_a_contract
showDialog.value = false;
};
//
const formData = reactive({
id: '',

View File

@ -94,8 +94,8 @@
<el-col :span="8">
<el-form-item label="项目所属部门" prop="depar" :rules="[
{ required: true, message: '不可为空', trigger: 'blur' },
]">
{ required: true, message: '不可为空', trigger: 'blur' },
]">
<el-select class="flex-1" v-model="formData.depar" clearable placeholder="请选择部门">
<el-option v-for="(item, index) in deptList" :key="index" :label="item.name"
:value="item.id" />
@ -196,8 +196,9 @@
<uploadAnnex :formData="formData"></uploadAnnex>
</el-form-item>
</el-col>
<el-dialog v-model="showDialog" title="选择项目" width="70%">
<dialogTable :config="cost_approved_projects" @customEvent="customEvent" :query="{ status: 0 }">
<el-dialog v-model="showDialog" title="选择合同" width="70%">
<dialogTable :config="cost_approved_projects" @customEvent="customEvent"
:query="{ status: 0, business_nature: 4 }">
</dialogTable>
</el-dialog>
<div v-if="showDialog1">

View File

@ -5,14 +5,14 @@
<el-row>
<el-col :span="8">
<el-form-item label="项目名称" prop="project_name">
<el-input v-model="formData.project_name" clearable placeholder="请输入项目名称"/>
<el-input v-model="formData.project_name" clearable placeholder="请输入项目名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性质" prop="nature">
<el-select class="flex-1" v-model="formData.nature" clearable placeholder="请选择性质">
<el-option v-for="(item, index) in dictData.supervision_project_nature" :key="index"
:label="item.name" :value="parseInt(item.value)"/>
<el-option v-for="(item, index) in dictData.supervision_project_nature" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
@ -20,98 +20,97 @@
<el-form-item label="行业" prop="industry">
<el-select class="flex-1" v-model="formData.industry" clearable placeholder="请选择行业">
<el-option v-for="(item, index) in dictData.industry" :key="index" :label="item.name"
:value="parseInt(item.value)"/>
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建设单位" prop="build_unit">
<el-input v-model="formData.build_unit_name" clearable placeholder="请输入建设单位" @click="showDialog1 = true"/>
<el-input v-model="formData.build_unit_name" clearable placeholder="请输入建设单位"
@click="showDialog1 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="建设区域" prop="build_area">
<el-select class="flex-1" v-model="formData.build_area" clearable placeholder="请选择建设区域">
<el-option v-for="(item, index) in dictData.const_area" :key="index" :label="item.name"
:value="parseInt(item.value)"/>
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目地址" prop="address">
<el-input v-model="formData.address" clearable placeholder="请输入项目地址"/>
<el-input v-model="formData.address" clearable placeholder="请输入项目地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目级别" prop="project_level">
<el-select class="flex-1" v-model="formData.project_level" clearable placeholder="请选择项目级别">
<el-option v-for="(item, index) in dictData.supervision_project_level" :key="index"
:label="item.name" :value="parseInt(item.value)"/>
<el-option v-for="(item, index) in dictData.supervision_project_level" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总投资(元)" prop="total_investment">
<el-input v-model="formData.total_investment" clearable placeholder="请输入总投资(元)" type="number"/>
<el-input v-model="formData.total_investment" clearable placeholder="请输入总投资(元)" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工程状态" prop="engineering_status">
<el-select class="flex-1" v-model="formData.engineering_status" clearable placeholder="请选择工程状态">
<el-option v-for="(item, index) in dictData.engineering_status" :key="index"
:label="item.name" :value="parseInt(item.value)"/>
<el-option v-for="(item, index) in dictData.engineering_status" :key="index" :label="item.name"
:value="parseInt(item.value)" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="合同服务内容" prop="contract_content">
<el-input v-model="formData.contract_content" clearable placeholder="请输入合同服务内容"
type="textarea"/>
<el-input v-model="formData.contract_content" clearable placeholder="请输入合同服务内容" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目概况" prop="project_overview">
<el-input v-model="formData.project_overview" clearable placeholder="请输入项目概况"/>
<el-input v-model="formData.project_overview" clearable placeholder="请输入项目概况" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目要求" prop="project_requirements">
<el-input v-model="formData.project_requirements" clearable placeholder="请输入项目要求"/>
<el-input v-model="formData.project_requirements" clearable placeholder="请输入项目要求" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划开工日期" prop="planned_start_date">
<el-date-picker class="flex-1 !flex" v-model="formData.planned_start_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="计划竣工日期" prop="planned_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.planned_end_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际开工日期" prop="actual_start_date">
<el-date-picker class="flex-1 !flex" v-model="formData.actual_start_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实际竣工日期" prop="actual_end_date">
<el-date-picker class="flex-1 !flex" v-model="formData.actual_end_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="实施部门" prop="implementation_department">
<el-select v-model="formData.implementation_department" placeholder="请选择实施部门"
class="flex-1">
<el-select v-model="formData.implementation_department" placeholder="请选择实施部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
@ -119,8 +118,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="监管部门" prop="supervision_department">
<el-select v-model="formData.supervision_department" placeholder="请选择监管部门"
class="flex-1">
<el-select v-model="formData.supervision_department" placeholder="请选择监管部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
@ -128,19 +126,21 @@
</el-col>
<el-col :span="8">
<el-form-item label="项目经理" prop="project_manager">
<el-input v-model="formData.project_manager_name" clearable placeholder="请输入项目经理" @click="userclick('project_manager')"/>
<el-input v-model="formData.project_manager_name" clearable placeholder="请输入项目经理"
@click="userclick('project_manager')" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="立项日期" prop="initiation_date">
<el-date-picker class="flex-1 !flex" v-model="formData.initiation_date" clearable type="date"
value-format="YYYY-MM-DD" placeholder="请选择日期">
value-format="YYYY-MM-DD" placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目负责人" prop="project_leader">
<el-input v-model="formData.project_leader_name" clearable placeholder="请输入项目负责人" @click="userclick('project_leader')"/>
<el-input v-model="formData.project_leader_name" clearable placeholder="请输入项目负责人"
@click="userclick('project_leader')" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -154,30 +154,30 @@
<el-col :span="8">
<el-form-item label="关联合同" prop="contract">
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" v-type="'code'"/>
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" @click="showDialog = true" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="甲方单位" prop="part_a_unit">
<el-input v-model="formData.part_a_unit" clearable placeholder="请输入甲方单位" @click="showDialog2 = true"/>
<el-input v-model="formData.part_a_unit" clearable placeholder="请输入甲方单位" @click="showDialog2 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建人" prop="create_user">
<el-input v-model="formData.create_user" clearable/>
<el-input v-model="formData.create_user" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间" prop="create_time">
<el-date-picker class="flex-1 !flex" v-model="formData.create_time" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss">
value-format="YYYY-MM-DD HH:mm:ss">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea"/>
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -198,19 +198,25 @@
<el-dialog v-model="showDialog2" title="选择甲方单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent2"> </dialogTable>
</el-dialog>
<el-dialog v-model="showDialog" title="选择合同" width="70%">
<dialogTable :config="cost_approved_projects" @customEvent="customEvent333"
:query="{ status: 0, business_nature: 2 }">
</dialogTable>
</el-dialog>
</popup>
</div>
</template>
<script lang="ts" setup name="manageProjectEdit">
import type {FormInstance} from 'element-plus'
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import {apiManageProjectAdd, apiManageProjectEdit, apiManageProjectDetail} from '@/api/manage_project'
import type {PropType} from 'vue'
import {timeFormat} from '@/utils/util'
import { cost_approved_projects } from "@/components/dialogTable/dialogTableConfig";
import { apiManageProjectAdd, apiManageProjectEdit, apiManageProjectDetail } from '@/api/manage_project'
import type { PropType } from 'vue'
import { timeFormat } from '@/utils/util'
import useUserStore from "@/stores/modules/user";
import {apiCostApprovedProjectDetail} from "@/api/cost_approved_project";
import {marketing_custom} from "@/components/dialogTable/dialogTableConfig";
import { apiCostApprovedProjectDetail } from "@/api/cost_approved_project";
import { marketing_custom } from "@/components/dialogTable/dialogTableConfig";
const userStore = useUserStore().userInfo;
const route = useRoute()
@ -240,6 +246,14 @@ const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑项目管理--项目信息' : '新增项目管理--项目信息'
})
const customEvent333 = (e) => {
formData.contract = e.id;
formData.contract_name = e.contract_name;
// formData.Acontact = e.part_a_contract
showDialog.value = false;
};
//
const formData = reactive({
id: '',
@ -381,10 +395,10 @@ const formRules = reactive<any>({
message: '请输入计划竣工日期',
trigger: ['blur']
},
{
validator: chekcDate1,
trigger: ['blur']
}],
{
validator: chekcDate1,
trigger: ['blur']
}],
actual_start_date: [{
required: true,
message: '请输入实际开工日期',
@ -395,10 +409,10 @@ const formRules = reactive<any>({
message: '请输入实际竣工日期',
trigger: ['blur']
},
{
validator: chekcDate,
trigger: ['blur']
}],
{
validator: chekcDate,
trigger: ['blur']
}],
implementation_department: [{
required: true,
message: '请输入实施部门',
@ -419,10 +433,10 @@ const formRules = reactive<any>({
message: '请输入立项日期',
trigger: ['blur']
},
{
validator: chekcDate2,
trigger: ['blur']
}],
{
validator: chekcDate2,
trigger: ['blur']
}],
project_leader: [{
required: true,
message: '请输入项目负责人',
@ -484,10 +498,10 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = {...formData,}
const data = { ...formData, }
mode.value == 'edit'
? await apiManageProjectEdit(data)
: await apiManageProjectAdd(data)
? await apiManageProjectEdit(data)
: await apiManageProjectAdd(data)
popupRef.value?.close()
emit('success')
}
@ -505,7 +519,7 @@ const handleClose = () => {
if (route.query.contractId) {
apiCostApprovedProjectDetail({id: route.query.contractId}).then((res) => {
apiCostApprovedProjectDetail({ id: route.query.contractId }).then((res) => {
customEvent(res)
})
}

View File

@ -29,7 +29,8 @@
<el-col :span="8">
<el-form-item label="建设单位">
<el-input v-model="formData.build_unit_name" clearable placeholder="请输入建设单位" @click="showDialog1 = true"/>
<el-input v-model="formData.build_unit_name" clearable placeholder="请输入建设单位"
@click="showDialog1 = true" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -72,7 +73,8 @@
<el-col :span="8">
<el-form-item label="关联合同">
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" disabled/>
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同"
@click="showDialog = true" readonly />
</el-form-item>
</el-col>
<el-col :span="8">
@ -113,8 +115,7 @@
<el-col :span="8">
<el-form-item label="监管部门">
<el-select v-model="formData.supervision_department" placeholder="请选择监管部门"
class="flex-1">
<el-select v-model="formData.supervision_department" placeholder="请选择监管部门" class="flex-1">
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
</el-option>
</el-select>
@ -212,12 +213,18 @@
<el-dialog v-model="showDialog2" title="选择甲方单位" width="70%">
<dialogTable :config="marketing_custom" @customEvent="customEvent2"> </dialogTable>
</el-dialog>
<el-dialog v-model="showDialog" title="选择合同" width="70%">
<dialogTable :config="cost_approved_projects" @customEvent="customEvent333"
:query="{ status: 0, business_nature: 1 }">
</dialogTable>
</el-dialog>
</popup>
</div>
</template>
<script lang="ts" setup name="supervisionProjectEdit">
import type { FormInstance } from 'element-plus'
import { cost_approved_projects } from "@/components/dialogTable/dialogTableConfig";
import Popup from '@/components/popup/index.vue'
import {
apiSupervisionProjectAdd,
@ -256,6 +263,13 @@ const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑工程监理--监理项目信息' : '新增工程监理--监理项目信息'
})
const customEvent333 = (e) => {
formData.contract = e.id;
formData.contract_name = e.contract_name;
// formData.Acontact = e.part_a_contract
showDialog.value = false;
};
//
const formData = reactive({
id: '',