import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; const opeMediaAddress = import.meta.env.VITE_OPE_MEDIA_ADDRESS; //列表数据 export const columns: BasicColumn[] = [ { title: '供应商名称', align: "center", dataIndex: 'suppliersName' }, { title: '供应商性质', align: "center", dataIndex: 'suppliersNature_dictText' }, { title: '供应商地址', align: "center", dataIndex: 'suppliersAddress' }, { title: '负责人', align: "center", dataIndex: 'personInCharge' }, { title: '联系电话', align: "center", dataIndex: 'contactNumber' }, { title: '开户行', align: "center", dataIndex: 'openingBank' }, { title: '开户行账号', align: "center", dataIndex: 'openingBankNo' }, { title: '资质照片', align: "center", dataIndex: 'imgPath', customRender: ({ text }) => { // 如果 text 为空或 null/undefined,使用默认图片 const imageUrl = text ? opeMediaAddress + text : opeMediaAddress + import.meta.env.VITE_DEFAULT_DIRECTIVE_PRE_PIC; return render.renderImage({ text: imageUrl }); }, }, { title: '审核状态', align: "center", dataIndex: 'applyStatus', customRender: ({ text, record }) => { console.log(text); var applyStatus = "" if(text == '1'){ applyStatus = "待审核" }else if(text == '2'){ applyStatus = "审核通过" }else if(text == '3'){ applyStatus = "审核未通过" } return applyStatus; }, }, { title: '审核备注', align: "center", dataIndex: 'applyContent' }, ]; // 高级查询数据 export const superQuerySchema = { suppliersName: {title: '供应商名称',order: 0,view: 'text', type: 'string',}, suppliersNature: {title: '供应商性质 1代理商 2批发商 3制造商',order: 1,view: 'text', type: 'string',}, suppliersAddress: {title: '供应商地址',order: 2,view: 'text', type: 'string',}, personInCharge: {title: '负责人',order: 3,view: 'text', type: 'string',}, contactNumber: {title: '联系电话',order: 4,view: 'text', type: 'string',}, supplyState: {title: '供应状态 1正常供应 2暂停供应',order: 5,view: 'text', type: 'string',}, openingBank: {title: '开户行',order: 6,view: 'text', type: 'string',}, openingBankNo: {title: '开户行账号',order: 7,view: 'text', type: 'string',}, wechartId: {title: '微信账号',order: 8,view: 'text', type: 'string',}, imgPath: {title: '资质照片',order: 9,view: 'text', type: 'string',}, applyStatus: {title: '审核状态',order: 10,view: 'text', type: 'string',}, applyContent: {title: '审核备注',order: 11,view: 'text', type: 'string',}, };