123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383 |
- import { BasicColumn } from '/@/components/Table';
- import { FormSchema } from '/@/components/Table';
- import { defHttp } from '/@/utils/http/axios';
- import { ref } from 'vue';
- const customerOption = ref([]);
- const projectOption = ref([]);
- //列表数据
- export const columns: BasicColumn[] = [
- {
- title: '单据编码(bill code)',
- align: 'center',
- dataIndex: 'billCode',
- },
- {
- title: '单据日期(bill date)',
- align: 'center',
- dataIndex: 'billDate',
- customRender: ({ text }) => {
- text = !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
- return text;
- },
- },
- {
- title: '系统项目(project)',
- align: 'center',
- dataIndex: 'projectId_dictText',
- },
- {
- title: '客户(customer)',
- align: 'center',
- dataIndex: 'customerId_dictText',
- },
- {
- title: '采购方式(procurement method)',
- align: 'center',
- dataIndex: 'procurementMethod',
- },
- {
- title: '招标项目号(tender code)',
- align: 'center',
- dataIndex: 'tenderCode',
- },
- {
- title: '招标项目名称(tender name)',
- align: 'center',
- dataIndex: 'tenderName',
- },
- {
- title: '投标时间(bid Time)',
- align: 'center',
- dataIndex: 'bidTime',
- },
- {
- title: '开标时间(opening time)',
- align: 'center',
- dataIndex: 'openingTime',
- },
- {
- title: '项目总价(total money)',
- align: 'center',
- dataIndex: 'totalMoney',
- },
- {
- title: '投标结果(tender result)',
- align: 'center',
- dataIndex: 'tenderResult_dictText',
- },
- {
- title: '备注(notes)',
- align: 'center',
- dataIndex: 'notes',
- },
- {
- title: '提交(submit)',
- align: 'center',
- dataIndex: 'submit',
- customRender: function (t, r, index) {
- if (t.text == 1) {
- return '是(yes)';
- } else if (t.text == 0) {
- return '否(no)';
- }
- },
- },
- ];
- //查询数据
- export const searchFormSchema: FormSchema[] = [
- {
- label: '单据编码(bill code)',
- field: 'billCode',
- component: 'JInput',
- labelWidth: 180,
- componentProps: {
- AutoComplete: 'off',
- },
- //colProps: {span: 6},
- },
- {
- label: '客户(customer)',
- field: 'customerId',
- component: 'JSelect',
- labelWidth: 150,
- componentProps: {
- getOptionUrl: () => defHttp.get({ url: '/cuspCode/cuspCustomerProfile/list?pageSize=-1&status=1'}),
- showField:"currency_dictText+name"
- },
- //colProps: {span: 6},
- },
- {
- label: '系统项目(project)',
- field: 'projectId',
- component: 'ApiSelect',
- labelWidth: 180,
- componentProps: {
- // mode: 'multiple',//multiple: 多选;不填写为单选
- //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
- api: () => defHttp.get({ url: 'baseCode/baseProjectArchive/list',params:{pageSize: -1,status:1}}),
- //数值转成String
- numberToString: false,
- //标题字段
- labelField: 'code',
- //值字段
- valueField: 'id',
- //返回结果字段
- resultField: 'records',
- filterOption: 'true',
- optionFilterProp: 'label',
- showSearch: 'true',
- },
- },
- {
- label: '招标项目号(tender code)',
- field: 'tenderCode',
- component: 'JInput',
- labelWidth: 200,
- componentProps: {
- AutoComplete: 'off',
- },
- //colProps: {span: 6},
- },
- {
- label: '投标结果(tender result)',
- field: 'tenderResult',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'tender_result',
- },
- labelWidth: 180,
- //colProps: {span: 6},
- },
- {
- label: '投标时间(bid Time)',
- field: 'bidTime',
- component: 'RangePicker',
- labelWidth: 150,
- componentProps: {
- valueType: 'Date',
- showTime: false,
- },
- //colProps: {span: 6},
- },
- {
- label: '开标时间(opening time)',
- field: 'openingTime',
- component: 'RangePicker',
- labelWidth: 180,
- componentProps: {
- valueType: 'Date',
- showTime: false,
- },
- //colProps: {span: 6},
- },
- {
- label: '招标项目名称(tender name)',
- field: 'tenderName',
- component: 'JInput',
- labelWidth: 200,
- componentProps: {
- AutoComplete: 'off',
- },
- //colProps: {span: 6},
- },
- {
- label: '备注(notes)',
- field: 'tenderCode',
- component: 'JInput',
- labelWidth: 180,
- componentProps: {
- AutoComplete: 'off',
- },
- //colProps: {span: 6},
- },
- {
- label: '提交(submit)',
- field: 'submit',
- component: 'JDictSelectTag',
- labelWidth: 150,
- componentProps: {
- dictCode: 'yes_or_no',
- },
- //colProps: {span: 6},
- },
- ];
- //表单数据
- export const formSchema: FormSchema[] = [
- {
- label: '单据编码(bill code)',
- field: 'billCode',
- component: 'Input',
- labelWidth: 150,
- dynamicDisabled: true,
- componentProps: {
- placeholder: '自动生成',
- },
- },
- {
- label: '单据日期(bill date)',
- field: 'billDate',
- component: 'DatePicker',
- componentProps: {
- valueFormat: 'YYYY-MM-DD',
- },
- labelWidth: 220,
- dynamicRules: ({ model, schema }) => {
- return [{ required: true, message: '请输入单据日期!' }];
- },
- },
- {
- label: '系统项目(project)',
- field: 'projectName',
- component: 'Select',
- slot: 'project',
- },
- {
- label: '采购方式(procurement method)',
- field: 'procurementMethod',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'procurement_method',
- },
- labelWidth: 220,
- dynamicRules: ({ model, schema }) => {
- return [{ required: true, message: '请输入采购方式!' }];
- },
- },
- {
- label: '客户(customer)',
- field: 'customerName',
- component: 'Input',
- labelWidth: 150,
- dynamicDisabled: true,
- dynamicRules: ({ model, schema }) => {
- return [{ required: true, message: '请输入客户!' }];
- },
- },
- {
- label: '招标项目号(tender code)',
- field: 'tenderCode',
- component: 'Input',
- labelWidth: 220,
- componentProps: {
- AutoComplete: 'off',
- },
- },
- {
- label: '包号(packet number)',
- field: 'packetNumber',
- labelWidth: 150,
- component: 'Input',
- componentProps: {
- AutoComplete: 'off',
- },
- },
- {
- label: '招标项目名称(tender name)',
- field: 'tenderName',
- component: 'Input',
- labelWidth: 220,
- componentProps: {
- AutoComplete: 'off',
- },
- },
- {
- label: '投标时间(bid Time)',
- field: 'bidTime',
- labelWidth: 150,
- component: 'DatePicker',
- componentProps: {
- showTime: false,
- valueFormat: 'YYYY-MM-DD',
- },
- },
- {
- label: '开标时间(opening time)',
- field: 'openingTime',
- labelWidth: 220,
- component: 'DatePicker',
- componentProps: {
- showTime: false,
- valueFormat: 'YYYY-MM-DD',
- },
- },
- {
- label: '项目总价(total money)',
- labelWidth: 150,
- field: 'totalMoney',
- component: 'InputNumber',
- componentProps: {
- AutoComplete: 'off',
- },
- },
- {
- label: '投标结果(tender result)',
- field: 'tenderResult',
- labelWidth: 220,
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'tender_result',
- },
- },
- {
- label: '中标方(winning bidder)',
- field: 'winningBidder',
- labelWidth: 150,
- component: 'Input',
- componentProps: {
- AutoComplete: 'off',
- },
- },
- {
- label: '中标价(bid price)',
- field: 'bidPrice',
- labelWidth: 220,
- component: 'InputNumber',
- componentProps: {
- AutoComplete: 'off',
- },
- },
- {
- label: '备注(notes)',
- field: 'notes',
- labelWidth: 150,
- component: 'Input',
- componentProps: {
- AutoComplete: 'off',
- },
- },
- {
- label: '附件(attachs)',
- field: 'attachs',
- labelWidth: 220,
- component: 'JUpload',
- },
- // TODO 主键隐藏字段,目前写死为ID
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false,
- },
- {
- label: '',
- field: 'projectId',
- component: 'Input',
- show: false,
- },
- {
- label: '',
- field: 'customerId',
- component: 'Input',
- show: false,
- },
- ];
- /**
- * 流程表单调用这个方法获取formSchema
- * @param param
- */
- export function getBpmFormSchema(_formData): FormSchema[] {
- // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
- return formSchema;
- }
|