tangning 2 år sedan
förälder
incheckning
da627a5cd7
3 ändrade filer med 53 tillägg och 42 borttagningar
  1. 1 1
      src/locales/lang/en/routes/equity.ts
  2. 1 1
      src/views/equity/DownModal.vue
  3. 51 40
      src/views/finance/data.tsx

+ 1 - 1
src/locales/lang/en/routes/equity.ts

@@ -20,7 +20,7 @@ export default {
   nickName:'Nickname',
   userName1:'Account',
   email:'Email',
-  userCount:'Quantity',
+  userCount:'Authorized Quantity',
   incrementType:{
     0:'Membership Subscription',
     1:'Scene Download',

+ 1 - 1
src/views/equity/DownModal.vue

@@ -91,7 +91,7 @@
             component: 'InputNumber',
             label: t('routes.equity.addcount'),
             required: true,
-            suffix:`${t('routes.equity.syks')} ${agent.value.downSubNum} ${t('routes.equity.unit.1')}`,
+            suffix:`${t('routes.equity.syks')} ${agent.value.downSubNum} ${t('routes.equity.unit.2')}`,
             // defaultValue:1,
             componentProps:{
               max:agent.value.downSubNum,

+ 51 - 40
src/views/finance/data.tsx

@@ -4,16 +4,15 @@ import { h, ref, computed } from 'vue';
 import { FormSchema } from '/@/components/Form/index';
 import { useI18n } from '/@/hooks/web/useI18n';
 const { t } = useI18n();
-import { dincrementList } from '/@/api/equity'
+import { dincrementList } from '/@/api/equity';
 import type { Dayjs } from 'dayjs';
-const selectPriceDate = ref('')
+const selectPriceDate = ref('');
 import dayjs from 'dayjs';
 import { useLocaleStore } from '/@/store/modules/locale';
 const localeStore = useLocaleStore();
 const isEn = computed(() => localeStore.getLocale === 'en');
 
 export const columns: BasicColumn[] = [
-        
   {
     title: t('routes.equity.timeList'),
     dataIndex: 'createTime',
@@ -32,9 +31,9 @@ export const columns: BasicColumn[] = [
     title: t('routes.equity.Type'),
     dataIndex: 'type',
     width: 120,
-    customRender:({record})=>{
-      return t(`routes.finance.equityType.${record.type}`) || '-'
-  }
+    customRender: ({ record }) => {
+      return t(`routes.finance.equityType.${record.type}`) || '-';
+    },
   },
   {
     title: t('routes.equity.nickName'),
@@ -56,20 +55,20 @@ export const columns: BasicColumn[] = [
     title: t('routes.equity.userCount'),
     dataIndex: 'count',
     // slots: { customRender: 'orderStatus' },
-    width: 80,
+    width: 120,
   },
   {
     title: t('routes.equity.giveType'),
     dataIndex: 'giveType',
     // slots: { customRender: 'orderStatus' },
     width: 180,
-    customRender:({record})=>{
-      return t(`routes.finance.giveType.${record.giveType}`) || '-'
-  }
+    customRender: ({ record }) => {
+      return t(`routes.finance.giveType.${record.giveType}`) || '-';
+    },
   },
 ];
 export const searchForm: Partial<FormProps> = {
-  labelWidth: isEn.value?120:100,
+  labelWidth: isEn.value ? 120 : 100,
   schemas: [
     {
       field: 'type',
@@ -79,28 +78,33 @@ export const searchForm: Partial<FormProps> = {
         maxLength: 50,
         api: async function () {
           const list = await dincrementList();
-          let optionList = []
-          list.map(ele => {
-            optionList.push({name:t(`routes.finance.equityType.${ele.validTimeType}`),value:ele.validTimeType,key: ele.validTimeType,})
+          let optionList = [];
+          list.map((ele) => {
+            optionList.push({
+              name: t(`routes.finance.equityType.${ele.validTimeType}`),
+              value: ele.validTimeType,
+              key: ele.validTimeType,
+            });
           });
           optionList.push({
             name: t('routes.finance.equityType.2'),
             value: 2,
             key: '2',
-          })
-          console.log('ele.id',optionList)
-          return optionList
+          });
+          console.log('ele.id', optionList);
+          return optionList;
         },
         numberToString: true,
         labelField: 'name',
         valueField: 'value',
         immediate: true,
-        },
+      },
       colProps: {
         xl: 5,
         xxl: 5,
       },
-    },{
+    },
+    {
       field: 'giveType',
       label: t('routes.equity.giveType'),
       component: 'Select',
@@ -110,15 +114,18 @@ export const searchForm: Partial<FormProps> = {
             label: t('routes.finance.giveType.0'),
             value: 0,
             key: '0',
-          },{
+          },
+          {
             label: t('routes.finance.giveType.1'),
             value: 1,
             key: '1',
-          },{
+          },
+          {
             label: t('routes.finance.giveType.2'),
             value: 2,
             key: '2',
-          },{
+          },
+          {
             label: t('routes.finance.giveType.3'),
             value: 3,
             key: '3',
@@ -129,30 +136,34 @@ export const searchForm: Partial<FormProps> = {
         xl: 5,
         xxl: 5,
       },
-    },{
+    },
+    {
       field: 'timeList',
       label: t('routes.equity.timeList'),
       component: 'RangePicker',
       componentProps: {
         maxLength: 100,
-        valueFormat:'YYYY-MM-DD',
+        valueFormat: 'YYYY-MM-DD',
         format: 'YYYY-MM-DD',
-        onCalendarChange:(date)=>{
-          console.log('current',date)
-          selectPriceDate.value = date[0]
+        onCalendarChange: (date) => {
+          console.log('current', date);
+          selectPriceDate.value = date[0];
         },
-        onOpenChange:(status)=>{
-          if(!status){
-            selectPriceDate.value = ''
+        onOpenChange: (status) => {
+          if (!status) {
+            selectPriceDate.value = '';
           }
         },
-        disabledDate:(current) => {
-          if(selectPriceDate.value){
-              return current >dayjs(selectPriceDate.value).add(3,'year')  || current < dayjs(selectPriceDate.value).subtract(3,'year')
-          }else{
-              return false
+        disabledDate: (current) => {
+          if (selectPriceDate.value) {
+            return (
+              current > dayjs(selectPriceDate.value).add(3, 'year') ||
+              current < dayjs(selectPriceDate.value).subtract(3, 'year')
+            );
+          } else {
+            return false;
           }
-      }
+        },
       },
       colProps: {
         xl: 7,
@@ -185,9 +196,9 @@ export const InvoiceSchemas: FormSchema[] = [
         // @ts-ignore
         validator: async (rule, value) => {
           if (!value) {
-            return Promise.reject(t('common.inputText')+t('routes.product.version'));
+            return Promise.reject(t('common.inputText') + t('routes.product.version'));
           }
-          if(/.*[\u4e00-\u9fa5]+.*$/.test(value)){
+          if (/.*[\u4e00-\u9fa5]+.*$/.test(value)) {
             /* eslint-disable-next-line */
             return Promise.reject(t('routes.equity.zhTips'));
           }
@@ -209,10 +220,10 @@ export const InvoiceSchemas: FormSchema[] = [
     required: true,
     label: t('routes.product.description'),
     componentProps: {
-      rows:4,
+      rows: 4,
     },
     colProps: {
       span: 24,
     },
   },
-]
+];