tangning 2 سال پیش
والد
کامیت
f0d78db37e

+ 1 - 1
.env

@@ -2,7 +2,7 @@
 VITE_PORT = 3100
 
 # spa-title
-VITE_GLOB_APP_TITLE = 四维时代管理后台
+VITE_GLOB_APP_TITLE = 四维时代经销商管理系统
 
 # spa shortname
 VITE_GLOB_APP_SHORT_NAME = 4DAGE

+ 1 - 1
src/api/customer/index.ts

@@ -7,7 +7,7 @@ enum Api {
   companyAdd = '/service/manage/company/add',
   companyUpdate = '/service/manage/company/update',
   companyDelete = '/service/manage/company/delete',
-  cameraList = '/service/agent/camera',
+  cameraList = '/service/agent/camera/list',
   companyUploadExcel = '/service/manage/excel/uploadExcel',
   downTemplate = '/service/manage/excel/downTemplate',
 }

+ 2 - 0
src/locales/lang/en/common.ts

@@ -17,4 +17,6 @@ export default {
 
   light: 'Light',
   dark: 'Dark',
+  reminder:'reminder',
+  operating:'operation',
 };

+ 4 - 4
src/locales/lang/en/routes/dashboard.ts

@@ -3,8 +3,8 @@ export default {
   about: 'About',
   workbench: 'Workbench',
   analysis: 'Analysis',
-  equity:'权益管理',
-  scene:'场景管理',
-  finance:'结算统计',
-  devices: '设备管理',
+  devices: 'device management',
+  equity:'Equity management',
+  scene:'Scenario management',
+  finance:'Settlement statistics',
 };

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

@@ -0,0 +1,17 @@
+export default {
+  snCode:'S/N',
+  wifiName:'Wifi',
+  deviceType:'Type',
+  activatedTime:'Time',
+  userName:'Account',
+  NoBind:'Unbound',
+  type:{
+    0:'Old binocular camera',
+    1:'4DKanKan',
+    2:'4DMinion',
+    3:'4DMega',
+    9:'4DMinion',
+    10:'4DMega',
+  },
+}
+

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

@@ -0,0 +1,45 @@
+export default {
+  add:'New Authorization',
+  addDowm:'New Download',
+  renew:'Renew',
+  userName:'User Account',
+  count:'User Account',
+  orderSn:'Order Number',
+  payTime:'Payment Time',
+  invoiceTime:'Invoicing application time',
+  money:'Invoiced Amount',
+  id:'EquityID',
+  timeList:'Time',
+  expiryTime: 'Expiry Date', 
+  newTime:'Latest authorization time',
+  time:'Start Date',
+  Type:'type',
+  giveType:'Authorization',
+  nickName:'Nickname',
+  userName1:'Account Number',
+  email:'Mailbox',
+  userCount:'Authorized quantity',
+  incrementType:{
+    0:'Membership Interests',
+    1:'Scene download',
+  },
+  equityType:{
+    0:'Professional member',
+    1:'Professional member',
+    2:'Senior member',
+  },
+  zhTips:'Chinese characters are not supported',
+  listTitle:'Sales Statistics List',
+  exportExcel:'Export Excel',
+  excelTitle:'Are you sure you want to export excel?',
+  CardMajorNum: 'Professional Members Last Month (Year)',
+  CardHighNum: 'Senior Members Last Month (Month)',
+  CardDownNum: 'Sales Scene Download Last Month',
+  unit:{
+    1:'individual',
+    2:'second',
+    '-1':'year',
+    '-2':'month',
+  }
+}
+

+ 25 - 0
src/locales/lang/en/routes/finance.ts

@@ -0,0 +1,25 @@
+export default {
+  deptName: 'Affiliated company',
+  userName: 'Full name',
+  nickName: 'Employee nickname',
+  setpaswd: 'Change Password',
+  mobile: 'Mobile phone',
+  permList: 'Equity',
+  userId: 'Account number',
+  createTime: 'Authorization Time',
+  updateTime: 'Modification Time',
+  staffList: 'Account List',
+  updateBtn: 'Change Password',
+  password: 'Change Password',
+  equityType: {
+    0: 'Professional Members (Years)',
+    1: 'Senior Members (Months)',
+    2: 'Scene Download',
+  },
+  giveType: {
+    0: 'Distributor Authorization',
+    1: 'Reseller Renewal',
+    2: 'Official Self-Purchase',
+    3: 'Platform Authorization',
+  },
+};

+ 33 - 0
src/locales/lang/en/routes/scene.ts

@@ -0,0 +1,33 @@
+export default {
+  tableType:{
+    0:'4DKanKan',
+    1:'4DMinion',
+    2:'4DMega',
+    3:'Old binocular camera',
+  },
+  transfer:'transfer',
+  copy:'copy',
+  down:'download',
+  canlenDown:'Cancel Download',
+  sceneName:'Scene Title',
+  num:'Scene code',
+  createTime:'Shooting time',
+  amount:'Calculation completion time',
+  snCode:'S/N',
+  sceneSize:'Scene Size',
+  userName:'Bind account',
+  viewCount:'Views',
+  status:'state',
+  statusType:{
+    '0':'In calculation',
+    '1':'Calculation succeeded',
+    '-2':'Calculation succeeded',
+    '-1':'Calculation failed',
+    '-3':'Sealing',
+  },
+  copyTipsTitle:'Copy Scene',
+  copyTipsText:'Copy the scene, and the scene belongs to the original camera<br/>Are you sure you want to copy the scene?',
+  copySccuse:'Copy succeeded',
+  deleteSccuse:'Deletion succeeded',
+  downErr:'Download failed',
+};

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

@@ -52,4 +52,5 @@ export default {
   userNick: '请输入员工名称',
   userCorrectNameNick: '请输入正确的员工名称',
   warning: '警告',
+  reminder:'温馨提示',
 };

+ 4 - 4
src/locales/lang/zh-CN/routes/dashboard.ts

@@ -13,9 +13,6 @@ export default {
   invoice: '发票管理',
   orderCamera: '相机订单',
   orderList: '订单管理',
-  equity:'权益管理',
-  scene:'场景管理',
-  finance:'结算统计',
   orderEquity: '权益订单',
   orderDownload: '下载订单',
   corporationAccount: '企业账号',
@@ -32,7 +29,6 @@ export default {
   scenesList: '场景列表',
   scenesLive: '直播',
   scenesRoom: '房间管理',
-  devices: '设备管理',
   product: '产品管理',
   firmware: '固件管理',
   account:'用户管理',
@@ -67,4 +63,8 @@ export default {
   customer: '客户管理',
   customerDevice: '客户设备',
   customerScene: '客户场景',
+  devices: '设备管理',
+  equity:'权益管理',
+  scene:'场景管理',
+  finance:'结算统计',
 };

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

@@ -0,0 +1,16 @@
+export default {
+  snCode:'SN码',
+  wifiName:'wifi名称',
+  deviceType:'设备类型',
+  activatedTime:'出库时间',
+  userName:'绑定账号',
+  NoBind:'未绑定',
+  type:{
+    0:'旧双目相机',
+    1:'四维看看',
+    2:'四维看见',
+    3:'四维深时',
+    9:'四维看见',
+    10:'四维深时',
+  },
+}

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

@@ -0,0 +1,45 @@
+export default {
+  add:'新增授权',
+  addDowm:'新增下载',
+  renew:'续费',
+  userName:'用户账号',
+  count:'用户账号',
+  orderSn:'订单号',
+  payTime:'支付时间',
+  invoiceTime:'开票申请时间',
+  money:'开票金额',
+  id:'权益ID',
+  timeList:'授权时间',
+  expiryTime: '到期日期', 
+  newTime:'最新授权时间',
+  time:'开始日期',
+  Type:'权益类型',
+  giveType:'授权方式',
+  nickName:'昵称',
+  userName1:'账号',
+  email:'邮箱',
+  userCount:'授权数量',
+  incrementType:{
+    0:'会员权益',
+    1:'场景下载',
+  },
+  equityType:{
+    0:'专业会员(年)',
+    1:'专业会员(年)',
+    2:'高级会员(月)',
+  },
+  zhTips:'不支持中文字符',
+  listTitle:'销售统计列表',
+  exportExcel:'导出excel',
+  excelTitle:'确定导出excel?',
+  CardMajorNum: '上月销售专业会员(年)',
+  CardHighNum: '上月销售高级会员(月)',
+  CardDownNum: '上月销售场景下载',
+  unit:{
+    1:'个',
+    2:'次',
+    '-1':'年',
+    '-2':'月',
+  }
+}
+

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

@@ -6,7 +6,7 @@ export default {
   mobile: '手机',
   permList: '权益',
   userId: '账号',
-  createTime: '创建时间',
+  createTime: '授权时间',
   updateTime: '修改时间',
   staffList: '账号列表',
   updateBtn: '修改密码',

+ 2 - 2
src/locales/lang/zh-CN/routes/product.ts

@@ -20,8 +20,8 @@ export default {
     1:'四维看看',
     2:'四维看见',
     3:'四维深时',
-    // 9:'四维看见',
-    // 10:'四维深时',
+    9:'四维看见',
+    10:'四维深时',
   },
   outType:{
     0:'正常销售',

+ 33 - 0
src/locales/lang/zh-CN/routes/scene.ts

@@ -0,0 +1,33 @@
+export default {
+  tableType:{
+    0:'四维看看',
+    1:'四维看见',
+    2:'四维深时',
+    3:'四维双目Lite',
+  },
+  transfer:'迁移',
+  copy:'复制',
+  down:'下载',
+  canlenDown:'取消下载',
+  sceneName:'场景标题',
+  num:'场景码',
+  createTime:'拍摄时间',
+  amount:'计算完成时间',
+  snCode:'SN码',
+  sceneSize:'场景大小',
+  userName:'绑定账号',
+  viewCount:'浏览量',
+  status:'状态',
+  statusType:{
+    '0':'计算中',
+    '1':'计算成功',
+    '-2':'计算成功',
+    '-1':'计算失败',
+    '-3':'封存',
+  },
+  copyTipsTitle:'复制场景',
+  copyTipsText:'复制场景,场景归属在原相机下。<br/>确定要复制场景吗?',
+  copySccuse:'复制成功',
+  deleteSccuse:'删除成功',
+  downErr:'下载失败',
+};

+ 0 - 39
src/router/routes/modules/dashboard.ts

@@ -1,39 +0,0 @@
-import type { AppRouteModule } from '/@/router/types';
-
-import { LAYOUT } from '/@/router/constant';
-import { t } from '/@/hooks/web/useI18n';
-
-const dashboard: AppRouteModule = {
-  path: '/dashboard',
-  name: 'Dashboard',
-  component: LAYOUT,
-  redirect: '/dashboard/analysis',
-  meta: {
-    orderNo: 1,
-    icon: 'ion:grid-outline',
-    title: t('routes.dashboard.dashboard'),
-    hideMenu:false,
-    hideChildrenInMenu: false,
-  },
-  children: [
-    {
-      path: 'analysis',
-      name: 'Analysis',
-      component: () => import('/@/views/dashboard/analysis/index.vue'),
-      meta: {
-        // affix: true,
-        title: t('routes.dashboard.analysis'),
-      },
-    },
-    {
-      path: 'workbench',
-      name: 'Workbench',
-      component: () => import('/@/views/dashboard/workbench/index.vue'),
-      meta: {
-        title: t('routes.dashboard.workbench'),
-      },
-    },
-  ],
-};
-
-export default dashboard;

+ 21 - 120
src/views/device/index.vue

@@ -2,43 +2,8 @@
   <PageWrapper contentBackground>
     <div class="desc-wrap-BasicTable">
       <BasicTable @register="registerTable">
-        <!--<template #toolbar>
-          <a-button type="primary" @click="put" v-if="getCheckPerm('device-in')"> 入库</a-button>
-          <a-button type="primary" @click="batchPut" v-if="getCheckPerm('device-all-in')"> 批量入库</a-button>
-          <a-button type="primary" @click="batchOutflow" v-if="getCheckPerm('device-all-out')">批量出库</a-button>
-        </template>
-         <template #action="{ record }">
-          <TableAction
-            stopButtonPropagation
-            :actions="[
-              {
-                label: '删除',
-                color: 'error',
-                ifShow: getCheckPerm('device-delete') && !(Boolean(record.outType) || Boolean(record.userName)),
-                onClick: handleDelete.bind(null, record),
-              },{
-                label: '出库',
-                ifShow: getCheckPerm('device-out') && !Boolean(record.outType),
-                onClick: handleCheckout.bind(null, record),
-              },{
-                label: '编辑',
-                ifShow: getCheckPerm('device-update') && Boolean(record.outType),
-                onClick: handleEdit.bind(null, record),
-              },{
-                label: '解绑',
-                ifShow: getCheckPerm('device-unbind') && Boolean(record.userName),
-                color: 'error',
-                onClick: handleUnbind.bind(null, record),
-              },
-            ]"
-          />
-        </template> -->
       </BasicTable>
     </div>
-    <!-- <batchOutflowModal @register="registerLinkModal" @reload="reload" />
-    <detailModal @register="register" @reload="reload" />
-    <batchPutModal @register="registerPut" @reload="reload" />
-    <PutModal @register="registerEnter" @reload="reload" /> -->
   </PageWrapper>
 </template>
 <script lang="ts">
@@ -56,12 +21,7 @@
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { cameraList } from '/@/api/customer';
-  import { cameraDelete } from '/@/api/device'
-  // import batchOutflowModal from './OutflowModal.vue';
-  // import detailModal from './detailsMoadl.vue';
-  // import batchPutModal from './batchPutModal.vue';
-  // import PutModal from './putModal.vue';
-  import { useModal } from '/@/components/Modal';
+  import { cameraDelete } from '/@/api/device';
   import { useRouter } from 'vue-router';
   import { UnbindCameraApi } from '/@/api/account';
   import { usePermissionStore } from '/@/store/modules/permission';
@@ -71,10 +31,6 @@
       TableAction,
       PageWrapper,
       TableImg,
-      // batchOutflowModal,
-      // detailModal,
-      // batchPutModal,
-      // PutModal,
       [Descriptions.name]: Descriptions,
       [Descriptions.Item.name]: Descriptions.Item,
     },
@@ -83,10 +39,6 @@
       const { createMessage, createConfirm } = useMessage();
       const permissionStore = usePermissionStore();
       const { getCheckPerm } = permissionStore;
-      // const [registerLinkModal, { openModal: openLinkModal }] = useModal();
-      // const [register, { openModal }] = useModal();
-      // const [registerPut, { openModal:openModalPut }] = useModal();
-      // const [registerEnter, { openModal:openModalEnter }] = useModal();
       const router = useRouter();
       const companyId: Number = router.currentRoute.value.params.id - 0;
       onMounted(() => {
@@ -94,68 +46,57 @@
       });
       const columns: BasicColumn[] = [
         {
-          title: 'SN码',
+          title: t('routes.device.snCode'),
           dataIndex: 'snCode',
           width: 180,
         },
         {
-          title: 'wifi名称',
+          title: t('routes.device.wifiName'),
           dataIndex: 'wifiName',
           width: 150,
         },
         {
-          title: '设备类型',
+          title: t('routes.device.deviceType'),
           dataIndex: 'type',
           ellipsis: false,
           width: 80,  
           customRender: ({ record }) => {
             let typeObj ={
-              '0':'旧双目相机',
-              '1':'四维看看',
-              '2':'四维看看lite',
-              '9':'四维看见',
-              '10':'四维深时',
+              '0':t('routes.device.type.0'),
+              '1':t('routes.device.type.1'),
+              '2':t('routes.device.type.2'),
+              '9':t('routes.device.type.9'),
+              '10':t('routes.device.type.10'),
             }
             return typeObj[record.type]
           }        
         },
 
         {
-          title: '出库时间',
+          title: t('routes.device.activatedTime'),
           dataIndex: 'activatedTime',
           width: 180,
         },
         {
-          title: '绑定账号',
+          title: t('routes.device.activatedTime'),
           dataIndex: 'userName',
           width: 180,
           customRender({ record }) {
-            return record.userName?record.userName:'未绑定'
+            return record.userName?record.userName:t('routes.device.activatedTime')
           },
         },
-        {
-          title: '操作',
-          dataIndex: 'action',
-          slots: { customRender: 'action' },
-          ifShow: true,
-          fixed: 'right',
-          flag: 'ACTION',
-          width: 120,
-        },
       ];
       const searchForm: Partial<FormProps> = {
         labelWidth: 80,
-        // showAdvancedButton: true,
         autoAdvancedLine:1,
         actionColOptions: {
           span: 24,
         },
-        // compact: true,
         schemas: [
           {
             field: 'snCode',
             component: 'Input',
-            label: 'SN码',
+            label: t('routes.device.snCode'),
             colProps: {
               xl: 6,
               xxl: 6,
@@ -163,7 +104,7 @@
           },{
             field: 'type',
             component: 'Select',
-            label: '设备类型',
+            label: t('routes.device.deviceType'),
             colProps: {
               xl: 6,
               xxl: 6,
@@ -171,19 +112,19 @@
             componentProps: {
               options: [
                 {
-                  label: t('routes.product.type.0'),
+                  label: t('routes.device.type.0'),
                   value: 0,
                   key: '0',
                 },{
-                  label: t('routes.product.type.1'),
+                  label: t('routes.device.type.1'),
                   value: 1,
                   key: '1',
                 },{
-                  label: t('routes.product.type.2'),
+                  label: t('routes.device.type.2'),
                   value: 9,
                   key: '9',
                 },{
-                  label: t('routes.product.type.3'),
+                  label: t('routes.device.type.3'),
                   value: 10,
                   key: '10',
                 },
@@ -193,7 +134,7 @@
           {
             field: 'userName',
             component: 'Input',
-            label: '绑定账号',
+            label: t('routes.device.userName'),
             colProps: {
               xl: 6,
               xxl: 6,
@@ -203,10 +144,7 @@
       };
       const [registerTable, { reload }] = useTable({
         api: cameraList,
-        // title: '四维深时场景列表',
-        // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
-        // rowSelection: { type: 'checkbox',onChange: onSelectChange },
         searchInfo: { companyId },
         useSearchForm: true,
         formConfig: searchForm,
@@ -231,7 +169,7 @@
       async function handleUnbind(record: Recordable) {
         createConfirm({
           iconType: 'warning',
-          title: () => h('span', '温馨提示'),
+          title: () => h('span', t('common.optSuccess')),
           content: '解绑后用户将看不到该相机拍摄的场景。<br/>确定解绑吗?',
           onOk: async () => {
             await UnbindCameraApi({cameraId:record.id})
@@ -243,7 +181,7 @@
       async function handleDelete(record: Recordable){
         createConfirm({
           iconType: 'warning',
-          title: () => h('span', '温馨提示'),
+          title: () => h('span', t('common.optSuccess')),
           content: '删除设备后需要重新入库<br/>确定删除吗?',
           onOk: async () => {
             await cameraDelete({id:record.id})
@@ -252,46 +190,9 @@
           },
         });
       }
-
-      // function deviceLink() {
-      //   openLinkModal(true);
-      // }
-      // function handleCheckout(record: Recordable) {
-      //   openModal(true, {
-      //     ...record,
-      //     isUpdate: false,
-      //   });
-      // }
-      // function handleEdit(record: Recordable) {
-      //   openModal(true, {
-      //     ...record,
-      //     isUpdate: true,
-      //   });
-      // }
-      // function put() {
-      //   openModalEnter(true)
-      // }
-      // function batchPut() {
-      //   console.log('批量入库');
-      //   openModalPut(true, {})
-      // }
-      // function batchOutflow() {
-      //   console.log('批量出库');
-      //   openLinkModal(true, {})
-      // }
       return {
         registerTable,
         handleUnbind,
-        // deviceLink,
-        // registerLinkModal,
-        // register,
-        // registerEnter,
-        // put,
-        // batchPut,
-        // batchOutflow,
-        // handleEdit,
-        // handleCheckout,
-        // registerPut,
         reload,
         handleDelete,
         getCheckPerm,

+ 4 - 5
src/views/equity/EditModal.vue

@@ -4,8 +4,6 @@
     @register="register"
     title="续费"
     height="500"
-    :showOkBtn="false"
-    :showCancelBtn="false"
     @visible-change="handleVisibleChange"
     @cancel="resetFields"
     @ok="handleSubmit"
@@ -56,7 +54,7 @@
               span: 24,
             },
           },{
-            field: 'invoiceNum',
+            field: 'id',
             component: 'Input',
             label: '权益ID',
             slot: 'text',
@@ -98,11 +96,12 @@
       });
       async function onDataReceive(data) {
         resetFields();
-        let detail = await InvoiceDetail({id:data.id})
+        // let detail = await InvoiceDetail({id:data.id})
+        console.log('InvoiceDetail',data)
         fileFlow.type = data.type
         setFieldsValue({
           ...data,
-          ...detail,
+          // ...detail,
         });
       }
       const handleSubmit = async () => {

+ 2 - 9
src/views/equity/InvoiceModal.vue

@@ -2,8 +2,7 @@
   <BasicModal
     v-bind="$attrs"
     @register="register"
-    title="新增授权"
-    :okText="okText"
+    :title="t('routes.equity.add')"
     @visible-change="handleVisibleChange"
     @cancel="resetFields"
     @ok="handleSubmit"
@@ -18,14 +17,11 @@
   </BasicModal>
 </template>
 <script lang="ts">
-  import { defineComponent, nextTick, onMounted, reactive, ref, computed } from 'vue';
+  import { defineComponent, nextTick, onMounted, reactive, computed } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
   import { useMessage } from '/@/hooks/web/useMessage';
-  import { InvoiceRegister } from '/@/api/order';
   import { useI18n } from '/@/hooks/web/useI18n';
-  import { uploadApi } from '/@/api/product/index';
-  import { ResultEnum } from '/@/enums/httpEnum';
   import { dincrementList, checkUserName, addApi } from '/@/api/equity'
   import { useUserStore } from '/@/store/modules/user';
   import dayjs from 'dayjs';
@@ -42,7 +38,6 @@
         file:null,
         type:2,//2-普通发票,3-专用发票
       })
-      const okText = ref('发送')
       const userStore = useUserStore();
       const { createMessage } = useMessage();
       const agent = computed(() => userStore.getAgent);
@@ -174,7 +169,6 @@
         resetFields();
         fileFlow.type = data.type
         setFieldsValue(data);
-        okText.value = fileFlow.type == 2?'发送':'确认'
         updateSchema([
           {field: 'shipNum',ifShow:fileFlow.type == 3,},
           {field: 'email',ifShow:fileFlow.type == 2,},
@@ -204,7 +198,6 @@
         handleSubmit,
         addListFunc,
         resetFields,
-        okText,
         t,
       };
     },

+ 60 - 118
src/views/equity/data.tsx

@@ -22,172 +22,114 @@ export const columnsDown: BasicColumn[] = [
 ];
 export const columns: BasicColumn[] = [
   {
-    title: '订单号',
-    dataIndex: 'orderSn',
+    title: t('routes.equity.id'),
+    dataIndex: 'id',
     ellipsis: false,
     width: 180,
+  },{
+    title: t('routes.equity.userName'),
+    dataIndex: 'userName',
+    ellipsis: false,
+    width: 180,
+  },{
+    title: t('routes.equity.Type'),
+    dataIndex: 'incrementTypeId',
+    width: 120,
+    customRender: ({ record }) => {
+        return t(`routes.equity.equityType.${record.incrementTypeId}`);
+    },
   },
   {
-    title: '支付时间',
-    dataIndex: 'payTime',
+    title: t('routes.equity.time'),
+    dataIndex: 'incrementStartTime',
     width: 150,
     customRender: ({ record }) => {
       return (
-        record.payTime &&
+        record.incrementStartTime &&
         h(Time, {
-          value: record.payTime,
+          value: record.incrementStartTime,
           mode: 'datetime',
         })
       );
     },
   },
   {
-    title: '开票申请时间',
-    dataIndex: 'invoiceTime',
+    title: t('routes.equity.expiryTime'),
+    dataIndex: 'incrementEndTime',
     width: 150,
     customRender: ({ record }) => {
       return (
-        record.invoiceTime &&
+        record.incrementEndTime &&
         h(Time, {
-          value: record.invoiceTime,
+          value: record.incrementEndTime,
           mode: 'datetime',
         })
       );
     },
   },
   {
-    title: '开票金额',
-    dataIndex: 'money',
-    width: 80,
-  },
-  {
-    title: '开票类型',
-    dataIndex: 'type',
-    width: 80,
-    customRender: ({ record }) => {
-      if (record.type == 2) {
-        return '普通发票';
-      } else {
-        return '专用发票';
-      }
-    },
-  },
-  {
-    title: '发票抬头',
-    dataIndex: 'title',
-    // slots: { customRender: 'orderType' },
-    width: 150,
-  },
-  {
-    title: '纳税人识别号',
-    dataIndex: 'code',
-    // slots: { customRender: 'orderStatus' },
-    width: 180,
-  },
-  {
-    title: '注册地址',
-    dataIndex: 'organizedAddress',
-    // slots: { customRender: 'orderStatus' },
-    width: 180,
-  },
-  {
-    title: '注册电话',
-    dataIndex: 'registerPhone',
-    // slots: { customRender: 'orderStatus' },
-    width: 120,
-  },
-  {
-    title: '开户银行',
-    dataIndex: 'bankName',
-    // slots: { customRender: 'orderStatus' },
-    width: 150,
-  },
-  {
-    title: '银行账号',
-    dataIndex: 'bankAccount',
-    // slots: { customRender: 'orderStatus' },
-    width: 130,
-  },
-  {
-    title: '收件人姓名',
-    dataIndex: 'shipName',
-    // slots: { customRender: 'orderStatus' },
-    width: 120,
-  },
-  {
-    title: '收件人电话',
-    dataIndex: 'shipMobile',
-    // slots: { customRender: 'orderStatus' },
-    width: 110,
-  },
-  {
-    title: '收货地址',
-    dataIndex: 'shipAddress',
-    // slots: { customRender: 'orderStatus' },
-    width: 130,
-  },
-  {
-    title: '邮箱',
-    dataIndex: 'email',
-    // slots: { customRender: 'orderStatus' },
+    title: t('routes.equity.newTime'),
+    dataIndex: 'invoiceTime',
     width: 150,
-  },
-  {
-    title: '状态',
-    dataIndex: 'invoiced',
-    // slots: { customRender: 'orderStatus' },
-    width: 80,
     customRender: ({ record }) => {
-      if (record.invoiced == 0) {
-        return '未开票';
-      } else {
-        return '已开票';
-      }
+      return (
+        record.updateTime &&
+        h(Time, {
+          value: record.updateTime,
+          mode: 'datetime',
+        })
+      );
     },
-  },
+  }
 ];
 export const searchForm: Partial<FormProps> = {
   labelWidth: 100,
   schemas: [
     {
-      field: 'invoiceTime',
-      label: '开票申请时间',
-      component: 'RangePicker',
+      field: 'id',
+      label: t('routes.equity.id'),
+      component: 'Input',
       componentProps: {
         maxLength: 100,
-        valueFormat: 'YYYY-MM-DD',
-        format: 'YYYY-MM-DD',
       },
       colProps: {
-        xl: 7,
-        xxl: 7,
+        xl: 6,
+        xxl: 6,
       },
     },
     {
-      field: 'payTime',
-      label: '支付时间',
-      component: 'RangePicker',
+      field: 'userName',
+      label: t('routes.equity.userName'),
+      component: 'Input',
       componentProps: {
         maxLength: 100,
-        valueFormat: 'YYYY-MM-DD',
-        format: 'YYYY-MM-DD',
       },
       colProps: {
-        xl: 7,
-        xxl: 7,
+        xl: 6,
+        xxl: 6,
       },
     },
     {
-      field: 'orderSn',
-      label: '订单号',
-      component: 'Input',
-      componentProps: {
-        maxLength: 100,
-      },
+      field: 'incrementTypeId',
+      component: 'Select',
+      label: t('routes.equity.Type'),
       colProps: {
         xl: 6,
         xxl: 6,
       },
+      componentProps: {
+        options: [
+          {
+            label: t('routes.equity.equityType.0'),
+            value: 0,
+            key: '0',
+          },{
+            label: t('routes.equity.equityType.1'),
+            value: 1,
+            key: '1',
+          }
+        ],
+      },
     },
   ],
 };
@@ -195,7 +137,7 @@ export const DownSchemas: Partial<FormProps> = {
   labelWidth: 100,
   schemas: [{
     field: 'userName',
-    label: '用户账号',
+    label: t('routes.equity.userName'),
     component: 'Input',
     componentProps: {
       maxLength: 100,
@@ -207,7 +149,7 @@ export const DownSchemas: Partial<FormProps> = {
   },
   {
     field: 'timeList',
-    label: '支付时间',
+    label: t('routes.equity.timeList'),
     component: 'RangePicker',
     componentProps: {
       maxLength: 100,

+ 9 - 22
src/views/equity/index.vue

@@ -2,18 +2,18 @@
   <PageWrapper contentBackground>
     <template #footer>
       <a-tabs v-model:activeKey="incrementTypeId" @change="changeTable">
-        <a-tab-pane :key="0" tab="会员权益" >
+        <a-tab-pane :key="0" :tab="t('routes.equity.incrementType.0')" >
           <div class="desc-wrap-BasicTable">
             <BasicTable @register="registerTable">
               <template #toolbar>
-                <a-button type="primary" @click="handleInvoice"> 新增授权</a-button>
+                <a-button type="primary" @click="handleInvoice"> {{t('routes.equity.add')}}</a-button>
               </template>
               <template #action="{ record }">
                   <TableAction
                     stopButtonPropagation
                     :actions="[
                       {
-                        label: '续费',
+                        label: t('routes.equity.renew'),
                         //icon: 'la:file-invoice-dollar',
                         onClick: headleDetails.bind(null, record),
                       }
@@ -23,11 +23,11 @@
             </BasicTable>
           </div>
         </a-tab-pane>
-        <a-tab-pane :key="1" tab="场景下载" >
+        <a-tab-pane :key="1" :tab="t('routes.equity.incrementType.1')" >
           <div class="desc-wrap-BasicTable">
             <BasicTable @register="registerDownTable">
               <template #toolbar>
-                <a-button type="primary" @click="handleInvoice"> 新增下载</a-button>
+                <a-button type="primary" @click="handleInvoice"> {{t('routes.equity.addDowm')}}</a-button>
               </template>
             </BasicTable>
           </div>
@@ -40,15 +40,13 @@
   </PageWrapper>
 </template>
 <script lang="ts">
-  import { defineComponent, h, reactive, ref, computed } from 'vue';
+  import { defineComponent, reactive, ref, computed } from 'vue';
   import { BasicTable, useTable, TableAction, TableImg } from '/@/components/Table';
   import { PageWrapper } from '/@/components/Page';
   import { useModal } from '/@/components/Modal';
   import { Descriptions,Tabs } from 'ant-design-vue';
   import { useI18n } from '/@/hooks/web/useI18n';
-  import { useMessage } from '/@/hooks/web/useMessage';
   import { listApi, dowmListApi } from '/@/api/equity'
-  import { downloadByData } from '/@/utils/file/download'
   import { useUserStore } from '/@/store/modules/user';
   import { searchForm, columns, columnsDown, DownSchemas } from './data'
   import AddModal from './InvoiceModal.vue';
@@ -95,7 +93,6 @@
         orderBy: '',
         sortBy: '',
       });
-      const { createMessage, createConfirm } = useMessage();
       const [registerAddModal, { openModal: openAddModal }] = useModal();
       const [registerDownModal, { openModal: openDownModal }] = useModal();
       const [registerEditModal, { openModal: openEditModal }] = useModal();
@@ -108,7 +105,7 @@
         formConfig: searchForm,
         showTableSetting: true,
         showIndexColumn:false,
-        searchInfo: { incrementTypeId:0 },
+        // searchInfo: { incrementTypeId:0 },
         rowKey: 'id',
         fetchSetting: {
           pageField: 'pageNum',
@@ -118,7 +115,7 @@
         },
         actionColumn: {
           width: 100,
-          title: '操作',
+          title: t('common.operating'),
           fixed: 'right',
           dataIndex: 'action',
           slots: { customRender: 'action' },
@@ -178,16 +175,6 @@
       }
 
     }
-    function exportExcel() {
-        createConfirm({
-          iconType: 'warning',
-          title: () => h('span', '温馨提示'),
-          content: () => h('span', '确定导出当前发票所有记录?'),
-          onOk: async () => {
-           await InvoiceExport(apiData);
-          },
-        });
-      }
       return {
         registerTable,
         registerDownTable,
@@ -195,7 +182,6 @@
         registerAddModal,
         registerEditModal,
         handleInvoice,
-        exportExcel,
         handleEdit,
         headleDetails,
         reload,
@@ -204,6 +190,7 @@
         incrementTypeId,
         getCheckPerm,
         registerDownModal,
+        t,
       };
     },
   });

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

@@ -8,21 +8,21 @@ const { t } = useI18n();
 export const columns: BasicColumn[] = [
         
   {
-    title: '授权时间',
-    dataIndex: 'creatTime',
+    title: t('routes.equity.timeList'),
+    dataIndex: 'createTime',
     width: 150,
     customRender: ({ record }) => {
       return (
-        record.payTime &&
+        record.createTime &&
         h(Time, {
-          value: record.payTime,
+          value: record.createTime,
           mode: 'datetime',
         })
       );
     },
   },
   {
-    title: '权益类型',
+    title: t('routes.equity.Type'),
     dataIndex: 'type',
     width: 150,
     customRender:({record})=>{
@@ -30,29 +30,29 @@ export const columns: BasicColumn[] = [
   }
   },
   {
-    title: '昵称',
+    title: t('routes.equity.nickName'),
     dataIndex: 'nickName',
     width: 80,
   },
   {
-    title: '账号',
+    title: t('routes.equity.userName1'),
     dataIndex: 'userName',
     width: 80,
   },
   {
-    title: '邮箱',
+    title: t('routes.equity.email'),
     dataIndex: 'email',
     // slots: { customRender: 'orderType' },
     width: 150,
   },
   {
-    title: '授权数量',
+    title: t('routes.equity.userCount'),
     dataIndex: 'count',
     // slots: { customRender: 'orderStatus' },
     width: 180,
   },
   {
-    title: '授予方式',
+    title: t('routes.equity.giveType'),
     dataIndex: 'giveType',
     // slots: { customRender: 'orderStatus' },
     width: 180,
@@ -66,7 +66,7 @@ export const searchForm: Partial<FormProps> = {
   schemas: [
     {
       field: 'giveType',
-      label: '权益类型',
+      label: t('routes.equity.Type'),
       component: 'Select',
       componentProps: {
         options: [
@@ -91,7 +91,7 @@ export const searchForm: Partial<FormProps> = {
       },
     },{
       field: 'giveType',
-      label: '授权方式',
+      label: t('routes.equity.giveType'),
       component: 'Select',
       componentProps: {
         options: [
@@ -120,7 +120,7 @@ export const searchForm: Partial<FormProps> = {
       },
     },{
       field: 'timeList',
-      label: '授权时间',
+      label: t('routes.equity.timeList'),
       component: 'RangePicker',
       componentProps: {
         maxLength: 100,
@@ -162,7 +162,7 @@ export const InvoiceSchemas: FormSchema[] = [
           }
           if(/.*[\u4e00-\u9fa5]+.*$/.test(value)){
             /* eslint-disable-next-line */
-            return Promise.reject('不支持中文字符');
+            return Promise.reject(t('routes.equity.zhTips'));
           }
           return Promise.resolve();
         },

+ 14 - 14
src/views/finance/index.vue

@@ -3,7 +3,7 @@
     <GrowCard :loading="loading" class="enter-y" :list="growCardList" />
     <BasicTable @register="registerTable">
       <template #toolbar>
-        <a-button type="primary" @click="exportExcel" > 导出excel</a-button>
+        <a-button type="primary" @click="exportExcel" > {{t('routes.equity.exportExcel')}}</a-button>
       </template>
     </BasicTable>
     <AddModal @update="reload" @register="registerAddModal" />
@@ -20,7 +20,6 @@ import { Descriptions } from 'ant-design-vue';
 import { useI18n } from '/@/hooks/web/useI18n';
 import { useMessage } from '/@/hooks/web/useMessage';
 import { logData, logList, DownExport } from '/@/api/finance';
-import { downloadByData } from '/@/utils/file/download';
 import { searchForm, columns } from './data';
 import AddModal from './InvoiceModal.vue';
 import EditModal from './EditModal.vue';
@@ -62,29 +61,29 @@ export default defineComponent({
       const {lastDownNum = 0,lastHighNum = 0,lastMajorNum = 0} = await logData({})
       loading.value = false
       growCardList.value = [{
-        title: '上月销售专业会员(年)',
+        title: t('routes.equity.CardMajorNum'),
         // icon: 'fa6-solid:users-gear',
         icon: 'visit-count|svg',
         value: lastMajorNum || 0,
-        unit: '个',
+        unit: t('routes.equity.unit.1'),
         color: 'green',
-        action: '年',
+        action: t('routes.equity.unit.-1'),
       },
       {
-        title: '上月销售高级会员(月)',
+        title:  t('routes.equity.CardHighNum'),
         icon: 'akar-icons:person-add',
         value: lastHighNum || 0,
-        unit: '个',
+        unit: t('routes.equity.unit.1'),
         color: 'blue',
-        action: '月',
+        action: t('routes.equity.unit.-2'),
       },
       {
-        title: '上月销售场景下载',
+        title: t('routes.equity.CardDownNum'),
         icon: 'carbon:user-role',
         value: lastDownNum || 0,
-        unit: '次',
+        unit: t('routes.equity.unit.2'),
         color: 'orange',
-        action: '月',
+        action: t('routes.equity.unit.-2'),
       },]
     });
     const permissionStore = usePermissionStore();
@@ -103,7 +102,7 @@ export default defineComponent({
     const [registerEditModal, { openModal: openEditModal }] = useModal();
     const [registerTable, { reload }] = useTable({
       api: logList,
-      title: '发票列表',
+      title: t('routes.equity.listTitle'),
       // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
       columns: columns,
       useSearchForm: true,
@@ -157,8 +156,8 @@ export default defineComponent({
     function exportExcel() {
       createConfirm({
         iconType: 'warning',
-        title: () => h('span', '温馨提示'),
-        content: () => h('span', '确定导出excel?'),
+        title: () => h('span', t('common.reminder')),
+        content: () => h('span', t('routes.equity.excelTitle')),
         onOk: async () => {
           await DownExport(apiData);
         },
@@ -177,6 +176,7 @@ export default defineComponent({
       getCheckPerm,
       loading,
       growCardList,
+      t,
     };
   },
 });

+ 34 - 45
src/views/scene/list.vue

@@ -2,10 +2,10 @@
   <PageWrapper contentBackground>
     <template #footer>
       <a-tabs v-model:activeKey="tableType" @change="changeTable">
-        <a-tab-pane :key="0" tab="四维看看" />
-        <a-tab-pane :key="1" tab="四维看见" />
-        <a-tab-pane :key="2" tab="四维深时" />
-        <a-tab-pane :key="3" tab="四维双目Lite" /> </a-tabs
+        <a-tab-pane :key="0" :tab="t('routes.scene.tableType.0')" />
+        <a-tab-pane :key="1" :tab="t('routes.scene.tableType.1')" />
+        <a-tab-pane :key="2" :tab="t('routes.scene.tableType.2')" />
+        <a-tab-pane :key="3" :tab="t('routes.scene.tableType.3')" /> </a-tabs
     ></template>
     <div class="desc-wrap-BasicTable">
       <BasicTable @register="registerTable">
@@ -22,12 +22,12 @@
             stopButtonPropagation
             :actions="[
               {
-                label: '迁移',
+                label: t('routes.scene.transfer'),
                 disabled:!(record.status == 1 || record.status == -2),
                 onClick: handleMove.bind(null, record),
               },
               {
-                label: '复制',
+                label: t('routes.scene.copy'),
                 disabled:!(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
                 onClick: handleCopy.bind(null, record),
               },
@@ -41,8 +41,8 @@
       @cancel="afterClose"
       @register="registerDownModal"
       @update="reload"
-      cancelText="取消下载"
-      okText="下载"
+      :cancelText="t('routes.scene.canlenDown')"
+      :okText="t('routes.scene.down')"
       @cancelDownload="cancelDownload"
       :okButtonProps="{ disabled: canDownload }"
     />
@@ -100,22 +100,21 @@
       const permissionStore = usePermissionStore();
       const { getCheckPerm } = permissionStore;
       const tableType = ref<Recordable>(0); //0看看 、1看见、2深时
-      const tabList = ref<Array>(['四维看看', '四维看见', '四维深时', '四维双目Lite']);
       const columns: BasicColumn[] = [
         {
-          title: '场景标题',
+          title: t('routes.scene.sceneName'),
           dataIndex: 'sceneName',
           slots: { customRender: 'href' },
           width: 150,
         },
         {
-          title: '场景码',
+          title: t('routes.scene.num'),
           dataIndex: 'num',
           ellipsis: true,
           width: 180,
         },
         {
-          title: '拍摄时间',
+          title: t('routes.scene.createTime'),
           dataIndex: 'createTime',
           width: 180,
           customRender: ({ record }) => {
@@ -129,7 +128,7 @@
           },
         },
         {
-          title: '计算完成时间',
+          title: t('routes.scene.amount'),
           dataIndex: 'amount',
           width: 180,
           customRender: ({ record }) => {
@@ -143,12 +142,12 @@
           },
         },
         {
-          title: 'SN码',
+          title: t('routes.scene.snCode'),
           dataIndex: 'snCode',
           width: 180,
         },
         {
-          title: '场景大小',
+          title: t('routes.scene.sceneSize'),
           dataIndex: 'sceneSize',
           width: 80,
           customRender: ({ record }) => {
@@ -160,40 +159,40 @@
           },
         },
         {
-          title: '绑定账号',
+          title: t('routes.scene.userName'),
           dataIndex: 'userName',
           width: 100,
         },
         {
-          title: '浏览量',
+          title: t('routes.scene.viewCount'),
           dataIndex: 'viewCount',
           width: 80,
         },
         {
-          title: '状态',
+          title: t('routes.scene.status'),
           dataIndex: 'status',
           width: 80,
           customRender: ({ record }) => {
             let str;
             switch (record.status - 0) {
               case 0:
-                str = '计算中';
+                str = t('routes.scene.statusType.0')
                 break;
               case 1:
-                str = '计算成功';
+                str = t('routes.scene.statusType.1')
                 break;
               case -2:
-                str = '计算成功';
+                str = t('routes.scene.statusType.-2')
                 break;
               case -1:
-                str = '计算失败';
+                str = t('routes.scene.statusType.-1')
                 break;
             }
-            return record.payStatus == -2 ? '封存' : str;
+            return record.payStatus == -2 ? t('routes.scene.statusType.-3') : str;
           },
         },
         {
-          title: '操作',
+          title: t('common.operating'),
           dataIndex: 'action',
           slots: { customRender: 'action' },
           ifShow: true,
@@ -207,7 +206,7 @@
         schemas: [
           {
             field: 'sceneName',
-            label: '场景标题',
+            label: t('routes.scene.sceneName'),
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -219,7 +218,7 @@
           },
           {
             field: 'snCode',
-            label: 'SN码',
+            label: t('routes.scene.snCode'),
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -231,7 +230,7 @@
           },
           {
             field: 'userName',
-            label: '绑定账号',
+            label: t('routes.scene.userName'),
             component: 'Input',
             componentProps: {
               maxLength: 100,
@@ -273,14 +272,15 @@
       }
       async function handleCopy(record: Recordable) {
         createConfirm({
-          title: '复制场景',
-          content: '复制场景,场景归属在原相机下。<br/>确定要复制场景吗?',
+          title: t('routes.scene.copyTipsTitle'),
+          content: t('routes.scene.copyTipsText'),
           onOk: async () => {
             sceneCopy({ num: record.num })
               .then(() => {
                 message.success({
-                  content: '复制成功',
+                  content: t('routes.scene.copySccuse'),
                 });
+                reload()
               })
           },
         });
@@ -294,9 +294,8 @@
         sceneDelete({ num: record.num })
           .then(() => {
             message.success({
-              content: '删除成功',
+              content: t('routes.scene.deleteSccuse'),
             });
-
             reload();
           })
         //   },
@@ -306,17 +305,6 @@
         openMoveModal(true, {
           ...record,
         });
-        // sceneMove({ snCode: record.snCode, num: record.num })
-        //   .then(() => {
-        //     message.success({
-        //       content: '迁移成功',
-        //     });
-        //   })
-        //   .catch(() => {
-        //     message.success({
-        //       content: '迁移失败',
-        //     });
-        //   });
       }
       let timer: null = ref(null);
       const downloadOption = ref<Object>({});
@@ -340,7 +328,7 @@
                 timer.value = setInterval(() => {
                   downloadProcess({ num: record.num }).then((res) => {
                     if(res.status == '1003'){
-                      createMessage.error('下载失败');
+                      createMessage.error(t('routes.scene.downErr'));
                       afterClose();
                       return
                     }
@@ -369,7 +357,7 @@
         rebuildScene({ num: record.num })
           .then(() => {
             message.success({
-              content: '操作成功',
+              content: t('common.optSuccess'),
             });
             reload();
           })
@@ -387,6 +375,7 @@
         handleReset,
         tableType,
         changeTable,
+        reload,
         t,
         openDownModal,
         registerDownModal,

+ 1 - 1
src/views/scene/sxz.vue

@@ -238,7 +238,7 @@
       // function exportExcel() {
       //   createConfirm({
       //     iconType: 'warning',
-      //     title: () => h('span', '温馨提示'),
+      //     title: () => h('span', t('common.optSuccess')),
       //     content: () => h('span', '确定当前标签下的订单记录?'),
       //     onOk: async () => {
       //       // await DownExport();

+ 1 - 1
src/views/scene/viewKankan.vue

@@ -208,7 +208,7 @@
       // function exportExcel() {
       //   createConfirm({
       //     iconType: 'warning',
-      //     title: () => h('span', '温馨提示'),
+      //     title: () => h('span', t('common.optSuccess')),
       //     content: () => h('span', '确定当前标签下的订单记录?'),
       //     onOk: async () => {
       //       // await DownExport();

+ 1 - 1
src/views/system/menu/index.vue

@@ -101,7 +101,7 @@
       async function handleDelete(record: Recordable) {
         createConfirm({
           iconType: 'warning',
-          title: () => h('span', '温馨提示'),
+          title: () => h('span', t('common.optSuccess')),
           content: () => h('span', `您确定删除${record.name}!`),
           onOk: async () => {
             await deleteMenuApi({id:record.id});