Jelajahi Sumber

fix(bugs): 修改细节

tangning 3 tahun lalu
induk
melakukan
84c35bedc8

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

@@ -36,4 +36,5 @@ export default {
     9: '未过期',
   },
   addcamera: '新增相机权益',
+  maxlength: '请输入合理的数量!',
 };

+ 2 - 2
src/views/rightsEnterprises/addCameraModal.vue

@@ -105,7 +105,7 @@
             span: 22,
           },
           componentProps: {
-            maxLength: 15,
+            maxLength: 3,
           },
         },
         {
@@ -148,7 +148,7 @@
           {
             field: 'companyId',
             componentProps: {
-              disabled: !!data.companyId,
+              disabled: !data.modify,
             },
           },
         ];

+ 6 - 1
src/views/rightsEnterprises/addModal.vue

@@ -78,8 +78,13 @@
           title: t('routes.rightsEnterprises.muber'),
           dataIndex: 'muber',
           edit: true,
-          editRule: true,
           // slots: { customRender: 'subNum' },
+          editRule: async (text) => {
+            if (text > 999 || text < 0) {
+              return t('routes.rightsEnterprises.maxlength');
+            }
+            return '';
+          },
           editComponent: 'InputNumber',
           width: 200,
         },

+ 3 - 3
src/views/rightsEnterprises/camera.vue

@@ -14,7 +14,7 @@
         {{ renderStatus(record.state) }}
       </template>
       <template #createTime="{ record, field }">
-        <Time v-if="record[field]" :value="record[field]" mode="date" />
+        <Time :value="record[field]" mode="datetime" />
       </template>
       <!-- onClick: handleOpenModal.bind(null, record), 
             ifShow: record.state == 0 && !!record.userId,
@@ -115,7 +115,7 @@
           title: '相机权益ID',
           dataIndex: 'id',
           fixed: 'left',
-          width: 50,
+          width: 100,
         },
         {
           title: t('routes.rightsEnterprises.snCode'),
@@ -140,7 +140,7 @@
         {
           title: t('routes.rightsEnterprises.purchaseTime'),
           dataIndex: 'createTime',
-          // slots: { customRender: 'createTime' },
+          slots: { customRender: 'createTime' },
           width: 160,
         },
         {

+ 3 - 2
src/views/rightsEnterprises/cameraList.vue

@@ -22,7 +22,7 @@
         {{ renderStatus(record.status) }}
       </template>
       <template #createTime="{ record }">
-        <Time v-if="record.createTime" :value="record.createTime" mode="datetime" />
+        <Time :value="record.createTime" mode="datetime" />
       </template>
       <template #action="{ record }">
         <TableAction
@@ -217,9 +217,10 @@
         }
       }
       function handleOpenModal(record: Recordable) {
-        console.log('Received', record);
         openModal(true, {
           ...record,
+          modify: true,
+          companyId: record.id,
           companyPhone: record.phone,
           companyName: record.name,
         });

+ 1 - 1
src/views/rightsEnterprises/list.vue

@@ -14,7 +14,7 @@
         {{ renderStatus(record.state) }}
       </template>
       <template #createTime="{ record, field }">
-        <Time v-if="record[field]" :value="record[field]" mode="date" />
+        <Time :value="record[field]" mode="datetime" />
       </template>
       <!-- onClick: handleOpenModal.bind(null, record), -->
       <template #action="{ record }">

+ 1 - 1
src/views/rightsEnterprises/rightsList.vue

@@ -22,7 +22,7 @@
         {{ renderStatus(record.status) }}
       </template>
       <template #createTime="{ record }">
-        <Time v-if="record.createTime" :value="record.createTime" mode="datetime" />
+        <Time :value="record.createTime" mode="datetime" />
       </template>
       <template #action="{ record }">
         <TableAction

+ 1 - 1
src/views/staff/list.vue

@@ -11,7 +11,7 @@
       </template>
       <template #headerTop v-if="getCheckRole([RoleEnum.COMPANY_ADMIN])">
         <Alert
-          :message="`带看权益为 ${surplusSubNum.lookNum} 个、拍摄权益为 ${surplusSubNum.shotNum} 个`"
+          :message="`剩余带看权益为 ${surplusSubNum.lookNum} 个、拍摄权益为 ${surplusSubNum.shotNum} 个`"
           type="info"
         />
       </template>