| | |
| | | <u-navbar title="待办处置" :is-back="true" back-text="" :back-icon-size="40" @left-click="onBackClick"></u-navbar> |
| | | |
| | | <scroll-view class="form-scroll" scroll-y> |
| | | <view class="form-section status-section"> |
| | | <view class="section-header"> |
| | | <text class="section-title">工单状态</text> |
| | | </view> |
| | | <picker |
| | | mode="selector" |
| | | :range="statusOptions" |
| | | range-key="name" |
| | | :value="statusPickerIndex" |
| | | @change="onStatusChange" |
| | | class="status-picker" |
| | | > |
| | | <div class="picker-value"> |
| | | {{ currentStatusLabel || '请选择' }} |
| | | <text class="picker-arrow">▼</text> |
| | | </div> |
| | | </picker> |
| | | </view> |
| | | <view class="form-section description-section"> |
| | | <view class="section-header"> |
| | | <text class="section-title">处置描述</text> |
| | |
| | | const MAX_FILE_COUNT = 9 |
| | | const eventId = ref('') |
| | | const eventStatus = ref(null) |
| | | const initialEventStatus = ref(null) // 进入页面时的原始工单状态 |
| | | const submitting = ref(false) |
| | | const uploading = ref(false) |
| | | const attachmentList = ref([]) |
| | |
| | | function handleBack() { |
| | | uni.navigateBack() |
| | | } |
| | | |
| | | // 状态选项列表 |
| | | const statusOptions = [ |
| | | { name: '处置中', value: 1 }, |
| | | { name: '已处置', value: 3 }, |
| | | // { name: '已完成', value: 4 }, |
| | | ] |
| | | |
| | | // 当前选中状态的索引 |
| | | const statusPickerIndex = computed(() => { |
| | | const status = eventStatus.value |
| | | return statusOptions.findIndex(item => item.value === status) |
| | | }) |
| | | |
| | | // 当前状态文本 |
| | | const currentStatusLabel = computed(() => { |
| | | const option = statusOptions.find(item => item.value === eventStatus.value) |
| | | return option?.name || '' |
| | | }) |
| | | |
| | | // 切换状态 |
| | | const onStatusChange = e => { |
| | | const index = e.detail.value |
| | | const selectedOption = statusOptions[index] |
| | | if (!selectedOption) return |
| | | eventStatus.value = selectedOption.value |
| | | } |
| | | |
| | | |
| | | // 切换处置状态 |
| | | // function handleStatusChange(event) { |
| | |
| | | eventId: eventId.value, |
| | | recordType: 1, |
| | | disposeContent: formData.value.disposeContent, |
| | | targetEventStatus: eventStatus.value == 1 ? 3 : eventStatus.value, |
| | | updateEventStatus: Number(eventStatus.value) == 1 ? true : false, |
| | | // targetEventStatus: eventStatus.value == 1 ? 3 : eventStatus.value, |
| | | // updateEventStatus: Number(eventStatus.value) == 1 ? true : false, |
| | | targetEventStatus: eventStatus.value, |
| | | // 已处置状态进入且未切换成处置中时,不更新工单状态 |
| | | updateEventStatus: !(Number(initialEventStatus.value) === 3 && Number(eventStatus.value) === 3), |
| | | attachUrl: attachmentList.value.map(file => file.link), |
| | | // operateTime: '2026-07-30 14:00:00', |
| | | // eventStatus: formData.value.isHandling ? '1' : '3', |
| | |
| | | } |
| | | |
| | | onLoad(options => { |
| | | console.log(options, '9090') |
| | | eventId.value = options?.id || '' |
| | | eventStatus.value = options?.eventStatus || '' |
| | | eventStatus.value = Number(options?.eventStatus) || null |
| | | initialEventStatus.value = eventStatus.value |
| | | }) |
| | | </script> |
| | | |
| | |
| | | } |
| | | |
| | | .status-section { |
| | | // #ifdef APP-PLUS |
| | | padding-top: 70rpx; |
| | | // #endif |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | height: 104rpx; |
| | | padding: 0 20rpx 0 22rpx; |
| | | height: 86rpx; |
| | | padding: 0 20rpx 0 0rpx; |
| | | } |
| | | |
| | | .status-switch { |