diff --git a/src/views/contract/edit.vue b/src/views/contract/edit.vue index 5149f31..9c54a49 100644 --- a/src/views/contract/edit.vue +++ b/src/views/contract/edit.vue @@ -3,20 +3,9 @@ -
- - - - - - - -
- @@ -262,8 +251,6 @@ const list1 = reactive([]) const list2 = reactive([]) const paymentList = reactive([{}]) const personnel = ref() -import { deptAll } from '@/api/org/department' -import { getAll } from '@/api/org/organization' import feedback from '@/utils/feedback' const userStore = useUserStore(); //验证 @@ -318,8 +305,6 @@ const delFileFn = (index: number) => { // 表单数据 const formData = reactive({ id: '', - dept_id: '', - org_id: '', approve_id: 1, custom_id: '', buy_bidding_document_id: '', @@ -414,34 +399,7 @@ const amountinput = (e) => { amount_daxie.value = toChinesNum(e) } } -//获取所有组织 -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' ? '编辑项目合同' : '新增项目合同' @@ -469,12 +427,6 @@ const setFormData = async (data: Record) => { } - - - if (data.dept_id) { - getlist1(data.org_id) - } - for (const key in formData) { if (data[key] != null && data[key] != undefined) { //@ts-ignore @@ -533,7 +485,6 @@ const handleSubmit = async () => { const open = (type = 'add') => { mode.value = type popupRef.value?.open() - getlist() } // 关闭回调 diff --git a/src/views/contract/index.vue b/src/views/contract/index.vue index 233e744..682f7e4 100644 --- a/src/views/contract/index.vue +++ b/src/views/contract/index.vue @@ -2,6 +2,12 @@
+ + + + + + @@ -103,7 +109,8 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiContractLists, apiContractDelete, apiContractDetail } from '@/api/contract' -import { timeFormat } from '@/utils/util' +import { apiProjectSearch } from '@/api/project' +import { apiCustomSearch } from '@/api/custom' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' @@ -117,6 +124,8 @@ const showDtail = ref(false) // 查询条件 const queryParams = reactive({ + project_id: '', + custom_id: '', contract_name: '', contract_type: '' })