This commit is contained in:
weiz 2024-03-19 17:56:57 +08:00
parent a085fd8c17
commit 031a77c930
5 changed files with 2 additions and 131 deletions

View File

@ -5,10 +5,6 @@
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="需求详情" name="first">
<el-descriptions :column="2" border>
<el-descriptions-item label="组织名称" label-align="left" align="left"
label-class-name="my-label">{{ formData.org_name }}</el-descriptions-item>
<el-descriptions-item label="部门名称" label-align="left" align="left"
label-class-name="my-label">{{ formData.dept_name }}</el-descriptions-item>
<el-descriptions-item label="客户名称" label-align="left" align="left"
label-class-name="my-label">{{ formData.custom_name }}</el-descriptions-item>
<el-descriptions-item label="项目名称" label-align="left" align="left"
@ -48,17 +44,10 @@
}}</el-descriptions-item>
<el-descriptions-item label="更新人" label-align="left" align="left"
label-class-name="my-label"> {{ formData.update_user_name
}}</el-descriptions-item>
<el-descriptions-item label="更新日期" label-align="left" align="left"
label-class-name="my-label"> {{ formData.update_time
}}</el-descriptions-item>
<el-descriptions-item label="附件" label-align="left" align="left"
label-class-name="my-label">
<div v-if="formDataannex.length > 0">
@ -66,7 +55,6 @@
style="margin-left: 5px;display: block;">
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
:href="item.uri" target="_blank">文件{{ index + 1 }}查看</el-link>
</div>
</div>
<div v-else>
@ -113,7 +101,6 @@
<el-table-column label="概算金额(万元)" prop='estimate_amount' width="180" />
<el-table-column label="要求" prop='ask' />
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
<template #default="{ row }">
<div v-if="row.annex && row.annex.length > 0">
<div v-for="(item, i) in row.annex " :key='i'>
@ -145,7 +132,6 @@
<el-table-column label="竞争对手劣势" prop='competitor_disadvantages' />
<el-table-column label="备注" prop='remark' />
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
<template #default="{ row }">
<div v-if="row.annex && row.annex.length > 0">
<div v-for="(item, i) in row.annex " :key='i'>
@ -180,7 +166,6 @@ import { apiCustomDetail } from '@/api/custom'
import { apiCustomerDemandSolutionLists } from '@/api/customer_demand_solution'
import { apiProjectEstimateLists } from '@/api/project_estimate'
import { apiCompetitorLists } from '@/api/competitor'
import { timeFormat } from '@/utils/util'
import type { TabsPaneContext } from 'element-plus'
const activeName = ref('first')
@ -231,7 +216,6 @@ const formData = reactive({
})
//
const handleSizeChange1 = (val: number) => {
pager1.page_size = val
@ -284,9 +268,6 @@ const competitorLists = () => {
})
}
//
const setFormData = async (data: Record<any, any>) => {
Object.assign(formData, data)
@ -331,13 +312,6 @@ const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,

View File

@ -3,19 +3,6 @@
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-form-item label="组织" prop="org_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-select class="flex-1" v-model="formData.org_id" clearable placeholder="请选择组织"
@change="area_change">
<el-option v-for="(item, index) in orglist" :key="index" :label="item.name"
:value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item label="部门" prop="dept_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-select class="flex-1" v-model="formData.dept_id" clearable placeholder="请选择部门">
<el-option v-for="(item, index) in jobs" :key="index" :label="item.name"
:value="parseInt(item.id)" />
</el-select>
</el-form-item>
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
<el-input v-model="project_name" clearable placeholder="请选择项目" :disabled="project" />
@ -69,8 +56,6 @@
<script lang="ts" setup name="customerDemandEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { deptAll } from '@/api/org/department'
import { getAll } from '@/api/org/organization'
import projectTable from "@/components/project/index.vue"
import { apiCustomerDemandAdd, apiCustomerDemandEdit, apiCustomerDemandDetail } from '@/api/customer_demand'
import { useDictData } from '@/hooks/useDictOptions'
@ -98,24 +83,9 @@ const formDataannex = reactive([])
const getlista = () => {
getAll().then((res) => {
// orglist = res.data
Object.assign(orglist, res)
})
}
const area_change = (e: any) => {
formData.org_id = e
let data = { 'org_id': e }
deptAll(data).then((res) => {
Object.assign(jobs, res)
})
}
//
const popupTitle = computed(() => {
@ -160,9 +130,6 @@ const formRules = reactive<any>({
//
const setFormData = async (data: Record<any, any>) => {
deptAll({ 'org_id': data.org_id }).then((res) => {
Object.assign(jobs, res)
})
if (data.annex && data.annex.length > 0) {
const arry1 = data.annex.map((item: any, index: any) => {
return {
@ -217,8 +184,6 @@ const handleClose = () => {
emit('close')
}
getlista()
defineExpose({
open,
setFormData,

View File

@ -1,9 +1,5 @@
<template>
<el-descriptions :column="3" title="基本信息" border>
<el-descriptions-item label="组织名称" label-align="left" align="left" label-class-name="my-label">{{ formData.org_name
}}</el-descriptions-item>
<el-descriptions-item label="部门名称" label-align="left" align="left" label-class-name="my-label">
{{ formData.dept_name }}</el-descriptions-item>
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label">{{ formData.name
}}</el-descriptions-item>
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label">

View File

@ -58,11 +58,8 @@
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiCustomDetail } from '@/api/custom'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import type { TabsPaneContext } from 'element-plus'
import { apiCustomServiceLists } from '@/api/custom_service'
import { subpackagdetailLists } from '@/api/project_subpackage_budget_detail'
import Overview from "./components/Overview.vue"
import Business from "./components/Business.vue"
import tender from "./components/tender.vue"
@ -132,13 +129,6 @@ const handleClose = () => {
emit('close')
}
defineExpose({
open,
setFormData,

View File

@ -3,20 +3,9 @@
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
<div
style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
</el-select>
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织"
@change="deptrmt">
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
</el-select>
</div>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="客户名s称" prop="custom_name"
<el-form-item label="客户名称" prop="custom_name"
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
<el-input v-model="formData.custom_name" @click="showDialog = true" clearable
placeholder="请选择客户" />
@ -117,12 +106,6 @@
value-format="YYYY-MM-DD" placeholder="选择投标时间">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="投标时间" prop="bidding_time">
<el-date-picker class="flex-1 !flex" v-model="formData.bidding_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择投标时间">
</el-date-picker>
</el-form-item> -->
</el-col>
<el-col :span="8">
<el-form-item label="信息来源" prop="information_sources"
@ -249,13 +232,8 @@ import { apiProjectAdd, apiProjectEdit, apiProjectDetail } from '@/api/project'
import { getAllProjectTypes } from '@/api/projecttype'
import type { PropType } from 'vue'
const protype = reactive([])
const list1 = reactive([])
const list2 = reactive([])
import { deptAll } from '@/api/org/department'
import { getAll } from '@/api/org/organization'
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
@ -273,34 +251,7 @@ const customEvent = (e: any) => {
formData.custom_name = e.name;
showDialog.value = false;
};
//
const getlist = () => {
getAll().then((res) => {
Object.assign(list1, res)
if (res.length > 0 && !formData.org_id) {
formData.org_id = res[0].id
deptAll({ 'org_id': res[0].id }).then((res) => {
if (res.length > 0) {
Object.assign(list2, res)
formData.dept_id = res[0].id
}
})
}
})
}
//
const deptrmt = (e: any) => {
formData.dept_id = ''
getlist1(e)
}
//
const getlist1 = (id: any) => {
deptAll({ 'org_id': id }).then((res) => {
list2.splice(0, list2.length, ...res)
})
}
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑项目表' : '新增项目表'
@ -358,10 +309,6 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
if (data.dept_id) {
getlist1(data.org_id)
}
if (!Array.isArray(formData.project_content)) formData.project_content = [];
if (!Array.isArray(formData.annex)) formData.annex = [];
//@ts-ignore
@ -392,7 +339,6 @@ const handleSubmit = async () => {
const open = (type = 'add') => {
mode.value = type
popupRef.value?.open()
getlist()
getAllProjectTypes().then((res) => {
protype.splice(0, protype.length, ...res);