|  | @@ -14,10 +14,18 @@
 | 
	
		
			
				|  |  |            <div v-for="(item, idx) in getCustomerList(model['categoryId'])" :key="item.value">
 | 
	
		
			
				|  |  |              <Card class="my-4">
 | 
	
		
			
				|  |  |                <FormItem :label="`${item.label}场地`" required :labelCol="{ xl: 2, sm: 3 }">
 | 
	
		
			
				|  |  | -                <InputNumber addon-before="共有" addon-after="个球场" v-model:value="model['inventory' + idx]" :max="30" :min="1"></InputNumber>
 | 
	
		
			
				|  |  | +                <InputNumber
 | 
	
		
			
				|  |  | +                  addon-before="共有"
 | 
	
		
			
				|  |  | +                  :disabled="!getIsMerchant"
 | 
	
		
			
				|  |  | +                  addon-after="个球场"
 | 
	
		
			
				|  |  | +                  v-model:value="model['inventory' + idx]"
 | 
	
		
			
				|  |  | +                  :max="30"
 | 
	
		
			
				|  |  | +                  :min="1"
 | 
	
		
			
				|  |  | +                ></InputNumber>
 | 
	
		
			
				|  |  |                </FormItem>
 | 
	
		
			
				|  |  |                <FormItem label="时间段及费用" required :labelCol="{ xl: 2, sm: 3 }" :wrapper-col="{ span: 22 }">
 | 
	
		
			
				|  |  | -                <ZtCustomTable :show-action="isMerchant" :tableColumn="ScheduleArrangementColums" v-model:value="model[item.value]"> </ZtCustomTable>
 | 
	
		
			
				|  |  | +                <ZtCustomTable :show-action="getIsMerchant" :tableColumn="ScheduleArrangementColums" v-model:value="model[item.value]">
 | 
	
		
			
				|  |  | +                </ZtCustomTable>
 | 
	
		
			
				|  |  |                </FormItem>
 | 
	
		
			
				|  |  |              </Card>
 | 
	
		
			
				|  |  |            </div>
 | 
	
	
		
			
				|  | @@ -27,7 +35,7 @@
 | 
	
		
			
				|  |  |            <Divider></Divider>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |          <template #formFooter>
 | 
	
		
			
				|  |  | -          <div style="margin: 0 auto" class="w-full flex items-center justify-center" v-if="isMerchant">
 | 
	
		
			
				|  |  | +          <div style="margin: 0 auto" class="w-full flex items-center justify-center" v-if="getIsMerchant">
 | 
	
		
			
				|  |  |              <a-button type="primary" @click="save" class="mr-2" :loading="isSubmit"> 保存 </a-button>
 | 
	
		
			
				|  |  |              <a-button type="error" @click="back" class="mr-2"> 关闭 </a-button>
 | 
	
		
			
				|  |  |            </div>
 | 
	
	
		
			
				|  | @@ -41,25 +49,22 @@
 | 
	
		
			
				|  |  |    import type { UserInfo } from '/#/store';
 | 
	
		
			
				|  |  |    import { TypographyTitle, Divider, InputNumber, FormItem, Card, message } from 'ant-design-vue';
 | 
	
		
			
				|  |  |    import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
 | 
	
		
			
				|  |  | -  import { getSprotProject, siteAdd } from '/@/api/common/api';
 | 
	
		
			
				|  |  | +  import { getSprotProject } from '/@/api/common/api';
 | 
	
		
			
				|  |  |    import { DemoOptionsItem } from '/@/api/demo/model/optionsModel';
 | 
	
		
			
				|  |  |    import ZtCustomTable from '/@/components/ZtCustomTable/index.vue';
 | 
	
		
			
				|  |  | -  import { ScheduleArrangementColums, apiForm, priceRules } from './gymnasiumBag.data';
 | 
	
		
			
				|  |  | +  import { ScheduleArrangementColums } from './gymnasiumBag.data';
 | 
	
		
			
				|  |  |    import { saveOrUpdate, queryById, Business } from './gymnasiumBag.api';
 | 
	
		
			
				|  |  | -  import { computed, ref } from 'vue';
 | 
	
		
			
				|  |  | +  import { ref } from 'vue';
 | 
	
		
			
				|  |  |    import { OriginalItem } from '/#/utils';
 | 
	
		
			
				|  |  |    import { areAllItemsAllFieldsFilled, extractRefs } from '/@/utils';
 | 
	
		
			
				|  |  |    import { useTabs } from '/@/hooks/web/useTabs';
 | 
	
		
			
				|  |  |    import { storeToRefs } from 'pinia';
 | 
	
		
			
				|  |  |    const projectList = ref<DemoOptionsItem[]>([]);
 | 
	
		
			
				|  |  |    import { useUserStore } from '/@/store/modules/user';
 | 
	
		
			
				|  |  | -  const { userInfo } = storeToRefs(useUserStore());
 | 
	
		
			
				|  |  | +  const { userInfo, getIsMerchant } = storeToRefs(useUserStore());
 | 
	
		
			
				|  |  |    const { close: closeTab } = useTabs();
 | 
	
		
			
				|  |  |    const isSubmit = ref(false);
 | 
	
		
			
				|  |  |    const uploadId = ref<any>();
 | 
	
		
			
				|  |  | -  const isMerchant = computed(() => {
 | 
	
		
			
				|  |  | -    return (userInfo.value as UserInfo).orgCode.length > 3;
 | 
	
		
			
				|  |  | -  });
 | 
	
		
			
				|  |  |    const changeData = ref(false);
 | 
	
		
			
				|  |  |    const formSchema: FormSchema[] = [
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -80,7 +85,7 @@
 | 
	
		
			
				|  |  |            getQueryData(e);
 | 
	
		
			
				|  |  |            changeData.value = true;
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | -        disabled: isMerchant.value,
 | 
	
		
			
				|  |  | +        disabled: getIsMerchant.value,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        colProps: {
 | 
	
		
			
				|  |  |          span: 14,
 | 
	
	
		
			
				|  | @@ -94,7 +99,7 @@
 | 
	
		
			
				|  |  |        component: 'Input',
 | 
	
		
			
				|  |  |        labelWidth: 0,
 | 
	
		
			
				|  |  |        ifShow() {
 | 
	
		
			
				|  |  | -        return isMerchant.value || changeData.value;
 | 
	
		
			
				|  |  | +        return getIsMerchant.value || changeData.value;
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -104,6 +109,7 @@
 | 
	
		
			
				|  |  |        defaultValue: [],
 | 
	
		
			
				|  |  |        componentProps: {
 | 
	
		
			
				|  |  |          options: projectList,
 | 
	
		
			
				|  |  | +        disabled: !getIsMerchant.value,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        required: true,
 | 
	
		
			
				|  |  |        labelWidth: 120,
 | 
	
	
		
			
				|  | @@ -112,7 +118,7 @@
 | 
	
		
			
				|  |  |          xs: 24,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        ifShow() {
 | 
	
		
			
				|  |  | -        return isMerchant.value || changeData.value;
 | 
	
		
			
				|  |  | +        return getIsMerchant.value || changeData.value;
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -127,7 +133,7 @@
 | 
	
		
			
				|  |  |          xs: 24,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        ifShow() {
 | 
	
		
			
				|  |  | -        return isMerchant.value || changeData.value;
 | 
	
		
			
				|  |  | +        return getIsMerchant.value || changeData.value;
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -137,7 +143,7 @@
 | 
	
		
			
				|  |  |        component: 'Input',
 | 
	
		
			
				|  |  |        labelWidth: 0,
 | 
	
		
			
				|  |  |        ifShow() {
 | 
	
		
			
				|  |  | -        return isMerchant.value || changeData.value;
 | 
	
		
			
				|  |  | +        return getIsMerchant.value || changeData.value;
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -148,13 +154,14 @@
 | 
	
		
			
				|  |  |        componentProps: {
 | 
	
		
			
				|  |  |          addonBefore: '开场前',
 | 
	
		
			
				|  |  |          addonAfter: '分钟可退',
 | 
	
		
			
				|  |  | +        disabled: !getIsMerchant.value,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        labelWidth: 120,
 | 
	
		
			
				|  |  |        colProps: {
 | 
	
		
			
				|  |  |          span: 24,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        ifShow() {
 | 
	
		
			
				|  |  | -        return isMerchant.value || changeData.value;
 | 
	
		
			
				|  |  | +        return getIsMerchant.value || changeData.value;
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -165,13 +172,14 @@
 | 
	
		
			
				|  |  |        componentProps: {
 | 
	
		
			
				|  |  |          addonBefore: '每笔订单最多可选择',
 | 
	
		
			
				|  |  |          addonAfter: '场',
 | 
	
		
			
				|  |  | +        disabled: !getIsMerchant.value,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        labelWidth: 120,
 | 
	
		
			
				|  |  |        colProps: {
 | 
	
		
			
				|  |  |          span: 24,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        ifShow() {
 | 
	
		
			
				|  |  | -        return isMerchant.value || changeData.value;
 | 
	
		
			
				|  |  | +        return getIsMerchant.value || changeData.value;
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      {
 | 
	
	
		
			
				|  | @@ -184,6 +192,7 @@
 | 
	
		
			
				|  |  |            minRows: 3,
 | 
	
		
			
				|  |  |            maxRows: 6,
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  | +        disabled: !getIsMerchant.value,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        defaultValue: '场地仅限个人使用,培训、比赛或者其他商业活动,可能需要额外付费。如有需求,请提前联系商家,咨询收费标准。',
 | 
	
		
			
				|  |  |        labelWidth: 120,
 | 
	
	
		
			
				|  | @@ -191,7 +200,7 @@
 | 
	
		
			
				|  |  |          span: 18,
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        ifShow() {
 | 
	
		
			
				|  |  | -        return isMerchant.value || changeData.value;
 | 
	
		
			
				|  |  | +        return getIsMerchant.value || changeData.value;
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    ];
 | 
	
	
		
			
				|  | @@ -241,7 +250,7 @@
 | 
	
		
			
				|  |  |      const res = await Business({ orgCode: userInfo.value?.orgCode, type: 1 });
 | 
	
		
			
				|  |  |      updateSchema({ field: 'name', componentProps: { options: res.map((it) => ({ label: it.name, value: it.id })) } });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    if (isMerchant.value) {
 | 
	
		
			
				|  |  | +    if (getIsMerchant.value) {
 | 
	
		
			
				|  |  |        //如果商家端进入默认取第一个
 | 
	
		
			
				|  |  |        setFieldsValue({
 | 
	
		
			
				|  |  |          name: res[0].id,
 |