241 lines
6.2 KiB
TypeScript
241 lines
6.2 KiB
TypeScript
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',
|
||
width: 100,
|
||
},
|
||
{
|
||
title: '供应商地址',
|
||
align: 'center',
|
||
dataIndex: 'suppliersAddress',
|
||
},
|
||
{
|
||
title: '负责人',
|
||
align: 'center',
|
||
dataIndex: 'personInCharge',
|
||
width: 100,
|
||
},
|
||
{
|
||
title: '联系电话',
|
||
align: 'center',
|
||
dataIndex: 'contactNumber',
|
||
width: 140,
|
||
},
|
||
{
|
||
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 });
|
||
},
|
||
width: 120,
|
||
},
|
||
{
|
||
title: '审核状态',
|
||
align: 'center',
|
||
dataIndex: 'applyStatus',
|
||
customRender: ({ text, record }) => {
|
||
console.log(text);
|
||
var applyStatus = '';
|
||
if (text == '1' || text == '4') {
|
||
applyStatus = '待审核';
|
||
} else if (text == '2') {
|
||
applyStatus = '审核通过';
|
||
} else if (text == '3' || text == '5') {
|
||
applyStatus = '审核驳回';
|
||
}
|
||
return applyStatus;
|
||
},
|
||
width: 100,
|
||
},
|
||
{
|
||
title: '驳回原因',
|
||
align: 'center',
|
||
dataIndex: 'applyContent',
|
||
width: 150,
|
||
},
|
||
];
|
||
|
||
export const columns2: BasicColumn[] = [
|
||
{
|
||
title: '供应商名称',
|
||
align: 'center',
|
||
dataIndex: 'suppliersName',
|
||
},
|
||
{
|
||
title: '供应商性质',
|
||
align: 'center',
|
||
dataIndex: 'suppliersNature_dictText',
|
||
width: 100,
|
||
},
|
||
{
|
||
title: '供应商地址',
|
||
align: 'center',
|
||
dataIndex: 'suppliersAddress',
|
||
},
|
||
{
|
||
title: '负责人',
|
||
align: 'center',
|
||
dataIndex: 'personInCharge',
|
||
width: 100,
|
||
},
|
||
{
|
||
title: '联系电话',
|
||
align: 'center',
|
||
dataIndex: 'contactNumber',
|
||
width: 140,
|
||
},
|
||
{
|
||
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 });
|
||
},
|
||
width: 120,
|
||
},
|
||
{
|
||
title: '审核状态',
|
||
align: 'center',
|
||
dataIndex: 'applyStatus',
|
||
customRender: ({ text, record }) => {
|
||
console.log(text);
|
||
var applyStatus = '';
|
||
if (text == '1' || text == '4') {
|
||
applyStatus = '待审核';
|
||
} else if (text == '2') {
|
||
applyStatus = '审核通过';
|
||
} else if (text == '3' || text == '5') {
|
||
applyStatus = '审核驳回';
|
||
}
|
||
return applyStatus;
|
||
},
|
||
width: 100,
|
||
},
|
||
{
|
||
title: '驳回原因',
|
||
align: 'center',
|
||
dataIndex: 'applyContent',
|
||
width: 150,
|
||
},
|
||
{
|
||
title: '类型',
|
||
align: 'center',
|
||
dataIndex: 'optType',
|
||
width: 100,
|
||
},
|
||
];
|
||
|
||
//变更审核列表数据
|
||
export const upColumns: 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 });
|
||
},
|
||
},
|
||
];
|
||
|
||
export const applyObj = {
|
||
suppliersName: '供应商名称',
|
||
suppliersNature: '供应商性质',
|
||
suppliersAddress: '供应商地址',
|
||
personInCharge: '负责人',
|
||
contactNumber: '联系电话',
|
||
openingBank: '开户行',
|
||
openingBankNo: '开户行账号',
|
||
imgPath: '营业执照',
|
||
};
|
||
|
||
// 高级查询数据
|
||
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' },
|
||
};
|