diff --git a/src/http/api/usercenter/seekorder.ts b/src/http/api/usercenter/seekorder.ts index 6a7a9f2..dbed1b0 100644 --- a/src/http/api/usercenter/seekorder.ts +++ b/src/http/api/usercenter/seekorder.ts @@ -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) +} \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 5cca330..7703969 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -216,7 +216,7 @@ const routes: Array = [ }, }, - /* 订单管理(求租方) */ + /* 订单管理(承租方) */ { path: 'orderManagement', name: 'orderManagement', @@ -228,7 +228,31 @@ const routes: Array = [ isLogin: true }, }, - /* 订单管理(订单详情) */ + /* 订单管理(出租方) */ + { + path: 'orderManagementBuy', + name: 'orderManagementBuy', + component: () => import('@/views/user/orderManagementCz/index.vue'), + meta: { + title: '订单管理(求租)', + keepAlive: true, + AuthFlag: false, + isLogin: true + }, + }, + /* 订单管理(订单详情出租) */ + { + path: 'orderManagementInfoBuy', + name: 'orderManagementInfoBuy', + component: () => import('@/views/user/orderManagementCz/detail.vue'), + meta: { + title: '订单详情', + keepAlive: true, + AuthFlag: false, + isLogin: false + }, + }, + /* 订单管理(订单详情承租) */ { path: 'orderManagementInfo', name: 'orderManagementInfo', diff --git a/src/store/user.ts b/src/store/user.ts index e8e1c8b..1e9f1c3 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -26,20 +26,20 @@ export const useStore = defineStore('myUser', { leaseAndLesseeList: [], leaseAndLesseeUserList: [ { title: '订单管理', name: 'orderManagementCz' }, - { title: '商品管理', name: 'goodsManagement' }, - { title: '商品上下架', name: 'goodsUpdown' }, - { title: '机手管理', name: 'operatorManagement' }, - { title: '寻源竞价', name: 'sourcingBidding' }, - { title: '专区管理', name: 'zoneManag' }, + { title: '装备管理', name: 'goodsManagement' }, + // { title: '商品上下架', name: 'goodsUpdown' }, + // { title: '机手管理', name: 'operatorManagement' }, + // { title: '寻源竞价', name: 'sourcingBidding' }, + // { title: '专区管理', name: 'zoneManag' }, ], isType: 1, leaseUserList: [ { title: '订单管理', name: 'orderManagementCz' }, - { title: '商品管理', name: 'goodsManagement' }, - { title: '商品上下架', name: 'goodsUpdown' }, - { title: '机手管理', name: 'operatorManagement' }, - { title: '寻源竞价', name: 'sourcingBidding' }, - { title: '专区管理', name: 'zoneManag' }, + { title: '装备管理管理', name: 'goodsManagement' }, + // { title: '商品上下架', name: 'goodsUpdown' }, + // { title: '机手管理', name: 'operatorManagement' }, + // { title: '寻源竞价', name: 'sourcingBidding' }, + // { title: '专区管理', name: 'zoneManag' }, ], lesseeUserList: [ { title: '寻源需求', name: 'sourcingNeed' }, @@ -144,11 +144,11 @@ export const useStore = defineStore('myUser', { editUserMenuList(type: number) { const leaseList: any = [ { title: '订单管理', name: 'orderManagementCz' }, - { title: '商品管理', name: 'goodsManagement' }, - { title: '商品上下架', name: 'goodsUpdown' }, - { title: '机手管理', name: 'operatorManagement' }, - { title: '寻源竞价', name: 'sourcingBidding' }, - { title: '专区管理', name: 'zoneManag' }, + { title: '装备管理', name: 'goodsManagement' }, + // { title: '商品上下架', name: 'goodsUpdown' }, + // { title: '机手管理', name: 'operatorManagement' }, + // { title: '寻源竞价', name: 'sourcingBidding' }, + // { title: '专区管理', name: 'zoneManag' }, ] const lesseeList: any = [ { title: '寻源需求', name: 'sourcingNeed' }, diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 5973d99..b99be84 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -198,6 +198,7 @@ const getOrderListData = async () => { orderList.value.forEach((e: any) => { e.isChecked = false; e.goods_num = 1; + e.lease_day = 1; // e.devInfoVoList.forEach((j: any) => { // j.isChecked = false // }) @@ -208,13 +209,16 @@ const getOrderListData = async () => { } onMounted(() => { - getOrderListData() + setTimeout(()=>{ + getOrderListData() + },500) + }) // 日期change事件 const onLeaseDateChange = (e: any, item: any) => { item.lease_date_string = `${e[0]}至${e[1]}` - item.lease_day = moment(e[1]).diff(e[0], 'day') + item.lease_day = moment(e[1]).diff(e[0], 'day') } // 删除按钮 @@ -300,6 +304,15 @@ const onCartSubmit = async () => { }) return } + console.log(amountDeviceList.value[0].lease_date==undefined) + if (amountDeviceList.value[0].lease_date==undefined) { + ElMessage({ + showClose: false, + message: '请选择租期', + type: 'error', + }) + return + } if (!protocolChecked.value) { ElMessage({ showClose: false, @@ -308,6 +321,8 @@ const onCartSubmit = async () => { }) return } + + console.log('提交订单') // 组装参数 const detailsList = amountDeviceList.value.map((e: any) => { @@ -328,7 +343,7 @@ const onCartSubmit = async () => { cost: orderAmountPice.value, detailsList, } - + console.log('submitParams',submitParams) const res: any = await submitBookCarApi(submitParams) if (res.code === 200) { ElMessage({ diff --git a/src/views/user/goodsManagement/index.vue b/src/views/user/goodsManagement/index.vue index 5346403..52fc9e1 100644 --- a/src/views/user/goodsManagement/index.vue +++ b/src/views/user/goodsManagement/index.vue @@ -469,7 +469,7 @@ message: '保存成功' }) dialogFormVisibleSettlein.value = false - ruleFormRef.value.resetField() + // ruleFormRef.value.resetField() getList() } } @@ -504,7 +504,7 @@ message: '保存成功' }) dialogFormVisibleSettlein.value = false - ruleFormRef.value.resetField() + // ruleFormRef.value.resetField() getList() } } @@ -775,12 +775,12 @@ + width="65%" align-center :close-on-click-modal="false" :before-close="handleClose"> 关 闭 - + 草 稿 @@ -868,7 +868,7 @@ @@ -1026,13 +1026,13 @@
- + - + - +

{{ item.fileName }}

@@ -1064,13 +1064,13 @@
- + - + - +

{{ item.fileName }}

@@ -1106,13 +1106,13 @@
- + - + - +

{{ item.fileName }}

@@ -1141,13 +1141,13 @@
- + - + - +

{{ item.fileName }}

@@ -1167,7 +1167,7 @@ - + description @@ -1205,36 +1205,41 @@ margin-bottom: 20px; } .imgsBox{ - width: auto; + width: 100%; height: auto; display: flex; + flex-wrap: wrap; align-items: center; margin-bottom: 30px; margin-left: 20px; .imgItem{ - width: 160px; - height: 160px; - margin-right: 40px; + width: 150px; + height: 150px; + margin-right: 20px; + margin-bottom: 30px; border: 1px dashed #bbb; position: relative; .picture-card{ - width: 160px; - height: 160px; + width: 150px; + height: 150px; } .icon-list{ width: 60px;height: 20px; position: absolute; top: 70px; - left: 40px; + left: 30px; display: flex; align-items: center; } .imgItem__icon{ margin: 0 5px; + cursor: pointer; } .file-name{ font-size: 10px; + width: 100%; + word-break: break-all; } } diff --git a/src/views/user/orderManagement/detail.vue b/src/views/user/orderManagement/detail.vue index 3c9dfd6..8eef986 100644 --- a/src/views/user/orderManagement/detail.vue +++ b/src/views/user/orderManagement/detail.vue @@ -6,39 +6,62 @@ import { getOrderListInfoApi } from 'http/api/usercenter/seekorder' const route = useRoute() /* 查询参数 */ const cardList = ref({}) -const orderStatusTemp = ref(0) +const orderStatusTemp = ref(0) const idTemp = ref('') const titleStaus = ref('') -// 获取数据列表 -// const getList = async () => { -// const res: any = await getOrderListApi() -// console.log('获取数据列表***', res) -// tableData.value = res.rows -// total.value = res.total -// } - +//描述信息 +const operationDetails = ref({ + 1: { title: '已出库', preOutboundUser: '', preOutboundTime: '' }, + 2: { title: '已收货', takeOverUser: '', takeOverTime: '' }, + 3: { title: '租赁结束', rentOverUser: '', rentOverTime: '' }, + }) // 根据步骤的 Id 返回对应的标题 const getStepTitle = (stepId:number)=> { - if (orderStatusTemp.value === 1) { + if (orderStatusTemp.value === 2) { titleStaus.value= '待出库' ; return stepId === 1 ? '待出库' : ''; - } else if (orderStatusTemp.value === 2) { + } else if (orderStatusTemp.value === 3) { titleStaus.value= '待收货' ; return stepId === 1 ? '已出库' : stepId === 2 ? '待收货' : ''; - } else if (orderStatusTemp.value === 3) { + } else if (orderStatusTemp.value === 4) { titleStaus.value= '租赁中' ; return stepId === 1 ? '已出库' : stepId === 2 ? '已收货' : stepId === 3 ? '租赁中' : ''; - } else if (orderStatusTemp.value === 4) { - titleStaus.value= '发起费用结算' ; - return stepId === 1 ? '已出库' : stepId === 2 ? '已收货' : stepId === 3 ? '租赁结束' : stepId === 4 ? '发起费用结算' : ''; } else if (orderStatusTemp.value === 5) { + titleStaus.value= '已退租' ; + return stepId === 1 ? '已出库' : stepId === 2 ? '已收货' : stepId === 3 ? '租赁结束' : stepId === 4 ? '已退租' : ''; + } else if (orderStatusTemp.value === 6) { titleStaus.value= '已完成' ; return stepId === 1 ? '已出库' : stepId === 2 ? '已收货' : stepId === 3 ? '租赁结束' : stepId === 4 ? '已退租' : stepId === 5 ? '已完成' : ''; + } else if(orderStatusTemp.value === 7) { + titleStaus.value= '已驳回' ; + return stepId === 1 ? '已驳回' : ''; } titleStaus.value='' 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) @@ -52,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(()=>{ @@ -70,7 +100,7 @@ const time = ref([])
- 订单管理 + 订单管理 订单明细
@@ -85,12 +115,12 @@ const time = ref([]) - - - - + + + + - +
@@ -179,8 +209,9 @@ const time = ref([])
{{"租赁中"}}
{{"已退租"}}
{{"已完成"}}
+
{{"已驳回"}}
- +
@@ -210,7 +241,7 @@ const time = ref([]) diff --git a/src/views/user/orderManagementCz/index.vue b/src/views/user/orderManagementCz/index.vue index 5fd0b43..a6e4052 100644 --- a/src/views/user/orderManagementCz/index.vue +++ b/src/views/user/orderManagementCz/index.vue @@ -1,147 +1,1957 @@ -