浏览代码

添加挂起说明

HD_wangm 4 月之前
父节点
当前提交
edd033c155
共有 3 个文件被更改,包括 42 次插入13 次删除
  1. 39 10
      pages/order/detail/suspendIndex.uvue
  2. 1 1
      pages/score/pending.uvue
  3. 2 2
      pages/worktime/index.uvue

+ 39 - 10
pages/order/detail/suspendIndex.uvue

@@ -63,20 +63,40 @@
 			</view> -->
 			<!-- 工作负责人选择 -->
 			<view class="info-section">
-			    <view class="section-title">
+			    <!-- <view class="section-title">
 			        <text class="section-title-text">挂起原因<text style="color: red;">*</text></text>
-			    </view>
+			    </view> -->
 			    <view class="info-card">
-			        <view class="form-item">
+			        <view class="info-item">
+						<view class="info-label">
+							<text class="form-label required">挂起原因<text style="color: red;">*</text></text>
+						</view>
 			            <!-- <text class="form-label required">挂起原因</text> -->
-			            <view class="form-picker" @click="showReasonPicker = true">
-			                <view class="picker-display">
-			                    <text v-if="suspendReason" class="selected-value">{{ suspendReason }}</text>
-			                    <text v-else class="placeholder">请选择挂起原因</text>
-			                    <text class="arrow">▼</text>
-			                </view>
-			            </view>
+						<view class="info-value">
+							<view class="form-picker" @click="showReasonPicker = true">
+								<view class="picker-display">
+									<text v-if="suspendReason" class="selected-value">{{ suspendReason }}</text>
+									<text v-else class="placeholder">请选择挂起原因</text>
+									<text class="arrow">▼</text>
+								</view>
+							</view>
+						</view>
 			        </view>
+					<view class="info-item" v-if="detailData.suspendReason == '4'">
+						<view class="info-label">
+							<text class="form-label required">说明<text style="color: red;">*</text></text>
+						</view>
+						<view class="info-value">
+							 <textarea
+								class="reject-reason-textarea"
+								placeholder="请输入说明(必填)"
+								v-model="suspendExplain"
+								maxlength="500"
+								:show-confirm-bar="false"
+								auto-height
+							></textarea>
+						</view>
+					</view>
 			    </view>
 			</view>
 
@@ -194,6 +214,7 @@
 	const selectedReasonIndex = ref<number>(-1)
 	const suspendReasonOptions = ref<PickerOption[]>([])
 	const showReasonPicker = ref<boolean>(false)
+	const suspendExplain = ref<string>("")
 
 	// 获取负责人列表(使用用户列表接口)
 	const dictList = async (): Promise<void> => {
@@ -300,9 +321,17 @@
 			})
 			return
 		}
+		if ((suspendExplain.value == '' || suspendExplain.value.trim() === '') && detailData.value.suspendReason == '4') {
+			uni.showToast({
+				title: '请输入说明',
+				icon: 'none'
+			})
+			return
+		}
 		if (isDealing.value || hasDealed.value) return // 双重保险
 		isDealing.value = true
 		detailData.value.workOrderStatus = 'to_approve'
+		detailData.value.rejectionReason = suspendExplain.value
 		try {
 			const result = await suspendOrder(detailData.value)
 			const resultObj = result as UTSJSONObject

+ 1 - 1
pages/score/pending.uvue

@@ -45,7 +45,7 @@
 			</view>
 			<view class="info-row">
 			  <view class="info-label">
-			    <text class="text-gray">工作结束时间: {{ formatDate(getPropertyValue(item, 'realEndTime')) }}</text>
+			    <text class="text-gray">工作结束时间: {{ getPropertyValue(item, 'realEndTime') }}</text>
 			  </view>
 			</view>
           </view>

+ 2 - 2
pages/worktime/index.uvue

@@ -94,10 +94,10 @@
             <text class="breakdown-label">维修工时</text>
             <text class="breakdown-value">{{ repairHours }}小时</text>
           </view>
-          <view v-if="rank !== null && totalRankingUsers !== null" class="breakdown-item">
+          <!-- <view v-if="rank !== null && totalRankingUsers !== null" class="breakdown-item">
             <text class="breakdown-label">排名</text>
             <text class="breakdown-value">{{ rank }}/{{ totalRankingUsers }}</text>
-          </view>
+          </view> -->
         </view>
       </view>
     </view>