master
jevononlie 7 months ago
parent fa8329da6c
commit 843901315f

@ -113,16 +113,14 @@
{
"text": "定时回收",
"pagePath": "pages/timeOrder/timeOrder",
"iconPath": "static/tabs/cart_default.png",
"selectedIconPath": "static/tabs/cart_selected.png"
"iconPath": "static/tabs/time_default.png",
"selectedIconPath": "static/tabs/time_selected.png"
},
{
"text": "到站回收",
"pagePath": "pages/dzOrder/dzOrder",
"iconPath": "static/tabs/cart_default.png",
"selectedIconPath": "static/tabs/cart_selected.png"
// "iconPath": "static/tabs/dz_default.png",
// "selectedIconPath": "static/tabs/dz_selected.png"
"iconPath": "static/tabs/dz_default.png",
"selectedIconPath": "static/tabs/dz_selected.png"
},
{
"text": "我的",

@ -5,12 +5,13 @@ import { getCategoryAPI } from '@/services/site'
import { postOrderCompleteDzAPI } from '@/services/order'
import { useMemberStore } from '@/stores'
import PageSkeleton from './components/PageSkeleton.vue'
import { serviceDomain } from '@/services/constants'
//
const memberStore = useMemberStore()
const storageUserInfo = uni.getStorageSync('storage_userInfo')
const stationId = memberStore.profile?.stationId || storageUserInfo.stationId
const clientMobile = memberStore.profile?.phone || storageUserInfo.phone
const clientMobile = ref('')
const siteProductList = ref([])
const isLoading = ref(false)
const getData = async () => {
@ -23,8 +24,11 @@ const getData = async () => {
stationId,
}
const res = await getCategoryAPI(params)
siteProductList.value.forEach((e) => {
e.productActualWeight = e.productActualWeight || 0
res.data.forEach((e) => {
e.productActualWeight = e.productActualWeight || ''
const arr = JSON.parse(e.photo)
const imgUrl = serviceDomain + arr[0].url
e.imgUrl = imgUrl
})
//
isLoading.value = false
@ -51,6 +55,14 @@ const sumVal = computed(() => {
//
const isLoadingPay = ref(false)
const handlePayment = async () => {
if (!clientMobile.value) {
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入手机号',
})
return
}
const flag = siteProductList.value.some((q) => {
return q.productActualWeight
})
@ -65,9 +77,9 @@ const handlePayment = async () => {
siteProductList.value.forEach((e) => {
if (e.productActualWeight) {
const obj = {
id: e.id,
productActualWeight: Number(e.productActualWeight).toFixed(2),
productId: e.productId,
recoveryPrice: e.recoveryPrice,
}
orderDetails.push(obj)
}
@ -76,12 +88,19 @@ const handlePayment = async () => {
return
}
const params = {
clientMobile: clientMobile,
clientMobile: clientMobile.value,
orderDetails,
}
isLoadingPay.value = true
const res = await postOrderCompleteDzAPI(params)
isLoadingPay.value = false
//
siteProductList.value.forEach((e) => {
if (e.productActualWeight) {
e.productActualWeight = ''
}
})
clientMobile.value = ''
uni.navigateTo({ url: '/payment/success/success' })
} else if (res.cancel) {
console.log('用户点击取消')
@ -100,20 +119,24 @@ const handlePayment = async () => {
<template>
<view class="viewport">
<view class="cont">
<view class="title">回收详情</view>
<view class="form-phone">
<view class="label">手机号</view>
<input type="number" maxlength="11" class="val" v-model="clientMobile" placeholder="请输入手机号" />
</view>
<view class="title">回收品类</view>
<view class="form">
<view class="category" v-for="item in siteProductList" :key="item.code">
<view class="item">
<view class="label">品类</view>
<view class="val">{{ item.name }}</view>
<view class="detail-item" v-for="item in siteProductList" :key="item.code">
<view class="product-info">
<image class="img-url" :src="item.imgUrl"></image>
<view class="name">{{ item.name }}</view>
</view>
<view class="item">
<view class="label">单价</view>
<view class="product-item">
<view class="label">回收价格</view>
<view class="val">{{ item.recoveryPrice }} </view>
</view>
<view class="item">
<view class="product-item">
<view class="label">实际重量Kg</view>
<input class="uni-input" v-model="item.productActualWeight" type="digit" placeholder="请输入实际重量" />
<input class="val uni-input" v-model="item.productActualWeight" type="digit" placeholder="请输入实际重量" />
</view>
</view>
</view>
@ -146,46 +169,65 @@ page {
margin: 30rpx auto;
padding: 20rpx 20rpx;
border-radius: 16rpx;
background: linear-gradient(180deg, #d2eeff -2%, rgba(255, 255, 255, 0) 22%), #ffffff;
box-shadow: 0px -2px 8px 0px rgba(133, 155, 180, 0.4);
.form-phone {
display: flex;
color: #95969d;
margin: 30rpx 10rpx;
.label {
font-size: 32rpx;
}
.val {
width: 400rpx;
font-size: 28rpx;
border-bottom: 2rpx solid #e1e7f2;
}
}
.title {
border-bottom: 2rpx solid #e1e7f2;
font-size: 44rpx;
font-size: 32rpx;
color: #95969d;
padding: 20rpx 10rpx 20rpx;
}
.form {
margin: 20rpx 0;
padding: 0 20rpx;
height: 68vh;
height: 60vh;
overflow: auto;
.category {
.detail-item {
margin: 20rpx 0;
font-size: 28rpx;
color: #999A9F;
display: flex;
flex-direction: column;
justify-content: space-around;
border-bottom: 2rpx solid #ddd;
.item {
.product-info {
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 28rpx;
.label {
width: 200rpx;
.img-url {
width: 40rpx;
height: 40rpx;
margin-right: 20rpx;
}
.val {
flex: 1;
margin: 20rpx 20rpx;
color: #999A9F;
.name {
font-size: 28rpx;
color: #95969d;
}
}
.uni-input {
width: 300rpx;
line-height: 30rpx;
border-bottom: 2rpx solid #999A9F;
}
.product-item {
display: flex;
font-size: 28rpx;
margin: 20rpx;
color: #95969d;
}
}

@ -37,17 +37,29 @@ const getMemberOrderByIdData = async (orderId) => {
//
isOderTypeDZ.value = data.orderType?.code == '520193532170867013' || false
data.orderDetails?.forEach((q) => {
const arr = JSON.parse(q.product.photo)
const imgUrl = serviceDomain + arr[0].url
q.imgUrl = imgUrl
})
if (data.recyclerInfo) {
const arr = JSON.parse(data.recyclerInfo.headIcon)
const imgUrl = serviceDomain + arr[0].url
data.recyclerInfo.imgUrl = imgUrl
}
if (data.recycleStationInfo) {
const arr = JSON.parse(data.recycleStationInfo.stationImg)
const imgUrl = serviceDomain + arr[0].url
data.recycleStationInfo.imgUrl = imgUrl
}
if (isOrderTypeSH.value) {
const str = data.appointmentTimeStart?.slice(0, 10)
const start = data.appointmentTimeStart?.slice(11, 16)
const end = data.appointmentTimeEnd?.slice(11, 16)
data.appointmentTime = str + ' ' + start + '-' + end
data.orderDetails?.forEach((q) => {
const arr = JSON.parse(q.product.photo)
const imgUrl = serviceDomain + arr[0].url
q.imgUrl = imgUrl
})
}
//
@ -76,61 +88,41 @@ const getMemberOrderByIdData = async (orderId) => {
</view>
</template>
</view>
<template v-if="isOrderTypeSH">
<view class="module">
<view class="title">订单编号{{ order.orderNumber }}</view>
<view class="detail-title">回收品类</view>
<view class="order-details">
<view class="detail-item" v-for="item in order.orderDetails" :key="item.id">
<view class="product-info">
<image class="img-url" :src="item.imgUrl"></image>
<view class="name">{{ item.product.name }}</view>
</view>
<template v-if="order.orderStatus.code == '520193049964319045'">
<view class="recovery-price">实际价格{{ item.actualRecoveryPrice }}</view>
<view class="recovery-weight">实际重量{{ item.productActualWeight }}千克</view>
</template>
<view class="module">
<view class="title">订单编号{{ order.orderNumber }}</view>
<view class="detail-title">回收品类</view>
<view class="order-details">
<view class="detail-item" v-for="item in order.orderDetails" :key="item.id">
<view class="product-info">
<image class="img-url" :src="item.imgUrl"></image>
<view class="name">{{ item.product.name }}</view>
</view>
<view class="recovery-price">回收价格{{ item.recoveryPrice }}</view>
<view class="recovery-price">实际价格{{ item.actualRecoveryPrice }}</view>
<view class="recovery-weight">实际重量{{ item.productActualWeight }}千克</view>
</view>
<view class="predict-weight">预估重量{{ order.predictWeight?.desc }}</view>
<template v-if="order.recyclerInfo">
<view class="staffs-name">
回收员{{ order.recyclerInfo?.staffsName }}</view>
<view class="staffs-phone">回收员手机号{{ order.recyclerInfo?.mobilePhone }}</view>
</template>
</view>
<view class="module info">
<view class="title">取件信息</view>
<view class="item">
<view class="label">取件时间</view>
<view class="val">{{ order.appointmentTime }}</view>
</view>
<view class="item" v-if="order.arrivalTime">
<view class="label">到达时间</view>
<view class="val">{{ order.arrivalTime }}</view>
</view>
<view class="item">
<view class="label">取件地址</view>
<view class="val">{{ order.addressInfo?.receiveStreet }} {{ order.addressInfo?.receiveHouseNumber }}
</view>
</view>
<view class="item">
<view class="label">下单时间</view>
<view class="val">{{ order.creatorTime }}</view>
</view>
<view class="item" v-if="order.completeTime">
<view class="label">完成时间</view>
<view class="val">{{ order.completeTime }}</view>
</view>
<view class="item">
<view class="label">备注</view>
<view class="val">{{ order.remark }}</view>
<view class="predict-weight">预估重量{{ order.predictWeight?.desc || '-' }}</view>
<view class="predict-weight">下单时间{{ order.creatorTime || '-' }}</view>
<view class="predict-weight" v-if="order.completeTime">{{ order.completeTime || '-' }}</view>
<view class="predict-weight">备注{{ order.remark || '-' }}</view>
</view>
<view class="module info" v-if="isOrderTypeSH">
<view class="title">取件信息</view>
<view class="item">
<view class="label">取件时间</view>
<view class="val">{{ order.appointmentTime }}</view>
</view>
<view class="item" v-if="order.arrivalTime">
<view class="label">到达时间</view>
<view class="val">{{ order.arrivalTime }}</view>
</view>
<view class="item">
<view class="label">取件地址</view>
<view class="val">{{ order.addressInfo?.receiveStreet }} {{ order.addressInfo?.receiveHouseNumber }}
</view>
</view>
</template>
</view>
<template v-if="isOderTypeTime">
<view class="module info">
<view class="title">小区信息</view>
@ -143,9 +135,9 @@ const getMemberOrderByIdData = async (orderId) => {
<view class="val">{{ order.housingEstateInfo.address }}</view>
</view>
<view class="item">
<view class="label">回收时间</view>
<view class="val">{{ order.housingEstateInfo.appointmentTimeStart }} -
{{ order.housingEstateInfo.appointmentTimeEnd }}</view>
<view class="label">定时时间</view>
<view class="val">{{ order.housingEstateInfo?.appointmentTimeStart }} -
{{ order.housingEstateInfo?.appointmentTimeEnd }}</view>
</view>
</view>
</template>
@ -188,8 +180,8 @@ const getMemberOrderByIdData = async (orderId) => {
</view>
<view class="item">
<view class="label">营业时间</view>
<view class="val">{{ order.recycleStationInfo.appointmentTimeStart + ' - ' +
order.recycleStationInfo.appointmentTimeEnd }}</view>
<view class="val">{{ order.recycleStationInfo?.appointmentTimeStart + ' - ' +
order.recycleStationInfo?.appointmentTimeEnd }}</view>
</view>
</view>
</view>
@ -322,7 +314,7 @@ page {
.predict-weight {
font-size: 28rpx;
margin-top: 40rpx;
margin-top: 20rpx;
color: #3D3D3D;
}
@ -366,7 +358,6 @@ page {
color: #3D3D3D;
width: 160rpx;
}
.val {
font-size: 28rpx;
color: #3D3D3D;

@ -162,6 +162,20 @@ const onRefresherrefresh = async () => {
<view class="text phone">{{ item.clientName }} <text class="iphone">{{ item.clientMobile }}</text></view>
</view>
</template>
<template v-if="isOderTypeDZ">
<view class="meta-item">
<view class="icon">
<uni-icons type="calendar" color="#3775F6" size="20"></uni-icons>
</view>
<view class="text ellipsis">完成时间{{ item.completeTime }}</view>
</view>
<view class="meta-item">
<view class="icon">
<uni-icons type="phone" color="#3775F6" size="20"></uni-icons>
</view>
<view class="text phone">{{ item.clientName }} <text class="iphone">{{ item.clientMobile }}</text></view>
</view>
</template>
</view>
</navigator>
<!-- 订单操作按钮 -->

@ -356,34 +356,9 @@ const handleDetailPopupClose = () => {
<view class="val">{{ order.remark }}</view>
</view>
</view>
<!-- <view class="time-status">
<text class="label">剩余接单时间</text>
<uni-countdown
:show-day="false"
:minute="30"
:second="0"
color="#E30000"
@timeup="handleTimeup(item)"
/>
</view> -->
</view>
</view>
</uni-popup>
<!-- <uni-popup ref="orderConfirmPopup" type="center" background-color="#fff">
<view class="popup-root">
<view class="title">请确保上门时间有效</view>
<view class="description">
<view class="tips">1请和客户确认如下上门时间</view>
<view class="date">
<uni-datetime-picker type="datetime" v-model="datetimesingle" @change="changeTime" />
</view>
</view>
<view class="footer">
<view class="button" @tap="orderConfirmPopup?.close?.()"></view>
<view class="button primary" @tap="handleAcceptConfirm"></view>
</view>
</view>
</uni-popup> -->
</template>
<style lang="scss">
page {

@ -103,48 +103,26 @@ const handlePayment = async () => {
<view class="cont">
<view class="title">回收详情</view>
<view class="form">
<view class="category" v-for="item in orderList" :key="item.id">
<view class="item">
<view class="label">品类</view>
<view class="val">{{ item.product.name }}</view>
<view class="detail-item" v-for="item in orderList" :key="item.code">
<view class="product-info">
<image class="img-url" :src="item.imgUrl"></image>
<view class="name">{{ item.name }}</view>
</view>
<!-- <view class="item">
<view class="label">预估重量</view>
<view class="val">{{ item.productWeight.desc }}</view>
</view> -->
<view class="item">
<view class="label">单价</view>
<view class="product-item">
<view class="label">回收价格</view>
<view class="val">{{ item.recoveryPrice }} </view>
</view>
<view class="item">
<view class="product-item">
<view class="label">实际重量Kg</view>
<input class="uni-input" v-model="item.productActualWeight" type="digit" placeholder="请输入实际重量" />
<input class="val uni-input" v-model="item.productActualWeight" type="digit" placeholder="请输入实际重量" />
</view>
</view>
<view class="sum">
<view class="item">
<view class="label">合计</view>
<view class="uni-input">{{ sumVal }}</view>
<!-- <input
class="uni-input"
v-model="sumVal"
type="digit"
name="input"
placeholder="请输入"
/> -->
</view>
<!-- <view class="item">
<view class="label">赠送积分积分</view>
<input
class="uni-input disabled"
disabled
v-model="sumVal"
type="digit"
name="input"
placeholder="请输入"
/>
</view> -->
</view>
</view>
</view>
<view class="sum">
<view class="item">
<view class="label">合计</view>
<view class="uni-input">{{ sumVal }}</view>
</view>
</view>
<view class="pay-action" @click="handlePayment"> </view>
@ -183,31 +161,35 @@ page {
height: 60vh;
overflow: auto;
.category {
margin: 20rpx 0;
font-size: 28rpx;
color: #999A9F;
.detail-item {
margin: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
border-bottom: 2rpx solid #ddd;
.item {
.product-info {
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 28rpx;
.label {
width: 200rpx;
.img-url {
width: 40rpx;
height: 40rpx;
margin-right: 20rpx;
}
.val {
flex: 1;
margin: 20rpx 20rpx;
color: #999A9F;
.name {
font-size: 28rpx;
color: #95969d;
}
}
.uni-input {
width: 300rpx;
line-height: 30rpx;
border-bottom: 2rpx solid #999A9F;
}
.product-item {
display: flex;
font-size: 28rpx;
margin: 20rpx;
color: #95969d;
}
}
@ -234,32 +216,34 @@ page {
}
}
}
}
.sum {
margin: 60rpx 0;
.sum {
margin: 30rpx auto 40rpx;
text-align: center;
width: 60vw;
.item {
display: flex;
flex-direction: row;
align-items: center;
// justify-content: space-between;
margin: 20rpx 0;
.item {
display: flex;
flex-direction: row;
align-items: center;
// justify-content: space-between;
margin: 20rpx 0;
.label {
width: 260rpx;
;
color: #0d0d26;
font-size: 36rpx;
}
.label {
width: 260rpx;
;
color: #0d0d26;
font-size: 36rpx;
}
.uni-input {
padding: 10rpx 30rpx;
background: #f2f2fa;
border-radius: 8rpx;
.uni-input {
padding: 10rpx 30rpx;
background: #f2f2fa;
border-radius: 8rpx;
&.disabled {
background: none;
}
&.disabled {
background: none;
}
}
}
@ -268,8 +252,8 @@ page {
.pay-action {
background: linear-gradient(143deg, #51B6FF 1%, #3775F6 92%);
width: 400rpx;
margin: 0 auto;
height: 112rpx;
margin: 20rpx auto 0;
padding: 10rpx 0;
color: #fff;
display: flex;
border-radius: 100rpx;

@ -2,7 +2,7 @@
* @Author:
* @Date: 2024-01-04 12:54:56
* @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-04-02 16:47:12
* @LastEditTime: 2024-04-03 13:29:09
* @FilePath: /app-nx-recycle/src/services/constants.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Loading…
Cancel
Save