123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- import { BasicColumn, FormSchema } from '/@/components/Table';
- import { getInsureList } from '/@/api/common/api';
- import { useUserStore } from '/@/store/modules/user';
- import { storeToRefs } from 'pinia';
- const { getIsMerchant, userInfo } = storeToRefs(useUserStore());
- export const formSchema: FormSchema[] = [
- {
- field: 'tenantId',
- label: '营业名称',
- component: 'ApiSelect',
- required: true,
- labelWidth: 120,
- slot: 'tenant',
- colProps: {
- span: 14,
- xs: 24,
- },
- },
- {
- field: 'title1',
- colSlot: 'title1',
- label: '',
- component: 'Input',
- labelWidth: 0,
- ifShow({ model }) {
- return getIsMerchant.value ? true : model['tenantId'];
- },
- },
- {
- field: 'teachingDay',
- label: '教学日',
- component: 'Input',
- slot: 'ZtCustomTable1',
- defaultValue: [],
- required: true,
- labelWidth: 120,
- colProps: {
- span: 20,
- xs: 24,
- },
- componentProps: {
- disabled: !getIsMerchant.value,
- },
- ifShow({ model }) {
- return getIsMerchant.value ? true : model['tenantId'];
- },
- },
- {
- field: 'noTeachingDay',
- label: '非教学日',
- component: 'Input',
- slot: 'ZtCustomTable2',
- defaultValue: [],
- required: true,
- labelWidth: 120,
- colProps: {
- span: 20,
- xs: 24,
- },
- ifShow({ model }) {
- return getIsMerchant.value ? true : model['tenantId'];
- },
- },
- {
- field: 'title2',
- colSlot: 'title2',
- label: '',
- component: 'Input',
- labelWidth: 0,
- ifShow({ model }) {
- return getIsMerchant.value ? true : model['tenantId'];
- },
- },
- {
- field: 'cover',
- label: '封面',
- component: 'JImageUpload',
- required: true,
- labelWidth: 120,
- colProps: {
- span: 14,
- xs: 24,
- },
- ifShow({ model }) {
- return getIsMerchant.value ? true : model['tenantId'];
- },
- componentProps: {
- disabled: !getIsMerchant.value,
- },
- },
- {
- field: 'insureIds',
- label: '配套保险',
- component: 'ApiSelect',
- componentProps: {
- api: getInsureList,
- resultField: 'data',
- labelField: 'name',
- valueField: 'id',
- mode: 'multiple',
- disabled: !getIsMerchant.value,
- },
- required: true,
- labelWidth: 120,
- colProps: {
- span: 14,
- xs: 24,
- },
- ifShow({ model }) {
- return getIsMerchant.value ? true : model['tenantId'];
- },
- },
- {
- field: 'reminder',
- label: '使用须知',
- component: 'InputTextArea',
- required: true,
- labelWidth: 120,
- colProps: {
- span: 22,
- xs: 24,
- },
- componentProps: {
- disabled: !getIsMerchant.value,
- },
- ifShow({ model }) {
- return getIsMerchant.value ? true : model['tenantId'];
- },
- },
- ];
- export const ScheduleArrangementColums: BasicColumn[] = [
- {
- title: '时间段',
- dataIndex: 'time',
- editComponent: 'TimeRangePicker',
- editRule: true,
- editComponentProps: {
- placeholder: ['开始时间', '结束时间'],
- size: 'middle',
- valueFormat: 'HH:mm',
- disabled: !getIsMerchant.value,
- },
- width: 350,
- editRow: true,
- editable: true,
- },
- {
- title: '总票数',
- key: 'InputNumber',
- dataIndex: 'ticketNum',
- width: 250,
- editComponent: 'InputNumber',
- editRule: true,
- editComponentProps: {
- size: 'middle',
- disabled: !getIsMerchant.value,
- },
- editRow: true,
- editable: true,
- },
- {
- key: 'op',
- dataIndex: 'operation',
- title: 'operation',
- fixed: 'right',
- },
- ];
|