diff --git a/components.d.ts b/components.d.ts index aa4561c..bc01e0b 100644 --- a/components.d.ts +++ b/components.d.ts @@ -18,13 +18,11 @@ declare module 'vue' { 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'] @@ -32,7 +30,6 @@ declare module 'vue' { 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'] diff --git a/env/.env.dev b/env/.env.dev index 8455276..1aed2b5 100644 --- a/env/.env.dev +++ b/env/.env.dev @@ -10,8 +10,8 @@ VITE_API_URL = '/proxyApi' # VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅 # VITE_proxyTarget = 'http://192.168.2.127:28080' # 梁超 # VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务 -VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 -# VITE_proxyTarget = 'http://192.168.2.129:18080' # 马帅j +# VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 +VITE_proxyTarget = 'http://192.168.2.72:28080' # 马帅j # VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型) # VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证) diff --git a/src/views/cart/index.vue b/src/views/cart/index.vue index 54a31af..f3d605c 100644 --- a/src/views/cart/index.vue +++ b/src/views/cart/index.vue @@ -271,32 +271,32 @@ onMounted(() => { // } // } const onLeaseDateChange = (value: any, companyIndex: number, goodsIndex: number) => { - // if (!value) { - // cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = '' - // cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = '' - // cardList.value[companyIndex].devInfoVoList[goodsIndex].days = 0 - // } else { - // cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = value[0] - // cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = value[1] - // cardList.value[companyIndex].devInfoVoList[goodsIndex].days = moment(value[1]).diff( - // value[0], - // 'day', - // ) - // } + if (!value) { + cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = '' + cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = '' + cardList.value[companyIndex].devInfoVoList[goodsIndex].days = 0 + } else { + cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = value[0] + cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = value[1] + cardList.value[companyIndex].devInfoVoList[goodsIndex].days = moment(value[1]).diff( + value[0], + 'day', + ) + } - cardList.value.forEach((e: any) => { - e.devInfoVoList.forEach((j: any) => { - if (!value) { - j.rentBeginTime = '' - j.rentEndTime = '' - j.days = 0 - } else { - j.rentBeginTime = value[0] - j.rentEndTime = value[1] - j.days = moment(value[1]).diff(value[0], 'day') - } - }) - }) + // cardList.value.forEach((e: any) => { + // e.devInfoVoList.forEach((j: any) => { + // if (!value) { + // j.rentBeginTime = '' + // j.rentEndTime = '' + // j.days = 0 + // } else { + // j.rentBeginTime = value[0] + // j.rentEndTime = value[1] + // j.days = moment(value[1]).diff(value[0], 'day') + // } + // }) + // }) } // 删除按钮 diff --git a/src/views/user/orderManagement/components/order-details.vue b/src/views/user/orderManagement/components/order-details.vue index ee24428..b807c1b 100644 --- a/src/views/user/orderManagement/components/order-details.vue +++ b/src/views/user/orderManagement/components/order-details.vue @@ -369,6 +369,7 @@ if (props.orderStatus == 7) { ? 'border-bottom:1px solid #eee' : '' " + style="min-height: 140px" >
+
+
+
租期
+
+ {{ goods.rentBeginTime }}至{{ goods.rentEndTime }} +
+
+
+ + +
总费用
{{ orderDetails.cost }} 元
- -
租期
-
- {{ orderDetails.startTime }}至{{ orderDetails.endTime }} -
-
@@ -592,6 +618,7 @@ if (props.orderStatus == 7) { .order-info { display: flex; padding: 10px 0; + align-items: center; } .order-items-info { diff --git a/src/views/user/orderManagement/components/order-home.vue b/src/views/user/orderManagement/components/order-home.vue index 4ac1f71..0f625b8 100644 --- a/src/views/user/orderManagement/components/order-home.vue +++ b/src/views/user/orderManagement/components/order-home.vue @@ -46,17 +46,27 @@ const pageNumber = 1 const total: any = ref(0) const cardList = ref([]) const status = 0 -const statusList = [ +const statusList: any = [ { id: '1', name: '待接单' }, { id: '2', name: '待出库' }, { id: '3', name: '待收货' }, { id: '4', name: '租赁中' }, - { id: '5', name: '已退租' }, - { id: '6', name: '已完成' }, + { id: '5', name: '已退租待结算' }, + { id: '6', name: '结算待确认' }, { id: '7', name: '已完成' }, { id: '8', name: '已驳回' }, ] +const orderText = (status: any) => { + return statusList.filter((e: any) => e.id == status)[0].name +} +const orderType = (status: any) => { + if (status == 1 || status == 2 || status == 3 || status == 5) return 'primary' + if (status == 4 || status == 7) return 'success' + if (status == 5 || status == 6) return 'warning' + if (status == 8) return 'danger' +} + // const dateTimeConvert=(param:string)=>{ // const time = param; // // 创建一个新的Date对象 @@ -183,16 +193,38 @@ const dialogVisible: any = ref(false) const dialogImageUrl = ref('') // 发起退租 -const handleViewBack = async (row: any) => { +const handleViewBack = async (goods: any, row: any) => { ElMessageBox.confirm('是否确定发起退租?', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', + }) + .then(() => { + return passApi({ orderId: row.orderId, orderStatus: 5, maIds: [goods.maId] }) + }) + .then((res: any) => { + if (res.code === 200) { + ElMessage({ + type: 'success', + message: '发起退租成功', + }) + numberTemp.value = numberTemp.value + 1 + getList() + } + }) + .catch(() => {}) +} +// 全部退租 +const handleViewBackAll = (row: any) => { + ElMessageBox.confirm('是否确定发起全部退租?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', }) .then(() => { return passApi({ orderId: row.orderId, orderStatus: 5 }) }) - .then((res) => { + .then((res: any) => { if (res.code === 200) { ElMessage({ type: 'success', @@ -506,7 +538,17 @@ const costSubmit = () => { {{ item.czcompanyName }} + +
+ {{ orderText(item.orderStatus) }} +
+ { v-for="(goods, j) in item.detailsList" :key="j" class="order-items order-info" + style="min-height: 140px" :style=" j != item.detailsList.length - 1 ? 'border-bottom:1px solid #eee' @@ -547,6 +590,7 @@ const costSubmit = () => {
{{ item.cost }} 元
-
租期
-
- {{ item.startTime }}至{{ item.endTime }} +
+
+
租期
+
+ {{ goods.rentBeginTime }}至{{ goods.rentEndTime }} +
+
+ {{ + orderText(goods.orderStatus) + }} +
+ + +
+ + +
+ + 发起退租 +
- - 确认收货 - 取消 + +
+ 取消 - - 订单详情 - - - 租赁协议 - - - 发起退租 - - - 费用清单 - - - 检修详情 - - - 费用确认 - + + 订单详情 + + + 租赁协议 + + + + 费用清单 + + + 检修详情 + + + 费用确认 + + + + 全部退租 + + 发起减免 +
@@ -1506,9 +1615,16 @@ const costSubmit = () => { } .order-title-info { - padding: 6px 4px; + position: relative; + padding: 14px 4px; font-size: 14px; color: #999; + + .order-type-box { + position: absolute; + top: 0; + right: 0; + } } .order-items { @@ -1518,6 +1634,8 @@ const costSubmit = () => { .order-info { display: flex; padding: 10px 0; + align-items: center; + justify-content: center; } .order-items-info { @@ -1535,6 +1653,7 @@ const costSubmit = () => { } .handle-btn { + width: 100%; display: flex; flex-wrap: wrap; align-items: center; @@ -1544,4 +1663,17 @@ const costSubmit = () => { margin-left: 10px !important; } } +.handle-btn-4 { + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + .el-button { + width: calc((100% - 20px) / 2); + // margin: 0; + margin-left: 10px !important; + margin-bottom: 10px; + } +} diff --git a/src/views/user/orderManagementCz/components/order-details.vue b/src/views/user/orderManagementCz/components/order-details.vue index dd6d6e2..b807c1b 100644 --- a/src/views/user/orderManagementCz/components/order-details.vue +++ b/src/views/user/orderManagementCz/components/order-details.vue @@ -157,7 +157,6 @@ console.log(props.orderStatus, 'orderStatus', props.orderId, 'orderId') const time = ref([]) const currentActive = ref(0) -const type = ref(0) const stepList = ref([ { title: '待接单', @@ -176,22 +175,20 @@ const stepList = ref([ description: '', }, { - title: '待退租结算', + title: '退租待结算', description: '', }, { - title: '待结算确认', + title: '结算待确认', description: '', }, + { title: '已完成', description: '', }, ]) -// const setStepType = (status: any) => { - -// } if (props.orderStatus == 1) { currentActive.value = 0 } @@ -372,6 +369,7 @@ if (props.orderStatus == 7) { ? 'border-bottom:1px solid #eee' : '' " + style="min-height: 140px" >
+
+
+
租期
+
+ {{ goods.rentBeginTime }}至{{ goods.rentEndTime }} +
+
+
+ + +
总费用
{{ orderDetails.cost }} 元
- -
租期
-
- {{ orderDetails.startTime }}至{{ orderDetails.endTime }} -
-
@@ -595,6 +618,7 @@ if (props.orderStatus == 7) { .order-info { display: flex; padding: 10px 0; + align-items: center; } .order-items-info {