|
@@ -0,0 +1,335 @@
|
|
|
|
+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';
|
|
|
|
+//列表数据
|
|
|
|
+export const columns: BasicColumn[] = [
|
|
|
|
+ {
|
|
|
|
+ title: '状态(1-启用,0-停用)',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'status'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '单据日期',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'billDate',
|
|
|
|
+ customRender:({text}) =>{
|
|
|
|
+ text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
|
|
|
+ return text;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '单据编码',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'billCode'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '项目',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'projectId'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '客户',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'customerId'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '采购方式',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'procurementMethod'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '招标项目号',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'tenderCode'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '招标项目名称',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'tenderName'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '包号',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'packetNumber'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '投标时间',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'bidTime'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '开标时间',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'openingTime'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '项目总价',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'totalMoney'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '投标结果',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'tenderResult'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '中标方',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'winningBidder'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '中标价',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'bidPrice'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '参与家数',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'households'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '备注',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'notes'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '附件',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'attachs'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '提交(0未提交,1已提交)',
|
|
|
|
+ align:"center",
|
|
|
|
+ dataIndex: 'submit'
|
|
|
|
+ },
|
|
|
|
+];
|
|
|
|
+//查询数据
|
|
|
|
+export const searchFormSchema: FormSchema[] = [
|
|
|
|
+ {
|
|
|
|
+ label: "单据编码",
|
|
|
|
+ field: 'billCode',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "项目",
|
|
|
|
+ field: 'projectId',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "客户",
|
|
|
|
+ field: 'customerId',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "招标项目号",
|
|
|
|
+ field: 'tenderCode',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "招标项目名称",
|
|
|
|
+ field: 'tenderName',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "投标时间",
|
|
|
|
+ field: "bidTime",
|
|
|
|
+ component: 'RangePicker',
|
|
|
|
+ componentProps: {
|
|
|
|
+ valueType: 'Date',
|
|
|
|
+ showTime:true
|
|
|
|
+ },
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "开标时间",
|
|
|
|
+ field: "openingTime",
|
|
|
|
+ component: 'RangePicker',
|
|
|
|
+ componentProps: {
|
|
|
|
+ valueType: 'Date',
|
|
|
|
+ showTime:true
|
|
|
|
+ },
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "投标结果",
|
|
|
|
+ field: 'tenderResult',
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "提交(0未提交,1已提交)",
|
|
|
|
+ field: 'submit',
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
+ //colProps: {span: 6},
|
|
|
|
+ },
|
|
|
|
+];
|
|
|
|
+//表单数据
|
|
|
|
+export const formSchema: FormSchema[] = [
|
|
|
|
+ {
|
|
|
|
+ label: '状态(1-启用,0-停用)',
|
|
|
|
+ field: 'status',
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '单据日期',
|
|
|
|
+ field: 'billDate',
|
|
|
|
+ component: 'DatePicker',
|
|
|
|
+ componentProps: {
|
|
|
|
+ valueFormat: 'YYYY-MM-DD'
|
|
|
|
+ },
|
|
|
|
+ dynamicRules: ({model,schema}) => {
|
|
|
|
+ return [
|
|
|
|
+ { required: true, message: '请输入单据日期!'},
|
|
|
|
+ ];
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '单据编码',
|
|
|
|
+ field: 'billCode',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '项目',
|
|
|
|
+ field: 'projectId',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ dynamicRules: ({model,schema}) => {
|
|
|
|
+ return [
|
|
|
|
+ { required: true, message: '请输入项目!'},
|
|
|
|
+ ];
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '客户',
|
|
|
|
+ field: 'customerId',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ dynamicRules: ({model,schema}) => {
|
|
|
|
+ return [
|
|
|
|
+ { required: true, message: '请输入客户!'},
|
|
|
|
+ ];
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '采购方式',
|
|
|
|
+ field: 'procurementMethod',
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
+ dynamicRules: ({model,schema}) => {
|
|
|
|
+ return [
|
|
|
|
+ { required: true, message: '请输入采购方式!'},
|
|
|
|
+ ];
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '招标项目号',
|
|
|
|
+ field: 'tenderCode',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '招标项目名称',
|
|
|
|
+ field: 'tenderName',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '包号',
|
|
|
|
+ field: 'packetNumber',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '投标时间',
|
|
|
|
+ field: 'bidTime',
|
|
|
|
+ component: 'DatePicker',
|
|
|
|
+ componentProps: {
|
|
|
|
+ showTime: true,
|
|
|
|
+ valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '开标时间',
|
|
|
|
+ field: 'openingTime',
|
|
|
|
+ component: 'DatePicker',
|
|
|
|
+ componentProps: {
|
|
|
|
+ showTime: true,
|
|
|
|
+ valueFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '项目总价',
|
|
|
|
+ field: 'totalMoney',
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '投标结果',
|
|
|
|
+ field: 'tenderResult',
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '中标方',
|
|
|
|
+ field: 'winningBidder',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '中标价',
|
|
|
|
+ field: 'bidPrice',
|
|
|
|
+ component: 'InputNumber',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '参与家数',
|
|
|
|
+ field: 'households',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '备注',
|
|
|
|
+ field: 'notes',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '附件',
|
|
|
|
+ field: 'attachs',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ },
|
|
|
|
+ // TODO 主键隐藏字段,目前写死为ID
|
|
|
|
+ {
|
|
|
|
+ label: '',
|
|
|
|
+ field: 'id',
|
|
|
|
+ component: 'Input',
|
|
|
|
+ show: false
|
|
|
|
+ },
|
|
|
|
+];
|
|
|
|
+
|
|
|
|
+// 高级查询数据
|
|
|
|
+export const superQuerySchema = {
|
|
|
|
+ status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',},
|
|
|
|
+ billDate: {title: '单据日期',order: 2,view: 'date', type: 'string',},
|
|
|
|
+ billCode: {title: '单据编码',order: 3,view: 'text', type: 'string',},
|
|
|
|
+ projectId: {title: '项目',order: 4,view: 'text', type: 'string',},
|
|
|
|
+ customerId: {title: '客户',order: 5,view: 'text', type: 'string',},
|
|
|
|
+ procurementMethod: {title: '采购方式',order: 6,view: 'number', type: 'number',},
|
|
|
|
+ tenderCode: {title: '招标项目号',order: 7,view: 'text', type: 'string',},
|
|
|
|
+ tenderName: {title: '招标项目名称',order: 8,view: 'text', type: 'string',},
|
|
|
|
+ packetNumber: {title: '包号',order: 9,view: 'text', type: 'string',},
|
|
|
|
+ bidTime: {title: '投标时间',order: 10,view: 'datetime', type: 'string',},
|
|
|
|
+ openingTime: {title: '开标时间',order: 11,view: 'datetime', type: 'string',},
|
|
|
|
+ totalMoney: {title: '项目总价',order: 12,view: 'number', type: 'number',},
|
|
|
|
+ tenderResult: {title: '投标结果',order: 13,view: 'number', type: 'number',},
|
|
|
|
+ winningBidder: {title: '中标方',order: 14,view: 'text', type: 'string',},
|
|
|
|
+ bidPrice: {title: '中标价',order: 15,view: 'number', type: 'number',},
|
|
|
|
+ households: {title: '参与家数',order: 16,view: 'text', type: 'string',},
|
|
|
|
+ notes: {title: '备注',order: 17,view: 'text', type: 'string',},
|
|
|
|
+ attachs: {title: '附件',order: 18,view: 'text', type: 'string',},
|
|
|
|
+ submit: {title: '提交(0未提交,1已提交)',order: 19,view: 'number', type: 'number',},
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+* 流程表单调用这个方法获取formSchema
|
|
|
|
+* @param param
|
|
|
|
+*/
|
|
|
|
+export function getBpmFormSchema(_formData): FormSchema[]{
|
|
|
|
+ // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
|
|
|
+ return formSchema;
|
|
|
|
+}
|