Commit c8d9dda1b31e3d60b6f8c8604c3040c740c1fdfb
1 parent
42248e0a
文本样式调整
Showing
5 changed files
with
103 additions
and
64 deletions
garbage-removal/src/components/my-piker/index.vue
| @@ -42,7 +42,12 @@ const closeUnit = () => { | @@ -42,7 +42,12 @@ const closeUnit = () => { | ||
| 42 | visible.value = false | 42 | visible.value = false |
| 43 | } | 43 | } |
| 44 | const openUnit = () => { | 44 | const openUnit = () => { |
| 45 | - visible.value = true | 45 | + const currentIndex = props.array.findIndex(item => item === props.parentValue); |
| 46 | + if (currentIndex !== -1) { | ||
| 47 | + index.value = currentIndex; | ||
| 48 | + unitValue.value = [currentIndex]; | ||
| 49 | + } | ||
| 50 | + visible.value = true; | ||
| 46 | } | 51 | } |
| 47 | const bindPickerChange = (e) => { | 52 | const bindPickerChange = (e) => { |
| 48 | index.value = e.detail.value | 53 | index.value = e.detail.value |
garbage-removal/src/pages/home-info/clean/index.vue
| @@ -108,10 +108,10 @@ | @@ -108,10 +108,10 @@ | ||
| 108 | </view> | 108 | </view> |
| 109 | </view> | 109 | </view> |
| 110 | 110 | ||
| 111 | - <!-- 添加是否需要搬运上车选项 --> | 111 | + <!-- 添加是否需要装车选项 --> |
| 112 | <view class="company-clean-container-car-main-content-type"> | 112 | <view class="company-clean-container-car-main-content-type"> |
| 113 | <view class="company-clean-container-car-main-content-type-price-area"> | 113 | <view class="company-clean-container-car-main-content-type-price-area"> |
| 114 | - <text style="color: red;">*</text>是否需要搬运上车: | 114 | + <text style="color: red;">*</text>是否需要装车: |
| 115 | </view> | 115 | </view> |
| 116 | <view | 116 | <view |
| 117 | style="width:100%;display: flex;justify-content: flex-start;align-items: center; "> | 117 | style="width:100%;display: flex;justify-content: flex-start;align-items: center; "> |
| @@ -266,7 +266,7 @@ | @@ -266,7 +266,7 @@ | ||
| 266 | const scrollTop = ref(0) | 266 | const scrollTop = ref(0) |
| 267 | // 车辆数量 | 267 | // 车辆数量 |
| 268 | const garCarNumberCount = ref() | 268 | const garCarNumberCount = ref() |
| 269 | - const garbageTypeList = ref(["装修垃圾", "建筑垃圾"]) | 269 | + const garbageTypeList = ref(["装修垃圾","工程渣土","工程垃圾","拆除垃圾"]) |
| 270 | const paramFrom = ref({ | 270 | const paramFrom = ref({ |
| 271 | carNumber: 0, | 271 | carNumber: 0, |
| 272 | remark: "", | 272 | remark: "", |
garbage-removal/src/pages/order-info/order-disposal/scan-detail/index.vue
| @@ -55,7 +55,6 @@ | @@ -55,7 +55,6 @@ | ||
| 55 | <view class="scan-car-num-content"> | 55 | <view class="scan-car-num-content"> |
| 56 | <up-input :disabled="!isDeletable" placeholder="请输入数字,单位吨" border="surround" | 56 | <up-input :disabled="!isDeletable" placeholder="请输入数字,单位吨" border="surround" |
| 57 | v-model="details.garCarryingWeight" @change="handlerInputChange"></up-input> | 57 | v-model="details.garCarryingWeight" @change="handlerInputChange"></up-input> |
| 58 | - <text>吨</text> | ||
| 59 | </view> | 58 | </view> |
| 60 | </view> | 59 | </view> |
| 61 | 60 | ||
| @@ -245,15 +244,31 @@ | @@ -245,15 +244,31 @@ | ||
| 245 | await askTransport(params).then((res) => { | 244 | await askTransport(params).then((res) => { |
| 246 | console.log(res); | 245 | console.log(res); |
| 247 | if (res.data.code == 200) { | 246 | if (res.data.code == 200) { |
| 248 | - uni.$u.toast("当前趟次记录完毕!") | 247 | + // 修改提示框,添加跳转到订单页面的选项 |
| 248 | + uni.showModal({ | ||
| 249 | + title: '提示', | ||
| 250 | + content: '当前趟次记录完毕!需要进入订单详情页面点击"完成订单"按钮才是最终完成订单。', | ||
| 251 | + showCancel: true, | ||
| 252 | + cancelText: '稍后处理', | ||
| 253 | + confirmText: '立即前往', | ||
| 254 | + success: function (res) { | ||
| 255 | + if (res.confirm) { | ||
| 256 | + // 跳转到订单页面 | ||
| 257 | + uni.redirectTo({ | ||
| 258 | + url: '/pages/order-info/order-disposal/transport-detail/index?garOrderId=' + params.garOrderId | ||
| 259 | + }); | ||
| 260 | + } else if (res.cancel) { | ||
| 261 | + // 返回上级页面 | ||
| 262 | + uni.navigateBack({ | ||
| 263 | + delta: 1 | ||
| 264 | + }); | ||
| 265 | + } | ||
| 266 | + } | ||
| 267 | + }); | ||
| 249 | } | 268 | } |
| 250 | }).catch((err) => { | 269 | }).catch((err) => { |
| 251 | uni.$u.toast("当前趟次记录失败") | 270 | uni.$u.toast("当前趟次记录失败") |
| 252 | }) | 271 | }) |
| 253 | - // 返回上级 | ||
| 254 | - uni.navigateBack({ | ||
| 255 | - delta: 1 | ||
| 256 | - }); | ||
| 257 | } | 272 | } |
| 258 | 273 | ||
| 259 | } | 274 | } |
garbage-removal/src/pages/order-info/order-disposal/transport-detail/index.vue
| @@ -48,47 +48,47 @@ | @@ -48,47 +48,47 @@ | ||
| 48 | </view> | 48 | </view> |
| 49 | <view v-if="dataGram.transportDetails" style="width: 100%;"> | 49 | <view v-if="dataGram.transportDetails" style="width: 100%;"> |
| 50 | <view v-for="(item, index) in dataGram.transportDetails" style="width: 100%; box-sizing: border-box;"> | 50 | <view v-for="(item, index) in dataGram.transportDetails" style="width: 100%; box-sizing: border-box;"> |
| 51 | - <view class="transport-process-item" style="display: flex;width: 100%; margin: 20rpx 0 ;"> | ||
| 52 | - <view style="width: 150rpx;"> | 51 | + <view class="transport-process-item" style="display: flex; width: 100%; margin: 20rpx 0; flex-wrap: nowrap; align-items: center;"> |
| 52 | + <view style="width: 80rpx; flex-shrink: 0; margin-right: 10rpx;"> | ||
| 53 | <up-image :show-loading="true" :src="item.fillImage" width="80rpx" height="80rpx"></up-image> | 53 | <up-image :show-loading="true" :src="item.fillImage" width="80rpx" height="80rpx"></up-image> |
| 54 | </view> | 54 | </view> |
| 55 | - <view style="display: flex;align-items: center;width: 70%;justify-content: center;"> | ||
| 56 | - <view style="display: flex;justify-content: center;align-items: center;font-size: 25rpx;"> | ||
| 57 | - <view style="margin-right: 4rpx;"> | ||
| 58 | - 载重: | ||
| 59 | - </view> | ||
| 60 | - <view>{{ item.garCarryingWeight }}吨</view> | 55 | + <view style="width: 120rpx; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 10rpx;"> |
| 56 | + <view style="font-size: 25rpx; white-space: nowrap;"> | ||
| 57 | + 载重: {{ item.garCarryingWeight }}吨 | ||
| 61 | </view> | 58 | </view> |
| 62 | </view> | 59 | </view> |
| 63 | - <view style="display: flex;align-items: center;width: 50%;justify-content: center; font-size: 25rpx;"> | ||
| 64 | - <view style=" transform: rotateY(180deg);"> | 60 | + <view style="width: 80rpx; display: flex; align-items: center; justify-content: center; font-size: 25rpx; margin-right: 10rpx;"> |
| 61 | + <view style="transform: rotateY(180deg);"> | ||
| 65 | <up-icon name="car-fill" size="40" color="#19a97c"></up-icon> | 62 | <up-icon name="car-fill" size="40" color="#19a97c"></up-icon> |
| 66 | </view> | 63 | </view> |
| 67 | - <view style="display: flex;justify-content: center;align-items: center;font-size: 25rpx;"> | ||
| 68 | - <view>{{ (index + 1) + '/' + dataGram.garRealCarCount }}</view> | ||
| 69 | - </view> | ||
| 70 | </view> | 64 | </view> |
| 71 | - <view style="display: flex;align-items: center;width: 160%; margin-left: 15rpx;overflow: hidden;"> | ||
| 72 | - <view style="display: flex;justify-content: center;align-items: center;font-size: 25rpx;"> | ||
| 73 | - <view style="margin-right: 4rpx;"> | 65 | + <view style="width: 80rpx; display: flex; justify-content: center; align-items: center; font-size: 25rpx; margin-right: 10rpx;"> |
| 66 | + <view>{{ (index + 1) + '/' + dataGram.garRealCarCount }}</view> | ||
| 67 | + </view> | ||
| 68 | + <view style="flex: 1; display: flex; align-items: center; margin-right: 10rpx; overflow: hidden;"> | ||
| 69 | + <view style="display: flex; justify-content: flex-start; align-items: center; font-size: 25rpx; overflow: hidden;"> | ||
| 70 | + <view style="margin-right: 4rpx; flex-shrink: 0;"> | ||
| 74 | 车牌: | 71 | 车牌: |
| 75 | </view> | 72 | </view> |
| 76 | - <view>{{ item.garHandlerCarCode }}</view> | 73 | + <view style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"> |
| 74 | + {{ item.garHandlerCarCode }} | ||
| 75 | + </view> | ||
| 77 | </view> | 76 | </view> |
| 78 | </view> | 77 | </view> |
| 79 | - <view style="display: flex; align-items: center;width: 150rpx; justify-content: flex-end;" | ||
| 80 | - @click="goTransportDetail(item)"> | ||
| 81 | - <text style="font-size: 30rpx;white-space: nowrap;margin-right: 15rpx;color: #19a97c;">详情</text> | 78 | + <view style="width: 100rpx; display: flex; align-items: center; justify-content: flex-end;" |
| 79 | + @click="goTransportDetail(item)"> | ||
| 80 | + <text style="font-size: 30rpx; white-space: nowrap; margin-right: 15rpx; color: #19a97c;">详情</text> | ||
| 82 | <up-icon name="arrow-right" size="30" color="#19a97c"></up-icon> | 81 | <up-icon name="arrow-right" size="30" color="#19a97c"></up-icon> |
| 83 | </view> | 82 | </view> |
| 84 | </view> | 83 | </view> |
| 84 | + | ||
| 85 | </view> | 85 | </view> |
| 86 | <view style="display: flex;align-items: center;width: 100%;justify-content: center;"> | 86 | <view style="display: flex;align-items: center;width: 100%;justify-content: center;"> |
| 87 | <view style="display: flex;justify-content: center;align-items: center;font-size: 25rpx;"> | 87 | <view style="display: flex;justify-content: center;align-items: center;font-size: 25rpx;"> |
| 88 | <view style="margin-right: 4rpx;"> | 88 | <view style="margin-right: 4rpx;"> |
| 89 | 载重共计: | 89 | 载重共计: |
| 90 | </view> | 90 | </view> |
| 91 | - <view>{{ transportWeightCount }}t</view> | 91 | + <view>{{ transportWeightCount }}吨</view> |
| 92 | </view> | 92 | </view> |
| 93 | </view> | 93 | </view> |
| 94 | </view> | 94 | </view> |
| @@ -180,7 +180,8 @@ const handleOrderDetail = (orderId) => { | @@ -180,7 +180,8 @@ const handleOrderDetail = (orderId) => { | ||
| 180 | }); | 180 | }); |
| 181 | transportWeightCount.value = dataGram.value.transportDetails.reduce((pre, cur) => { | 181 | transportWeightCount.value = dataGram.value.transportDetails.reduce((pre, cur) => { |
| 182 | console.log(pre, cur); | 182 | console.log(pre, cur); |
| 183 | - return pre + cur.garCarryingWeight | 183 | + const weight = parseFloat(cur.garCarryingWeight) || 0; |
| 184 | + return pre + weight; | ||
| 184 | }, 0) | 185 | }, 0) |
| 185 | }) | 186 | }) |
| 186 | } | 187 | } |
garbage-removal/src/pages/order/order-disposal/index.vue
| @@ -34,10 +34,9 @@ | @@ -34,10 +34,9 @@ | ||
| 34 | 34 | ||
| 35 | </view> | 35 | </view> |
| 36 | <view class="scan-box"> | 36 | <view class="scan-box"> |
| 37 | + <view class="scan-tip">在此处扫码</view> | ||
| 37 | <view class="scan-btn"> | 38 | <view class="scan-btn"> |
| 38 | <view class="scan-icon"> | 39 | <view class="scan-icon"> |
| 39 | - | ||
| 40 | - | ||
| 41 | <!-- #ifdef H5 --> | 40 | <!-- #ifdef H5 --> |
| 42 | <u-icon @click="handleScanH5" name="scan" :size="180" color="#fff"></u-icon> | 41 | <u-icon @click="handleScanH5" name="scan" :size="180" color="#fff"></u-icon> |
| 43 | <!-- #endif --> | 42 | <!-- #endif --> |
| @@ -299,36 +298,55 @@ onMounted(() => { | @@ -299,36 +298,55 @@ onMounted(() => { | ||
| 299 | 298 | ||
| 300 | } | 299 | } |
| 301 | 300 | ||
| 302 | - .scan-box { | ||
| 303 | - position: fixed; | ||
| 304 | - bottom: 200rpx; | ||
| 305 | - right: 50rpx; | ||
| 306 | - width: 90rpx; | ||
| 307 | - height: 90rpx; | ||
| 308 | - border-radius: 15rpx; | ||
| 309 | - box-shadow: 0 0 10rpx rgba(0, 0, 0, .1); | ||
| 310 | - display: flex; | ||
| 311 | - justify-content: center; | ||
| 312 | - align-items: center; | ||
| 313 | - padding: 2rpx; | ||
| 314 | - box-sizing: border-box; | ||
| 315 | - background-color: #ffffff71; | ||
| 316 | 301 | ||
| 317 | - .scan-btn { | ||
| 318 | - width: 80rpx; | ||
| 319 | - height: 80rpx; | ||
| 320 | - border-radius: 50%; | ||
| 321 | - display: flex; | ||
| 322 | - justify-content: center; | ||
| 323 | - align-items: center; | ||
| 324 | - background-color: #19a97c; | ||
| 325 | - @include handleClick; | ||
| 326 | 302 | ||
| 327 | - .scan-icon { | ||
| 328 | - display: flex; | ||
| 329 | - justify-content: center; | ||
| 330 | - align-items: center; | ||
| 331 | - } | ||
| 332 | - } | ||
| 333 | - } | 303 | + |
| 304 | + .scan-box { | ||
| 305 | + position: fixed; | ||
| 306 | + bottom: 200rpx; | ||
| 307 | + right: 50rpx; | ||
| 308 | + width: 90rpx; | ||
| 309 | + height: 160rpx; | ||
| 310 | + border-radius: 15rpx; | ||
| 311 | + box-shadow: 0 0 10rpx rgba(0, 0, 0, .1); | ||
| 312 | + display: flex; | ||
| 313 | + flex-direction: column; | ||
| 314 | + justify-content: space-between; /* 重新分配空间 */ | ||
| 315 | + align-items: center; | ||
| 316 | + padding: 10rpx 2rpx 5rpx; /* 调整内边距 */ | ||
| 317 | + box-sizing: border-box; | ||
| 318 | + background-color: #ffffff71; | ||
| 319 | + z-index: 999; | ||
| 320 | + | ||
| 321 | + .scan-tip { | ||
| 322 | + color: #19a97c; | ||
| 323 | + font-size: 16rpx; | ||
| 324 | + text-align: center; | ||
| 325 | + font-weight: bold; | ||
| 326 | + line-height: 3.4; /* 适当调整行高 */ | ||
| 327 | + width: 100%; | ||
| 328 | + overflow: hidden; | ||
| 329 | + text-overflow: ellipsis; | ||
| 330 | + white-space: nowrap; | ||
| 331 | + margin-bottom: 0; /* 移除底部边距 */ | ||
| 332 | + } | ||
| 333 | + | ||
| 334 | + .scan-btn { | ||
| 335 | + width: 80rpx; | ||
| 336 | + height: 80rpx; | ||
| 337 | + border-radius: 50%; | ||
| 338 | + display: flex; | ||
| 339 | + justify-content: center; | ||
| 340 | + align-items: center; | ||
| 341 | + background-color: #19a97c; | ||
| 342 | + @include handleClick; | ||
| 343 | + flex-shrink: 0; /* 防止按钮被压缩 */ | ||
| 344 | + | ||
| 345 | + .scan-icon { | ||
| 346 | + display: flex; | ||
| 347 | + justify-content: center; | ||
| 348 | + align-items: center; | ||
| 349 | + } | ||
| 350 | + } | ||
| 351 | + } | ||
| 334 | </style> | 352 | </style> |