123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434 |
- import { BasicColumn, FormSchema } from '/@/components/Table';
- import { requestMagicApi } from '/@/api/magicApi';
- import { getDataOption } from '/@/api/system/dic';
- export const type = {
- 0: '菜单',
- 1: '目录',
- };
- export const TableColumns: BasicColumn[] = [
- {
- title: '学期',
- dataIndex: 'baseSemesterIdCn',
- },
- {
- title: '入库单号',
- dataIndex: 'orderNumber',
- },
- {
- title: '入库类型',
- dataIndex: 'warehouseModeCn',
- },
- {
- title: '书名',
- dataIndex: 'bookName',
- customRender: ({ text }) => {
- return text ? text : '/';
- },
- },
- {
- title: '书号(ISSN)',
- dataIndex: 'issn',
- customRender: ({ text }) => {
- return text ? text : '/';
- },
- },
- {
- title: '出版社',
- dataIndex: 'publishingHouse',
- customRender: ({ text }) => {
- return text ? text : '/';
- },
- },
- {
- title: '作者(主编)',
- dataIndex: 'editorInChief',
- customRender: ({ text }) => {
- return text ? text : '/';
- },
- },
- {
- title: '规划教材',
- dataIndex: 'isTextbookPlan',
- customRender: ({ text }) => {
- return text === 1 ? '是' : '否';
- },
- },
- {
- title: '教材分类',
- dataIndex: 'textbookTypeCn',
- },
- {
- title: '对应课程',
- dataIndex: 'courseName',
- customRender: ({ text }) => {
- return text ? text : '/';
- },
- },
- {
- title: '关联学科组',
- dataIndex: 'groupName',
- customRender: ({ text }) => {
- return text ? text : '/';
- },
- },
- {
- title: '使用时长',
- dataIndex: 'useType',
- customRender: ({ record }) => {
- return record.useType ? record.useType + '学期' : '';
- },
- },
- {
- title: '定价(元)',
- dataIndex: 'Price',
- },
- {
- title: '折扣',
- dataIndex: 'discount',
- },
- {
- title: '小计(元)',
- dataIndex: 'subtotal',
- },
- {
- title: '入库时间',
- dataIndex: 'createDateStr',
- },
- {
- title: '入库人员',
- dataIndex: 'warehouseUser',
- },
- {
- title: '入库数量',
- dataIndex: 'warehouseNumber',
- },
- {
- title: '退还书店数量',
- dataIndex: 'returnBookstoreNumber',
- },
- {
- title: '实际入库数量',
- dataIndex: 'actualWarehouseNumber',
- },
- {
- title: '实际入库金额(元)',
- dataIndex: 'actualTotalPrice',
- },
- {
- title: '已出库数量',
- dataIndex: 'issuedNumber',
- },
- {
- title: '退书数量',
- dataIndex: 'recedeNumber',
- },
- {
- title: '剩余库存数量',
- dataIndex: 'remainNumber',
- },
- ];
- export const Eumns = {
- name: '公文名称',
- remark: '发文说明',
- number: '发文字号',
- orgName: '发文部门',
- institution: '发文单位意见',
- backOpinion: '会办单位意见',
- dateOfIssue: '印发日期',
- urgency: '紧急程度',
- confidentialityPeriod: '保密期限',
- tags: '主题词',
- printNumber: '打印份数',
- };
- export const formSchema: FormSchema[] = [
- {
- field: 'id',
- component: 'Input',
- label: 'id',
- show: false,
- },
- {
- label: '学科组名',
- field: 'groupName',
- component: 'Input',
- required: true,
- colProps: { span: 24 },
- },
- {
- label: '组长名称',
- field: 'leaderUserId',
- component: 'ApiSelect',
- componentProps: {
- api: requestMagicApi,
- params: { url: '/educational/all-teacher' },
- valueField: 'teacherUserId',
- labelField: 'teacherUserName',
- showSearch: true,
- filterOption: (input, option) => {
- return (
- option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
- option?.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
- );
- },
- },
- required: true,
- colProps: { span: 24 },
- },
- {
- label: '学科组课程',
- field: 'subjectGroupCourseIds',
- component: 'ApiSelect',
- componentProps: {
- api: requestMagicApi,
- params: { url: '/educational/subject/option-unselected' },
- showSearch: true,
- mode: 'multiple',
- // 搜索参考
- filterOption: (input, option) => {
- return (
- option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
- option?.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
- );
- },
- },
- required: true,
- colProps: { span: 24 },
- },
- {
- label: '备注',
- field: 'remark',
- component: 'InputTextArea',
- colProps: { span: 24 },
- },
- ];
- export const searchFormSchema: FormSchema[] = [
- {
- label: '学期',
- field: 'baseSemesterId',
- component: 'ApiSelect',
- componentProps: {
- getPopupContainer: () => document.body,
- api: requestMagicApi,
- params: { url: 'baseData/semester/option' },
- },
- colProps: { span: 8 },
- },
- {
- label: '入库类型',
- field: 'warehouseMode',
- component: 'ApiSelect',
- colProps: { span: 8 },
- componentProps: {
- getPopupContainer: () => document.body,
- api: getDataOption,
- params: { code: 'warehouse_mode' },
- },
- },
- {
- label: '书名',
- field: 'bookName',
- component: 'Input',
- colProps: { span: 8 },
- },
- {
- label: '书号',
- field: 'issn',
- component: 'Input',
- colProps: { span: 8 },
- },
- {
- label: '单号',
- field: 'orderNumber',
- component: 'Input',
- colProps: { span: 8 },
- },
- {
- label: '教材类型',
- field: 'textbookType',
- component: 'ApiSelect',
- componentProps: {
- getPopupContainer: () => document.body,
- api: getDataOption,
- params: { code: 'textbook_type' },
- },
- colProps: { span: 8 },
- },
- // {
- // label: '学科组',
- // field: 'subjectGroupId',
- // component: 'ApiSelect',
- // componentProps: {
- // getPopupContainer: () => document.body,
- // api: requestMagicApi,
- // params: { url: '/educational/subjectGroup/list' },
- // },
- // colProps: { span: 8 },
- // },
- {
- label: '所属学科组',
- field: 'groupName',
- component: 'Input',
- colProps: { span: 8 },
- },
- {
- label: '使用时长',
- field: 'useType',
- component: 'Select',
- colProps: { span: 8 },
- componentProps: {
- getPopupContainer: () => document.body,
- options: [
- { label: '一学期', value: 1 },
- { label: '二学期', value: 2 },
- { label: '三学期', value: 3 },
- { label: '四学期', value: 4 },
- { label: '五学期', value: 5 },
- { label: '六学期', value: 6 },
- ],
- },
- },
- {
- label: '入库人员',
- field: 'warehouseUser',
- component: 'Input',
- colProps: { span: 8 },
- },
- {
- label: '入库时间',
- field: '[startCreateDate,endCreateDate]',
- component: 'RangePicker',
- colProps: { span: 8 },
- componentProps: {
- getPopupContainer: () => document.body,
- placeholder: ['开始时间', '结束时间'],
- format: 'YYYY-MM-DD HH:mm:ss',
- showTime: { format: 'HH:mm:ss' },
- },
- },
- {
- label: '退还书店',
- field: 'returnBookstore',
- component: 'Select',
- colProps: { span: 8 },
- componentProps: {
- getPopupContainer: () => document.body,
- options: [
- { label: '有退书', value: 1 },
- { label: '无退书', value: 0 },
- ],
- },
- },
- {
- label: '退还状态',
- field: 'returnState',
- component: 'Select',
- colProps: { span: 8 },
- componentProps: {
- getPopupContainer: () => document.body,
- options: [
- { label: '有退书', value: 1 },
- { label: '无退书', value: 0 },
- ],
- },
- },
- // {
- // field: 'majorSetId',
- // label: '专业方向',
- // component: 'ApiSelect',
- // componentProps: ({}) => {
- // return {
- // getPopupContainer: () => document.body,
- // api: getMajorSetOption,
- // };
- // },
- // colProps: { span: 6 },
- // },
- // {
- // label: '作者(主编)',
- // field: 'editorInChief',
- // component: 'Input',
- // colProps: { span: 6 },
- // },
- // {
- // label: '规划教材',
- // field: 'isTextbookPlan',
- // component: 'ApiSelect',
- // componentProps: {
- // getPopupContainer: () => document.body,
- // api: getDataOption,
- // params: { code: 'judgment_method_1' },
- // },
- // colProps: { span: 6 },
- // },
- // {
- // label: '对应课程',
- // field: 'courseSubjectId',
- // component: 'ApiSelect',
- // componentProps: ({ formModel }) => {
- // return {
- // getPopupContainer: () => document.body,
- // api: async () => {
- // if (!formModel.subjectGroupId) {
- // return [];
- // }
- // const data = await getSubjectGroupInfo({ id: formModel.subjectGroupId });
- // return data.subjectGroupCourseList.map((item) => {
- // return {
- // label: item.courseSubjectIdCN,
- // value: item.courseSubjectId,
- // };
- // });
- // },
- // showSearch: true,
- // // 搜索参考
- // filterOption: (input, option) => {
- // return (
- // option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
- // option?.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
- // );
- // },
- // };
- // },
- // colProps: { span: 6 },
- // },
- // {
- // label: '使用班级',
- // field: 'classId',
- // component: 'ApiSelect',
- // componentProps: ({ formModel }) => {
- // return {
- // getPopupContainer: () => document.body,
- // api: requestMagicApi,
- // params: { url: `educational/class/option` },
- // showSearch: true,
- // // mode: 'multiple',
- // // 搜索参考
- // filterOption: (input, option) => {
- // return (
- // option?.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
- // option?.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
- // );
- // },
- // };
- // },
- // colProps: { span: 6 },
- // },
- // {
- // label: '规格型号',
- // field: 'specificationsModels',
- // component: 'Input',
- // colProps: { span: 6 },
- // },
- // {
- // label: '使用年级',
- // field: 'gradeId',
- // component: 'ApiSelect',
- // componentProps: {
- // getPopupContainer: () => document.body,
- // api: requestMagicApi,
- // params: { url: '/baseData/grade/option' },
- // },
- // colProps: { span: 6 },
- // },
- ];
|