代码提交
This commit is contained in:
parent
0848782d52
commit
8d3fac9a3a
|
|
@ -10,13 +10,9 @@ declare module 'vue' {
|
|||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
||||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
||||
<<<<<<< HEAD
|
||||
ElDivider: typeof import('element-plus/es')['ElDivider']
|
||||
=======
|
||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElDialog: typeof import('element-plus/es')['ElDialog']
|
||||
>>>>>>> dev-songyang
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||
|
|
@ -27,6 +23,7 @@ declare module 'vue' {
|
|||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ VITE_BUILD_MODE = 'dev'
|
|||
VITE_API_URL = '/proxyApi'
|
||||
|
||||
# 开发环境接口地址
|
||||
# VITE_proxyTarget = 'http://10.40.92.66:9205' #盛旭
|
||||
VITE_proxyTarget = 'http://10.40.92.66:9205' #盛旭
|
||||
|
||||
# VITE_proxyTarget = 'http://10.40.92.185:9200' # 赵福海 (登录)
|
||||
|
||||
VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||
# VITE_proxyTarget = 'http://10.40.92.253:8080' # 牛 (个人中心 基础信息企业申请认证)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,4 +10,10 @@ export const equipmentDeploymentApi = (data: any) => {
|
|||
// 获取商品入驻列表
|
||||
export const getEquipmentListApi = (data: any) => {
|
||||
return post('/dev/list', data)
|
||||
}
|
||||
}
|
||||
|
||||
// 商品删除接口
|
||||
export const deleteGoodstApi = (data: any) => {
|
||||
return post('/dev/remove', data)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@ export const goodsUpApi = (data: any) => {
|
|||
|
||||
// 装备下架接口
|
||||
export const goodsDownApi = (data: any) => {
|
||||
return post('/off', data)
|
||||
return post('/off/upOffList ', data)
|
||||
}
|
||||
|
||||
// 装备删除接口
|
||||
export const goodsDeleteApi = (data: any) => {
|
||||
return post('/off/remove', data)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
import axios from 'axios'
|
||||
import NProgress from 'nprogress'
|
||||
import { useStore } from 'store/main'
|
||||
import {ElMessage} from "element-plus";
|
||||
import { ElMessage } from "element-plus";
|
||||
import router from "@/router"
|
||||
const store = useStore()
|
||||
// const CancelToken = axios.CancelToken
|
||||
|
|
@ -21,7 +21,7 @@ const service = axios.create({
|
|||
|
||||
service.interceptors.request.use(
|
||||
(config) => {
|
||||
config.headers['Authorization'] =VITE_ENV=='development'&&VITE_LocalFlag?VITE_token: store.token
|
||||
config.headers['Authorization'] = VITE_ENV == 'development' && VITE_LocalFlag ? VITE_token : store.token
|
||||
return config
|
||||
},
|
||||
(error) => {
|
||||
|
|
@ -32,12 +32,12 @@ service.interceptors.request.use(
|
|||
service.interceptors.response.use(
|
||||
(res) => {
|
||||
const { data } = res
|
||||
if(data.code == '200'){
|
||||
if (data.code == '200') {
|
||||
return data
|
||||
}else if(data.code == '403'){
|
||||
} else if (data.code == '403') {
|
||||
ElMessage.error('请重新登录')
|
||||
router.push('/login')
|
||||
}else{
|
||||
} else {
|
||||
return data
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@
|
|||
|
||||
.goods-count {
|
||||
display: flex;
|
||||
background-clip: #f5f5f5;
|
||||
padding-top: 30px;
|
||||
|
||||
li {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,11 @@
|
|||
import { useStore } from 'store/user'
|
||||
const store = useStore()
|
||||
|
||||
import { equipmentDeploymentApi, getEquipmentListApi } from 'http/api/usercenter/goodsmang'
|
||||
import {
|
||||
equipmentDeploymentApi,
|
||||
getEquipmentListApi,
|
||||
deleteGoodstApi
|
||||
} from 'http/api/usercenter/goodsmang'
|
||||
|
||||
// 注册地址拼装
|
||||
const AssemblyRegisterAddress: any = reactive([])
|
||||
|
|
@ -154,8 +158,6 @@
|
|||
maStatus: 15
|
||||
})
|
||||
|
||||
const initData = ref(JSON.parse(JSON.stringify(equipmentDeploymentParams)))
|
||||
|
||||
const pageSize = 20
|
||||
const pageNumber = 1
|
||||
const total: any = ref(0)
|
||||
|
|
@ -167,7 +169,6 @@
|
|||
// 获取数据列表
|
||||
const getList = async () => {
|
||||
const res: any = await getEquipmentListApi({})
|
||||
console.log('获取数据列表***', res)
|
||||
total.value = res.total
|
||||
tableData.list = res.rows
|
||||
}
|
||||
|
|
@ -186,13 +187,83 @@
|
|||
dialogFormVisibleSettlein.value = true
|
||||
}
|
||||
// 删除按钮
|
||||
const deleteRowInfo = (row: any) => {
|
||||
console.log(row, '删除当前数据')
|
||||
const deleteRowInfo = async (row: any) => {
|
||||
const res: any = await deleteGoodstApi([row.maId])
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
getList()
|
||||
}
|
||||
}
|
||||
|
||||
// 装备入驻按钮
|
||||
const equipmentDeployment = () => {
|
||||
equipmentDeploymentParams.value = initData
|
||||
equipmentDeploymentParams.value = {
|
||||
/* 租赁范围 */
|
||||
leaseScope: '',
|
||||
/* 设备所在地 */
|
||||
location: '',
|
||||
/* 设备所在地 省 */
|
||||
addressEconomize: '',
|
||||
/* 设备所在地 市 */
|
||||
addressProvince: '',
|
||||
/* 设备所在地 区 */
|
||||
addressArea: '',
|
||||
/* 设备类型 */
|
||||
typeId: '',
|
||||
/* 设备类型大类 */
|
||||
deviceType: '',
|
||||
/* 设备类型子类 */
|
||||
deviceTypeSon: '',
|
||||
/* 设备类型小类*/
|
||||
deviceTypeSun: '',
|
||||
/* 设备品牌 */
|
||||
brand: '',
|
||||
/* 设备型号 */
|
||||
modelName: '',
|
||||
/* 出场日期 */
|
||||
productionDate: '',
|
||||
/* 工作小时数 */
|
||||
workingHours: '',
|
||||
/* 整机序列号 */
|
||||
serialNumber: '',
|
||||
/* 月租金 */
|
||||
monthLeasePrice: '',
|
||||
/* 日租金 */
|
||||
dayLeasePrice: '',
|
||||
/* 是否提供机手 */
|
||||
isOperator: '',
|
||||
/* 机手月费用 */
|
||||
jsMonthPrice: '',
|
||||
/* 机手日费用 */
|
||||
jsDayPrice: '',
|
||||
/* 详细说明 */
|
||||
description: '',
|
||||
/* 设备图片 */
|
||||
picUrl: '',
|
||||
/* 检测信息 ,保险信息*/
|
||||
fileList: [
|
||||
/* 检测信息 */
|
||||
{
|
||||
id: '28',
|
||||
url: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/488bab245180ebf9f1f3d7db5301be4.png'
|
||||
},
|
||||
/* 保险信息 */
|
||||
{
|
||||
id: '29',
|
||||
utr: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/488bab245180ebf9f1f3d7db5301be4.png'
|
||||
},
|
||||
/* 设备图片 */
|
||||
{
|
||||
id: '20',
|
||||
utr: 'https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/488bab245180ebf9f1f3d7db5301be4.png'
|
||||
}
|
||||
],
|
||||
/* 设备状态 */
|
||||
maStatus: 15
|
||||
}
|
||||
// 打开入驻弹框
|
||||
dialogFormVisibleSettlein.value = true
|
||||
}
|
||||
|
|
@ -202,9 +273,9 @@
|
|||
// 入驻框保存提交
|
||||
const submitBtn = async () => {
|
||||
console.log(AssemblyRegisterAddress, '地址***---***')
|
||||
equipmentDeploymentParams.value.location = AssemblyRegisterAddress.join(',')
|
||||
// equipmentDeploymentParams.value.location = AssemblyRegisterAddress.join(',')
|
||||
// equipmentDeploymentParams.typeId = deviceType.join(',')
|
||||
const res: any = await equipmentDeploymentApi(equipmentDeploymentParams)
|
||||
const res: any = await equipmentDeploymentApi(equipmentDeploymentParams.value)
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import FormComponent from 'components/FormComponent/index.vue'
|
||||
import PagingComponent from 'components/PagingComponent/index.vue'
|
||||
import { getEquipmentListApi } from 'http/api/usercenter/goodsmang'
|
||||
import { goodsUpApi } from 'http/api/usercenter/goodsupdown'
|
||||
import { goodsUpApi, goodsDownApi, goodsDeleteApi } from 'http/api/usercenter/goodsupdown'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const pageSize = 20
|
||||
const pageNumber = 1
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
// 选择复选框时获取的数据源
|
||||
const getRowId = (val: any) => {
|
||||
console.log(val, '需要删除的数据源**')
|
||||
val.forEach((item: any, index: any) => {
|
||||
groundingParams.value[index] = {
|
||||
/* 设备id */
|
||||
|
|
@ -57,16 +56,34 @@
|
|||
}
|
||||
|
||||
// 批量下架按钮
|
||||
const handleOffshelf = () => {
|
||||
console.log('下架设备')
|
||||
const handleOffshelf = async () => {
|
||||
groundingParams.value.forEach((item: any) => {
|
||||
item.type = 2
|
||||
})
|
||||
const res: any = await goodsDownApi(groundingParams.value)
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '批量下架申请成功'
|
||||
})
|
||||
getList()
|
||||
groundingParams.value = []
|
||||
}
|
||||
}
|
||||
// 编辑按钮
|
||||
const editRowInfo = (row: any) => {
|
||||
console.log(row, '编辑当前数据')
|
||||
}
|
||||
// 删除按钮
|
||||
const deleteRowInfo = (row: any) => {
|
||||
console.log(row, '删除当前数据')
|
||||
const deleteRowInfo = async (row: any) => {
|
||||
const res: any = await goodsDeleteApi([row.upId])
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
})
|
||||
getList()
|
||||
}
|
||||
}
|
||||
// 上架按钮
|
||||
const groundingBtn = async (row: any) => {
|
||||
|
|
@ -94,7 +111,30 @@
|
|||
}
|
||||
|
||||
// 下架按钮
|
||||
const offShelfBtn = () => {}
|
||||
const offShelfBtn = async (row: any) => {
|
||||
groundingParams.value[0] = {
|
||||
/* 设备id */
|
||||
maId: row.maId,
|
||||
/* 申请时间 */
|
||||
applyTime: '',
|
||||
/* 申请人 */
|
||||
applyUser: '',
|
||||
/* 申请企业*/
|
||||
applyCompany: '',
|
||||
/* 1为上架 2为下架 */
|
||||
type: 2
|
||||
}
|
||||
console.log('下架设备')
|
||||
const res: any = await goodsDownApi(groundingParams.value)
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '下架申请成功'
|
||||
})
|
||||
getList()
|
||||
groundingParams.value = []
|
||||
}
|
||||
}
|
||||
|
||||
const tableProps: any = ref([
|
||||
{ v_label: '编码', v_props: 'code', v_slot: '', width: '' },
|
||||
|
|
@ -103,7 +143,7 @@
|
|||
{ v_label: '装备名称', v_props: 'v_equipment_name', v_slot: '', width: '' },
|
||||
{ v_label: '租金', v_props: 'monthLeasePrice', v_slot: '', width: '' },
|
||||
{ v_label: '状态', v_props: 'maStatus', v_slot: 'v_type', width: '' },
|
||||
{ v_label: '操作', v_props: 'v_operate', v_slot: 'operate', width: '200px' }
|
||||
{ v_label: '操作', v_props: 'v_operate', v_slot: 'operate', width: '260px' }
|
||||
])
|
||||
|
||||
const tableData: any = ref([])
|
||||
|
|
@ -138,8 +178,8 @@
|
|||
<el-tag v-if="row.maStatus === '18'" size="small" type="danger">下架</el-tag>
|
||||
</template>
|
||||
<template v-slot:operate="{ row }">
|
||||
<el-button size="small" type="primary" @click="groundingBtn(row)">上架</el-button>
|
||||
<el-button size="small" type="primary" @click="offShelfBtn(row)">下架</el-button>
|
||||
<el-button size="small" type="success" @click="groundingBtn(row)">上架</el-button>
|
||||
<el-button size="small" type="warning" @click="offShelfBtn(row)">下架</el-button>
|
||||
<el-button size="small" type="primary" @click="editRowInfo(row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" @click="deleteRowInfo(row)">删除</el-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@
|
|||
color: '#fff'
|
||||
}">
|
||||
<el-table-column align="center" prop="code" label="订单编号" />
|
||||
<el-table-column align="center" prop="name" label="供应商" />
|
||||
<el-table-column align="center" prop="supplierCompany" label="供应商" />
|
||||
<el-table-column align="center" prop="createTime" label="订单创建日期" />
|
||||
<el-table-column align="center" prop="payType" label="装备类型" />
|
||||
<el-table-column align="center" prop="orderUser" label="装备名称" />
|
||||
<el-table-column align="center" prop="deviceName" label="装备名称" />
|
||||
<el-table-column align="center" prop="orderStatus" label="订单状态" />
|
||||
<el-table-column align="center" prop="name" label="操作" width="260px">
|
||||
<template #default="scope">
|
||||
|
|
|
|||
Loading…
Reference in New Issue