diff --git a/components.d.ts b/components.d.ts index b51de7e..7316b7b 100644 --- a/components.d.ts +++ b/components.d.ts @@ -25,12 +25,8 @@ declare module 'vue' { 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'] - 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'] @@ -40,16 +36,13 @@ declare module 'vue' { ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] - ElTimeline: typeof import('element-plus/es')['ElTimeline'] - ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] - ElUpload: typeof import('element-plus/es')['ElUpload'] EquipCard: typeof import('./src/components/equipCard.vue')['default'] + EquipCardHall: typeof import('./src/components/equipCardHall/index.vue')['default'] EquipCardNew: typeof import('./src/components/equipCardNew/index.vue')['default'] EquipDetailTable: typeof import('./src/components/equipDetailTable.vue')['default'] FooterInfo: typeof import('./src/components/FooterInfo/index.vue')['default'] FormComponent: typeof import('./src/components/FormComponent/index.vue')['default'] Header: typeof import('./src/components/header/index.vue')['default'] - Hearder: typeof import('./src/components/hearder/index.vue')['default'] Navmenu: typeof import('./src/components/Navmenu/index.vue')['default'] PagingComponent: typeof import('./src/components/PagingComponent/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/src/components/equipCardHall/index.vue b/src/components/equipCardHall/index.vue new file mode 100644 index 0000000..8c79ed4 --- /dev/null +++ b/src/components/equipCardHall/index.vue @@ -0,0 +1,191 @@ + + + diff --git a/src/components/header/index.vue b/src/components/header/index.vue index 96115e5..ee07e21 100644 --- a/src/components/header/index.vue +++ b/src/components/header/index.vue @@ -14,7 +14,7 @@ const isShowLogout = computed(() => { return store.token }) -const placeholderText = ref('请输入关键字') +const placeholderText = ref('搜索设备关键词') // 退出登录 const handlerLogout = () => { diff --git a/src/components/uploadImg.vue b/src/components/uploadImg.vue index 838a5e8..1cb2456 100644 --- a/src/components/uploadImg.vue +++ b/src/components/uploadImg.vue @@ -1,66 +1,71 @@ diff --git a/src/http/api/equip.ts b/src/http/api/equip.ts index f8bb03f..f39e5c8 100644 --- a/src/http/api/equip.ts +++ b/src/http/api/equip.ts @@ -1,11 +1,13 @@ import { post, get, put } from '../index' +// 获取装备分类/maType/getTypeList +export const getTypeListApi = () => { + return get(`/material-mall/maType/getTypeList`, {}) +} + // 获取装备列表 -export const getList = (params = {}) => { - return post('/zlpt-equip/dev/list', { - ...params, - maStatus: 16 - }) +export const getDeviceListApi = (data: any) => { + return post('/material-mall/dev/list', data) } //获取装备详情 diff --git a/src/http/api/home/index.ts b/src/http/api/home/index.ts index 6e35998..b0df475 100644 --- a/src/http/api/home/index.ts +++ b/src/http/api/home/index.ts @@ -3,6 +3,9 @@ import { get, post } from '../../index' export const getGoodsClassListApi = () => { return get('/material-mall/maType/getEquipmentType', {}) } +export const getCompanyListApi = () => { + return get('/material-mall/dev/companyList', {}) +} export const getHotSearchListApi = () => { return get('/material-mall/maType/getHotSearch', {}) } diff --git a/src/layout/header.vue b/src/layout/header.vue index 558ba36..6e58b37 100644 --- a/src/layout/header.vue +++ b/src/layout/header.vue @@ -15,7 +15,7 @@ const isShowLogout = computed(() => { return store.token }) -const placeholderText = ref('请输入关键字') +const placeholderText = ref('搜索设备关键词') // 退出登录 const handlerLogout = () => { @@ -75,7 +75,7 @@ const searchKeywordBtn = () => { } else { router.push({ name: 'equipList', - state: { keyWord: keywordIptValue.value }, + query: { keyWord: keywordIptValue.value }, }) } } @@ -196,7 +196,7 @@ const onCarts = () => { @keydown.enter="searchKeywordBtn" ref="inputRef" @focus="placeholderText = ''" - @blur="placeholderText = '请输入关键字'" + @blur="placeholderText = '搜索设备关键词'" /> diff --git a/src/router/index.ts b/src/router/index.ts index 988082f..fc1680b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -84,7 +84,7 @@ const routes: Array = [ component: () => import('views/home/index.vue'), meta: { title: '首页', - keepAlive: false, + keepAlive: true, AuthFlag: false, activeName: 'home', }, diff --git a/src/views/EnterpriseCertification.vue b/src/views/EnterpriseCertification.vue index c36f46b..7538d9d 100644 --- a/src/views/EnterpriseCertification.vue +++ b/src/views/EnterpriseCertification.vue @@ -15,7 +15,8 @@ + v-model.trim="applyParams.companyName" + > @@ -25,12 +26,14 @@ placeholder="请选择企业类型" clearable v-model="applyParams.companyType" - @change="changeProvince"> + @change="changeProvince" + > + :value="item.name" + > @@ -42,12 +45,14 @@ placeholder="请选择企业所属" clearable v-model="applyParams.companyLtd" - @change="changeProvince"> + @change="changeProvince" + > + :value="item.name" + > @@ -56,7 +61,8 @@ + v-model.trim="applyParams.creditCode" + > @@ -68,12 +74,14 @@ placeholder="请选择省份" clearable v-model="applyParams.registerS" - @change="changeProvince"> + @change="changeProvince" + > + :value="item.code + ',' + item.name" + > @@ -81,12 +89,14 @@ v-model="applyParams.registerAddressProvince" placeholder="请选择市" @change="changeMarket" - clearable> + clearable + > + :value="item.code + ',' + item.name" + > @@ -94,19 +104,22 @@ v-model="applyParams.registerAddressArea" placeholder="请选择区" clearable - @change="changeArea"> + @change="changeArea" + > + :value="item.code + ',' + item.name" + > + clearable + > @@ -118,12 +131,14 @@ placeholder="请选择省份" clearable v-model="applyParams.registerSs" - @change="opeChangeProvince"> + @change="opeChangeProvince" + > + :value="item.code + ',' + item.name" + > @@ -131,12 +146,14 @@ v-model="applyParams.operateAddressProvince" placeholder="请选择市" @change="opeChangeMarket" - clearable> + clearable + > + :value="item.code + ',' + item.name" + > @@ -144,19 +161,22 @@ v-model="applyParams.operateAddressArea" placeholder="请选择区" @change="opeChangeArea" - clearable> + clearable + > + :value="item.code + ',' + item.name" + > + placeholder="请输入实际办公地址" + > @@ -167,12 +187,14 @@ + placeholder="请选法人证件类型" + > + :value="item.name" + > @@ -182,7 +204,8 @@ + clearable + > @@ -195,7 +218,8 @@ width="120px" height="120px" :autoUpload="true" - :successResultCallBack="successResultCallBackFn"> + :successResultCallBack="successResultCallBackFn" + > @@ -217,7 +241,8 @@ :acceptTypeList="['.jpg', '.jpeg', '.png']" width="120px" height="120px" - :successResultCallBack="successResultCallBackFnfrCardf"> + :successResultCallBack="successResultCallBackFnfrCardf" + > @@ -237,7 +262,8 @@ :acceptTypeList="['.jpg', '.jpeg', '.png']" width="120px" height="120px" - :successResultCallBack="successResultCallBackFnfrCardz"> + :successResultCallBack="successResultCallBackFnfrCardz" + > @@ -257,7 +283,8 @@ :acceptTypeList="['.jpg', '.jpeg', '.png']" width="120px" height="120px" - :successResultCallBack="successResultCallBackFnfryz"> + :successResultCallBack="successResultCallBackFnfryz" + > @@ -276,7 +303,8 @@ + clearable + > > @@ -286,7 +314,8 @@ + clearable + > @@ -294,7 +323,8 @@ + clearable + > @@ -306,7 +336,8 @@ v-model.trim="applyParams.businessScope" clearable type="textarea" - :rows="5"> + :rows="5" + > @@ -325,7 +356,8 @@ + clearable + > @@ -333,7 +365,8 @@ + clearable + > @@ -342,7 +375,8 @@ + clearable + >
被授权人手机号修改且运营审核通过后,企业系统管理员权限将同步到修改后被授权手机号的登录账号。
@@ -354,7 +388,8 @@ + clearable + > > @@ -369,7 +404,8 @@ :acceptTypeList="['.jpg', '.jpeg', '.png']" width="120px" height="120px" - :successResultCallBack="successResultCallBackFnCardbsz"> + :successResultCallBack="successResultCallBackFnCardbsz" + > @@ -389,7 +425,8 @@ :acceptTypeList="['.jpg', '.jpeg', '.png']" width="120px" height="120px" - :successResultCallBack="successResultCallBackFnCardbsf"> + :successResultCallBack="successResultCallBackFnCardbsf" + > @@ -411,7 +448,8 @@ :acceptTypeList="['.jpg', '.jpeg', '.png']" width="120px" height="120px" - :successResultCallBack="successResultCallBackFnsqs"> + :successResultCallBack="successResultCallBackFnsqs" + > @@ -498,446 +536,446 @@ diff --git a/src/views/cart/index.vue b/src/views/cart/index.vue index 7c78ea5..9c36c09 100644 --- a/src/views/cart/index.vue +++ b/src/views/cart/index.vue @@ -53,13 +53,13 @@
-
{{ item.company_name }}
-
{{ item.user_name }}
-
{{ item.user_phone }}
+
{{ item.companyPersonPhoneKey.companyName }}
+
{{ item.companyPersonPhoneKey.person }}
+
{{ item.companyPersonPhoneKey.personPhone }}
- +
@@ -67,11 +67,14 @@
- +
-
{{ goods.goods_name }}
-
装备编号: {{ goods.goods_code }}
-
装备型号: {{ goods.goods_type }}
+
{{ goods.deviceName }}
+
装备编号: {{ goods.code }}
+
装备型号: {{ goods.typeName }}
@@ -176,122 +179,29 @@ import moment from 'moment' const protocolChecked = ref(false) -const cardList = ref([ - { - company_name: '安徽博诺斯有限公司', - user_name: '王先生', - user_phone: '18725632356', - isChecked: false, - good_list: [ - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 1, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - ], - }, - { - company_name: '安徽博诺斯有限公司', - user_name: '王先生', - user_phone: '18725632356', - isChecked: false, - good_list: [ - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - ], - }, - { - company_name: '安徽博诺斯有限公司', - user_name: '王先生', - user_phone: '18725632356', - isChecked: false, - good_list: [ - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - { - goods_pic: - 'https://fc1tn.baidu.com/it/u=4185529537,1682541874&fm=202&src=766&fc=tdmatt&mola=new&crop=v1', - goods_name: 'W190挖掘机', - goods_code: '995221_JHL', - goods_type: '挖地型号996', - lease_date: '', - lease_pic: 300, - lease_day: 0, - goods_num: 0, - totalAmount: 0, - isChecked: false, - lease_date_string: '', - }, - ], - }, -]) +const cardList = ref([]) const getBookCarDetailsData = async () => { - const res = await getBookCarDetailsApi() - console.log(res, '购物车详情') + const res: any = await getBookCarDetailsApi() + console.log(res, '----') + + cardList.value = res.data + + cardList.value.forEach((e: any) => { + e.isChecked = false + e.devInfoVoList.forEach((j: any) => { + j.isChecked = false + }) + }) + + console.log(cardList.value, '***********') + // console.log(res, '购物车详情') } -getBookCarDetailsData() + +onMounted(() => { + getBookCarDetailsData() +}) + // 日期change事件 const onLeaseDateChange = (e: any, item: any) => { item.lease_date_string = `${e[0]}至${e[1]}` @@ -305,9 +215,9 @@ const onDeleteGoods = (index: number) => { // 全选change事件 const onChangeAll = (e: boolean) => { - cardList.value.forEach((item) => { + cardList.value.forEach((item: any) => { item.isChecked = e - item.good_list.forEach((j) => { + item.devInfoVoList.forEach((j: any) => { j.isChecked = e }) }) @@ -315,33 +225,33 @@ const onChangeAll = (e: boolean) => { // 公司全选事件 const onChangeGoods = (index: number) => { - cardList.value[index].isChecked = cardList.value[index].good_list.every( - (e) => e.isChecked === true, + cardList.value[index].isChecked = cardList.value[index].devInfoVoList.every( + (e: any) => e.isChecked === true, ) } // 公司全选事件 const onChangeCompany = (e: boolean, index: number, item: any) => { - cardList.value[index].good_list.every((j) => (j.isChecked = e)) + cardList.value[index].devInfoVoList.every((j) => (j.isChecked = e)) } // 计算所有装备 const amountNum = computed(() => { let amountNum = 0 cardList.value.forEach((e) => { - amountNum = e.good_list.length + amountNum + amountNum = e.devInfoVoList.length + amountNum }) return amountNum }) // 计算全选按钮的选中状态 const allChecked = computed(() => { - return cardList.value.every((e) => e.isChecked === true) + return cardList.value.every((e: any) => e.isChecked === true) }) // 已勾选的所有装备 const amountDevice = computed(() => { let amountNum = 0 cardList.value.forEach((e) => { - e.good_list.forEach((g) => { + e.devInfoVoList.forEach((g) => { if (g.isChecked) { amountNum++ } @@ -354,7 +264,7 @@ const amountDevice = computed(() => { const orderAmountPice = computed(() => { let orderAmountPice = 0 cardList.value.forEach((e) => { - e.good_list.forEach((g) => { + e.devInfoVoList.forEach((g) => { if (g.isChecked) { orderAmountPice = g.goods_num * g.lease_pic * g.lease_day + orderAmountPice } diff --git a/src/views/equip/list.vue b/src/views/equip/list.vue index a88dfd5..5d8dfcc 100644 --- a/src/views/equip/list.vue +++ b/src/views/equip/list.vue @@ -1,610 +1,623 @@