Browse Source

登记页面加执法转办案,非现场添加人数大于2人

dev
wangmingyong@163.com 1 month ago
parent
commit
1ef6de3028
  1. 3
      zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/index.js
  2. 63
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementRegister.vue
  3. 11
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/nos/nosAdd.vue

3
zdxt-web-client/zdxt-efcode-enforcement-app/src/api/enforcement/index.js

@ -130,6 +130,9 @@ export const getComprehensiveAnalysis = (params, success, error) => _get(baseUrl
// 查询字典数据(公共)
export const queryDict = (params, success, error) => _get("/system/dict/data/dictType", params, success, error);
// 获取系统配置
export const getSystemConfig = (configKey, success, error) => _get(`/system/config/configKey/${configKey}`, null, success, error);
// endregion
// region 消息模块

63
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/enforce/enforcementRegister.vue

@ -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>

11
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/nos/nosAdd.vue

@ -1,12 +1,12 @@
<template>
<div class="register-page">
<!-- 页面头部 -->
<van-nav-bar title="新增任务" left-text="关闭" left-arrow @click-left="goBack">
<!-- <van-nav-bar title="新增任务" left-text="关闭" left-arrow @click-left="goBack"> -->
<!-- <template #right>
<van-icon name="filter-o" size="20" @click="onFilterClick" />
<van-icon name="search" size="20" style="margin-left: 12px;" @click="onSearchClick" />
</template> -->
</van-nav-bar>
<!-- </van-nav-bar> -->
<!-- 表单主体 -->
<van-form @submit="onSubmit" scroll-to-error class="page-content">
@ -553,6 +553,13 @@ const onSubmit = () => {
return;
}
// >= 2
const totalEnforcers = buildLawEnforcerList().length;
if (totalEnforcers < 2) {
showToast('执法人员不少于2人才能提交');
return;
}
showConfirmDialog({
title: '确认提交',
message: '确认提交吗?提交后将无法修改。',

Loading…
Cancel
Save