diff --git a/src/api/system/company/model/index.ts b/src/api/system/company/model/index.ts index b950b3e..7e85122 100644 --- a/src/api/system/company/model/index.ts +++ b/src/api/system/company/model/index.ts @@ -52,6 +52,7 @@ export interface Company { export interface CompanyParam { companyId?: number; shortName?: string; + companyTypeMultiple?: string; companyName?: string; domain?: string; keywords?: string; diff --git a/src/api/tower/fall/model/index.ts b/src/api/tower/fall/model/index.ts index b6d22d7..07eb50f 100644 --- a/src/api/tower/fall/model/index.ts +++ b/src/api/tower/fall/model/index.ts @@ -4,6 +4,7 @@ export interface TowerFall { id?: number; code?: string; model?: string; + companyId?: number; factory?: string; factoryDate?: string; discardDate?: string; diff --git a/src/views/tower/fall/components/fall-edit.vue b/src/views/tower/fall/components/fall-edit.vue index d6f042f..e6669ab 100644 --- a/src/views/tower/fall/components/fall-edit.vue +++ b/src/views/tower/fall/components/fall-edit.vue @@ -40,16 +40,19 @@ - - + @@ -157,7 +160,7 @@ import { User } from '@/api/user/model'; import { Organization } from '@/api/system/organization/model'; import { Customer } from '@/api/oa/customer/model'; - + import { Company } from '@/api/system/company/model'; // 是否是修改 const isUpdate = ref(false); const useForm = Form.useForm; @@ -170,6 +173,8 @@ visible: boolean; // 修改回显的数据 data?: TowerFall | null; + + companyList: Company[] | null; }>(); const emit = defineEmits<{ @@ -214,6 +219,7 @@ const form = reactive({ id: undefined, code: undefined, + companyId: undefined, model: undefined, factory: '', factoryDate: '', @@ -238,11 +244,11 @@ // 表单验证规则 const rules = reactive({ - name: [ + code: [ { required: true, type: 'string', - message: '请输入设备', + message: '请输入防坠器编号', trigger: 'blur' } ], @@ -254,11 +260,27 @@ trigger: 'blur' } ], - factoryNo: [ + factory: [ { required: true, type: 'string', - message: '请输入出厂编号', + message: '请输入制造厂家', + trigger: 'blur' + } + ], + factoryDate: [ + { + required: true, + type: 'string', + message: '请输入出厂日期', + trigger: 'blur' + } + ], + discardDate: [ + { + required: true, + type: 'string', + message: '请输入报废日期', trigger: 'blur' } ] @@ -266,9 +288,6 @@ const { resetFields } = useForm(form, rules); - const onLifeYaer = () => { - form.surplusYear = form.lifeYear; - }; // const onFactoryDate = () => { // form.scrapDate = form.factoryDate; // }; diff --git a/src/views/tower/fall/index.vue b/src/views/tower/fall/index.vue index 1c4e13e..553091b 100644 --- a/src/views/tower/fall/index.vue +++ b/src/views/tower/fall/index.vue @@ -54,7 +54,7 @@ - + @@ -76,6 +76,9 @@ updateBatchTowerFall } from '@/api/tower/fall'; import { TowerFall, TowerFallParam } from '@/api/tower/fall/model'; + import { pageCompany } from '@/api/system/company'; + import { Customer } from '@/api/oa/customer/model'; + import { Company } from '@/api/system/company/model'; defineProps<{ activeKey?: boolean; @@ -118,8 +121,8 @@ }, { title: '产权单位', - dataIndex: 'company', - key: 'company' + dataIndex: 'companyName', + key: 'companyName' }, { title: '出厂日期', @@ -154,7 +157,12 @@ const current = ref(null); // 是否显示编辑弹窗 const showEdit = ref(false); - + const companys = ref(); + pageCompany({ + companyTypeMultiple: '产权单位' + }).then((res) => { + companys.value = res?.list; + }); // 表格数据源 const datasource: DatasourceFunction = ({ page,