所有的订单管理页面
This commit is contained in:
parent
0b7fe3c0a2
commit
29bc0bdb6f
|
|
@ -19,16 +19,19 @@ declare module 'vue' {
|
|||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
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']
|
||||
ElPagination: typeof import('element-plus/es')['ElPagination']
|
||||
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
|
|
@ -36,6 +39,8 @@ declare module 'vue' {
|
|||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTabPane: typeof import('element-plus/es')['ElTabPane']
|
||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||
EquipCard: typeof import('./src/components/equipCard.vue')['default']
|
||||
|
|
|
|||
|
|
@ -7,13 +7,8 @@ VITE_API_URL = '/proxyApi'
|
|||
# 开发环境接口地址
|
||||
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
|
||||
|
||||
<<<<<<< HEAD
|
||||
VITE_proxyTarget = 'http://localhost:18080' # 马帅
|
||||
VITE_proxyTarget = 'http://localhost:28080' # 马帅
|
||||
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
|
||||
=======
|
||||
# VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
|
||||
VITE_proxyTarget = 'http://192.168.0.244:28580' # 马帅
|
||||
>>>>>>> dev-sy
|
||||
# VITE_proxyTarget = 'http://192.168.2.129:18080' # 马帅
|
||||
|
||||
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
|
||||
|
|
|
|||
|
|
@ -11,3 +11,13 @@ export const getOrderListApi = (data: any) => {
|
|||
export const getOrderListInfoApi = (data: any) => {
|
||||
return get('/material-mall/order/getOrderDetailsById',data)
|
||||
}
|
||||
|
||||
//出库
|
||||
export const passApi = (data: any) => {
|
||||
return post('/material-mall/order/updateOrderStatus',data)
|
||||
}
|
||||
|
||||
//驳回
|
||||
export const failApi = (data: any) => {
|
||||
return post('/material-mall/order/updateOrderStatus',data)
|
||||
}
|
||||
|
|
@ -9,14 +9,12 @@ const cardList = ref<any>({})
|
|||
const orderStatusTemp = ref<number>(0)
|
||||
const idTemp = ref<string>('')
|
||||
const titleStaus = ref<any>('')
|
||||
// 获取数据列表
|
||||
// const getList = async () => {
|
||||
// const res: any = await getOrderListApi()
|
||||
// console.log('获取数据列表***', res)
|
||||
// tableData.value = res.rows
|
||||
// total.value = res.total
|
||||
// }
|
||||
|
||||
//描述信息
|
||||
const operationDetails = ref<any>({
|
||||
1: { title: '已出库', preOutboundUser: '', preOutboundTime: '' },
|
||||
2: { title: '已收货', takeOverUser: '', takeOverTime: '' },
|
||||
3: { title: '租赁结束', rentOverUser: '', rentOverTime: '' },
|
||||
})
|
||||
// 根据步骤的 Id 返回对应的标题
|
||||
const getStepTitle = (stepId:number)=> {
|
||||
if (orderStatusTemp.value === 2) {
|
||||
|
|
@ -42,6 +40,28 @@ const getStepTitle = (stepId:number)=> {
|
|||
return ''; // 默认返回空字符串
|
||||
}
|
||||
|
||||
// 根据步骤的 Id 返回对应的描述
|
||||
const getDescription=(desId:number)=>{
|
||||
const operation = operationDetails.value[desId];
|
||||
if (operation.title=="已出库" && titleStaus.value!= "待出库" ) {
|
||||
return `
|
||||
操作人:${operation.preOutboundUser==null ? ' ': operation.preOutboundUser}
|
||||
操作时间:${operation.preOutboundTime==null ? ' ': operation.preOutboundTime}
|
||||
`;
|
||||
}else if(operation.title=="已收货" && titleStaus.value!= "待收货" && titleStaus.value!= "待出库"){
|
||||
return `
|
||||
操作人:${operation.takeOverUser==null ? ' ': operation.takeOverUser}
|
||||
操作时间:${operation.takeOverTime==null ? ' ': operation.takeOverTime}
|
||||
`;
|
||||
}else if(operation.title=="租赁结束" && (titleStaus.value!= "待收货" && titleStaus.value!= "待出库" && titleStaus.value!= "租赁中")){
|
||||
return `
|
||||
操作人:${operation.rentOverUser==null ? ' ': operation.rentOverUser}
|
||||
操作时间:${operation.rentOverTime==null ? ' ': operation.rentOverTime}
|
||||
`;
|
||||
}
|
||||
return ''; // 默认返回空描述
|
||||
}
|
||||
|
||||
const getId = ()=>{
|
||||
orderStatusTemp.value = Number(route.query.orderStatusTemp)
|
||||
idTemp.value = String(route.query.idTemp)
|
||||
|
|
@ -55,6 +75,13 @@ const getList = async () => {
|
|||
|
||||
const res: any = await getOrderListInfoApi(params)
|
||||
cardList.value = res.data
|
||||
operationDetails.value[1].preOutboundUser = res.data.detailsList[0].preOutboundUser
|
||||
operationDetails.value[1].preOutboundTime = res.data.detailsList[0].preOutboundTime
|
||||
operationDetails.value[2].takeOverUser = res.data.detailsList[0].takeOverUser
|
||||
operationDetails.value[2].takeOverTime = res.data.detailsList[0].takeOverTime
|
||||
operationDetails.value[3].rentOverUser = res.data.detailsList[0].rentOverUser
|
||||
operationDetails.value[3].rentOverTime = res.data.detailsList[0].rentOverTime
|
||||
|
||||
}
|
||||
|
||||
onBeforeMount(()=>{
|
||||
|
|
@ -89,9 +116,9 @@ const time = ref([])
|
|||
</el-header>
|
||||
|
||||
<el-steps class="step" :space="400" :active="orderStatusTemp===7 ? 1 : orderStatusTemp-1" finish-status="success">
|
||||
<el-step :title="getStepTitle(1)" ></el-step>
|
||||
<el-step :title="getStepTitle(2)" ></el-step>
|
||||
<el-step :title="getStepTitle(3)" ></el-step>
|
||||
<el-step :title="getStepTitle(1)" :description="getDescription(1)"></el-step>
|
||||
<el-step :title="getStepTitle(2)" :description="getDescription(2)"></el-step>
|
||||
<el-step :title="getStepTitle(3)" :description="getDescription(3)"></el-step>
|
||||
<el-step :title="getStepTitle(4)" ></el-step>
|
||||
<el-step :title="getStepTitle(5)" ></el-step>
|
||||
</el-steps>
|
||||
|
|
@ -184,7 +211,7 @@ const time = ref([])
|
|||
<div v-if="goods.orderStatus=='6'" style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color:blue">{{"已完成"}}</div>
|
||||
<div v-if="goods.orderStatus=='7'" style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color:blue">{{"已驳回"}}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<!-- <el-col :span="3">
|
||||
<div>
|
||||
<el-button
|
||||
@click="handleViewOrder(j)"
|
||||
|
|
@ -203,7 +230,7 @@ const time = ref([])
|
|||
驳回
|
||||
</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -9,6 +9,13 @@ const cardList = ref<any>({})
|
|||
const orderStatusTemp = ref<number>(0)
|
||||
const idTemp = ref<string>('')
|
||||
const titleStaus = ref<any>('')
|
||||
|
||||
//描述信息
|
||||
const operationDetails = ref<any>({
|
||||
1: { title: '已出库', preOutboundUser: '', preOutboundTime: '' },
|
||||
2: { title: '已收货', takeOverUser: '', takeOverTime: '' },
|
||||
3: { title: '租赁结束', rentOverUser: '', rentOverTime: '' },
|
||||
})
|
||||
// 获取数据列表
|
||||
// const getList = async () => {
|
||||
// const res: any = await getOrderListApi()
|
||||
|
|
@ -42,6 +49,28 @@ const getStepTitle = (stepId:number)=> {
|
|||
return ''; // 默认返回空字符串
|
||||
}
|
||||
|
||||
// 根据步骤的 Id 返回对应的描述
|
||||
const getDescription=(desId:number)=>{
|
||||
const operation = operationDetails.value[desId];
|
||||
if (operation.title=="已出库" && titleStaus.value!= "待出库" ) {
|
||||
return `
|
||||
操作人:${operation.preOutboundUser==null ? ' ': operation.preOutboundUser}
|
||||
操作时间:${operation.preOutboundTime==null ? ' ': operation.preOutboundTime}
|
||||
`;
|
||||
}else if(operation.title=="已收货" && titleStaus.value!= "待收货" && titleStaus.value!= "待出库"){
|
||||
return `
|
||||
操作人:${operation.takeOverUser==null ? ' ': operation.takeOverUser}
|
||||
操作时间:${operation.takeOverTime==null ? ' ': operation.takeOverTime}
|
||||
`;
|
||||
}else if(operation.title=="租赁结束" && (titleStaus.value!= "待收货" && titleStaus.value!= "待出库" && titleStaus.value!= "租赁中")){
|
||||
return `
|
||||
操作人:${operation.rentOverUser==null ? ' ': operation.rentOverUser}
|
||||
操作时间:${operation.rentOverTime==null ? ' ': operation.rentOverTime}
|
||||
`;
|
||||
}
|
||||
return ''; // 默认返回空描述
|
||||
}
|
||||
|
||||
const getId = ()=>{
|
||||
orderStatusTemp.value = Number(route.query.orderStatusTemp)
|
||||
idTemp.value = String(route.query.idTemp)
|
||||
|
|
@ -55,6 +84,12 @@ const getList = async () => {
|
|||
|
||||
const res: any = await getOrderListInfoApi(params)
|
||||
cardList.value = res.data
|
||||
operationDetails.value[1].preOutboundUser = res.data.detailsList[0].preOutboundUser
|
||||
operationDetails.value[1].preOutboundTime = res.data.detailsList[0].preOutboundTime
|
||||
operationDetails.value[2].takeOverUser = res.data.detailsList[0].takeOverUser
|
||||
operationDetails.value[2].takeOverTime = res.data.detailsList[0].takeOverTime
|
||||
operationDetails.value[3].rentOverUser = res.data.detailsList[0].rentOverUser
|
||||
operationDetails.value[3].rentOverTime = res.data.detailsList[0].rentOverTime
|
||||
}
|
||||
|
||||
onBeforeMount(()=>{
|
||||
|
|
@ -89,9 +124,9 @@ const time = ref([])
|
|||
</el-header>
|
||||
|
||||
<el-steps class="step" :space="400" :active="orderStatusTemp===7 ? 1 : orderStatusTemp-1" finish-status="success">
|
||||
<el-step :title="getStepTitle(1)" ></el-step>
|
||||
<el-step :title="getStepTitle(2)" ></el-step>
|
||||
<el-step :title="getStepTitle(3)" ></el-step>
|
||||
<el-step :title="getStepTitle(1)" :description="getDescription(1)"></el-step>
|
||||
<el-step :title="getStepTitle(2)" :description="getDescription(2)"></el-step>
|
||||
<el-step :title="getStepTitle(3)" :description="getDescription(3)"></el-step>
|
||||
<el-step :title="getStepTitle(4)" ></el-step>
|
||||
<el-step :title="getStepTitle(5)" ></el-step>
|
||||
</el-steps>
|
||||
|
|
@ -184,7 +219,7 @@ const time = ref([])
|
|||
<div v-if="goods.orderStatus=='6'" style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color:blue">{{"已完成"}}</div>
|
||||
<div v-if="goods.orderStatus=='7'" style="font-size: 14px; font-weight: bold; margin-bottom: 10px; color:blue">{{"已驳回"}}</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<!-- <el-col :span="3">
|
||||
<div>
|
||||
<el-button
|
||||
@click="handleViewOrder(j)"
|
||||
|
|
@ -203,7 +238,7 @@ const time = ref([])
|
|||
驳回
|
||||
</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
import { ref } from 'vue'
|
||||
import PagingComponent from 'components/PagingComponent/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { getOrderListApi } from 'http/api/usercenter/seekorder'
|
||||
import { getOrderListApi,passApi,failApi } from 'http/api/usercenter/seekorder'
|
||||
import uploadComponent from 'components/uploadComponent/index.vue'
|
||||
import previewImg from './previewImg/index.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ElMessage,ElMessageBox } from 'element-plus'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import { useStore } from 'store/user'
|
||||
const store = useStore()
|
||||
import { mainStore } from 'store/main'
|
||||
|
|
@ -23,11 +24,13 @@ const queryParams: any = ref({
|
|||
startTime: '',
|
||||
endTime: '',
|
||||
})
|
||||
const queryFormRef = ref<FormInstance>()
|
||||
const time = ref([])
|
||||
const router = useRouter()
|
||||
const pageSize = 20
|
||||
const pageNumber = 1
|
||||
const total: any = ref(0)
|
||||
const numberTemp = ref<number>(0)
|
||||
const cardList = ref<any>([])
|
||||
const status = 0
|
||||
const statusList = [
|
||||
|
|
@ -38,19 +41,14 @@ const statusList = [
|
|||
{ id: '6', name: '已完成' },
|
||||
{ id: '7', name: '已驳回' },
|
||||
]
|
||||
// 获取数据列表
|
||||
// const getList = async () => {
|
||||
// const res: any = await getOrderListApi()
|
||||
// console.log('获取数据列表***', res)
|
||||
// tableData.value = res.rows
|
||||
// total.value = res.total
|
||||
// }
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
if (time.value.length > 0) {
|
||||
console.log('time', time)
|
||||
queryParams.value.startTime = time.value[0]
|
||||
queryParams.value.endTime = time.value[1]
|
||||
const dateStart = new Date(time.value[0]);
|
||||
const dateEnd = new Date(time.value[1]);
|
||||
queryParams.value.startTime = dateStart.toLocaleDateString('en-CA')
|
||||
queryParams.value.endTime = dateEnd.toLocaleDateString('en-CA')
|
||||
} else {
|
||||
queryParams.value.startTime = undefined
|
||||
queryParams.value.endTime = undefined
|
||||
|
|
@ -74,8 +72,18 @@ onMounted(() => {
|
|||
|
||||
// 查询按钮
|
||||
const queryTableList = () => {
|
||||
queryParams.value.pageNum=1
|
||||
getList()
|
||||
}
|
||||
|
||||
// 重置
|
||||
const resetTableList = (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
formEl.resetFields()
|
||||
time.value = []
|
||||
queryTableList()
|
||||
}
|
||||
|
||||
// 全选事件
|
||||
const onChangeCompany = (e: boolean, index: number, item: any) => {
|
||||
cardList.value[index].detailsList.forEach((item:any)=>{
|
||||
|
|
@ -97,8 +105,83 @@ const onChangeGoods = (index: number) => {
|
|||
cardList.value[index].isChecked = flag;
|
||||
}
|
||||
|
||||
// 计算是否过期
|
||||
const isExpired=(goods:any)=> {
|
||||
// 出库按钮
|
||||
const confirmPass = async (index: number) => {
|
||||
let ids: number[] = [];
|
||||
cardList.value[index].detailsList.forEach((item:any)=>{
|
||||
if(item.orderStatus=="2" && item.isChecked==true){
|
||||
console.log(2222222222)
|
||||
ids.push(item.id)
|
||||
}
|
||||
})
|
||||
console.log('ids',ids)
|
||||
if(ids.length==0){
|
||||
ElMessage({
|
||||
showClose: false,
|
||||
message: '请选择装备',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}else{
|
||||
ElMessageBox.confirm('是否确定出库?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
return passApi({'ids':ids,'orderStatus':3})
|
||||
// return removeDeviceApi([row.maId])
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '出库成功'
|
||||
})
|
||||
numberTemp.value = numberTemp.value+1;
|
||||
getList()
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
|
||||
// 驳回按钮
|
||||
const confirmFail = async (index: number) => {
|
||||
let ids: number[] = [];
|
||||
cardList.value[index].detailsList.forEach((item:any)=>{
|
||||
if(item.orderStatus=="2" && item.isChecked==true){
|
||||
ids.push(item.id)
|
||||
}
|
||||
})
|
||||
console.log('ids',ids)
|
||||
if(ids.length==0){
|
||||
ElMessage({
|
||||
showClose: false,
|
||||
message: '请选择装备',
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}else{
|
||||
ElMessageBox.confirm('是否确定驳回?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
return failApi({'ids':ids,'orderStatus':7})
|
||||
// return removeDeviceApi([row.maId])
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: '驳回成功'
|
||||
})
|
||||
numberTemp.value = numberTemp.value+1;
|
||||
getList()
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
|
||||
// 计算是否过期
|
||||
const isExpired=(goods:any)=> {
|
||||
// 获取当前日期并去掉时间部分
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
|
|
@ -116,28 +199,6 @@ const clickRentingTermination = () => {
|
|||
console.log('退租')
|
||||
}
|
||||
|
||||
/* 查看按钮 */
|
||||
const clickPreviewDetails = (row: any) => {
|
||||
console.log('查看', row)
|
||||
router.push({
|
||||
name: 'orderDetails',
|
||||
query: {
|
||||
orderId: row.orderId,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/* 续租按钮 */
|
||||
const clickRenewalOfLease = ({ row }: any) => {
|
||||
console.log('续租', row)
|
||||
router.push({
|
||||
name: 'renewalOfLease',
|
||||
query: {
|
||||
orderId: row.orderId,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/* 确认收货 */
|
||||
const clickConfirmReceipt = (row: any) => {
|
||||
console.log('确认收货')
|
||||
|
|
@ -557,7 +618,7 @@ const dialogFormVisibleSettleRepair: any = ref(false)
|
|||
<template>
|
||||
<!-- 订单管理 -->
|
||||
<div class="container">
|
||||
<el-form :model="queryParams" :inline="true" size="default" label-width="0">
|
||||
<el-form :model="queryParams" ref="queryFormRef" :inline="true" size="default" label-width="0">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="deviceName">
|
||||
|
|
@ -644,7 +705,7 @@ const dialogFormVisibleSettleRepair: any = ref(false)
|
|||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="queryTableList">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
<el-button @click="resetTableList(queryFormRef)">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -655,6 +716,7 @@ const dialogFormVisibleSettleRepair: any = ref(false)
|
|||
<el-col :span="1">
|
||||
<div style="text-align: center">
|
||||
<el-checkbox
|
||||
:key="numberTemp"
|
||||
v-model="item.isChecked"
|
||||
@change="onChangeCompany($event, index, item)"
|
||||
>
|
||||
|
|
@ -697,6 +759,7 @@ const dialogFormVisibleSettleRepair: any = ref(false)
|
|||
class="item"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="confirmPass(index)"
|
||||
>出库</el-button
|
||||
>
|
||||
<el-button
|
||||
|
|
@ -704,6 +767,7 @@ const dialogFormVisibleSettleRepair: any = ref(false)
|
|||
class="item"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="confirmFail(index)"
|
||||
>驳回</el-button
|
||||
>
|
||||
</div>
|
||||
|
|
@ -745,7 +809,7 @@ const dialogFormVisibleSettleRepair: any = ref(false)
|
|||
<el-row class="cart-list" v-for="(goods, j) in item.detailsList" :key="j">
|
||||
<el-col :span="1">
|
||||
<div style="text-align: center">
|
||||
<el-checkbox v-model="goods.isChecked" @change="onChangeGoods(index)" :disabled="goods.orderStatus!='2'">
|
||||
<el-checkbox :key="numberTemp" v-model="goods.isChecked" @change="onChangeGoods(index)" :disabled="goods.orderStatus!='2'">
|
||||
</el-checkbox>
|
||||
</div>
|
||||
</el-col>
|
||||
|
|
|
|||
Loading…
Reference in New Issue