Pārlūkot izejas kodu

feat(staff): fixed merge

gemercheung 3 gadi atpakaļ
vecāks
revīzija
b8522026f2

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

@@ -19,17 +19,23 @@ export default {
   light: '亮色主题',
   dark: '黑暗主题',
   unbind: '解绑',
+  details: '详情',
   bind: '绑定',
   yes: '是',
   no: '否',
+  roleName: '角色',
   unusual: '异常',
   operation: '操作',
+  normal: '正常',
+  unNormal: '非正常',
   state: '状态',
   fullName: '姓名',
+  print: '打印',
   optSuccess: '操作成功',
   optFail: '操作失败',
   notConnect: '暂未接入',
   delConfirm: '是否确认删除',
+  mobile: '手机',
   phone: '请填写您的手机号码!',
   phoneError: '请正确填写您的手机号码!',
 };

+ 12 - 0
src/locales/lang/zh-CN/routes/staff.ts

@@ -0,0 +1,12 @@
+export default {
+  deptName: '所属公司',
+  userName: '员工名称',
+  nickName: '员工昵称',
+  mobile: '手机',
+  createTime: '创建时间',
+  staffList: '员工列表',
+  roleType: {
+    0: '公司管理员',
+    1: '公司员工',
+  },
+};

+ 17 - 16
src/views/staff/list.vue

@@ -16,17 +16,17 @@
           :actions="[
             {
               icon: 'mdi:information-outline',
-              label: '详情',
+              label: t('common.details'),
               onClick: () => {
                 go(`/order/list/detail/${record.orderNo}`);
               },
             },
             {
               icon: 'mdi:printer-outline',
-              label: '打印',
+              label: t('common.print'),
               color: 'error',
               onClick: () => {
-                createMessage.info(`暂未接入`);
+                createMessage.info(t('common.notConnect'));
               },
             },
           ]"
@@ -86,34 +86,35 @@
           width: 60,
         },
         {
-          title: '所属公司',
+          title: t('routes.staff.deptName'),
           dataIndex: 'companyName',
           width: 160,
         },
         {
-          title: '员工名称',
+          title: t('routes.staff.userName'),
           dataIndex: 'userName',
           width: 80,
         },
         {
-          title: '员工妮称',
+          title: t('routes.staff.nickName'),
           dataIndex: 'nickName',
           width: 80,
         },
         {
           title: '手机',
           dataIndex: 'phone',
-          width: 80,
+          width: 160,
         },
+
         {
-          title: '角色',
+          title: t('common.roleName'),
           dataIndex: 'roleName',
           // slots: { customRender: 'role' },
           sorter: true,
           width: 80,
         },
         {
-          title: '状态',
+          title: t('common.state'),
           dataIndex: 'status',
           slots: { customRender: 'status' },
           sorter: true,
@@ -121,7 +122,7 @@
         },
 
         {
-          title: '创建时间',
+          title: t('routes.staff.createTime'),
           dataIndex: 'createTime',
           slots: { customRender: 'createTime' },
           width: 130,
@@ -140,7 +141,7 @@
         schemas: [
           {
             field: 'phone',
-            label: '手机号',
+            label: t('routes.corporation.phone'),
             component: 'Input',
             colProps: {
               xl: 5,
@@ -151,7 +152,7 @@
       };
 
       const [registerTable] = useTable({
-        title: '员工列表',
+        title: t('routes.staff.staffList'),
         api: ListApi,
         columns: columns,
         useSearchForm: true,
@@ -173,9 +174,9 @@
       function renderRoleType(type: number): string {
         switch (type) {
           case 0:
-            return '公司管理员';
+            return t('routes.staff.roleType.0');
           case 1:
-            return '公司员工';
+            return t('routes.staff.roleType.1');
           default:
             return '';
         }
@@ -183,9 +184,9 @@
       function renderStatus(type: number): string {
         switch (type) {
           case 1:
-            return '正常';
+            return t('common.normal');
           case 0:
-            return '非正常';
+            return t('common.unNormal');
           default:
             return '';
         }