|
|
|
@ -34,6 +34,7 @@ |
|
|
|
<div class="bottom-buttons"> |
|
|
|
<van-button v-if="!isNonEnforcement" class="btn-save" @click="handleSave">保存</van-button> |
|
|
|
<van-button class="btn-submit" type="primary" native-type="submit">提交</van-button> |
|
|
|
<van-button v-if="showTransferButton && !isNonEnforcement" class="btn-transfer" @click="handleSubmitAndTransfer">提交并转办案</van-button> |
|
|
|
</div> |
|
|
|
</van-form> |
|
|
|
|
|
|
|
@ -52,7 +53,7 @@ import { ref, reactive, computed, onMounted } from 'vue'; |
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
import { showConfirmDialog, showSuccessToast, showToast } from 'vant'; |
|
|
|
import { loadDict } from '@/util/dictUtil'; |
|
|
|
import { saveEnfRegistration, submitEnfRegistration, addNonRegistration, getEnforcementRegistrationDetailById } from '@/api/enforcement/index'; |
|
|
|
import { saveEnfRegistration, submitEnfRegistration, addNonRegistration, getEnforcementRegistrationDetailById, getSystemConfig } from '@/api/enforcement/index'; |
|
|
|
import EnterpriseInfoSection from '@/components/enforcement/register/EnterpriseInfoSection.vue'; |
|
|
|
import EnforcementInfoSection from '@/components/enforcement/register/EnforcementInfoSection.vue'; |
|
|
|
import NonEnforcementInfoSection from '@/components/enforcement/register/NonEnforcementInfoSection.vue'; |
|
|
|
@ -77,6 +78,9 @@ const canSelectReason = computed(() => { |
|
|
|
// 是否为非行政执法模式 |
|
|
|
const isNonEnforcement = ref(false); |
|
|
|
|
|
|
|
// 是否显示"提交并转办案"按钮(由系统配置控制) |
|
|
|
const showTransferButton = ref(false); |
|
|
|
|
|
|
|
// 编辑模式:是否有编辑的ID |
|
|
|
const editId = ref(''); |
|
|
|
|
|
|
|
@ -523,6 +527,35 @@ const onSubmit = () => { |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// 提交并转办案 |
|
|
|
const handleSubmitAndTransfer = () => { |
|
|
|
showConfirmDialog({ |
|
|
|
title: '确认提交并转办案', |
|
|
|
message: '确认提交并转办案吗?提交后将无法修改。', |
|
|
|
width: '80%', |
|
|
|
}).then(() => { |
|
|
|
const payload = buildSubmitPayload(); |
|
|
|
// 标记为转办案 |
|
|
|
payload.isTransfer = 1; |
|
|
|
submitEnfRegistration(payload, (res) => { |
|
|
|
if (res.code === 200 || res.code === 0) { |
|
|
|
showSuccessToast('提交成功,已转办案'); |
|
|
|
sessionStorage.removeItem('enterpriseScanData'); |
|
|
|
sessionStorage.removeItem('outOfCityEnterprise'); |
|
|
|
sessionStorage.removeItem('scanReason'); |
|
|
|
router.push('/enforcement/enforcementList'); |
|
|
|
} else { |
|
|
|
showToast(res.msg || '提交失败'); |
|
|
|
} |
|
|
|
}, (err) => { |
|
|
|
console.error('提交并转办案接口失败', err); |
|
|
|
showToast('提交失败'); |
|
|
|
}); |
|
|
|
}).catch(() => { |
|
|
|
// 用户取消 |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// ========== 获取详情数据 ========== |
|
|
|
const fetchDetail = (id) => { |
|
|
|
getEnforcementRegistrationDetailById({ id }, (res) => { |
|
|
|
@ -595,6 +628,17 @@ onMounted(() => { |
|
|
|
const enforceType = route.query.type; |
|
|
|
isNonEnforcement.value = enforceType === 'non-enforcement'; |
|
|
|
|
|
|
|
// 获取系统配置:是否显示"提交并转办案"按钮 |
|
|
|
getSystemConfig('sys.show.function', (res) => { |
|
|
|
if (res && res.code === 200) { |
|
|
|
const configValue = res.data || res.configValue || res.value; |
|
|
|
showTransferButton.value = String(configValue) === '1'; |
|
|
|
} |
|
|
|
}, () => { |
|
|
|
// 配置获取失败则默认不显示 |
|
|
|
showTransferButton.value = false; |
|
|
|
}); |
|
|
|
|
|
|
|
// 判断是否为编辑模式 |
|
|
|
const id = route.query.id; |
|
|
|
if (id) { |
|
|
|
@ -736,18 +780,19 @@ onMounted(() => { |
|
|
|
left: 0; |
|
|
|
right: 0; |
|
|
|
display: flex; |
|
|
|
gap: 0.24rem; |
|
|
|
gap: 0.2rem; |
|
|
|
padding: 0.28rem 0.32rem; |
|
|
|
background: #fff; |
|
|
|
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08); |
|
|
|
z-index: 99; |
|
|
|
|
|
|
|
.btn-save, |
|
|
|
.btn-submit { |
|
|
|
.btn-submit, |
|
|
|
.btn-transfer { |
|
|
|
flex: 1; |
|
|
|
height: 0.92rem; |
|
|
|
border-radius: 0.46rem; |
|
|
|
font-size: 0.34rem; |
|
|
|
font-size: 0.32rem; |
|
|
|
font-weight: 500; |
|
|
|
border: none; |
|
|
|
transition: all 0.2s; |
|
|
|
@ -780,5 +825,15 @@ onMounted(() => { |
|
|
|
box-shadow: 0 2px 8px rgba(19, 103, 254, 0.2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.btn-transfer { |
|
|
|
background: linear-gradient(135deg, #ff9f43 0%, #ff7a45 100%); |
|
|
|
color: #fff; |
|
|
|
box-shadow: 0 4px 12px rgba(255, 159, 67, 0.3); |
|
|
|
|
|
|
|
&:active { |
|
|
|
box-shadow: 0 2px 8px rgba(255, 159, 67, 0.2); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
|