| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687 |
- import {BasicColumn} from '/@/components/Table';
- import {FormSchema} from '/@/components/Table';
- import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
- import { defHttp } from '/@/utils/http/axios';
- //列表数据
- export const columns: BasicColumn[] = [
- {
- title: '单据编码(bill code)',
- align:"center",
- dataIndex: 'billCode'
- },
- {
- title: '单据日期(bill date)',
- align:"center",
- sorter: true,
- dataIndex: 'billDate',
- customRender:({text}) =>{
- text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
- return text;
- },
- },
- {
- title: '项目(Project)',
- align:"center",
- dataIndex: 'quotationProjectName'
- },
- {
- title: '客户(Customer)',
- align:"center",
- dataIndex: 'quotationCustomerName'
- },
- {
- title: '优先级(priority)',
- align:"center",
- dataIndex: 'priority_dictText'
- },
- {
- title: '产品分类(production class)',
- align:"center",
- dataIndex: 'productionClass'
- },
- {
- title: '机型(model)',
- align:"center",
- dataIndex: 'model'
- },
- {
- title: '厂家(maker)',
- align:"center",
- dataIndex: 'maker'
- },
- {
- title: '业务类型(busyness type)',
- align:"center",
- dataIndex: 'busynessType',
- // width:250,
- },
- {
- title: '销售部门(sale department)',
- align:"center",
- dataIndex: 'saleDepartment'
- },
- {
- title: '业务员(salesman)',
- align:"center",
- dataIndex: 'salesman'
- },
- {
- title: '关闭(close)',
- align:"center",
- dataIndex: 'isClose_dictText'
- },
- {
- title: '提交(submit)',
- align:"center",
- dataIndex: 'status_dictText'
- },
- {
- title: '版本号',
- align:"center",
- dataIndex: 'version'
- },
- ];
- //查询数据
- export const searchFormSchema: FormSchema[] = [
- {
- label: "单据编码(bill code)",
- field: "billCode",
- component: 'Input',
- labelWidth: 150,
- //colProps: {span: 6},
- },
- {
- label: "单据日期(bill date)",
- field: "billDate",
- component: 'RangePicker',
- labelWidth: 150,
- componentProps: {
- valueType: 'Date',
- },
- //colProps: {span: 6},
- },
- {
- label: "业务类型(busyness type)",
- field: "busynessType",
- labelWidth: 180,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"busyness_type"
- },
- //colProps: {span: 6},
- },
-
- {
- label: "客户(Customer)",
- field: "quotationCustomerName",
- labelWidth: 150,
- component: 'Input',
- //colProps: {span: 6},
- },
- {
- label: "项目(Project)",
- field: "quotationProjectName",
- labelWidth: 150,
- component: 'Input',
- //colProps: {span: 6},
- },
- {
- label: "优先级(priority)",
- field: "priority",
- labelWidth: 150,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"priority"
- },
- //colProps: {span: 6},
- },
- {
- label: "产品分类(production class)",
- field: "productionClass",
- labelWidth: 180,
- component: 'ApiSelect',
- componentProps: {
- // mode: 'multiple',//multiple: 多选;不填写为单选
- //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
- api: ()=> defHttp.get({ url: 'baseCode/baseProductClass/list?pageSize=-1' }),
- //数值转成String
- numberToString: false,
- //标题字段
- labelField: 'name',
- //值字段
- valueField: 'id',
- //请求参数
- params:{},
- //返回结果字段
- resultField:'records'
- },
- //colProps: {span: 6},
- },
- {
- label: "机型(model)",
- field: "model",
- labelWidth: 150,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"model_typer"
- },
- //colProps: {span: 6},
- },
- {
- label: "厂家(maker)",
- field: "maker",
- labelWidth: 150,
- component: 'Input',
- //colProps: {span: 6},
- },
- {
- label: "业务员(salesman)",
- field: "salesman",
- labelWidth: 150,
- component: 'JSelectUser',
- componentProps:{
- },
- //colProps: {span: 6},
- },
- {
- label: "销售部门(sale department)",
- field: "saleDepartment",
- labelWidth: 180,
- component: 'JSelectDept',
- componentProps:{
- },
- //colProps: {span: 6},
- },
- {
- label: "提交(submit)",
- field: "status",
- labelWidth: 150,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"yes_or_no"
- },
- //colProps: {span: 6},
- },
- {
- label: "关闭(close)",
- field: "isClose",
- labelWidth: 150,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"yes_or_no"
- },
- //colProps: {span: 6},
- },
- ];
- //表单数据
- export const formSchema: FormSchema[] = [
- {
- label: '合同编号(bill code)',
- field: 'billCode',
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '单据日期(bill date)',
- field: 'billDate',
- component: 'DatePicker',
- componentProps: {
- valueFormat: 'YYYY-MM-DD',
- },
- dynamicDisabled:true,
- labelWidth: 200,
- },
- {
- label: '报价项目(quotation project)',
- labelWidth: 200,
- field: 'quotationProjectName',
- component: 'InputSearch',
- slot: 'quotationProjectName',
- dynamicRules: ({model,schema}) => {
- return [
- { required: true, message: '请输入报价项目名称!'},
- ];
- },
- },
- {
- label: '客户(customer)',
- labelWidth: 200,
- field: 'quotationCustomerName',
- component: 'Input',
- dynamicDisabled:true,
- },
- {
- label: '业务类型(busyness type)',
- labelWidth: 200,
- field: 'busynessType',
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"busyness_type"
- },
- },
- {
- label: '优先级(priority)',
- labelWidth: 200,
- field: 'priority',
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"priority"
- },
- },
- {
- label: '产品分类(production class)',
- labelWidth: 200,
- field: 'productionClass',
- component: 'ApiSelect',
- componentProps: {
- // mode: 'multiple',//multiple: 多选;不填写为单选
- //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
- api: ()=> defHttp.get({ url: 'baseCode/baseProductClass/list?pageSize=-1' }),
- //数值转成String
- numberToString: false,
- //标题字段
- labelField: 'name',
- //值字段
- valueField: 'id',
- //请求参数
- params:{},
- //返回结果字段
- resultField:'records'
- },
- },
- {
- label: '机型(model)',
- field: 'model',
- labelWidth: 200,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"model_typer"
- },
- },
- {
- label: '厂家(maker)',
- labelWidth: 200,
- field: 'maker',
- component: 'Input',
- },
- {
- label: '币种(currency)',
- labelWidth: 200,
- field: 'currency',
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"currency"
- },
- },
- {
- label: '交货条款(delivery terms)',
- labelWidth: 200,
- field: 'deliveryTerms',
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"delivery_terms"
- },
- },
- {
- label: '付款条件(payment terms)',
- field: 'paymentTerms',
- labelWidth: 200,
- component: 'JDictSelectTag',
- componentProps:{
- dictCode:"payment_terms"
- },
- },
- {
- label: '付款条件2',
- field: 'paymentInfo',
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '销售部门(sale department)',
- field: 'saleDepartment',
- labelWidth: 200,
- component: 'Input',
- dynamicDisabled:true,
- componentProps:{
- },
- },
- {
- label: '业务员(salesman)',
- field: 'salesman',
- labelWidth: 200,
- component: 'Input',
- dynamicDisabled:true,
- componentProps:{
- },
- },
- {
- label: '汇率(exchange rate)',
- field: 'exchangeRate',
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '备注(notes)',
- field: 'notes',
- labelWidth: 200,
- component: 'Input',
- },
- {
- label: '附件(attachs)',
- field: 'attachs',
- labelWidth: 200,
- component: 'JUpload',
- },
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false
- },
- {
- label: '',
- field: 'quotationCustomer',
- component: 'Input',
- show: false
- },
- {
- label: '',
- field: 'quotationProject',
- component: 'Input',
- show: false
- },
- {
- label: '',
- field: 'status',
- component: 'Input',
- show: false
- },
- ];
- //子表单数据
- //子表表格配置
- export const saleContractShipColumns: JVxeColumn[] = [
- {
- title: '船名(ship name)',
- key: 'shipName',
- type: JVxeTypes.normal,
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '主机号(hostN 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,
- width:"200px",
- 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 saleContractProductColumns: JVxeColumn[] = [
- {
- title: '交期(delivery time)',
- key: 'deliveryTime',
- type: JVxeTypes.date,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '产品分类(product class)',
- key: 'productClass',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '产品编码(product code)',
- key: 'productCode',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '产品中文名chinese name)',
- key: 'chineseName',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '产品英文名(english name)',
- key: 'englishName',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '型号(model)',
- key: 'model',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '备件号(partno)',
- key: 'partno',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '图号(drawingno)',
- key: 'drawingno',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '订货号(orderno)',
- key: 'orderno',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '厂家(factory)',
- key: 'factory',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '质量等级(quality grade)',
- key: 'qualityGrade',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '数量(quantity)',
- key: 'quantity',
- type: JVxeTypes.inputNumber,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '税率(tax rate)',
- key: 'taxRate',
- type: JVxeTypes.inputNumber,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '折扣(discount)',
- key: 'discount',
- type: JVxeTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '含税单价(tax price)',
- key: 'taxPrice',
- type: JVxeTypes.inputNumber,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '含税金额(tax amount)',
- key: 'taxAmount',
- type: JVxeTypes.normal,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '备注(notes)',
- key: 'notes',
- type: JVxeTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '操作(operation)',
- key: 'action',
- width:"200px",
- // 固定在右侧
- fixed: 'right',
- // 对齐方式为居中
- align: 'center',
- // 组件类型定义为【插槽】
- type: JVxeTypes.slot,
- // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
- slotName: 'action',
- },
- ]
- // 高级查询数据
- export const superQuerySchema = {
- hisId: {title: '历史主键',order: 0,view: 'text', type: 'string',},
- status: {title: '状态(1-已提交,0-未提交)',order: 1,view: 'number', type: 'number',},
- billDate: {title: '单据日期',order: 2,view: 'date', type: 'string',},
- billCode: {title: '单据编码',order: 3,view: 'text', type: 'string',},
- quotationProject: {title: '报价项目',order: 4,view: 'text', type: 'string',},
- quotationProjectName: {title: '报价项目名称',order: 5,view: 'text', type: 'string',},
- quotationCustomer: {title: '报价客户',order: 6,view: 'text', type: 'string',},
- quotationCustomerName: {title: '报价客户名称',order: 7,view: 'text', type: 'string',},
- busynessType: {title: '业务类型(busyness type)',order: 8,view: 'text', type: 'string',},
- priority: {title: '优先级(priority)',order: 9,view: 'text', type: 'string',},
- productionClass: {title: '产品分类(production class)',order: 10,view: 'text', type: 'string',},
- model: {title: '机型(model)',order: 11,view: 'text', type: 'string',},
- maker: {title: '厂家(maker)',order: 12,view: 'text', type: 'string',},
- currency: {title: '币种(currency)',order: 13,view: 'text', type: 'string',},
- deliveryTerms: {title: '交货条款(delivery terms)',order: 14,view: 'text', type: 'string',},
- paymentTerms: {title: '付款条件(payment terms)',order: 15,view: 'text', type: 'string',},
- paymentInfo: {title: '付款条件2',order: 16,view: 'text', type: 'string',},
- saleDepartment: {title: '销售部门(sale department)',order: 17,view: 'sel_depart', type: 'string',},
- salesman: {title: '业务员(salesman)',order: 18,view: 'sel_user', type: 'string',},
- exchangeRate: {title: '汇率(exchange rate)',order: 19,view: 'text', type: 'string',},
- notes: {title: '备注(notes)',order: 20,view: 'text', type: 'string',},
- attachs: {title: '附件(attachs)',order: 21,view: 'text', type: 'string',},
- version: {title: '版本号',order: 22,view: 'text', type: 'string',},
- isClose: {title: '关闭(1-是,0-否)',order: 23,view: 'number', type: 'number',},
- //子表高级查询
- saleContractShip: {
- title: '销售合同-船明细',
- view: 'table',
- fields: {
- status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
- headId: {title: '表头主键(销售合同)',order: 2,view: 'text', type: 'string',},
- shipId: {title: '船id',order: 3,view: 'text', type: 'string',},
- shipName: {title: '船名',order: 4,view: 'text', type: 'string',},
- hostNumber: {title: '主机号',order: 5,view: 'text', type: 'string',},
- projectNo: {title: '工程编号',order: 6,view: 'text', type: 'string',},
- shipFactory: {title: '船厂',order: 7,view: 'text', type: 'string',},
- shipowner: {title: '船东',order: 8,view: 'text', type: 'string',},
- }
- },
- saleContractProduct: {
- title: '销售合同-产品明细',
- view: 'table',
- fields: {
- status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
- headId: {title: '表头主键(销售报价单)',order: 2,view: 'text', type: 'string',},
- deliveryTime: {title: '交期',order: 3,view: 'datetime', type: 'string',},
- productId: {title: '产品id',order: 4,view: 'text', type: 'string',},
- productClass: {title: '产品分类',order: 5,view: 'text', type: 'string',},
- productCode: {title: '产品编码',order: 6,view: 'text', type: 'string',},
- chineseName: {title: '产品中文名',order: 7,view: 'text', type: 'string',},
- englishName: {title: '产品英文名',order: 8,view: 'text', type: 'string',},
- specifications: {title: '规格',order: 9,view: 'text', type: 'string',},
- model: {title: '型号',order: 10,view: 'text', type: 'string',},
- partno: {title: '备件号',order: 11,view: 'text', type: 'string',},
- drawingno: {title: '图号',order: 12,view: 'text', type: 'string',},
- orderno: {title: '订货号',order: 13,view: 'text', type: 'string',},
- factory: {title: '厂家',order: 14,view: 'text', type: 'string',},
- qualityGrade: {title: '质量等级',order: 15,view: 'text', type: 'string',},
- quantity: {title: '数量',order: 16,view: 'number', type: 'number',},
- unit: {title: '单位',order: 17,view: 'text', type: 'string',},
- taxRate: {title: '税率(tax rate)',order: 18,view: 'number', type: 'number',},
- discount: {title: '折扣(discount)',order: 19,view: 'text', type: 'string',},
- taxPrice: {title: '含税单价(tax price)',order: 20,view: 'number', type: 'number',},
- taxAmount: {title: '含税金额(tax amount)',order: 21,view: 'number', type: 'number',},
- notes: {title: '备注(notes)',order: 22,view: 'text', type: 'string',},
- }
- },
- };
- /**
- * 流程表单调用这个方法获取formSchema
- * @param param
- */
- export function getBpmFormSchema(_formData): FormSchema[]{
- // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
- return formSchema;
- }
|