update
This commit is contained in:
parent
d6b518a538
commit
b52e733bdf
@ -2,12 +2,7 @@
|
|||||||
<div class="detail-popup">
|
<div class="detail-popup">
|
||||||
<popup ref="popupRef" title="竞争对手详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
<popup ref="popupRef" title="竞争对手详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
<el-form ref="formRef" :model="formData" label-width="120px">
|
||||||
|
|
||||||
<el-descriptions :column="2" border>
|
<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">{{
|
<el-descriptions-item label="客户名称" label-align="left" align="left" label-class-name="my-label">{{
|
||||||
formData.custom_name }}</el-descriptions-item>
|
formData.custom_name }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
@ -91,7 +86,6 @@
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
import { apiCustomDetail } from '@/api/custom'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
@ -103,11 +97,6 @@ const emit = defineEmits(['success', 'close'])
|
|||||||
const formRef = shallowRef<FormInstance>()
|
const formRef = shallowRef<FormInstance>()
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||||
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@ -151,11 +140,6 @@ const handleClose = () => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
setFormData,
|
setFormData,
|
||||||
|
@ -3,19 +3,6 @@
|
|||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="650px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="650px" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
<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"
|
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="project_name" clearable readonly placeholder="请输入项目名称" :disabled="project" />
|
<el-input v-model="project_name" clearable readonly placeholder="请输入项目名称" :disabled="project" />
|
||||||
@ -90,17 +77,9 @@
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { apiCompetitorAdd, apiCompetitorEdit, apiCompetitorDetail } from '@/api/competitor'
|
import { apiCompetitorAdd, apiCompetitorEdit, apiCompetitorDetail } from '@/api/competitor'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { deptAll } from '@/api/org/department'
|
|
||||||
import { getAll } from '@/api/org/organization'
|
|
||||||
import projectTable from "@/components/project/index.vue"
|
import projectTable from "@/components/project/index.vue"
|
||||||
import customerdemand from "@/components/customerdemand/index.vue"
|
import customerdemand from "@/components/customerdemand/index.vue"
|
||||||
import type { PropType } from 'vue'
|
|
||||||
let props = defineProps({
|
let props = defineProps({
|
||||||
// dictData: {
|
|
||||||
// type: Object as PropType<Record<string, any[]>>,
|
|
||||||
// default: () => ({})
|
|
||||||
// }
|
|
||||||
project: Object
|
project: Object
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['success', 'close'])
|
const emit = defineEmits(['success', 'close'])
|
||||||
@ -147,8 +126,6 @@ const delFileFn = (index: number) => {
|
|||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
org_id: '',
|
|
||||||
dept_id: '',
|
|
||||||
project_id: '',
|
project_id: '',
|
||||||
customer_demand_id: '',
|
customer_demand_id: '',
|
||||||
competitor_name: '',
|
competitor_name: '',
|
||||||
@ -182,22 +159,7 @@ const customEvent1 = (e: any) => {
|
|||||||
|
|
||||||
showDialog1.value = false;
|
showDialog1.value = false;
|
||||||
};
|
};
|
||||||
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(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑竞争对手' : '新增竞争对手'
|
return mode.value == 'edit' ? '编辑竞争对手' : '新增竞争对手'
|
||||||
@ -229,9 +191,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, 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) {
|
if (data.annex && data.annex.length > 0) {
|
||||||
const arry1 = data.annex.map((item: any, index: any) => {
|
const arry1 = data.annex.map((item: any, index: any) => {
|
||||||
return {
|
return {
|
||||||
@ -289,8 +248,6 @@ const handleClose = () => {
|
|||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getlista()
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
setFormData,
|
setFormData,
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<el-descriptions :column="2" border>
|
<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">{{
|
<el-descriptions-item label="客户名称" label-align="left" align="left" label-class-name="my-label">{{
|
||||||
formData.custom_name }}</el-descriptions-item>
|
formData.custom_name }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
@ -25,11 +21,7 @@
|
|||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="方案内容" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="方案内容" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.solution_content
|
formData.solution_content
|
||||||
|
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="添加人" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="添加人" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.add_user_name
|
formData.add_user_name
|
||||||
|
|
||||||
@ -39,17 +31,10 @@
|
|||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新人" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="更新人" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.update_user_name
|
formData.update_user_name
|
||||||
|
|
||||||
|
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="更新日期" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="更新日期" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.update_time
|
formData.update_time
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
||||||
<div v-if="formData.annex?.length > 0">
|
<div v-if="formData.annex?.length > 0">
|
||||||
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
|
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
|
||||||
@ -73,7 +58,6 @@
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
import { apiCustomDetail } from '@/api/custom'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
@ -91,20 +75,14 @@ const datas = reactive({
|
|||||||
areaOptions: [],
|
areaOptions: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
Object.assign(formData, data)
|
Object.assign(formData, data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
@ -114,7 +92,6 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
setFormData(data)
|
setFormData(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
popupRef.value?.close()
|
popupRef.value?.close()
|
||||||
@ -131,13 +108,6 @@ const handleClose = () => {
|
|||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
setFormData,
|
setFormData,
|
||||||
|
@ -3,19 +3,6 @@
|
|||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="650px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="650px" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
<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"
|
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称" :disabled="project" />
|
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称" :disabled="project" />
|
||||||
@ -69,8 +56,6 @@
|
|||||||
<script lang="ts" setup name="customerDemandSolutionEdit">
|
<script lang="ts" setup name="customerDemandSolutionEdit">
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
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 projectTable from "@/components/project/index.vue"
|
||||||
import customerdemand from "@/components/customerdemand/index.vue"
|
import customerdemand from "@/components/customerdemand/index.vue"
|
||||||
import { apiCustomerDemandSolutionAdd, apiCustomerDemandSolutionEdit, apiCustomerDemandSolutionDetail } from '@/api/customer_demand_solution'
|
import { apiCustomerDemandSolutionAdd, apiCustomerDemandSolutionEdit, apiCustomerDemandSolutionDetail } from '@/api/customer_demand_solution'
|
||||||
@ -80,8 +65,6 @@ import type { PropType } from 'vue'
|
|||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
org_id: '',
|
|
||||||
dept_id: '',
|
|
||||||
project_id: '',
|
project_id: '',
|
||||||
customer_demand_id: '',
|
customer_demand_id: '',
|
||||||
theme: '',
|
theme: '',
|
||||||
@ -137,22 +120,6 @@ const customEvent1 = (e: any) => {
|
|||||||
|
|
||||||
showDialog1.value = false;
|
showDialog1.value = false;
|
||||||
};
|
};
|
||||||
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(() => {
|
const popupTitle = computed(() => {
|
||||||
@ -169,9 +136,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, 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) {
|
if (data.annex && data.annex.length > 0) {
|
||||||
const arry1 = data.annex.map((item: any, index: any) => {
|
const arry1 = data.annex.map((item: any, index: any) => {
|
||||||
return {
|
return {
|
||||||
@ -229,8 +193,6 @@ const handleClose = () => {
|
|||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
getlista()
|
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
setFormData,
|
setFormData,
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
<div class="detail-popup">
|
<div class="detail-popup">
|
||||||
<popup ref="popupRef" title="项目概算详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
<popup ref="popupRef" title="项目概算详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
<el-descriptions :column="2" border>
|
<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">{{
|
<el-descriptions-item label="客户名称" label-align="left" align="left" label-class-name="my-label">{{
|
||||||
formData.custom_name }}</el-descriptions-item>
|
formData.custom_name }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
@ -93,10 +89,8 @@
|
|||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
<script lang="ts" setup name="customdetail">
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
import { apiCustomDetail } from '@/api/custom'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
@ -105,14 +99,7 @@ defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['success', 'close'])
|
const emit = defineEmits(['success', 'close'])
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
|
@ -5,22 +5,6 @@
|
|||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="组织" prop="org_id"
|
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
|
||||||
<el-select class="flex-1" readonly 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-col><el-col :span="12">
|
|
||||||
<el-form-item label="部门" readonly prop="dept_id"
|
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
|
||||||
<el-select class="flex-1" v-model="formData.dept_id" clearable placeholder="请选择部门"
|
|
||||||
@change="area_change1">
|
|
||||||
<el-option v-for="(item, index) in jobs" :key="index" :label="item.name"
|
|
||||||
:value="parseInt(item.id)" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item></el-col><el-col :span="12">
|
|
||||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||||
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称"
|
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称"
|
||||||
@ -127,8 +111,6 @@
|
|||||||
<script lang="ts" setup name="projectEstimateEdit">
|
<script lang="ts" setup name="projectEstimateEdit">
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
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 projectTable from "@/components/project/index.vue"
|
||||||
import contactsTable from "@/components/contacts/index.vue"
|
import contactsTable from "@/components/contacts/index.vue"
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
@ -184,8 +166,6 @@ const delFileFn = (index: number) => {
|
|||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
org_id: '',
|
|
||||||
dept_id: '',
|
|
||||||
project_id: '',
|
project_id: '',
|
||||||
customer_demand_id: '',
|
customer_demand_id: '',
|
||||||
estimate_source: '',
|
estimate_source: '',
|
||||||
@ -229,30 +209,6 @@ const customEvent2 = (e: any) => {
|
|||||||
contact_phone.value = e.phone
|
contact_phone.value = e.phone
|
||||||
showDialog2.value = false;
|
showDialog2.value = false;
|
||||||
};
|
};
|
||||||
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 area_change1 = (e: any) => {
|
|
||||||
formData.dept_id = e
|
|
||||||
let data = { 'dept_id': e }
|
|
||||||
getAdminsByDept(data).then((res) => {
|
|
||||||
Object.assign(jlist, res)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
//打开弹窗
|
||||||
const demandclck = () => {
|
const demandclck = () => {
|
||||||
@ -289,10 +245,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
deptAll({ 'org_id': data.org_id }).then((res) => {
|
|
||||||
Object.assign(jobs, res)
|
|
||||||
})
|
|
||||||
|
|
||||||
contact_name.value = data.contact_name
|
contact_name.value = data.contact_name
|
||||||
contact_phone.value = data.contact_phone
|
contact_phone.value = data.contact_phone
|
||||||
project_name.value = data.project_name
|
project_name.value = data.project_name
|
||||||
@ -351,8 +303,6 @@ const handleClose = () => {
|
|||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getlista()
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
setFormData,
|
setFormData,
|
||||||
|
@ -61,7 +61,6 @@
|
|||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="序号" type="index" width="55" />
|
||||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||||
<el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip />
|
<el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="需求" prop="customer_demand_name" show-overflow-tooltip />
|
<el-table-column label="需求" prop="customer_demand_name" show-overflow-tooltip />
|
||||||
<el-table-column label="概算来源" prop="estimate_source">
|
<el-table-column label="概算来源" prop="estimate_source">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
@ -3,20 +3,9 @@
|
|||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules" inline>
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules" inline>
|
||||||
<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>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="客户" prop="custom_id"
|
<el-form-item label="客户名称" prop="custom_id"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||||
<el-input v-model="customer_name" clearable placeholder="点击选择客户" readonly
|
<el-input v-model="customer_name" clearable placeholder="点击选择客户" readonly
|
||||||
@click="showDialog = true" />
|
@click="showDialog = true" />
|
||||||
@ -128,7 +117,6 @@
|
|||||||
<el-table :data="tableData">
|
<el-table :data="tableData">
|
||||||
<el-table-column label="序号">
|
<el-table-column label="序号">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<!-- <el-button @click="handleAdd(row)" size="small">+</el-button> -->
|
|
||||||
<el-button @click="handleDelete(row)" size="small">-</el-button>
|
<el-button @click="handleDelete(row)" size="small">-</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -204,9 +192,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>
|
|
||||||
<reviewprocess></reviewprocess>
|
|
||||||
</div> -->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
@ -225,14 +210,10 @@
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { apiQuotationAdd, apiQuotationEdit, apiQuotationDetail } from '@/api/quotation'
|
import { apiQuotationAdd, apiQuotationEdit, apiQuotationDetail } from '@/api/quotation'
|
||||||
import { timeFormat, convertToChinese } from '@/utils/util'
|
|
||||||
import { toChinesNum } from "@/utils/util";
|
import { toChinesNum } from "@/utils/util";
|
||||||
import customDialog1 from '@/components/product/index.vue'
|
import customDialog1 from '@/components/product/index.vue'
|
||||||
import reviewprocess from '@/components/reviewprocess/index.vue'
|
|
||||||
const list1 = reactive([])
|
const list1 = reactive([])
|
||||||
const list2 = reactive([])
|
const list2 = reactive([])
|
||||||
import { deptAll } from '@/api/org/department'
|
|
||||||
import { getAll } from '@/api/org/organization'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { computed, watch } from "vue"
|
import { computed, watch } from "vue"
|
||||||
|
|
||||||
@ -281,22 +262,6 @@ const delFileFn = (index: number) => {
|
|||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑报价单' : '新增报价单'
|
return mode.value == 'edit' ? '编辑报价单' : '新增报价单'
|
||||||
})
|
})
|
||||||
//获取所有组织
|
|
||||||
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 amountinput = (e) => {
|
const amountinput = (e) => {
|
||||||
if (e && e > 0) {
|
if (e && e > 0) {
|
||||||
@ -309,23 +274,9 @@ const amountinput1 = (e) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取部门
|
|
||||||
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 formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
dept_id: '',
|
|
||||||
org_id: '',
|
|
||||||
approve_id: 1,
|
approve_id: 1,
|
||||||
custom_id: '',
|
custom_id: '',
|
||||||
quotation_date: '',
|
quotation_date: '',
|
||||||
@ -398,9 +349,6 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
});
|
});
|
||||||
Object.assign(formDataannex, arry1)
|
Object.assign(formDataannex, arry1)
|
||||||
}
|
}
|
||||||
if (data.dept_id) {
|
|
||||||
getlist1(data.org_id)
|
|
||||||
}
|
|
||||||
if (data.total_amount && data.total_amount > 0) {
|
if (data.total_amount && data.total_amount > 0) {
|
||||||
amountinput1(data.total_amount)
|
amountinput1(data.total_amount)
|
||||||
}
|
}
|
||||||
@ -464,7 +412,6 @@ const handleSubmit = async () => {
|
|||||||
const open = (type = 'add') => {
|
const open = (type = 'add') => {
|
||||||
mode.value = type
|
mode.value = type
|
||||||
popupRef.value?.open()
|
popupRef.value?.open()
|
||||||
getlist()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭回调
|
// 关闭回调
|
||||||
|
Loading…
x
Reference in New Issue
Block a user