master
王家东 2 weeks ago
parent 4c3f6657b4
commit 894662cfda
  1. 26
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java
  2. 6
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/Expert.java
  3. 2
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java
  4. 5
      jeecgboot-vue3/src/views/expert/admin/Expert.api.ts
  5. 32
      jeecgboot-vue3/src/views/expert/admin/ExpertList.vue
  6. 188
      jeecgboot-vue3/src/views/expert/admin/components/ExpertForm1.vue
  7. 78
      jeecgboot-vue3/src/views/expert/admin/components/ExpertModal1.vue
  8. 7
      jeecgboot-vue3/src/views/expert/county/Expert.api.ts
  9. 19
      jeecgboot-vue3/src/views/expert/county/ExpertList.vue
  10. 182
      jeecgboot-vue3/src/views/expert/county/components/ExpertForm1.vue
  11. 77
      jeecgboot-vue3/src/views/expert/county/components/ExpertModal1.vue
  12. 2
      jeecgboot-vue3/src/views/expert/firm/components/ExpertForm.vue
  13. 4
      jeecgboot-vue3/src/views/expert/self/components/ExpertForm.vue

@ -629,7 +629,7 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
public Result<String> handleupupfirm(@RequestParam(name="id",required=true) String id) {
String str ="";
Expert expert =expertService.getById(id);
if (expert.getCompopen().equals("1")) {
if (expert.getCompopen().equals("1") ||expert.getCompopen().equals("3")) {
//修改提交审核状态
expertService.handleupupfirm(id);
str ="通过审核";
@ -659,11 +659,11 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
//这个是专家的上级管理员审核
@AutoLog(value = "专家管理-这个是上级管理员的通过审核")
@ApiOperation(value="专家管理-这个是上级管理员的通过审核", notes="专家管理-这个是上级管理员的通过审核")
@GetMapping(value = "handleupcount")
@GetMapping(value = "/handleupcount")
public Result<String> handleupcount(@RequestParam(name="id",required=true) String id) {
String str ="";
Expert expert =expertService.getById(id);
if (expert.getCompopen().equals("2") && expert.getAdminopen().equals("1")) {
if ((expert.getCompopen().equals("2") && expert.getAdminopen().equals("1")) || (expert.getCompopen().equals("2") && expert.getAdminopen().equals("3"))) {
//修改提交审核状态
expertService.handleupcount(id);
str ="审核通过";
@ -935,4 +935,24 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
}
@AutoLog(value = "专家管理-市局/县区管理员驳回")
@ApiOperation(value="专家管理-市局/县区管理员驳回", notes="专家管理-市局/县区管理员驳回")
@RequestMapping(value = "/saveOrUpdateadminbh", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> saveOrUpdateadminbh(@RequestBody Expert expert) {
expert.setAdminopen("3");
expert.setCompopen("3");
expert.setIsdone("N");
expertService.updateById(expert);
return Result.OK("驳回成功,已责令专家重新编辑!");
}
@AutoLog(value = "专家管理-公司驳回")
@ApiOperation(value="专家管理-公司驳回", notes="专家管理-公司驳回")
@RequestMapping(value = "/saveOrUpdatefimebh", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> saveOrUpdatefimebh(@RequestBody Expert expert) {
expert.setCompopen("3");
expertService.updateById(expert);
return Result.OK("编辑成功!");
}
}

@ -102,6 +102,7 @@ public class Expert implements Serializable {
private String phone;
@TableField(exist = false)
private String emails;
@Dict(dicCode = "sex")
@TableField(exist = false)
private Integer sex;
@TableField(exist = false)
@ -140,4 +141,9 @@ public class Expert implements Serializable {
@ApiModelProperty(value = "职称")
private java.lang.String zc;
/**驳回原因*/
@Excel(name = "驳回原因", width = 15)
@ApiModelProperty(value = "驳回原因")
private java.lang.String backinfo;
}

@ -44,7 +44,7 @@ public interface ExpertMapper extends BaseMapper<Expert> {
@Select("SELECT user_id FROM sys_user_role WHERE role_id =#{number}")
List<String> userbyrole(String number);
@Update("UPDATE expert SET isdone = 'Y' WHERE id = #{id}")
@Update("UPDATE expert SET isdone = 'Y' , backinfo = '' WHERE id = #{id}")
void updatetj(String id);
@Update("UPDATE expert SET compopen = '2' WHERE id = #{id}")

@ -13,6 +13,7 @@ enum Api {
exportXls = '/expert/expert/exportXls',
handleadminback = '/expert/expert/handleadminback',
handleadminup = '/expert/expert/handleadminup',
saveOrUpdateadminbhapi= '/expert/expert/saveOrUpdateadminbh',
}
/**
@ -89,3 +90,7 @@ export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}
export const saveOrUpdateadminbh = (params, isUpdate) => {
let url = isUpdate ? Api.saveOrUpdateadminbhapi : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

@ -79,6 +79,7 @@
</BasicTable>
<!-- 表单区域 -->
<ExpertModal ref="registerModal" @success="handleSuccess"></ExpertModal>
<ExpertModal1 ref="registerModal1zbc" @success="handleSuccess"></ExpertModal1>
</div>
</template>
@ -90,6 +91,7 @@
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,handleadminup,handleadminback } from './Expert.api';
import { downloadFile } from '/src/utils/common/renderUtils';
import ExpertModal from './components/ExpertModal.vue'
import ExpertModal1 from './components/ExpertModal1.vue'
import { useUserStore } from '/src/store/modules/user';
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
@ -99,6 +101,7 @@
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const registerModal1zbc = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
@ -166,6 +169,13 @@
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
function handleEdit1zbc(record: Recordable) {
registerModal1zbc.value.disableSubmit = false;
console.log(registerModal1zbc.value,'registerForm.value')
registerModal1zbc.value.edit(record);
}
/**
* 详情
@ -237,14 +247,10 @@
confirm: handleupadmin.bind(null, record),
placement: 'topLeft',
},
}, {
label: '驳回审核',
popConfirm: {
title: '是否驳回',
confirm: handlebackadmin.bind(null, record),
placement: 'topLeft',
},
}
}, {
label: '驳回',
onClick: handleEdit1zbc.bind(null, record),
},
];
}
@ -271,13 +277,9 @@
placement: 'topLeft',
},
}, {
label: '驳回审核',
popConfirm: {
title: '是否驳回',
confirm: handlebackadmin.bind(null, record),
placement: 'topLeft',
},
}
label: '驳回',
onClick: handleEdit1zbc.bind(null, record),
},
]
}

@ -0,0 +1,188 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ExpertForm">
<a-row>
<a-col :span="24">
<a-form-item label="驳回原因" v-bind="validateInfos.errinfo" id="ExpertForm-backinfo" name="backinfo">
<a-input v-model:value="formData.backinfo" placeholder="请输入驳回原因" allow-clear ></a-input>
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
</a-spin>
</template>
<script lang="ts" setup>
import { usePermission } from '/@/hooks/web/usePermission';
const { hasPermission } = usePermission();
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectDept from '/src/components/Form/src/jeecg/components/JSelectDept.vue';
import JImageUpload from '/src/components/Form/src/jeecg/components/JImageUpload.vue';
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/src/utils/http/axios';
import { useMessage } from '/src/hooks/web/useMessage';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
import { getValueType } from '/src/utils';
import { saveOrUpdateadminbh } from '../Expert.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/src/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({})},
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
seusername: '',
psd: '',
sepsd: '',
realname: '',
workon: '',
sex: '',
ssdep: '',
topPic: '',
phone: '',
emails: '',
colleges: '',
major: '',
directioncal: '',
research: '',
educationcal: '',
expinfo: '',
compopen: '',
adminopen: '',
backinfo: '',
zc: '',
expsture: '',
errinfo: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
psd: [{ required: true, message: '请输入密码!'},],
sepsd: [{ required: true, message: '请输入确认密码!'},],
workon: [{ required: true, message: '请输入工号!'},],
ssdep: [{ required: true, message: '请输入部门!'},],
emails: [{ required: true, message: '请输入邮箱!'},],
phone: [{ required: true, message: '请输入电话!'},],
seusername: [{ required: true, message: '请输入用户名!'},],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
const isEit = ref(false)
function add() {
isEit.value = true
console.log(11111)
// edit({});
}
/**
* 编辑
*/
function edit(record) {
isEit.value = false
console.log(22222)
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if(record.hasOwnProperty(key)){
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
/**
* 提交数据
*/
async function submitForm() {
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdateadminbh(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

@ -0,0 +1,78 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ExpertForm1 ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ExpertForm1>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ExpertForm1 from './ExpertForm1.vue'
import JModal from '/src/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
console.log(record,'record')
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

@ -13,6 +13,7 @@ enum Api {
exportXls = '/expert/expert/exportXls',
handleupcount = '/expert/expert/handleupcount',
handlebackcoount = '/expert/expert/handlebackcoount',
saveOrUpdateadminbhapi= '/expert/expert/saveOrUpdateadminbh',
}
/**
@ -88,3 +89,9 @@ export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}
export const saveOrUpdateadminbh = (params, isUpdate) => {
let url = isUpdate ? Api.saveOrUpdateadminbhapi : Api.save;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

@ -69,6 +69,7 @@
</BasicTable>
<!-- 表单区域 -->
<ExpertModal ref="registerModal" @success="handleSuccess"></ExpertModal>
<ExpertModal1 ref="registerModal1" @success="handleSuccess"></ExpertModal1>
</div>
</template>
@ -80,6 +81,7 @@
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,handleupcount,handlebackco } from './Expert.api';
import { downloadFile } from '/src/utils/common/renderUtils';
import ExpertModal from './components/ExpertModal.vue'
import ExpertModal1 from './components/ExpertModal1.vue'
import { useUserStore } from '/src/store/modules/user';
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
@ -90,6 +92,7 @@
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const registerModal1 = ref();
const userStore = useUserStore();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
@ -158,6 +161,14 @@
registerModal.value.edit(record);
}
/**
* 编辑事件
*/
function handleEdit1(record: Recordable) {
registerModal1.value.disableSubmit = false;
registerModal1.value.edit(record);
}
/**
* 详情
*/
@ -229,12 +240,8 @@
},
}, {
label: '驳回',
popConfirm: {
title: '是否确认通过审核',
confirm: handlebackcount.bind(null, record),
placement: 'topLeft',
},
}
onClick: handleEdit1.bind(null, record),
},
];
}

@ -0,0 +1,182 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ExpertForm">
<a-row>
<a-col :span="24">
<a-form-item label="驳回原因" v-bind="validateInfos.errinfo" id="ExpertForm-backinfo" name="backinfo">
<a-input v-model:value="formData.backinfo" placeholder="请输入驳回原因" allow-clear ></a-input>
</a-form-item>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
</a-spin>
</template>
<script lang="ts" setup>
import JDictSelectTag from '/src/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectDept from '/src/components/Form/src/jeecg/components/JSelectDept.vue';
import JImageUpload from '/src/components/Form/src/jeecg/components/JImageUpload.vue';
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
import { defHttp } from '/src/utils/http/axios';
import { useMessage } from '/src/hooks/web/useMessage';
import JSwitch from '/src/components/Form/src/jeecg/components/JSwitch.vue';
import { getValueType } from '/src/utils';
import { saveOrUpdateadminbh } from '../Expert.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/src/components/Form/src/container/JFormContainer.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({})},
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
seusername: '',
psd: '',
sepsd: '',
realname: '',
workon: '',
sex: '',
ssdep: '',
topPic: '',
phone: '',
emails: '',
colleges: '',
major: '',
directioncal: '',
research: '',
educationcal: '',
expinfo: '',
compopen: '',
adminopen: '',
errinfo: '',
expsture: '',
backinfo: '',
zc: '',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
psd: [{ required: true, message: '请输入密码!'},],
sepsd: [{ required: true, message: '请输入确认密码!'},],
workon: [{ required: true, message: '请输入工号!'},],
ssdep: [{ required: true, message: '请输入部门!'},],
emails: [{ required: true, message: '请输入邮箱!'},],
phone: [{ required: true, message: '请输入电话!'},],
seusername: [{ required: true, message: '请输入用户名!'},],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
const disabled = computed(()=>{
if(props.formBpm === true){
if(props.formData.disabled === false){
return false;
}else{
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
const isEit = ref(false)
function add() {
isEit.value = true
// edit({});
}
/**
* 编辑
*/
function edit(record) {
isEit.value = false
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if(record.hasOwnProperty(key)){
tmpData[key] = record[key]
}
})
//
Object.assign(formData, tmpData);
});
}
/**
* 提交数据
*/
async function submitForm() {
try {
//
await validate();
} catch ({ errorFields }) {
if (errorFields) {
const firstField = errorFields[0];
if (firstField) {
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
}
}
return Promise.reject(errorFields);
}
confirmLoading.value = true;
const isUpdate = ref<boolean>(false);
//
let model = formData;
if (model.id) {
isUpdate.value = true;
}
//
for (let data in model) {
//
if (model[data] instanceof Array) {
let valueType = getValueType(formRef.value.getProps, data);
//
if (valueType === 'string') {
model[data] = model[data].join(',');
}
}
}
await saveOrUpdateadminbh(model, isUpdate.value)
.then((res) => {
if (res.success) {
createMessage.success(res.message);
emit('ok');
} else {
createMessage.warning(res.message);
}
})
.finally(() => {
confirmLoading.value = false;
});
}
defineExpose({
add,
edit,
submitForm,
});
</script>
<style lang="less" scoped>
.antd-modal-form {
padding: 14px;
}
</style>

@ -0,0 +1,77 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ExpertForm1 ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ExpertForm1>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ExpertForm1 from './ExpertForm1.vue'
import JModal from '/src/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false);
const registerForm = ref();
const emit = defineEmits(['register', 'success']);
/**
* 新增
*/
function add() {
title.value = '新增';
visible.value = true;
nextTick(() => {
registerForm.value.add();
});
}
/**
* 编辑
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback() {
handleCancel();
emit('success');
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
add,
edit,
disableSubmit,
});
</script>
<style lang="less">
/**隐藏样式-modal确定按钮 */
.jee-hidden {
display: none !important;
}
</style>
<style lang="less" scoped></style>

@ -98,7 +98,7 @@
<a-col :span="24" v-if="formData.adminopen === '3' || formData.compopen === '3'">
<a-form-item label="驳回原因" v-bind="validateInfos.errinfo" id="ExpertForm-backinfo" name="backinfo">
<a-input v-model:value="formData.backinfo" placeholder="请输入驳回原因" allow-clear ></a-input>
<a-input v-model:value="formData.backinfo" placeholder="请输入驳回原因" allow-clear disabled="true"></a-input>
</a-form-item>
</a-col>

@ -94,8 +94,8 @@
</a-col>
<a-col :span="24" v-if="formData.adminopen === '3' || formData.compopen === '3'">
<a-form-item label="异常备注" v-bind="validateInfos.errinfo" id="ExpertForm-backinfo" name="backinfo">
<a-input v-model:value="formData.backinfo" placeholder="请输入异常备注" allow-clear ></a-input>
<a-form-item label="驳回原因" v-bind="validateInfos.errinfo" id="ExpertForm-backinfo" name="backinfo">
<a-input v-model:value="formData.backinfo" placeholder="请输入驳回原因" allow-clear disabled="true"></a-input>
</a-form-item>
</a-col>

Loading…
Cancel
Save