update
This commit is contained in:
parent
f0daf15991
commit
9fdf783320
@ -2,16 +2,6 @@
|
|||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="120px" :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>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="项目名称" prop="project_id"
|
<el-form-item label="项目名称" prop="project_id"
|
||||||
@ -165,8 +155,6 @@ const mode = ref('add')
|
|||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
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 configs from "@/config"
|
import configs from "@/config"
|
||||||
const base_url = configs.baseUrl + configs.urlPrefix
|
const base_url = configs.baseUrl + configs.urlPrefix
|
||||||
import useUserStore from "@/stores/modules/user";
|
import useUserStore from "@/stores/modules/user";
|
||||||
@ -205,39 +193,10 @@ const customEvent = (e: any) => {
|
|||||||
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 deptrmt = (e: any) => {
|
|
||||||
formData.dept_id = ''
|
|
||||||
getlist1(e)
|
|
||||||
|
|
||||||
}
|
|
||||||
//获取所有部门
|
|
||||||
const getlist1 = (id: any) => {
|
|
||||||
deptAll({ 'org_id': id }).then((res) => {
|
|
||||||
Object.assign(list2, res)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
dept_id: '',
|
|
||||||
org_id: '',
|
|
||||||
project_id: '',
|
project_id: '',
|
||||||
project_estimation: '',
|
project_estimation: '',
|
||||||
bidding_project_fund_source: '',
|
bidding_project_fund_source: '',
|
||||||
@ -280,9 +239,6 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
Object.assign(formDataannex, arry1)
|
Object.assign(formDataannex, arry1)
|
||||||
|
|
||||||
}
|
}
|
||||||
if (data.dept_id) {
|
|
||||||
getlist1(data.org_id)
|
|
||||||
}
|
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
|
@ -2,15 +2,6 @@
|
|||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @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="project_id"
|
<el-form-item label="项目名称" prop="project_id"
|
||||||
@ -163,8 +154,6 @@ const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|||||||
const mode = ref('add')
|
const mode = ref('add')
|
||||||
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 configs from "@/config"
|
import configs from "@/config"
|
||||||
const base_url = configs.baseUrl + configs.urlPrefix
|
const base_url = configs.baseUrl + configs.urlPrefix
|
||||||
import useUserStore from "@/stores/modules/user";
|
import useUserStore from "@/stores/modules/user";
|
||||||
@ -178,8 +167,6 @@ const popupTitle = computed(() => {
|
|||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
"org_id": 0,
|
|
||||||
"dept_id": 0,
|
|
||||||
"project_id": 0,
|
"project_id": 0,
|
||||||
"bid_decision_id": 0,
|
"bid_decision_id": 0,
|
||||||
bid_decision_code: "",
|
bid_decision_code: "",
|
||||||
@ -208,34 +195,6 @@ const submituser = (e: any) => {
|
|||||||
const formRules = reactive<any>({
|
const formRules = reactive<any>({
|
||||||
|
|
||||||
})
|
})
|
||||||
//获取所有组织
|
|
||||||
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 customEvent = (e: any) => {
|
const customEvent = (e: any) => {
|
||||||
formData.project_id = e.project_id;
|
formData.project_id = e.project_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user