|
|
@@ -67,24 +67,30 @@
|
|
|
<!-- 开始时间选择器 -->
|
|
|
<uni-datetime-picker :end="formElements[elem.endElemIndex].defaultValue"
|
|
|
@change="setTimeRange(elem)"
|
|
|
+ @click.native.stop
|
|
|
v-else-if="'9' == elem.type && undefined != elem.endElemIndex"
|
|
|
v-model="elem.defaultValue" :clear-icon="false" type="datetime" />
|
|
|
<!-- 结束时间选择器 -->
|
|
|
<uni-datetime-picker :start="formElements[elem.startElemIndex].defaultValue"
|
|
|
@change="setTimeRange(elem)"
|
|
|
+ @click.native.stop
|
|
|
v-else-if="'9' == elem.type && undefined != elem.startElemIndex"
|
|
|
v-model="elem.defaultValue" :clear-icon="false" type="datetime" />
|
|
|
<!-- 其他时间选择器 -->
|
|
|
<!-- 年月日 时分秒 -->
|
|
|
<uni-datetime-picker v-else-if="'9' == elem.type && BUKA_MODELID != processInfo.modelId"
|
|
|
+ @click.native.stop
|
|
|
v-model="elem.defaultValue" type="datetime" />
|
|
|
<!-- 补卡流程专用 -->
|
|
|
<uni-datetime-picker v-else-if="'9' == elem.type && BUKA_MODELID == processInfo.modelId"
|
|
|
+ @click.native.stop
|
|
|
v-model="elem.defaultValue" type="datetime"
|
|
|
:start="`${formElements[0].defaultValue} 00:00:00`"
|
|
|
:end="`${formElements[0].defaultValue} 23:59:59`" @change="bukaTimeChange" />
|
|
|
<!-- 年月日 -->
|
|
|
- <uni-datetime-picker v-else-if="'3' == elem.type" v-model="elem.defaultValue" type="date" />
|
|
|
+ <uni-datetime-picker v-else-if="'3' == elem.type"
|
|
|
+ @click.native.stop
|
|
|
+ v-model="elem.defaultValue" type="date" />
|
|
|
<!-- 签名 -->
|
|
|
<view v-else-if="'13' == elem.type">
|
|
|
<view v-if="elem.defaultValue == ''">
|
|
|
@@ -190,8 +196,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { onMounted, reactive, ref, computed, nextTick } from 'vue'
|
|
|
-import { onLoad } from '@dcloudio/uni-app'
|
|
|
+import { onMounted, reactive, ref, computed, nextTick, onUnmounted } from 'vue'
|
|
|
+import { onLoad, onUnload } from '@dcloudio/uni-app'
|
|
|
import { useUserStore } from '@/store/user.js'
|
|
|
import $modal from '@/plugins/modal.js'
|
|
|
import $tab from '@/plugins/tab.js'
|
|
|
@@ -228,6 +234,10 @@ const bukaObj = ref({
|
|
|
bukaType: '',
|
|
|
bukaTime: ''
|
|
|
})
|
|
|
+
|
|
|
+// 防止时间选择器误触发返回
|
|
|
+const isDatePickerShowing = ref(false)
|
|
|
+
|
|
|
onLoad((options) => {
|
|
|
const { modelName, modelId, control, bukaDate, bukaType } = options
|
|
|
processInfo.modelName = modelName
|
|
|
@@ -912,21 +922,30 @@ function submitProcess() { // 提交表单
|
|
|
$modal.msgError('请上传附件')
|
|
|
return
|
|
|
}
|
|
|
- submitProcessForm(userStore.user, processInfo, seqs).then(res => {
|
|
|
- if (res.returnMsg.includes('提交失败')) {
|
|
|
- // 启用提交按钮
|
|
|
+
|
|
|
+ // 二次确认
|
|
|
+ $modal.confirm('', '确认提交该流程?')
|
|
|
+ .then(() => {
|
|
|
+ submitProcessForm(userStore.user, processInfo, seqs).then(res => {
|
|
|
+ if (res.returnMsg.includes('提交失败')) {
|
|
|
+ // 启用提交按钮
|
|
|
+ button_state.value = true
|
|
|
+ $modal.msgError(res.returnMsg)
|
|
|
+ } else {
|
|
|
+ $modal.msgSuccess(res.returnMsg)
|
|
|
+ // 通知列表刷新数据
|
|
|
+ uni.$emit('ReloadProcessData');
|
|
|
+ setTimeout(() => {
|
|
|
+ // 返回上一页
|
|
|
+ $tab.navigateBack();
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // 用户取消,恢复按钮状态
|
|
|
button_state.value = true
|
|
|
- $modal.msgError(res.returnMsg)
|
|
|
- } else {
|
|
|
- $modal.msgSuccess(res.returnMsg)
|
|
|
- // 通知列表刷新数据
|
|
|
- uni.$emit('ReloadProcessData');
|
|
|
- setTimeout(() => {
|
|
|
- // 返回上一页
|
|
|
- $tab.navigateBack();
|
|
|
- }, 1000)
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
}).catch(err => {
|
|
|
button_state.value = true
|
|
|
$modal.msgError('表单填写错误')
|
|
|
@@ -1175,6 +1194,8 @@ function submitProcess() { // 提交表单
|
|
|
::v-deep .uni-calendar__content {
|
|
|
margin: -20px;
|
|
|
margin-top: 20px;
|
|
|
+ // 防止鸿蒙系统上日期选择器误触发返回
|
|
|
+ pointer-events: auto;
|
|
|
|
|
|
.uni-calendar__header {
|
|
|
.uni-calendar__header-text {
|