修改bug

This commit is contained in:
yangjun 2026-02-05 09:43:57 +08:00
parent ea4754864e
commit 1023a04f93
7 changed files with 56 additions and 20 deletions

View File

@ -13,6 +13,7 @@ enum Api {
importExcel = '/configSuppliersApply/nuConfigSuppliersApply/importExcel',
exportXls = '/configSuppliersApply/nuConfigSuppliersApply/exportXls',
getModifyInfo = '/configSuppliersApply/nuConfigSuppliersApply/getModifyInfo',
getModifyHistoryInfo = '/configSuppliersApply/nuConfigSuppliersApply/getModifyHistoryInfo',
audit = '/configSuppliersApply/nuConfigSuppliersApply/audit',
}
@ -82,6 +83,9 @@ export const saveOrUpdate = (params, isUpdate) => {
export const getModifyInfo = (params) => {
return defHttp.post({ url: Api.getModifyInfo, params });
};
export const getModifyHistoryInfo = (params) => {
return defHttp.post({ url: Api.getModifyHistoryInfo, params });
};
/**
*

View File

@ -74,7 +74,7 @@ export const columns: BasicColumn[] = [
width: 100,
},
{
title: '审核备注',
title: '驳回原因',
align: 'center',
dataIndex: 'applyContent',
width: 150,
@ -121,7 +121,7 @@ export const columns2: BasicColumn[] = [
dataIndex: 'openingBankNo',
},
{
title: '资质照片',
title: '营业执照',
align: 'center',
dataIndex: 'imgPath',
customRender: ({ text }) => {
@ -150,7 +150,7 @@ export const columns2: BasicColumn[] = [
width: 100,
},
{
title: '审核备注',
title: '驳回原因',
align: 'center',
dataIndex: 'applyContent',
width: 150,
@ -220,7 +220,7 @@ export const applyObj = {
contactNumber: '联系电话',
openingBank: '开户行',
openingBankNo: '开户行账号',
imgPath: '资质照片',
imgPath: '营业执照',
};
// 高级查询数据

View File

@ -58,6 +58,7 @@
</BasicTable>
<!-- 表单区域 -->
<NuConfigSuppliersApplyHistoryModal ref="registerModal" @success="handleSuccess"></NuConfigSuppliersApplyHistoryModal>
<NuConfigSuppliersApplyModal ref="registerDetailModal" @success="handleSuccess"></NuConfigSuppliersApplyModal>
</div>
</template>
@ -69,17 +70,21 @@ import { columns2, superQuerySchema } from './NuConfigSuppliersApply.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuConfigSuppliersApply.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import NuConfigSuppliersApplyHistoryModal from './components/NuConfigSuppliersApplyHistoryModal.vue'
import NuConfigSuppliersApplyModal from './components/NuConfigSuppliersApplyModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS
import { useMessage } from '/@/hooks/web/useMessage';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const registerDetailModal = ref();
const suppliersId = ref<any>('');
const userStore = useUserStore();
const { createMessage } = useMessage();
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
@ -129,8 +134,17 @@ function handleSuperQuery(params) {
* 详情
*/
function handleDetail(record: Recordable) {
console.log("🚀 ~ handleDetail ~ record:", record)
if(record.optType == '变更'){
registerModal.value.disableSubmit = true;
registerModal.value.edit(record);
}else if(record.optType == '入驻'){
registerDetailModal.value.disableSubmit = true;
registerDetailModal.value.edit(record);
}else{
createMessage.error('错误数据,请联系管员');
}
}
/**

View File

@ -51,9 +51,9 @@
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="资质照片" v-bind="validateInfos.imgPath" id="NuConfigSuppliersApplyForm-imgPath"
<a-form-item label="营业执照" v-bind="validateInfos.imgPath" id="NuConfigSuppliersApplyForm-imgPath"
name="imgPath">
<!-- <a-input v-model:value="formData.imgPath" placeholder="请输入资质照片" disabled ></a-input> -->
<!-- <a-input v-model:value="formData.imgPath" placeholder="请输入营业执照" disabled ></a-input> -->
<j-image-upload v-if="formData.imgPath" :fileMax="1" :value="opeMediaAddress + formData.imgPath"
disabled></j-image-upload>
</a-form-item>
@ -67,7 +67,6 @@
<!-- <a-input v-model:value="formData.applyStatus" placeholder="请输入审核状态" ></a-input> -->
<a-select v-model:value="formData.applyStatus" placeholder="请选择审核状态" style="width: 200px"
:disabled="false">
<a-select-option value="1">待审核</a-select-option>
<a-select-option value="2">审核通过</a-select-option>
<a-select-option value="3">审核驳回</a-select-option>
<!-- <a-select-option value="4"
@ -78,10 +77,9 @@
</a-form-item>
</a-col>
<a-col :span="24" v-show="formData.applyStatus == 3">
<a-form-item label="审核备注" v-bind="validateInfos.applyContent" id="NuConfigSuppliersApplyForm-applyContent"
<a-form-item label="驳回原因" v-bind="validateInfos.applyContent" id="NuConfigSuppliersApplyForm-applyContent"
name="applyContent">
<!-- <a-input v-model:value="formData.applyContent" placeholder="请输入审核备注" ></a-input> -->
<a-textarea v-model:value="formData.applyContent" placeholder="请输入审核备注" rows="4"></a-textarea>
<a-textarea :maxlength="50" show-count v-model:value="formData.applyContent" placeholder="请输入驳回原因" rows="4"></a-textarea>
</a-form-item>
</a-col>
</a-row>
@ -136,6 +134,17 @@ const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
const confirmLoading = ref<boolean>(false);
//
const validatorRules = reactive({
applyStatus: [{ required: true, message: '请选择审核状态!' },],
applyContent: [
{
validator: async (_rule, value) => {
if (formData.status === 'modifyFail' && !value) {
return Promise.reject('请输入驳回原因!');
}
return Promise.resolve();
},
},
],
});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
@ -171,6 +180,7 @@ function edit(record) {
tmpData[key] = record[key]
}
})
tmpData.applyStatus = null;
//
Object.assign(formData, tmpData);
});

View File

@ -49,8 +49,8 @@
:label-col="labelCol" :wrapper-col="wrapperCol" >
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核结果" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核结果">
<a-form-item label="审核状态" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核状态">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
@ -74,7 +74,7 @@ import { ref, reactive, computed, onMounted } from 'vue';
import { Table as ATable, Input, Row, Col, Form } from 'ant-design-vue';
import { applyObj } from '../NuConfigSuppliersApply.data'
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
import { getModifyInfo, auditSubmit } from '../NuConfigSuppliersApply.api';
import { getModifyHistoryInfo, auditSubmit } from '../NuConfigSuppliersApply.api';
import { useMessage } from '/@/hooks/web/useMessage';
import { initDictOptions } from '/@/utils/dict';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
@ -117,6 +117,14 @@ const filteredTableData = computed(() => {
&& item.d1 !== 'sysOrgCode'
&& item.d1 !== 'izEnabled'
&& item.d1 !== 'sourceType'
&& item.d1 !== 'applyStatus'
&& item.d1 !== 'applyContent'
&& item.d1 !== 'applyId'
&& item.d1 !== 'suppliersId'
&& item.d1 !== 'izHistory'
&& item.d1 !== 'applyOrg'
&& item.d1 !== 'optType'
);
});
@ -157,7 +165,7 @@ const fieldMap = {
async function show(record) {
console.log("🚀 ~ show ~ record:", record)
let data = await getModifyInfo({ id: record.id })
let data = await getModifyHistoryInfo({ id: record.id })
formData.id = record.id
formData.suppliersId = record.suppliersId

View File

@ -11,7 +11,7 @@
</a-drawer>
<!-- 信息变更审核 -->
<a-drawer :title="'审核'" width="900" :visible="upInfoVisible" :closable="true" :footer-style="{ textAlign: 'right' }"
<a-drawer :title="title" width="900" :visible="upInfoVisible" :closable="true" :footer-style="{ textAlign: 'right' }"
:bodyStyle="{ padding: '14px' }" @close="handleUpInfoCancel">
<template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleUpInfoCancel">关闭</a-button>
@ -53,7 +53,7 @@ function add() {
* @param record
*/
function edit(record) {
title.value = disableSubmit.value ? '详情' : '编辑';
title.value = disableSubmit.value ? '详情' : '新供应商审核';
visible.value = true;
nextTick(() => {
registerForm.value.edit(record);
@ -65,7 +65,7 @@ function edit(record) {
* @param record
*/
function upInfoEdit(record) {
title.value = disableSubmit.value ? '详情' : '审核';
title.value = disableSubmit.value ? '详情' : '信息变更审核';
upInfoVisible.value = true;
nextTick(() => {
upInfoForm.value.show(record);

View File

@ -46,8 +46,8 @@
:label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="审核结果" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核结果">
<a-form-item label="审核状态" name="status" v-bind="validateInfos.status">
<a-select v-model:value="formData.status" style="width: 200px" placeholder="请选择审核状态">
<a-select-option value="modifyPass">审核通过</a-select-option>
<a-select-option value="modifyFail">审核驳回</a-select-option>
</a-select>
@ -93,7 +93,7 @@ const formData = reactive<Record<string, any>>({
pkId: ''
});
const validatorRules = reactive({
status: [{ required: true, message: '请选择审核结果!' },],
status: [{ required: true, message: '请选择审核状态!' },],
applyContent: [
{
validator: async (_rule, value) => {