tangning 2 月之前
父節點
當前提交
c691c77503

+ 15 - 0
src/api/customer/index.ts

@@ -11,6 +11,7 @@ enum Api {
   cameraList = '/service/agent/camera/list',
   companyUploadExcel = '/service/manage/excel/uploadExcel',
   downTemplate = '/service/agent/camera/downTemplate',
+  cameraExport = '/service/agent/camera/export',
   uploadAuthModelExcel = '/service/agent/authorizeModeling/uploadAuthModelExcel',
 }
 
@@ -85,6 +86,20 @@ export const downTemplate = (params: companyExcelParams) => {
     responseType: 'blob',
   });
 };
+export const downCameraExport = (params: companyExcelParams) => {
+  const { t } = useI18n();
+  return defHttp.downloadFile<FileStream>({
+    method: 'GET',
+    url: Api.cameraExport,
+    params: params,
+    fileName: '设备管理.xlsx',
+    headers: {
+      // @ts-ignore
+      ignoreCancelToken: true,
+    },
+    responseType: 'blob',
+  });
+};
 
 //导入算法授权授权时间
 

+ 1 - 0
src/locales/lang/en/routes/device.ts

@@ -5,6 +5,7 @@ export default {
   activatedTime: 'Time',
   userName: 'Bound account',
   NoBind: 'Unbind',
+  export: 'Export',
   type: {
     0: '4DKanKan Lite',
     1: '4DKanKan',

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

@@ -17,6 +17,7 @@ export default {
   countNumber: ' Quantity',
   Type: ' Type',
   giveType: 'Methods',
+  orderSn1: 'Transaction number',
   nickName: 'Nickname',
   userName1: 'Account',
   userCreateTime: 'Registration time',

+ 1 - 0
src/locales/lang/zh-CN/routes/device.ts

@@ -5,6 +5,7 @@ export default {
   activatedTime: '出库时间',
   userName: '绑定账号',
   NoBind: '未绑定',
+  export: '导出',
   type: {
     0: '旧双目相机',
     1: '四维看看',

+ 66 - 66
src/locales/lang/zh-CN/routes/equity.ts

@@ -1,77 +1,77 @@
 export default {
-  add:'新增授权',
-  addDowm:'新增下载',
-  renew:'续费',
-  userName:'用户账号',
-  count:'用户账号',
-  orderSn:'订单号',
-  payTime:'支付时间',
-  invoiceTime:'开票申请时间',
-  money:'开票金额',
-  id:'权益ID',
-  dowmCount:'下载次数',
-  timeList:'授权时间',
-  expiryTime: '到期日期', 
-  newTime:'最新授权时间',
-  time:'开始日期',
-  countNumber:'数量',
-  Type:'权益类型',
-  giveType:'授权方式',
-  nickName:'昵称',
-  userName1:'账号',
-  userCreateTime:'账号注册时间',
-  email:'邮箱',
-  userCount:'授权数量',
-  incrementType:{
-    0:'会员权益',
-    1:'场景下载',
+  add: '新增授权',
+  addDowm: '新增下载',
+  renew: '续费',
+  userName: '用户账号',
+  count: '用户账号',
+  orderSn: '订单号',
+  payTime: '支付时间',
+  invoiceTime: '开票申请时间',
+  money: '开票金额',
+  id: '权益ID',
+  dowmCount: '下载次数',
+  timeList: '授权时间',
+  expiryTime: '到期日期',
+  newTime: '最新授权时间',
+  time: '开始日期',
+  countNumber: '数量',
+  Type: '权益类型',
+  giveType: '授权方式',
+  orderSn1: '交易单号',
+  nickName: '昵称',
+  userName1: '账号',
+  userCreateTime: '账号注册时间',
+  email: '邮箱',
+  userCount: '授权数量',
+  incrementType: {
+    0: '会员权益',
+    1: '场景下载',
   },
-  equityType:{
-    0:'专业会员(年)',
-    1:'专业会员(年)',
-    2:'专业会员(年)',
-    3:'高级会员(月)',
+  equityType: {
+    0: '专业会员(年)',
+    1: '专业会员(年)',
+    2: '专业会员(年)',
+    3: '高级会员(月)',
   },
-  zhTips:'不支持中文字符',
-  listTitle:'销售统计列表',
-  exportExcel:'导出excel',
-  excelTitle:'确定导出excel?',
+  zhTips: '不支持中文字符',
+  listTitle: '销售统计列表',
+  exportExcel: '导出excel',
+  excelTitle: '确定导出excel?',
   CardMajorNum: '上月销售专业会员(年)',
   CardHighNum: '上月销售高级会员(月)',
   CardDownNum: '上月销售场景下载',
-  syks:'剩余可售',
-  addcount:'新增次数',
-  rules:{
-    userName:'请输入用户账号',
-    userName1:'请输入正确的用户账号',
-    userName2:'该账号不存在',
+  syks: '剩余可售',
+  addcount: '新增次数',
+  rules: {
+    userName: '请输入用户账号',
+    userName1: '请输入正确的用户账号',
+    userName2: '该账号不存在',
     id: '请输入正确的权益ID',
-},
-  unit:{
-    1:'个',
-    2:'次',
-    '-1':'年',
-    '-2':'月',
-    '-3':'个月',
   },
-  titleHelpMessage:{
-    1:'统计规则:',
-    2:'1、会员权益:统计当前经销商新授权的记录、以及相关权益ID续费记录,包括经销商授权和续费、平台授权(续费)、官网自购(续费);',
-    3:'2、场景下载:统计当前经销售新授权(除相关用户)的下载次数;',
+  unit: {
+    1: '个',
+    2: '次',
+    '-1': '年',
+    '-2': '月',
+    '-3': '个月',
   },
-  totalTime:'期限',
-  totalMessge:'剩余可售权益不足',
-  operationType:'操作类型',
-  operationUserName:'操作用户',
-  operationTime:'操作时间',
-  incrementId:'权益ID',
+  titleHelpMessage: {
+    1: '统计规则:',
+    2: '1、会员权益:统计当前经销商新授权的记录、以及相关权益ID续费记录,包括经销商授权和续费、平台授权(续费)、官网自购(续费);',
+    3: '2、场景下载:统计当前经销售新授权(除相关用户)的下载次数;',
+  },
+  totalTime: '期限',
+  totalMessge: '剩余可售权益不足',
+  operationType: '操作类型',
+  operationUserName: '操作用户',
+  operationTime: '操作时间',
+  incrementId: '权益ID',
   platform: '平台',
-  operation:{
-    0:'授权权益',
-    1:'解除权益',
-    2:'绑定相机',
-    3:'解绑相机',
+  operation: {
+    0: '授权权益',
+    1: '解除权益',
+    2: '绑定相机',
+    3: '解绑相机',
   },
-  jjxs:'即将销售',
-}
-
+  jjxs: '即将销售',
+};

+ 2 - 2
src/router/routes/modules/account.ts

@@ -13,7 +13,7 @@ export const Device: AppRouteRecordRaw = {
     icon: 'uil:user-md',
     orderNo: 6,
     hideChildrenInMenu: true,
-    roles: [RoleEnum.SUPER, RoleEnum.TEST],
+    roles: [RoleEnum.SUPER, RoleEnum.TEST, RoleEnum.LEVEL2],
   },
   children: [
     {
@@ -23,7 +23,7 @@ export const Device: AppRouteRecordRaw = {
       meta: {
         title: t('routes.dashboard.account'),
         hideBreadcrumb: true,
-        roles: [RoleEnum.SUPER, RoleEnum.TEST],
+        roles: [RoleEnum.SUPER, RoleEnum.TEST, RoleEnum.LEVEL2],
       },
     },
     {

+ 1 - 1
src/store/modules/user.ts

@@ -186,7 +186,7 @@ export const useUserStore = defineStore({
       this.setToken(undefined);
       this.setSessionTimeout(false);
       this.setUserInfo(null);
-      goLogin && router.push(PageEnum.BASE_LOGIN);
+      // goLogin && router.push(PageEnum.BASE_LOGIN);
     },
 
     /**

+ 39 - 3
src/views/device/index.vue

@@ -3,7 +3,19 @@
     <div class="desc-wrap-BasicTable">
       <BasicTable @register="registerTable">
         <template #toolbar>
-          <a-button type="primary" v-if="hasPermission([RoleEnum.SUPER, RoleEnum.TEST, RoleEnum.LEVEL2])" @click="handleAdd"> {{t('routes.retailer.allff')}}</a-button>
+          <a-button
+            v-if="hasPermission([RoleEnum.SUPER, RoleEnum.TEST, RoleEnum.LEVEL2])"
+            @click="getTemplate"
+          >
+            {{ t('routes.device.export') }}</a-button
+          >
+          <a-button
+            type="primary"
+            v-if="hasPermission([RoleEnum.SUPER, RoleEnum.TEST, RoleEnum.LEVEL2])"
+            @click="handleAdd"
+          >
+            {{ t('routes.retailer.allff') }}</a-button
+          >
         </template>
         <template #action="{ record }">
           <TableAction
@@ -55,6 +67,7 @@
   import { useLocaleStore } from '/@/store/modules/locale';
   import { dincrementList } from '/@/api/equity';
   import { useUserStore } from '/@/store/modules/user';
+  import { downCameraExport } from '/@/api/customer';
   import distributeModal from './distributeModal.vue';
   export default defineComponent({
     components: {
@@ -124,7 +137,7 @@
           // ifShow: hasPermission([RoleEnum.SUPER]),
           customRender({ record }) {
             return record.subAgentName || '-';
-          }
+          },
         },
         {
           title: t('routes.retailer.activatedTime'),
@@ -323,6 +336,21 @@
               xxl: 8,
             },
           },
+
+          {
+            field: 'outTime',
+            label: t('routes.device.activatedTime'),
+            component: 'RangePicker',
+            componentProps: {
+              maxLength: 100,
+              valueFormat: 'YYYY-MM-DD',
+              format: 'YYYY-MM-DD',
+            },
+            colProps: {
+              xl: 7,
+              xxl: 7,
+            },
+          },
         ],
       };
       const [registerTable, { reload }] = useTable({
@@ -350,7 +378,7 @@
         actionColumn: {
           width: 150,
           title: t('common.operating'),
-          ifShow: hasPermission([RoleEnum.SUPER, RoleEnum.TEST,RoleEnum.LEVEL2]),
+          ifShow: hasPermission([RoleEnum.SUPER, RoleEnum.TEST, RoleEnum.LEVEL2]),
           dataIndex: 'action',
           slots: { customRender: 'action' },
         },
@@ -380,6 +408,13 @@
           },
         });
       }
+      async function getTemplate() {
+        try {
+          const res = await downCameraExport();
+        } catch (error) {
+          console.log('not passing', error);
+        }
+      }
       function handleAdd() {
         openModal(true, {});
       }
@@ -387,6 +422,7 @@
         openModal(true, record);
       }
       return {
+        getTemplate,
         registerTable,
         headleUnbind,
         reload,

+ 4 - 2
src/views/empower/batchModal.vue

@@ -24,7 +24,9 @@
   import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
   import { useMessage } from '/@/hooks/web/useMessage';
   // import { sceneMove } from '/@/api/operate';
-  import { uploadAuthModelExcel, downTemplate } from '/@/api/customer';
+  import { uploadAuthModelExcel } from '/@/api/customer';
+  import { downTemplate } from '/@/api/retailer';
+
   import { useI18n } from '/@/hooks/web/useI18n';
   import { downloadByData } from '/@/utils/file/download'
   const { t } = useI18n();
@@ -116,7 +118,7 @@
       }
       async function getTemplate() {
         try {
-          await downTemplate({ type: 1 });
+          await downTemplate({ type: 1, filename: t('routes.empower.pldr') + '.xlsx' });
         } catch (error) {
           console.log('not passing', error);
         }

+ 14 - 0
src/views/finance/data.tsx

@@ -29,6 +29,11 @@ export const columns: BasicColumn[] = [
     },
   },
   {
+    title: t('routes.equity.orderSn1'),
+    dataIndex: 'orderSn',
+    width: 150,
+  },
+  {
     title: t('routes.equity.Type'),
     dataIndex: 'type',
     width: 120,
@@ -188,6 +193,15 @@ export const searchForm: Partial<FormProps> = {
       },
     },
     {
+      field: 'orderSn',
+      component: 'Input',
+      label: t('routes.equity.orderSn1'),
+      colProps: {
+        xl: 6,
+        xxl: 6,
+      },
+    },
+    {
       field: 'timeList',
       label: t('routes.equity.timeList'),
       component: 'RangePicker',