瀏覽代碼

feat(store): 添加用户信息中的 orgType 字段

- 在 UserInfo 接口中添加 orgType 字段,用于表示用户所在组织的类型
- 该字段将用于控制某些功能的显示和权限
zhangtao 2 天之前
父節點
當前提交
693ae05e72
共有 25 個文件被更改,包括 250 次插入130 次删除
  1. 4 4
      .env.development
  2. 2 2
      src/layouts/default/header/components/user-dropdown/DepartSelect.vue
  3. 2 2
      src/settings/projectSetting.ts
  4. 7 0
      src/store/modules/user.ts
  5. 33 8
      src/views/AccountManagement/accountManagement/SeparateAccounts.data.ts
  6. 19 3
      src/views/AccountManagement/accountManagement/components/SeparateAccountsModal.vue
  7. 2 35
      src/views/AccountManagement/accountManagement/index.vue
  8. 26 12
      src/views/businessManagement/competition/competition.data.ts
  9. 10 1
      src/views/businessManagement/competition/competitionCommon.vue
  10. 1 0
      src/views/businessManagement/competition/index.vue
  11. 11 5
      src/views/businessManagement/courses/courses.data.ts
  12. 1 1
      src/views/businessManagement/gymnasiumBag/gymnasiumBag.api.ts
  13. 11 1
      src/views/businessManagement/gymnasiumBag/gymnasiumBag.data.ts
  14. 28 19
      src/views/businessManagement/gymnasiumBag/index.vue
  15. 6 3
      src/views/businessManagement/schoolOpen/index.vue
  16. 45 5
      src/views/businessManagement/schoolOpen/schoolOpen.data.ts
  17. 2 2
      src/views/informationManagement/ContractList/ContractList.data.ts
  18. 14 8
      src/views/informationManagement/ContractList/index.vue
  19. 1 0
      src/views/informationManagement/shopInfo/index.vue
  20. 7 1
      src/views/informationManagement/shopInfo/shopInfo.data.ts
  21. 1 1
      src/views/orderManagement/order/components/orderModelView.vue
  22. 3 1
      src/views/safetyManagement/userEvaluation/evaluate.data.ts
  23. 5 10
      src/views/safetyManagement/userEvaluation/index.vue
  24. 8 6
      src/views/system/user/user.data.ts
  25. 1 0
      types/store.d.ts

+ 4 - 4
.env.development

@@ -8,15 +8,15 @@ VITE_PUBLIC_PATH = /
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
 # VITE_PROXY = [["/jeecgboot","http://192.168.1.34:8080/jeecg-boot"],["/upload","http://192.168.1.34:8080/jeecg-boot"]]
-# VITE_PROXY = [["/jeecgboot","http://192.168.0.11:8080/jeecg-boot"],["/upload","http://192.168.0.11:8080/upload"]]
+VITE_PROXY = [["/jeecgboot","http://192.168.0.11:8080/jeecg-boot"],["/upload","http://192.168.0.11:8080/upload"]]
 # VITE_PROXY = [["/jeecgboot","http://192.168.1.253:8080/jeecg-boot"],["/upload","http://192.168.1.253:8080/upload"]]
-VITE_PROXY = [["/jeecgboot","http://192.168.1.166:8080/jeecg-boot"],["/upload","http://192.168.1.166:8080/upload"]]
+# VITE_PROXY = [["/jeecgboot","http://192.168.1.166:8080/jeecg-boot"],["/upload","http://192.168.1.166:8080/upload"]]
 
 #后台接口全路径地址(必填)
 # VITE_GLOB_DOMAIN_URL=http://192.168.1.34:8080/jeecg-boot #//黄、
-# VITE_GLOB_DOMAIN_URL=http://192.168.0.11:8080/jeecg-boot  #李
+VITE_GLOB_DOMAIN_URL=http://192.168.0.11:8080/jeecg-boot  #李
 # VITE_GLOB_DOMAIN_URL=http://192.168.1.253:8080/jeecg-boot  #张
-VITE_GLOB_DOMAIN_URL=http://192.168.1.166:8080/jeecg-boot  #张
+# VITE_GLOB_DOMAIN_URL=http://192.168.1.166:8080/jeecg-boot  #张
 
 
 #后台接口父地址(必填)

+ 2 - 2
src/layouts/default/header/components/user-dropdown/DepartSelect.vue

@@ -185,7 +185,7 @@
   function departResolve() {
     return new Promise(async (resolve, reject) => {
       if (!unref(isMultiDepart)) {
-        resolve();
+        resolve(true);
       } else {
         const result = await selectDepart({
           username: userStore.getUserInfo.username,
@@ -195,7 +195,7 @@
         if (result.userInfo) {
           const userInfo = result.userInfo;
           userStore.setUserInfo(userInfo);
-          resolve();
+          resolve(true);
         } else {
           requestFailed(result);
           userStore.logout();

+ 2 - 2
src/settings/projectSetting.ts

@@ -140,7 +140,7 @@ const setting: ProjectConfig = {
   // 多标签
   multiTabsSetting: {
     // 刷新后是否保留已经打开的标签页
-    cache: false,
+    cache: true,
     // 开启
     show: true,
     // 是否可以拖拽
@@ -173,7 +173,7 @@ const setting: ProjectConfig = {
   },
 
   // 是否开启KeepAlive缓存  开发时候最好关闭,不然每次都需要清除缓存
-  openKeepAlive: true,
+  openKeepAlive: false,
 
   // 自动锁屏时间,为0不锁屏。 单位分钟 默认1个小时
   lockTime: 0,

+ 7 - 0
src/store/modules/user.ts

@@ -90,6 +90,13 @@ export const useUserStore = defineStore({
     hasShareTenantId(): boolean {
       return this.shareTenantId != null && this.shareTenantId !== '';
     },
+    /**
+     * 判断是否是商家端
+     * @returns
+     */
+    getIsMerchant(): boolean {
+      return (this.userInfo as UserInfo)?.orgCode.length > 3;
+    },
   },
   actions: {
     setToken(info: string | undefined) {

+ 33 - 8
src/views/AccountManagement/accountManagement/SeparateAccounts.data.ts

@@ -4,7 +4,11 @@ import { rules } from '/@/utils/helper/validator';
 import { render } from '/@/utils/common/renderUtils';
 import { getWeekMonthQuarterYear } from '/@/utils';
 import { getUserDeparts } from '/@/views/system/depart/depart.api';
+import { h, ref } from 'vue';
+import { list } from '../Merchant/Merchant.api.';
 
+import { Select } from 'ant-design-vue';
+const searchOptions = ref([]);
 //列表数据
 export const columns: BasicColumn[] = [
   {
@@ -59,15 +63,26 @@ export const formSchema: FormSchema[] = [
   {
     label: '商户名称',
     field: 'deptId',
-    component: 'ApiSelect',
-    componentProps: {
-      api: getUserDeparts,
-      labelField: 'departName',
-      valueField: 'id',
-      placeholder: '请选择商户名称',
-      resultField: 'list',
-    },
+    component: 'Select',
     required: true,
+    render: ({ model, field }) => {
+      console.log(model, 'f');
+
+      return h(Select, {
+        options: searchOptions.value,
+        fieldNames: { label: 'merchantName', value: 'id' },
+        filterOption: false,
+        showSearch: true,
+        allowClear: true,
+        value: model[field],
+        onChange(value) {
+          model[field] = value;
+        },
+        onSearch(value) {
+          getSearch(value);
+        },
+      });
+    },
   },
   {
     label: '分账规则',
@@ -142,3 +157,13 @@ export function getBpmFormSchema(_formData): FormSchema[] {
   // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
   return formSchema;
 }
+
+async function listData() {
+  const res = await list({});
+  searchOptions.value = res.records;
+}
+listData();
+async function getSearch(value) {
+  const res = await list({ merchantName: value });
+  searchOptions.value = res.records;
+}

+ 19 - 3
src/views/AccountManagement/accountManagement/components/SeparateAccountsModal.vue

@@ -10,7 +10,7 @@
             class="mr-5"
             :precision="2"
             :max="ptSeparateAccountsMax"
-            :min="1"
+            :min="0"
             @change="handleShChange"
             placeholder="请输入平台分账比例"
           ></InputNumber>
@@ -21,7 +21,7 @@
             class="mr-5"
             :precision="2"
             :max="shSeparateAccountsMax"
-            :min="1"
+            :min="0"
             placeholder="请输入商户分账比例"
             @change="handleShChange"
           ></InputNumber>
@@ -35,18 +35,33 @@
           ></InputNumber>
         </FormItem>
       </template>
+      <!-- <template #search="{ model, feild }">
+        {{ model[feild] }}
+        <FormItem>
+          <Select
+            v-model:value="model[feild]"
+            :options="searchOptions"
+            @search="getSearch"
+            :fieldNames="{ label: 'merchantName', value: 'id' }"
+            :filter-option="false"
+            showSearch
+            allowClear
+          ></Select>
+        </FormItem>
+      </template> -->
     </BasicForm>
   </BasicModal>
 </template>
 
 <script lang="ts" setup>
-  import { InputNumber, FormItem } from 'ant-design-vue';
+  import { InputNumber, FormItem, Select } from 'ant-design-vue';
   import { ref, computed, unref } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { BasicForm, useForm } from '/@/components/Form/index';
   import { formSchema } from '../SeparateAccounts.data';
   import { saveOrUpdate } from '../SeparateAccounts.api';
   import { useMessage } from '/@/hooks/web/useMessage';
+
   const { createMessage } = useMessage();
   // Emits声明
   const emit = defineEmits(['register', 'success']);
@@ -62,6 +77,7 @@
     showActionButtonGroup: false,
     baseColProps: { span: 24 },
   });
+
   //表单赋值
   const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
     //重置表单

+ 2 - 35
src/views/AccountManagement/accountManagement/index.vue

@@ -5,20 +5,6 @@
       <!--插槽:table标题-->
       <template #tableTitle>
         <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
-        <a-dropdown v-if="selectedRowKeys.length > 0">
-          <template #overlay>
-            <a-menu>
-              <a-menu-item key="1" @click="batchHandleDelete">
-                <Icon icon="ant-design:delete-outlined"></Icon>
-                删除
-              </a-menu-item>
-            </a-menu>
-          </template>
-          <a-button
-            >批量操作
-            <Icon icon="mdi:chevron-down"></Icon>
-          </a-button>
-        </a-dropdown>
       </template>
       <!--操作栏-->
       <template #action="{ record }">
@@ -115,12 +101,7 @@
   async function handleDelete(record) {
     await deleteOne({ id: record.id }, handleSuccess);
   }
-  /**
-   * 批量删除事件
-   */
-  async function batchHandleDelete() {
-    await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
-  }
+
   /**
    * 成功回调
    */
@@ -143,21 +124,7 @@
    * 下拉操作栏
    */
   function getDropDownAction(record) {
-    return [
-      {
-        label: '详情',
-        onClick: handleDetail.bind(null, record),
-      },
-      {
-        label: '删除',
-        popConfirm: {
-          title: '是否确认删除',
-          confirm: handleDelete.bind(null, record),
-          placement: 'topLeft',
-        },
-        auth: 'separateAccounts:nm_separate_accounts:delete',
-      },
-    ];
+    return [];
   }
   function handleSwitchChange(e, record) {
     createWarningModal({

+ 26 - 12
src/views/businessManagement/competition/competition.data.ts

@@ -2,10 +2,13 @@ import { options } from '../../monitor/mynews/XssWhiteList';
 import { getBaiduAdd, getInsureList, getSprotProject } from '/@/api/common/api';
 import { FormSchema } from '/@/components/Table';
 import { BasicColumn } from '/@/components/Table';
-import { getAddress } from '../courses/courses.api';
 import { Button, Image, Input, InputGroup, message } from 'ant-design-vue';
 import { h, VNode } from 'vue';
 import dayjs from 'dayjs';
+import { useUserStore } from '/@/store/modules/user';
+import { storeToRefs } from 'pinia';
+import { Business } from '../gymnasiumBag/gymnasiumBag.api';
+const { userInfo } = storeToRefs(useUserStore());
 /**
  * 列表columns
  */
@@ -69,15 +72,24 @@ export const searchFormSchema: FormSchema[] = [
     colProps: { span: 6 },
   },
   {
-    field: '',
+    field: 'categoryId',
     label: '比赛项目',
-    component: 'Input',
+    component: 'ApiSelect',
     colProps: { span: 6 },
+    componentProps: {
+      api: getSprotProject,
+      labelField: 'name',
+      valueField: 'id',
+      resultField: 'records',
+    },
   },
   {
-    field: '',
+    field: 'joinTime',
     label: '报名结束时间',
     component: 'RangePicker',
+    componentProps: {
+      valueType: 'Date',
+    },
     colProps: { span: 8 },
   },
 ];
@@ -132,7 +144,7 @@ export const formSchema: FormSchema[] = [
     component: 'DatePicker',
     required: true,
     componentProps: {
-      format: 'YYYY-MM-DD hh:mm:ss',
+      format: 'YYYY-MM-DD HH:mm:ss',
       showTime: true,
     },
     labelWidth: 200,
@@ -152,6 +164,7 @@ export const formSchema: FormSchema[] = [
     required: true,
     colProps: { xxl: 8 },
     labelWidth: 200,
+    slot: 'RangePickerTime',
   },
   {
     field: 'scheduleDTOS',
@@ -160,10 +173,7 @@ export const formSchema: FormSchema[] = [
     slot: 'ZtCustomTable1',
     defaultValue: [],
     ifShow(e) {
-      if (e.model.competitionTime) {
-        return true;
-      }
-      return false;
+      return e.model.competitionTime;
     },
     required: true,
     labelWidth: 200,
@@ -296,9 +306,12 @@ export const formSchema: FormSchema[] = [
     required: true,
     labelWidth: 200,
     componentProps: {
-      api: getAddress,
-      labelField: 'address',
-      valueField: 'siteId',
+      api: Business,
+      labelField: 'name',
+      valueField: 'id',
+      params: {
+        orgCode: userInfo.value?.orgCode,
+      },
     },
     ifShow(e) {
       return e.model.siteType == 0;
@@ -402,6 +415,7 @@ export const SchedulePricesColums: BasicColumn[] = [
     editComponentProps: {
       size: 'middle',
       min: 1,
+      precision: 0,
     },
     editRule: async (text, record) => {
       if (record.editValueRefs.type == 0 && text != '1') {

+ 10 - 1
src/views/businessManagement/competition/competitionCommon.vue

@@ -10,6 +10,9 @@
           <TypographyTitle :level="4">比赛时间及赛程安排</TypographyTitle>
           <Divider></Divider>
         </template>
+        <template #RangePickerTime="{ model, field }">
+          <RangePicker v-model:value="model[field]" @change="handleChange"></RangePicker>
+        </template>
         <template #ZtCustomTable1="{ model, field }">
           <ZtCustomTable
             :tableColumn="ScheduleArrangementColums"
@@ -61,7 +64,7 @@
   </div>
 </template>
 <script lang="ts" setup name="business-management-competitionCommon">
-  import { TypographyTitle, Divider, FormItem, Input, Button } from 'ant-design-vue';
+  import { TypographyTitle, Divider, FormItem, Input, Button, RangePicker } from 'ant-design-vue';
   import { BasicForm, useForm, JAreaSelect } from '/@/components/Form/index';
   import ZtCustomTable from '/@/components/ZtCustomTable/index.vue';
   import { formSchema, SchedulePricesColums } from './competition.data';
@@ -84,6 +87,12 @@
     showActionButtonGroup: false,
     disabled: Boolean(Number(route.query.type) == 2),
   });
+  function handleChange(e) {
+    if (!e) {
+      setFieldsValue({ scheduleDTOS: [] });
+    }
+  }
+
   const isSubmit = ref(false);
   async function back() {
     await closeTab();

+ 1 - 0
src/views/businessManagement/competition/index.vue

@@ -62,6 +62,7 @@
         rowProps: { gutter: 24 },
         // update-end--author:liaozhiyang---date:20230803---for:【QQYUN-5873】查询区域lablel默认居左
         schemas: searchFormSchema,
+        fieldMapToTime: [['joinTime', ['startTime', 'endTime'], 'YYYY-MM-DD']],
       },
       actionColumn: {
         width: 120,

+ 11 - 5
src/views/businessManagement/courses/courses.data.ts

@@ -5,11 +5,13 @@ import { render } from '/@/utils/common/renderUtils';
 import { getWeekMonthQuarterYear } from '/@/utils';
 import { getInsureList, getSprotProject } from '/@/api/common/api';
 import { defHttp } from '/@/utils/http/axios';
-import { getAddress, getCoachList } from './courses.api';
+import { getCoachList } from './courses.api';
 import { useUserStore } from '/@/store/modules/user';
 import ZtCustomTable from '/@/components/ZtCustomTable/index.vue';
 import { h } from 'vue';
-
+import { Business } from '../gymnasiumBag/gymnasiumBag.api';
+import { storeToRefs } from 'pinia';
+const { userInfo } = storeToRefs(useUserStore());
 //列表数据
 export const columns: BasicColumn[] = [
   {
@@ -146,9 +148,13 @@ export const formSchema: FormSchema[] = [
     component: 'ApiSelect',
     required: true,
     componentProps: {
-      api: getAddress,
-      labelField: 'address',
-      valueField: 'siteId',
+      api: Business,
+      labelField: 'name',
+      valueField: 'tenantId',
+      params: {
+        orgCode: 'A01',
+        type: 0,
+      },
     },
   },
   {

+ 1 - 1
src/views/businessManagement/gymnasiumBag/gymnasiumBag.api.ts

@@ -42,5 +42,5 @@ export const queryById = (params) => {
  * @returns
  */
 export const Business = (params) => {
-  return defHttp.get({ url: `${Api.Business}?orgCode=${params.orgCode}&type=${params.type}` });
+  return defHttp.post({ url: `${Api.Business}`, data: params });
 };

+ 11 - 1
src/views/businessManagement/gymnasiumBag/gymnasiumBag.data.ts

@@ -1,7 +1,9 @@
 import { h } from 'vue';
 import { BasicColumn } from '/@/components/Table';
 import { PlusCircleOutlined, MinusCircleOutlined } from '@ant-design/icons-vue';
-
+import { storeToRefs } from 'pinia';
+import { useUserStore } from '/@/store/modules/user';
+const { getIsMerchant } = storeToRefs(useUserStore());
 export const ScheduleArrangementColums: BasicColumn[] = [
   {
     title: '时间段',
@@ -12,6 +14,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       placeholder: ['开始时间', '结束时间'],
       size: 'middle',
       valueFormat: 'HH:mm:ss',
+      disabled: !getIsMerchant.value,
     },
     width: 350,
     editRow: true,
@@ -29,6 +32,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       step: 0.01,
       size: 'middle',
       precision: 2,
+      disabled: !getIsMerchant.value,
     },
   },
   {
@@ -41,6 +45,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       min: 1,
       step: 0.01,
       size: 'middle',
+      disabled: !getIsMerchant.value,
       precision: 2,
     },
   },
@@ -56,6 +61,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       step: 0.01,
       size: 'middle',
       precision: 2,
+      disabled: !getIsMerchant.value,
     },
   },
   {
@@ -68,6 +74,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       min: 1,
       size: 'middle',
       step: 0.01,
+      disabled: !getIsMerchant.value,
       precision: 2,
     },
   },
@@ -81,6 +88,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       min: 1,
       step: 0.01,
       size: 'middle',
+      disabled: !getIsMerchant.value,
       precision: 2,
     },
   },
@@ -95,6 +103,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       step: 0.01,
       size: 'middle',
       precision: 2,
+      disabled: !getIsMerchant.value,
     },
   },
   {
@@ -108,6 +117,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       min: 1,
       step: 0.01,
       precision: 2,
+      disabled: !getIsMerchant.value,
     },
   },
   {

+ 28 - 19
src/views/businessManagement/gymnasiumBag/index.vue

@@ -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,

+ 6 - 3
src/views/businessManagement/schoolOpen/index.vue

@@ -14,13 +14,13 @@
           <Divider></Divider>
         </template>
         <template #ZtCustomTable1="{ model, field }">
-          <ZtCustomTable :tableColumn="ScheduleArrangementColums" v-model:value="model[field]" :count="3"></ZtCustomTable>
+          <ZtCustomTable :tableColumn="ScheduleArrangementColums" :showAction="getIsMerchant" v-model:value="model[field]" :count="3"></ZtCustomTable>
         </template>
         <template #ZtCustomTable2="{ model, field }">
-          <ZtCustomTable :tableColumn="ScheduleArrangementColums" v-model:value="model[field]" :count="1"></ZtCustomTable>
+          <ZtCustomTable :tableColumn="ScheduleArrangementColums" :showAction="getIsMerchant" v-model:value="model[field]" :count="1"></ZtCustomTable>
         </template>
         <template #formFooter>
-          <div style="margin: 0 auto">
+          <div style="margin: 0 auto" 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>
@@ -39,7 +39,9 @@
   import { getDetails, saveOrUpdate } from './schoolOpen.api';
   import { ref, unref } from 'vue';
   import { useRouter } from 'vue-router';
+  import { storeToRefs } from 'pinia';
   const router = useRouter();
+  const { getIsMerchant } = storeToRefs(useUserStore());
   const [registerForm, { setProps, resetFields, setFieldsValue, updateSchema, validate, clearValidate, getFieldsValue }] = useForm({
     schemas: formSchema,
     showActionButtonGroup: false,
@@ -48,6 +50,7 @@
   function back() {
     router.back();
   }
+
   async function save() {
     await validate();
     isSubmit.value = true;

+ 45 - 5
src/views/businessManagement/schoolOpen/schoolOpen.data.ts

@@ -1,6 +1,9 @@
 import { BasicColumn, FormSchema } from '/@/components/Table';
 import { getInsureList } from '/@/api/common/api';
-import { getUserDeparts } from '/@/views/system/depart/depart.api';
+import { Business } from '../gymnasiumBag/gymnasiumBag.api';
+import { useUserStore } from '/@/store/modules/user';
+import { storeToRefs } from 'pinia';
+const { getIsMerchant, userInfo } = storeToRefs(useUserStore());
 export const formSchema: FormSchema[] = [
   {
     field: 'tenantId',
@@ -9,10 +12,13 @@ export const formSchema: FormSchema[] = [
     required: true,
     labelWidth: 120,
     componentProps: {
-      api: getUserDeparts,
-      labelField: 'departName',
-      valueField: 'id',
-      resultField: 'list',
+      api: Business,
+      labelField: 'name',
+      valueField: 'tenantId',
+      params: {
+        orgCode: userInfo.value?.orgCode,
+        type: 0,
+      },
     },
     colProps: {
       span: 14,
@@ -25,6 +31,9 @@ export const formSchema: FormSchema[] = [
     label: '',
     component: 'Input',
     labelWidth: 0,
+    ifShow({ model }) {
+      return getIsMerchant.value ? true : model['tenantId'];
+    },
   },
   {
     field: 'teachingDay',
@@ -39,6 +48,12 @@ export const formSchema: FormSchema[] = [
       span: 20,
       xs: 24,
     },
+    componentProps: {
+      disabled: !getIsMerchant.value,
+    },
+    ifShow({ model }) {
+      return getIsMerchant.value ? true : model['tenantId'];
+    },
   },
   {
     field: 'noTeachingDay',
@@ -52,6 +67,9 @@ export const formSchema: FormSchema[] = [
       span: 20,
       xs: 24,
     },
+    ifShow({ model }) {
+      return getIsMerchant.value ? true : model['tenantId'];
+    },
   },
   {
     field: 'title2',
@@ -59,6 +77,9 @@ export const formSchema: FormSchema[] = [
     label: '',
     component: 'Input',
     labelWidth: 0,
+    ifShow({ model }) {
+      return getIsMerchant.value ? true : model['tenantId'];
+    },
   },
   {
     field: 'cover',
@@ -70,6 +91,12 @@ export const formSchema: FormSchema[] = [
       span: 14,
       xs: 24,
     },
+    ifShow({ model }) {
+      return getIsMerchant.value ? true : model['tenantId'];
+    },
+    componentProps: {
+      disabled: !getIsMerchant.value,
+    },
   },
   {
     field: 'insureIds',
@@ -81,6 +108,7 @@ export const formSchema: FormSchema[] = [
       labelField: 'name',
       valueField: 'id',
       mode: 'multiple',
+      disabled: !getIsMerchant.value,
     },
     required: true,
     labelWidth: 120,
@@ -88,6 +116,10 @@ export const formSchema: FormSchema[] = [
       span: 14,
       xs: 24,
     },
+
+    ifShow({ model }) {
+      return getIsMerchant.value ? true : model['tenantId'];
+    },
   },
   {
     field: 'reminder',
@@ -99,6 +131,12 @@ export const formSchema: FormSchema[] = [
       span: 22,
       xs: 24,
     },
+    componentProps: {
+      disabled: !getIsMerchant.value,
+    },
+    ifShow({ model }) {
+      return getIsMerchant.value ? true : model['tenantId'];
+    },
   },
 ];
 
@@ -112,6 +150,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
       placeholder: ['开始时间', '结束时间'],
       size: 'middle',
       valueFormat: 'HH:mm',
+      disabled: !getIsMerchant.value,
     },
     width: 350,
     editRow: true,
@@ -126,6 +165,7 @@ export const ScheduleArrangementColums: BasicColumn[] = [
     editRule: true,
     editComponentProps: {
       size: 'middle',
+      disabled: !getIsMerchant.value,
     },
     editRow: true,
     editable: true,

+ 2 - 2
src/views/informationManagement/ContractList/ContractList.data.ts

@@ -13,8 +13,7 @@ export const columns: BasicColumn[] = [
   {
     title: '类型',
     align: 'center',
-    dataIndex: 'avatar',
-    slots: { customRender: 'img' },
+    dataIndex: 'contractType',
   },
   {
     title: '说明',
@@ -66,6 +65,7 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       fileType: 'pdf',
       tipText: '仅支持pdf格式',
+      maxCount: 1,
     },
   },
   // TODO 主键隐藏字段,目前写死为ID

+ 14 - 8
src/views/informationManagement/ContractList/index.vue

@@ -67,26 +67,32 @@
    */
   function getTableAction(record) {
     return [
-      {
-        label: '编辑底稿',
-        onClick: handleView.bind(null, record),
-      },
+      // {
+      //   label: '编辑底稿',
+      //   onClick: handleView.bind(null, record),
+      //   ifShow() {
+      //     return record.docTemplateId;
+      //   },
+      // },
       {
         label: '制作合同',
         onClick: handleGoEsign.bind(null, record),
+        ifShow() {
+          return !record.docTemplateId;
+        },
       },
       {
         label: '编辑合同',
         onClick: handleEdit.bind(null, record),
-        ifShow(record) {
-          return !record.docTemplateId;
+        ifShow() {
+          return record.docTemplateId;
         },
       },
       {
         label: '预览合同',
         onClick: handleView.bind(null, record),
-        ifShow(record) {
-          return !record.docTemplateId;
+        ifShow() {
+          return record.docTemplateId;
         },
       },
     ];

+ 1 - 0
src/views/informationManagement/shopInfo/index.vue

@@ -66,6 +66,7 @@
   function back() {
     router.back();
   }
+
   async function getisCertified() {
     const res = await isCertified(userInfo.value?.orgCode);
     console.log(res, 'rens ');

+ 7 - 1
src/views/informationManagement/shopInfo/shopInfo.data.ts

@@ -8,6 +8,7 @@ import { storeToRefs } from 'pinia';
 import { getEsignURL } from './shopInfo.api';
 import { useMessage } from '/@/hooks/web/useMessage';
 const { createWarningModal } = useMessage();
+const { userInfo } = storeToRefs(useUserStore());
 const confirmLoading = ref(false);
 export const formSchema: FormSchema[] = [
   {
@@ -124,6 +125,9 @@ export const formSchema: FormSchema[] = [
     component: 'RadioButtonGroup',
     required: true,
     defaultValue: false,
+    ifShow: () => {
+      return userInfo.value?.orgType != '20';
+    },
     render: ({ model, field }) => {
       return h(
         Button,
@@ -218,8 +222,10 @@ export const formSchema: FormSchema[] = [
     component: 'RangeTime',
     field: 'Time',
     colProps: { span: 6 },
+    required: true,
+
     ifShow(renderCallbackParams) {
-      return renderCallbackParams.model['runType'] == 1;
+      return renderCallbackParams.model['runType'] == 1 && renderCallbackParams.model['runStatus'] == 0;
     },
   },
   {

+ 1 - 1
src/views/orderManagement/order/components/orderModelView.vue

@@ -1,5 +1,5 @@
 <template>
-  <BasicModal v-bind="$attrs" @register="registerModal" title="看" width="1000px" destroyOnClose>
+  <BasicModal v-bind="$attrs" @register="registerModal" title="看" width="1000px" destroyOnClose>
     <div class="px3" v-if="orderInfo">
       <div class="flex items-center font-semibold">
         <div>订单编号:{{ orderInfo.orderCode }}</div>

+ 3 - 1
src/views/safetyManagement/userEvaluation/evaluate.data.ts

@@ -120,10 +120,12 @@ export const searchFormSchema: FormSchema[] = [
   },
   {
     label: '提交时间',
-    field: 'time',
+    field: 'joinTime',
     component: 'RangePicker',
     componentProps: {
       placeholder: ['开始时间', '结束时间'],
+      format: 'YYYY-MM-DD',
+      valueType: 'Date',
     },
   },
   {

+ 5 - 10
src/views/safetyManagement/userEvaluation/index.vue

@@ -18,25 +18,21 @@
 
 <script lang="ts" name="evaluate-evaluate" setup>
   import evaluateModel from './components/evaluateModel.vue';
-  import { ref, reactive, computed, unref, h } from 'vue';
-  import { BasicTable, useTable, TableAction, TableImg } from '/@/components/Table';
+  import { ref, reactive, h } from 'vue';
+  import { BasicTable, TableAction, TableImg } from '/@/components/Table';
   import { useModal } from '/@/components/Modal';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { columns, searchFormSchema } from './evaluate.data';
   import { list, getAudit } from './evaluate.api';
-  import { downloadFile } from '/@/utils/common/renderUtils';
-  import { useUserStore } from '/@/store/modules/user';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { Radio, RadioGroup } from 'ant-design-vue';
   const queryParam = reactive<any>({});
-  const checkedKeys = ref<Array<string | number>>([]);
-  const userStore = useUserStore();
-  const { createMessage, createWarningModal } = useMessage();
+  const { createWarningModal } = useMessage();
   //注册model
   const [registerModal, { openModal }] = useModal();
   const isChange = ref(1);
   //注册table数据
-  const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
+  const { tableContext } = useListPage({
     tableProps: {
       title: 'evaluate',
       api: list,
@@ -47,8 +43,7 @@
         schemas: searchFormSchema,
         autoSubmitOnEnter: true,
         showAdvancedButton: true,
-        fieldMapToNumber: [],
-        fieldMapToTime: [['time', ['startTime', 'endTime'], 'YYYY-MM-DD HH:mm:ss']],
+        fieldMapToTime: [['joinTime', ['startTime', 'endTime'], 'YYYY-MM-DD']],
       },
       actionColumn: {
         width: 120,

+ 8 - 6
src/views/system/user/user.data.ts

@@ -95,7 +95,7 @@ export const searchFormSchema: FormSchema[] = [
     label: '名字',
     field: 'realname',
     component: 'JInput',
-   //colProps: { span: 6 },
+    //colProps: { span: 6 },
   },
   {
     label: '性别',
@@ -123,7 +123,7 @@ export const searchFormSchema: FormSchema[] = [
       placeholder: '请选择状态',
       stringToNumber: true,
     },
-   //colProps: { span: 6 },
+    //colProps: { span: 6 },
   },
 ];
 
@@ -148,7 +148,7 @@ export const formSchema: FormSchema[] = [
     label: '登录密码',
     field: 'password',
     component: 'StrengthMeter',
-    componentProps:{
+    componentProps: {
       autocomplete: 'new-password',
     },
     rules: [
@@ -201,6 +201,7 @@ export const formSchema: FormSchema[] = [
       valueField: 'id',
       immediate: false,
     },
+    required: true,
   },
   {
     label: '所属部门',
@@ -222,7 +223,7 @@ export const formSchema: FormSchema[] = [
             },
           ]);
           //update-begin---author:wangshuai---date:2024-05-11---for:【issues/1222】用户编辑界面“所属部门”与“负责部门”联动出错整---
-          if(!values){
+          if (!values) {
             formModel.departIds = [];
             return;
           }
@@ -232,15 +233,16 @@ export const formSchema: FormSchema[] = [
         },
       };
     },
+    required: true,
   },
   {
     label: '租户',
     field: 'relTenantIds',
     component: 'JSearchSelect',
     componentProps: {
-      dict:"sys_tenant,name,id",
+      dict: 'sys_tenant,name,id',
       async: true,
-      multiple: true
+      multiple: true,
     },
   },
   {

+ 1 - 0
types/store.d.ts

@@ -41,6 +41,7 @@ export interface UserInfo {
   tenantid?: string | number;
   roles: RoleInfo[];
   orgCode: string;
+  orgType: string;
 }
 
 export interface LoginInfo {