diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 00e05c3..a606bd4 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -82,6 +82,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/components.d.ts b/components.d.ts index fd5a679..570c1c5 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,40 +8,23 @@ export {} declare module 'vue' { export interface GlobalComponents { Breadcrumb: typeof import('./src/components/Breadcrumb/index.vue')['default'] - ElBadge: typeof import('element-plus/es')['ElBadge'] - ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] - ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] - ElCarousel: typeof import('element-plus/es')['ElCarousel'] - ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] ElCascader: typeof import('element-plus/es')['ElCascader'] - ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] ElCol: typeof import('element-plus/es')['ElCol'] - ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] - ElCountdown: typeof import('element-plus/es')['ElCountdown'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] - ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] - ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] - ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] - ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] ElPagination: typeof import('element-plus/es')['ElPagination'] - ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElProgress: typeof import('element-plus/es')['ElProgress'] - ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] - ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] ElSelect: typeof import('element-plus/es')['ElSelect'] - ElStep: typeof import('element-plus/es')['ElStep'] - ElSteps: typeof import('element-plus/es')['ElSteps'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTag: typeof import('element-plus/es')['ElTag'] diff --git a/src/router/index.ts b/src/router/index.ts index 20731f0..02a1aa5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -235,6 +235,17 @@ const routes: Array = [ isLogin: true }, }, + { + path: '/contract-manage', + name: 'contract-manage', + component: () => import('views/user/contract-manage/index.vue'), + meta: { + title: '合同管理', + keepAlive: true, + AuthFlag: false, + isLogin: true + }, + }, { path: '/rent-termination', name: 'rent-termination', @@ -246,6 +257,7 @@ const routes: Array = [ isLogin: true }, }, + { path: '/settlement-manage', name: 'settlement-manage', diff --git a/src/views/user/contract-manage/index.vue b/src/views/user/contract-manage/index.vue new file mode 100644 index 0000000..e52a769 --- /dev/null +++ b/src/views/user/contract-manage/index.vue @@ -0,0 +1,362 @@ + + + + + diff --git a/src/views/user/goodsManagement/index.vue b/src/views/user/goodsManagement/index.vue index 1abdb17..cb290a8 100644 --- a/src/views/user/goodsManagement/index.vue +++ b/src/views/user/goodsManagement/index.vue @@ -71,6 +71,10 @@ const getSelectId = (list: any, id: any) => { for (let i in list) { if (list[i].id == id) { //查询到就返回该数组对象的value + console.log('21',list[i].propertyNames) + list[i].propertyNames.forEach((item:any) =>{ + options.value.push({'label':item,'value':item}) + }) return [list[i].id] } if (list[i].children) { @@ -174,6 +178,11 @@ const maId: any = ref('') const editRowInfo = (row: any) => { settleinTitle.value = '装备编辑' getDetailData(row) + if(row.devInfoProperties!=null){ + row.devInfoProperties.forEach((item:any)=>{ + propertyNamesTwo.value.push({'propertyName':item.propertyName,'propertyValue':item.propertyValue}) + }) + } disabledForm.value = false isEditDisabled.value = true isViewForm.value = false @@ -211,6 +220,7 @@ const deleteRowInfo = async (row: any) => { } //获取详情接口 const getDetailData = async (row: any) => { + await getTypeTreeData() const { data: res }: any = await getDetailApi(row.maId) const { deviceName, @@ -232,6 +242,7 @@ const getDetailData = async (row: any) => { detailsFileList, insurancePdf, examinationPdf, + devInfoProperties, } = res Object.assign(addAndEditForm, { @@ -253,7 +264,9 @@ const getDetailData = async (row: any) => { detailsFileList, insurancePdf, examinationPdf, + devInfoProperties, }) + if (settleinTitle.value == '装备编辑') { Object.assign(addAndEditForm, { maId: row.maId, @@ -274,7 +287,16 @@ const getDetailData = async (row: any) => { }) descriptionFormList.value[0].insurancePdfs = insurancePdf descriptionFormList.value[0].examinationPdfs = examinationPdf + options.value=[] addAndEditForm.deviceTypeList = getSelectId(deviceTypeTree.value, addAndEditForm.typeId) + if(res.devInfoProperties!=null){ + res.devInfoProperties.forEach((item:any)=>{ + propertyNamesTwo.value.push({'propertyName':item.propertyName,'propertyValue':item.propertyValue}) + }) + } + // addAndEditForm.deviceTypeList[0].data.propertyNames.forEach((item:any) =>{ + // options.value.push({'label':item,'value':item}) + // }) dialogFormVisibleSettlein.value = true console.log(res, '详情接口') @@ -385,7 +407,7 @@ const countDisabled = ref(false) //装备类目-change const dialogTypeCascader = ref() //装备类目-change -const dialogTypeChange = () => { + const dialogTypeChange = async () => { const deviceTypeList = dialogTypeCascader.value.getCheckedNodes() // console.log(deviceTypeList) // equipmentDeploymentParams.value.unitName = deviceTypeList[0].data.unitName @@ -401,6 +423,21 @@ const dialogTypeChange = () => { // equipmentDeploymentParams.value.deviceCount = 1 // countDisabled.value = true // } + console.log('deviceTypeList',deviceTypeList[0].data.propertyNames) + if(deviceTypeList[0].data.propertyNames==null){ + propertyNames.value=[] + propertyNamesTwo.value=[] + }else{ + propertyNames.value=[] + propertyNamesTwo.value=[] + propertyNamesTwo.value.push({'propertyName':null,'propertyValue':null}) + deviceTypeList[0].data.propertyNames.forEach((item:any) =>{ + propertyNames.value.push({'propertyName':item,'propertyValue':null}) + options.value.push({'label':item,'value':item}) + }) + console.log(propertyNames.value) + } + // propertyNames.value = deviceTypeList[0].data.propertyNames isDisabled.value = true addAndEditForm.unitName = deviceTypeList[0].data.unitName addAndEditForm.dayLeasePrice = deviceTypeList[0].data.leasePrice @@ -603,7 +640,7 @@ const submitFun = (type: any) => { addAndEditForm.typeId = addAndEditForm.deviceTypeList[addAndEditForm.deviceTypeList.length - 1] - + addAndEditForm.devInfoProperties = propertyNamesTwo.value; let SEND_FUN_API: any = null if (type == 1) { SEND_FUN_API = equipmentAddApi @@ -622,6 +659,7 @@ const submitFun = (type: any) => { message: '保存成功', duration: 1000, }) + propertyNamesTwo.value = [] dialogFormVisibleSettlein.value = false getList() } @@ -648,6 +686,7 @@ const closeDialogBtn = () => { const handleClose = (done: () => void) => { // ruleFormRef.value.resetFields() done() + propertyNamesTwo.value = [] dialogFormVisibleSettlein.value = false } @@ -960,6 +999,35 @@ const onDeleteImgExaminationPdf = (j: any, index: any) => { const onDialogClose = () => { addAndEditFormRef.value.resetFields() } +const propertyNames = ref([ +]) +const propertyNamesTwo = ref([ +]) +const options = ref([ + // { + // label:'重量', + // value:1 + // }, + // { + // label:'宽度', + // value:2 + // }, + // { + // label:'长度', + // value:3 + // } +]) + + //新增属性 + const addPartItem = () => { + propertyNamesTwo.value.push({'propertyName':null,'propertyValue':null}); + } + + const removePartItem = (index:any)=> { + if (propertyNamesTwo.value.length > 1) { + propertyNamesTwo.value.splice(index, 1); + } + }