更新
This commit is contained in:
parent
c55a25a9eb
commit
f2a5af731a
@ -1,5 +1,5 @@
|
||||
NODE_ENV = 'development'
|
||||
|
||||
VITE_APP_BASE_URL = 'http://a.com/'
|
||||
VITE_APP_BASE_URL = 'https://ceshi-engineering.lihaink.cn/'
|
||||
# VITE_APP_BASE_URL = 'http://www.eng.local/'
|
||||
# VITE_APP_BASE_URL = 'http://192.168.1.5:9090/'
|
@ -25,20 +25,20 @@
|
||||
<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="item.value" />
|
||||
:label="item.name" :value="parseInt(item.value)"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="委托单位">
|
||||
<el-input v-model="formData.company" clearable placeholder="请输入委托单位" />
|
||||
<el-input v-model="formData.company" 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="item.value" />
|
||||
:value="parseInt(item.value)"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -69,7 +69,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关联合同">
|
||||
<el-input v-model="formData.contract" clearable placeholder="请输入关联合同" />
|
||||
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -135,27 +135,38 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="委托联系人">
|
||||
<el-input v-model="formData.consult_user" clearable placeholder="请输入委托联系人" />
|
||||
<el-input v-model="formData.consult_user_name" clearable placeholder="请输入委托联系人" @click="userclick('consult_user')"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="监管部门">
|
||||
<el-input v-model="formData.supervision_department" clearable placeholder="请输入监管部门" />
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实施部门">
|
||||
<el-input v-model="formData.implementation_department" clearable placeholder="请输入实施部门" />
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目部">
|
||||
<el-input v-model="formData.project_department" clearable placeholder="请输入项目部" />
|
||||
<el-select v-model="formData.project_department" placeholder="请选择项目部门" class="flex-1">
|
||||
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目负责人员">
|
||||
<el-input v-model="formData.project_manager" clearable placeholder="请输入项目负责人员" />
|
||||
<el-input v-model="formData.project_manager_name" clearable placeholder="请输入项目负责人员" @click="userclick('project_manager')"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -198,6 +209,16 @@
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div v-if="showDialog">
|
||||
<personnelselector ref="personnel" @confirm="submituser" type="1">
|
||||
</personnelselector>
|
||||
</div>
|
||||
<el-dialog v-model="showDialog1" title="选择委托单位" width="70%">
|
||||
<dialogTable :config="marketing_custom" @customEvent="customEvent1"></dialogTable>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog2" title="选择甲方单位" width="70%">
|
||||
<dialogTable :config="marketing_custom" @customEvent="customEvent2"></dialogTable>
|
||||
</el-dialog>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
@ -210,6 +231,8 @@ import { timeFormat } from '@/utils/util'
|
||||
import type {PropType} from 'vue'
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import {checkPhone} from "@/utils/validate"
|
||||
import {apiCostApprovedProjectDetail} from "@/api/cost_approved_project";
|
||||
import {marketing_custom} from "@/components/dialogTable/dialogTableConfig";
|
||||
|
||||
|
||||
const userStore = useUserStore().userInfo;
|
||||
@ -218,13 +241,19 @@ defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
deptList: Array
|
||||
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
const showDialog2 = ref(false)
|
||||
const personnel = ref(null)
|
||||
const route = useRoute()
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
@ -239,12 +268,14 @@ const formData = reactive({
|
||||
industry: '',
|
||||
nature: '',
|
||||
company: '',
|
||||
company_name: '',
|
||||
build_area: '',
|
||||
address: '',
|
||||
project_level: '',
|
||||
total_investment: '',
|
||||
initiation_date: '',
|
||||
contract: '',
|
||||
contract_name: '',
|
||||
contract_amount: '',
|
||||
contract_content: '',
|
||||
project_overview: '',
|
||||
@ -256,11 +287,14 @@ const formData = reactive({
|
||||
consult_type: '',
|
||||
telephone: '',
|
||||
consult_user: '',
|
||||
consult_user_name: '',
|
||||
supervision_department: '',
|
||||
implementation_department: '',
|
||||
project_department: '',
|
||||
project_manager: '',
|
||||
project_manager_name: '',
|
||||
part_a_unit: '',
|
||||
part_a: '',
|
||||
project_archiving: [],
|
||||
archiving_directory: '',
|
||||
annex: [],
|
||||
@ -486,8 +520,49 @@ const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
if (route.query.contractId) {
|
||||
apiCostApprovedProjectDetail({id: route.query.contractId}).then((res) => {
|
||||
customEvent(res)
|
||||
})
|
||||
}
|
||||
const customEvent = (e) => {
|
||||
formData.contract = e.id
|
||||
formData.contract_name = e.contract_name
|
||||
formData.nature = e.industry_nature
|
||||
formData.project_manager = e.project_director
|
||||
formData.part_a = e.part_a
|
||||
formData.part_a_unit = e.part_a_name
|
||||
formData.build_area = e.const_area
|
||||
formData.total_investment = e.project_money
|
||||
formData.supervision_department = e.supervise_dept
|
||||
formData.contract_amount = e.signed_amount
|
||||
|
||||
formData.project_overview = e.project_scale
|
||||
|
||||
}
|
||||
const customEvent1 = (e) => {
|
||||
formData.company = e.id
|
||||
formData.company_name = e.invoice_company
|
||||
showDialog1.value = false
|
||||
}
|
||||
const customEvent2 = (e) => {
|
||||
formData.part_a = e.id
|
||||
formData.part_a_unit = e.invoice_company
|
||||
showDialog2.value = false
|
||||
}
|
||||
|
||||
let value
|
||||
const userclick = async (val) => {
|
||||
showDialog.value = true
|
||||
value = val
|
||||
await nextTick()
|
||||
personnel.value.open()
|
||||
}
|
||||
const submituser = (e: any) => {
|
||||
formData[value + '_name'] = e.name
|
||||
formData[value] = e.id
|
||||
showDialog.value = false
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
|
@ -70,7 +70,7 @@
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="success()" @close="success()" :deptList="deptList" />
|
||||
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" />
|
||||
</div>
|
||||
</template>
|
||||
@ -82,13 +82,15 @@ import { apiConsultProjectLists, apiConsultProjectDelete, apiConsultProjectDetai
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import detailConfig from './detail'
|
||||
import {deptLists} from "@/api/org/department";
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const detailRef = ref('')
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
const showDetail = ref(false)
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
// 查询条件
|
||||
@ -148,6 +150,20 @@ const handleDetail = async (row) => {
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
if (route.query.contractId) {
|
||||
handleAdd()
|
||||
}
|
||||
const success = () => {
|
||||
router.push({
|
||||
path: '/management/manage_basic/manage_project',
|
||||
|
||||
})
|
||||
}
|
||||
const deptList = ref([])
|
||||
const getDeptList = async () => {
|
||||
const res = await deptLists()
|
||||
deptList.value = res.lists
|
||||
}
|
||||
getDeptList()
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -100,7 +100,7 @@
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="success()" @close="success()" />
|
||||
<detail-popup v-if="showDetail" ref="detailRef" :dict-data="dictData" @close="showDetail = false" />
|
||||
</div>
|
||||
</template>
|
||||
@ -183,6 +183,24 @@ const link = (data: any) => {
|
||||
}
|
||||
})
|
||||
break
|
||||
case '2':
|
||||
router.push({
|
||||
path: '/management/manage_basic/manage_project',
|
||||
query: {
|
||||
contractId: data.id,
|
||||
contractName: data.contract_name
|
||||
}
|
||||
})
|
||||
break
|
||||
case '3':
|
||||
router.push({
|
||||
path: '/consult/consult_basic/consult_project',
|
||||
query: {
|
||||
contractId: data.id,
|
||||
contractName: data.contract_name
|
||||
}
|
||||
})
|
||||
break
|
||||
case '4':
|
||||
router.push({
|
||||
path: '/cost_consultation/cost_consultation_project/cost_project',
|
||||
|
@ -26,7 +26,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="建设单位" prop="build_unit">
|
||||
<el-input v-model="formData.build_unit" clearable placeholder="请输入建设单位" />
|
||||
<el-input v-model="formData.build_unit_name" clearable placeholder="请输入建设单位" @click="showDialog1 = true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -110,17 +110,25 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实施部门" prop="implementation_department">
|
||||
<el-input v-model="formData.implementation_department" clearable placeholder="请输入实施部门" />
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="监管部门" prop="supervision_department">
|
||||
<el-input v-model="formData.supervision_department" clearable placeholder="请输入监管部门" />
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目经理" prop="project_manager">
|
||||
<el-input v-model="formData.project_manager" clearable placeholder="请输入项目经理" />
|
||||
<el-input v-model="formData.project_manager_name" clearable placeholder="请输入项目经理" @click="userclick('project_manager')"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -132,23 +140,26 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目负责人" prop="project_leader">
|
||||
<el-input v-model="formData.project_leader" clearable placeholder="请输入项目负责人" />
|
||||
<el-input v-model="formData.project_leader_name" clearable placeholder="请输入项目负责人" @click="userclick('project_leader')"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目部" prop="project_department">
|
||||
<el-input v-model="formData.project_department" clearable placeholder="请输入项目部" />
|
||||
<el-select v-model="formData.project_department" placeholder="请选择项目部门" class="flex-1">
|
||||
<el-option :label="item.name" :value="item.id" v-for="item in deptList">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关联合同" prop="contract">
|
||||
<el-input v-model="formData.contract" clearable placeholder="请输入关联合同" v-type="'code'" />
|
||||
<el-input v-model="formData.contract_name" clearable placeholder="请输入关联合同" v-type="'code'"/>
|
||||
</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="请输入甲方单位" />
|
||||
<el-input v-model="formData.part_a_unit" clearable placeholder="请输入甲方单位" @click="showDialog2 = true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -177,6 +188,16 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div v-if="showDialog">
|
||||
<personnelselector ref="personnel" @confirm="submituser" type="1">
|
||||
</personnelselector>
|
||||
</div>
|
||||
<el-dialog v-model="showDialog1" title="选择建设单位" width="70%">
|
||||
<dialogTable :config="marketing_custom" @customEvent="customEvent1"> </dialogTable>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog2" title="选择甲方单位" width="70%">
|
||||
<dialogTable :config="marketing_custom" @customEvent="customEvent2"> </dialogTable>
|
||||
</el-dialog>
|
||||
</popup>
|
||||
</div>
|
||||
</template>
|
||||
@ -188,7 +209,11 @@ import { apiManageProjectAdd, apiManageProjectEdit, apiManageProjectDetail } fro
|
||||
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";
|
||||
|
||||
const userStore = useUserStore().userInfo;
|
||||
const route = useRoute()
|
||||
|
||||
// create_user: userStore.account,
|
||||
// create_time: timeFormat('', 'yyyy-mm-dd hh:MM:ss'),
|
||||
@ -198,14 +223,17 @@ defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
deptList: Array
|
||||
})
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
|
||||
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
const showDialog2 = ref(false)
|
||||
const personnel = ref(null)
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
@ -219,6 +247,7 @@ const formData = reactive({
|
||||
nature: '',
|
||||
industry: '',
|
||||
build_unit: '',
|
||||
build_unit_name: '',
|
||||
build_area: '',
|
||||
address: '',
|
||||
project_level: '',
|
||||
@ -234,12 +263,16 @@ const formData = reactive({
|
||||
implementation_department: '',
|
||||
supervision_department: '',
|
||||
project_manager: '',
|
||||
project_manager_name: '',
|
||||
initiation_date: '',
|
||||
project_leader: '',
|
||||
project_leader_name: '',
|
||||
project_department: '',
|
||||
remark: '',
|
||||
contract: '',
|
||||
contract_name: '',
|
||||
part_a_unit: '',
|
||||
part_a: '',
|
||||
annex: [],
|
||||
create_user: userStore.account,
|
||||
create_time: timeFormat('', 'yyyy-mm-dd hh:MM:ss'),
|
||||
@ -471,7 +504,49 @@ const handleClose = () => {
|
||||
}
|
||||
|
||||
|
||||
if (route.query.contractId) {
|
||||
apiCostApprovedProjectDetail({id: route.query.contractId}).then((res) => {
|
||||
customEvent(res)
|
||||
})
|
||||
}
|
||||
const customEvent = (e) => {
|
||||
formData.contract = e.id
|
||||
formData.contract_name = e.contract_name
|
||||
formData.nature = e.industry_nature
|
||||
formData.planned_start_date = e.start_date
|
||||
formData.planned_end_date = e.end_date
|
||||
formData.project_manager = e.project_director
|
||||
formData.part_a = e.part_a
|
||||
formData.part_a_unit = e.part_a_name
|
||||
formData.build_area = e.const_area
|
||||
formData.total_investment = e.project_money
|
||||
formData.supervision_department = e.supervise_dept
|
||||
|
||||
formData.project_overview = e.project_scale
|
||||
|
||||
}
|
||||
const customEvent1 = (e) => {
|
||||
formData.build_unit = e.id
|
||||
formData.build_unit_name = e.invoice_company
|
||||
showDialog1.value = false
|
||||
}
|
||||
const customEvent2 = (e) => {
|
||||
formData.part_a = e.id
|
||||
formData.part_a_unit = e.invoice_company
|
||||
showDialog2.value = false
|
||||
}
|
||||
let value
|
||||
const userclick = async (val) => {
|
||||
showDialog.value = true
|
||||
value = val
|
||||
await nextTick()
|
||||
personnel.value.open()
|
||||
}
|
||||
const submituser = (e: any) => {
|
||||
formData[value + '_name'] = e.name
|
||||
formData[value] = e.id
|
||||
showDialog.value = false
|
||||
}
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
|
@ -114,7 +114,7 @@
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="success()" @close="success()" :deptList="deptList" />
|
||||
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" />
|
||||
|
||||
</div>
|
||||
@ -127,7 +127,10 @@ import { apiManageProjectLists, apiManageProjectDelete, apiManageProjectDetail }
|
||||
import detailConfig from './detail'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import {deptLists} from "@/api/org/department";
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const detailRef = ref('')
|
||||
// 是否显示编辑框
|
||||
@ -194,7 +197,20 @@ const handleDetail = async (id: any) => {
|
||||
detailRef.value?.open()
|
||||
detailRef.value?.setFormData(res)
|
||||
}
|
||||
if (route.query.contractId) {
|
||||
handleAdd()
|
||||
}
|
||||
const success = () => {
|
||||
router.push({
|
||||
path: '/management/manage_basic/manage_project',
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
const deptList = ref([])
|
||||
const getDeptList = async () => {
|
||||
const res = await deptLists()
|
||||
deptList.value = res.lists
|
||||
}
|
||||
getDeptList()
|
||||
getLists()
|
||||
</script>
|
||||
|
@ -244,7 +244,6 @@ const success = () => {
|
||||
path: '/supervision/supervision_basic/supervision_project',
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
getLists()
|
||||
getDeptList()
|
||||
|
Loading…
x
Reference in New Issue
Block a user