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'; //列表数据 export const columns: BasicColumn[] = [ { title: '询价单号(bill code)', align:"center", dataIndex: 'billCode' }, { title: '单据日期(bill date)', align:"center", dataIndex: 'billDate', }, { title: '询价项目(inquiry project)', align:"center", dataIndex: 'projectName', customRender:({text,record}) =>{ if(record.inquiryProject_dictText==1){ return text; }else if(record.inquiryProject_dictText==0){ return text+'(停用)' } } }, { title: '供应商编码(supplier code)', align:"center", width:150, dataIndex: 'inquirySuppiler_dictText' }, { title: '供应商名称(inquiry name)', align:"center", width:280, dataIndex: 'suppilerName' }, { title: '询价有效期(inquiry period)', align:"center", dataIndex: 'inquiryPeriodEnd', width:250, // customRender:({text,record}) =>{ // if(record.inquiryPeriodBegin&&record.inquiryPeriodEnd){ // text = record.inquiryPeriodBegin+'~'+record.inquiryPeriodEnd // }else if(!record.inquiryPeriodBegin){ // text = record.inquiryPeriodEnd // }else if(!record.inquiryPeriodEnd){ // text = record.inquiryPeriodBegin // }else{ // text='' // } // return text; // }, }, { title: '优先级(priority)', align:"center", dataIndex: 'priority_dictText' }, { title: '产品分类(production class)', align:"center", dataIndex: 'productionClass_dictText' }, { title: '机型(model)', align:"center", dataIndex: 'model' }, { title: '厂家(maker)', align:"center", dataIndex: 'maker' }, { title: '来源(sourceCode)', align:"center", dataIndex: 'sourceCode' }, { title: '状态(status)', align:"center", dataIndex: 'status_dictText', }, { title: '销售询价单附件(sales inquiry form attachs)', align:"center", dataIndex: 'saleAttachs', width:350, slots: { customRender: 'saleAttachs' }, }, { title: '提交(submit)', align:"center", dataIndex: 'submit_dictText', }, { title: '制单人', align:"center", dataIndex: 'createBy', }, { title: '制单时间', align:"center", dataIndex: 'createTime', width:180, }, ]; //子表表格配置 export const PuechaseInquiryFormShipColumns: JVxeColumn[] = [ { title: '船名(ship name)', key: 'shipName', type: JVxeTypes.normal, placeholder: '请输入${title}', defaultValue:'', }, { title: '主机号(host number)', key: 'hostNumber', type: JVxeTypes.input, placeholder: '请输入${title}', defaultValue:'', }, { title: '工程编号(project No)', key: 'projectNo', type: JVxeTypes.input, placeholder: '请输入${title}', defaultValue:'', }, { title: '船厂(ship factory)', key: 'shipFactory', type: JVxeTypes.normal, placeholder: '请输入${title}', defaultValue:'', }, { title: '船东(shipowner)', key: 'shipowner', type: JVxeTypes.normal, placeholder: '请输入${title}', defaultValue:'', }, { title: '操作(operation)', key: 'action', width:"400px", // 固定在右侧 fixed: 'right', // 对齐方式为居中 align: 'center', // 组件类型定义为【插槽】 type: JVxeTypes.slot, // slot 的名称,对应 v-slot 冒号后面和等号前面的内容 slotName: 'action', }, ] export const PuechaseInquiryFormProductColumns: JVxeColumn[] = [ // { // title: '产品分类(product class)', // key: 'productClass', // type: JVxeTypes.normal, // placeholder: '请输入${title}', // width:"200px", // defaultValue:'', // }, { title: '产品编码(product code)', key: 'productCode', type: JVxeTypes.normal, placeholder: '请输入${title}', width:"200px", defaultValue:'', }, { title: '产品中文名(chinese name)', key: 'chineseName', type: JVxeTypes.input, placeholder: '请输入${title}', width:"200px", defaultValue:'', }, { title: '产品英文名(english name)', key: 'englishName', type: JVxeTypes.input, placeholder: '请输入${title}', width:"200px", defaultValue:'', }, { title: '型号(model)', key: 'model', type: JVxeTypes.normal, placeholder: '请输入${title}', width:"200px", defaultValue:'', }, { title: '备件号(partno)', key: 'partno', type: JVxeTypes.normal, placeholder: '请输入${title}', width:"200px", defaultValue:'', }, { title: '订货号(orderno)', key: 'orderno', type: JVxeTypes.normal, placeholder: '请输入${title}', width:"200px", defaultValue:'', }, { title: '图号(drawingno)', key: 'drawingno', type: JVxeTypes.normal, placeholder: '请输入${title}', width:"200px", defaultValue:'', }, // { // title: '厂家(factory)', // key: 'factory', // placeholder: '请输入${title}', // width:"200px", // defaultValue:'', // type: JVxeTypes.select, // options: [], // dictCode: 'factory', // }, { title: '质量等级(quality grade)', key: 'qualityGrade', type: JVxeTypes.select, options: [], dictCode: 'quality_grade', placeholder: '请输入${title}', width:"200px", defaultValue:'', }, { title: '需要船检证书(need Ship inspection certificate)', key: 'needShip', width:"200px", placeholder: '请输入${title}', defaultValue:'', type: JVxeTypes.normal, formatter({ cellValue, row, column }) { if(row.needShip=='0'){ return '否' }else{ return '是' } }, }, { title: '船检证书(ship Inspection certificate)', key: 'shipInspection', type: JVxeTypes.normal, width:"200px", placeholder: '请输入${title}', defaultValue:'', }, { title: '数量(quantity)', key: 'quantity', type: JVxeTypes.inputNumber, validateRules: [{ required: true, message: '' }], placeholder: '请输入${title}', width:"200px", defaultValue:'', }, { title: '单位(unit)', key: 'unit', type: JVxeTypes.normal, placeholder: '请输入${title}', defaultValue:'', width:"200px", }, { title: '备注(note)', key: 'notes', width:"200px", type: JVxeTypes.input, placeholder: '请输入${title}', defaultValue:'', }, { title: '操作(operation)', key: 'action', width:"200px", // 固定在右侧 fixed: 'right', // 对齐方式为居中 align: 'center', // 组件类型定义为【插槽】 type: JVxeTypes.slot, // slot 的名称,对应 v-slot 冒号后面和等号前面的内容 slotName: 'action', }, ]