123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607 |
- import {BasicColumn} from '/@/components/Table';
- import {FormSchema} from '/@/components/Table';
- import { rules} from '/@/utils/helper/validator';
- import { render } from '/@/utils/common/renderUtils';
- import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
- import { getWeekMonthQuarterYear } from '/@/utils';
- import { uploadUrl } from '/@/api/common/api';
- //列表数据
- export const columns: BasicColumn[] = [
- {
- title: '编码(code)',
- align:"center",
- dataIndex: 'code'
- },
- {
- title: '名称(name)',
- align:"center",
- dataIndex: 'name'
- },
- {
- title: '简称(abbreviation)',
- align:"center",
- dataIndex: 'abbreviation'
- },
- {
- title: '供应商性质(supplier nature)',
- align:"center",
- dataIndex: 'supplierNature_dictText',
- width:200
- },
- {
- title: '税号(duty paragraph)',
- align:"center",
- dataIndex: 'dutyParagraph',
- width:200
- },
- {
- title: '法人(legal person)',
- align:"center",
- dataIndex: 'legalPerson'
- },
- {
- title: '联系人(contacts)',
- align:"center",
- dataIndex: 'contacts'
- },
- {
- title: '联系电话(phone)',
- align:"center",
- dataIndex: 'phone'
- },
- {
- title: '国家(country)',
- align:"center",
- dataIndex: 'country'
- },
- {
- title: '付款条件(payment terms)',
- align:"center",
- dataIndex: 'paymentTerms',
- width:200
- },
- {
- title: '原厂(original factory)',
- align:"center",
- dataIndex: 'originalFactory_dictText',
- width:180
- },
- {
- title: '状态(status)',
- align:"center",
- dataIndex: 'status_dictText'
- },
- {
- title: '考评等级(evaluation level)',
- align:"center",
- dataIndex: 'evaluationLevel_dictText',
- width:200
- },
- {
- title: '临时供应商(temporary supplier)',
- align:"center",
- dataIndex: 'temporarySupplier',
- customRender:function (t, r, index) {
- if(t.text==1){
- return '申请中(application in progress)'
- }else if(t.text==0){
- return '是(yes)'
- }else if(t.text==2){
- return '否'
- }
- }
- },
-
- ];
- //查询数据
- export const searchFormSchema: FormSchema[] = [
- {
- label: "编码(code)",
- field: "code",
- component: 'Input',
- labelWidth: 150,
- //colProps: {span: 6},
- },
- {
- label: "名称(name)",
- field: "name",
- component: 'Input',
- labelWidth: 150,
- //colProps: {span: 6},
- },
- {
- label: "简称(abbreviation)",
- field: "abbreviation",
- component: 'Input',
- labelWidth: 180,
- //colProps: {span: 6},
- },
- {
- label: "税号(dutyParagraph)",
- field: "dutyParagraph",
- component: 'Input',
- labelWidth: 150,
- //colProps: {span: 6},
- },
- {
- label: "联系人(contacts)",
- field: "contacts",
- component: 'Input',
- labelWidth: 150,
- //colProps: {span: 6},
- },
- {
- label: "联系电话(phone)",
- field: "phone",
- component: 'Input',
- labelWidth: 150,
- //colProps: {span: 6},
- },
- {
- label: "付款条件(payment terms)",
- field: "paymentTerms",
- component: 'JDictSelectTag',
- // component: 'JSelectMultiple',
- labelWidth: 180,
- componentProps:{
- dictCode:"payment_terms"
- },
- //colProps: {span: 6},
- },
- {
- label: "国家(country)",
- field: "country",
- component: 'JDictSelectTag',
- labelWidth: 150,
- componentProps:{
- dictCode: 'country'
- },
- //colProps: {span: 6},
- },
- {
- label: "考评评级(evaluation level)",
- field: "evaluationLevel",
- component: 'JDictSelectTag',
- labelWidth: 180,
- componentProps:{
- dictCode:"grade"
- },
- //colProps: {span: 6},
- },
- {
- label: "原厂(original factory)",
- field: "originalFactory",
- component: 'JDictSelectTag',
- labelWidth: 150,
- componentProps:{
- dictCode: "yes_or_no"
- },
- //colProps: {span: 6},
- },
- {
- label: "供应商性质(supplier nature)",
- field: "supplierNature",
- component: 'JDictSelectTag',
- labelWidth: 180,
- componentProps:{
- dictCode: "supplier_nature"
- },
- //colProps: {span: 6},
- },
-
- {
- label: "状态(status)",
- field: "status",
- labelWidth: 150,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode: "valid_status"
- },
- //colProps: {span: 6},
- },
- {
- label: "临时供应商(temporary supplier)",
- field: "temporarySupplier",
- component: 'JDictSelectTag',
- labelWidth: 210,
- componentProps:{
- dictCode: "should_apply"
- },
- //colProps: {span: 6},
- },
-
- ];
- //表单数据
- export const formSchema: FormSchema[] = [
- {
- label: '编码(code)',
- field: 'code',
- component: 'Input',
- labelWidth: 200,
- colProps: {span: 12},
- componentProps: {
- placeholder:'自动生成'
- },
- dynamicDisabled:true
- },
- {
- label: '名称(name)',
- field: 'name',
- colProps: {span: 12},
- component: 'Input',
- labelWidth: 200,
- required: true,
- },
- {
- label: '简称(abbreviation)',
- field: 'abbreviation',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '曾用名(name used before)',
- field: 'nameUsedBefore',
- colProps: {span: 12},
- component: 'Input',
- labelWidth: 200,
- },
- {
- label: '税号(duty paragraph)',
- field: 'dutyParagraph',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '法人(legal person)',
- field: 'legalPerson',
- colProps: {span: 12},
- component: 'Input',
- labelWidth: 200,
- },
- {
- label: '联系人(contacts)',
- field: 'contacts',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '联系电话(phone)',
- field: 'phone',
- colProps: {span: 12},
- component: 'Input',
- labelWidth: 200,
- },
- {
- label: '邮箱(email)',
- field: 'email',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '注册地址(register address)',
- field: 'registerAddress',
- colProps: {span: 12},
- component: 'Input',
- labelWidth: 200,
- },
- {
- label: '公司地址(address)',
- field: 'address',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '供应商性质(supplier nature)',
- field: 'supplierNature',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"supplier_nature"
- },
- },
- {
- label: '国家(country)',
- field: 'country',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"country"
- },
- },
- {
- label: '国外供应商(abroad supplier)',
- field: 'abroadSupplier',
- colProps: {span: 12},
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"yes_or_no",
- stringToNumber: true,
- },
- labelWidth: 200,
- },
- {
- label: '币种(currency)',
- field: 'currency',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"currency "
- },
- },
- {
- label: '原厂(original factory)',
- field: 'originalFactory',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"yes_or_no",
- stringToNumber: true,
- },
- },
- {
- label: '开户行(opening bank)',
- field: 'openingBank',
- labelWidth: 200,
- colProps: {span: 12},
- component: 'Input',
- },
- {
- label: '付款条件(payment terms)',
- field: 'paymentTerms',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"supplier_payment_terms"
- },
- },
- {
- label: '户名(opening name)',
- field: 'openingName',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '银行代码(swift code)',
- field: 'swiftCode',
- labelWidth: 200,
- colProps: {span: 12},
- component: 'Input',
- },
-
- {
- label: '银行帐号(bank account)',
- field: 'bankAccount',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '状态(status)',
- field: 'status',
- colProps: {span: 12},
- labelWidth: 200,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"valid_status",
- stringToNumber: true,
- },
- },
- {
- label: '营业执照(business license)',
- field: 'businessLicense',
- colProps: {span: 6},
- labelWidth: 200,
- component: 'JUpload',
- componentProps: {
- //是否显示选择按钮
- text: '上传',
- //最大上传数
- maxCount: 1,
- //是否显示下载按钮
- download: true,
- },
- },
- {
- label: '其他文件(other files)',
- field: 'otherFiles',
- colProps: {span: 6},
- labelWidth: 200,
- component: 'JUpload',
- },
- {
- label: '备注(notes)',
- field: 'notes',
- colProps: {span: 24},
- labelWidth: 200,
- component: 'Input',
- },
- // TODO 主键隐藏字段,目前写死为ID
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false
- },
- ];
- //子表单数据
- //子表表格配置
- export const cuspSupplierProfileManColumns: JVxeColumn[] = [
- {
- title: '姓名(name)',
- key: 'name',
- type: JVxeTypes.input,
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '电话(mobile)',
- key: 'mobile',
- type: JVxeTypes.input,
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '邮箱(email)',
- key: 'email',
- type: JVxeTypes.input,
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '职位(position)',
- key: 'position',
- type: JVxeTypes.input,
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '操作(operation)',
- key: 'action',
- width:"200px",
- // 固定在右侧
- fixed: 'right',
- // 对齐方式为居中
- align: 'center',
- // 组件类型定义为【插槽】
- type: JVxeTypes.slot,
- // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
- slotName: 'action',
- },
- ]
- export const cuspSupplierProfileQualificationColumns: JVxeColumn[] = [
- {
- title: '资质证书名称(qualification certificate name)',
- key: 'qualificationCertificateName',
- type: JVxeTypes.input,
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '有效期始(valid begin)',
- key: 'validBegin',
- type: JVxeTypes.date,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '有效期止(valid end)',
- key: 'validEnd',
- // type: JVxeTypes.datetime,
- type: JVxeTypes.date,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '资质证书附件(qualification certificate)',
- key: 'qualificationCertificate',
- type: JVxeTypes.upload,
- btnText: '点击上传',
- token: true,
- responseName: 'message',
- action: uploadUrl,
- },
- {
- title: '临期提醒',
- key: 'deadlineReminder',
- type: JVxeTypes.select,
- options: [],
- dictCode: 'yes_or_no',
- stringToNumber: true,
- placeholder: '请选择',
- },
- {
- title: '操作(operation)',
- key: 'action',
- width:"200px",
- // 固定在右侧
- fixed: 'right',
- // 对齐方式为居中
- align: 'center',
- // 组件类型定义为【插槽】
- type: JVxeTypes.slot,
- // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
- slotName: 'action',
- },
- ]
- // 高级查询数据
- export const superQuerySchema = {
- status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',dictCode: '',},
- code: {title: '编码',order: 2,view: 'text', type: 'string',},
- name: {title: '名称',order: 3,view: 'text', type: 'string',},
- abbreviation: {title: '简称',order: 4,view: 'text', type: 'string',},
- nameUsedBefore: {title: '曾用名',order: 5,view: 'text', type: 'string',},
- dutyParagraph: {title: '税号',order: 6,view: 'text', type: 'string',},
- legalPerson: {title: '法人',order: 7,view: 'text', type: 'string',},
- contacts: {title: '联系人',order: 8,view: 'text', type: 'string',},
- phone: {title: '联系电话',order: 9,view: 'text', type: 'string',},
- email: {title: '邮箱',order: 10,view: 'text', type: 'string',},
- registerAddress: {title: '注册地址',order: 11,view: 'text', type: 'string',},
- address: {title: '公司地址',order: 12,view: 'text', type: 'string',},
- supplierNature: {title: '供应商性质',order: 13,view: 'list', type: 'string',dictCode: '',},
- country: {title: '国家',order: 14,view: 'list', type: 'string',dictCode: '',},
- currency: {title: '币种',order: 15,view: 'text', type: 'string',},
- abroadSupplier: {title: '国外供应商',order: 16,view: 'number', type: 'number',},
- originalFactory: {title: '原厂',order: 17,view: 'number', type: 'number',dictCode: '',},
- openingBank: {title: '开户行',order: 18,view: 'text', type: 'string',},
- paymentTerms: {title: '付款条件',order: 19,view: 'list', type: 'string',dictCode: '',},
- swiftCode: {title: '银行代码',order: 20,view: 'text', type: 'string',},
- bankAccount: {title: '银行帐号',order: 21,view: 'text', type: 'string',},
- businessLicense: {title: '营业执照',order: 22,view: 'text', type: 'string',},
- otherFiles: {title: '其他文件',order: 23,view: 'text', type: 'string',},
- notes: {title: '备注',order: 24,view: 'text', type: 'string',},
- temporarySupplier: {title: '临时供应商',order: 25,view: 'number', type: 'number',dictCode: '',},
- evaluationLevel: {title: '供应商等级',order: 26,view: 'list', type: 'string',dictCode: '',},
- //子表高级查询
- cuspSupplierProfileMan: {
- title: '供应商档案-联系人',
- view: 'table',
- fields: {
- status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
- headId: {title: '主表主键(供应商档案)',order: 2,view: 'text', type: 'string',},
- code: {title: '编码',order: 3,view: 'text', type: 'string',},
- name: {title: '姓名',order: 4,view: 'text', type: 'string',},
- mobile: {title: '电话',order: 5,view: 'text', type: 'string',},
- email: {title: '邮箱',order: 6,view: 'text', type: 'string',},
- position: {title: '职位',order: 7,view: 'text', type: 'string',},
- }
- },
- cuspSupplierProfileQualification: {
- title: '供应商档案-资质信息',
- view: 'table',
- fields: {
- status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
- headId: {title: '主表主键(供应商档案)',order: 2,view: 'text', type: 'string',},
- qualificationCertificateName: {title: '资质证书名称',order: 3,view: 'text', type: 'string',},
- qualificationCertificateCode: {title: '资质证书编码',order: 4,view: 'text', type: 'string',},
- validBegin: {title: '有效期始',order: 5,view: 'datetime', type: 'string',},
- validEnd: {title: '有效期止',order: 6,view: 'datetime', type: 'string',},
- qualificationCertificate: {title: '资质证书附件',order: 7,view: 'text', type: 'string',},
- deadlineReminder: {title: '临期提醒',order: 8,view: 'number', type: 'number',},
- }
- },
- };
- /**
- * 流程表单调用这个方法获取formSchema
- * @param param
- */
- export function getBpmFormSchema(_formData): FormSchema[]{
- // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
- return formSchema;
- }
|