|
|
@@ -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
|
|
|
@@ -767,5 +796,10 @@
|
|
|
color: #999999;
|
|
|
margin-left: 12rpx;
|
|
|
}
|
|
|
+.reject-reason-textarea {
|
|
|
+ width: 100%;
|
|
|
+ min-height: 100rpx;
|
|
|
+ line-height: 1.5;
|
|
|
+}
|
|
|
</style>
|
|
|
|