tangning 8 місяців тому
батько
коміт
ab9dd87004

+ 10 - 1
src/views/account/overview/AddDownModal.vue

@@ -120,7 +120,16 @@
             field: 'useType',
             componentProps: {
               onChange: (value) => {
-                updateSchema({ field: 'projectNum', ifShow: value == '4' });
+                updateSchema([
+                  { field: 'projectNum', ifShow: value == '4' },
+                  { field: 'companyName', ifShow: value != '3' },
+                  { field: 'businessDept', ifShow: value != '3' },
+                  { field: 'businessName', ifShow: value != '3' },
+                  { field: 'customerPayTime', ifShow: value != '3' },
+                  { field: 'customerName', ifShow: value != '3' },
+                  { field: 'customerType', ifShow: value != '3' },
+                  { field: 'endCustomer', ifShow: value != '3' },
+                ]);
               },
             },
           },

+ 55 - 25
src/views/account/overview/AddModal.vue

@@ -19,12 +19,18 @@
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
   import { useMessage } from '/@/hooks/web/useMessage';
-  import { remarkschemas, Addschemas } from "./data";
+  import { remarkschemas, Addschemas } from './data';
   import { InvoiceRegister } from '/@/api/order';
   import { useI18n } from '/@/hooks/web/useI18n';
   import { uploadApi } from '/@/api/product/index';
   import { ResultEnum } from '/@/enums/httpEnum';
-  import { DetailsApi, dincrementList, AddUserIncrementApi, getAddUserIncrementTime, currencyList } from '/@/api/account';
+  import {
+    DetailsApi,
+    dincrementList,
+    AddUserIncrementApi,
+    getAddUserIncrementTime,
+    currencyList,
+  } from '/@/api/account';
   import dayjs from 'dayjs';
   import { otherInfoStore } from '/@/store/modules/other';
   import { useUserStore } from '/@/store/modules/user';
@@ -41,7 +47,7 @@
       const userStore = useUserStore();
       const overviewInfo = computed(() => otherInfo.getOverviewInfo);
       // const overviewInfo = getOverviewInfo() || {}
-      const title = ref('新增权益')
+      const title = ref('新增权益');
       const fileFlow = reactive({
         file: null,
         id: '',
@@ -66,6 +72,9 @@
           component: 'ApiSelect',
           label: '权益类型',
           required: true,
+          itemProps: {
+            autoLink: false,
+          },
           componentProps: {
             api: async function () {
               const res = await dincrementList();
@@ -82,17 +91,26 @@
             },
             onChange: (value) => {
               console.log('onChange', value);
-              let { monthQy = 1, count = 1 } = getFieldsValue()
+              let { monthQy = 1, count = 1 } = getFieldsValue();
               let unitStr = value == '3' ? '个月' : '年';
-              let incrementEndTime = dayjs().add(1, value == '3' ? 'month' : 'year').format('YYYY-MM-DD')
+              let incrementEndTime = dayjs()
+                .add(1, value == '3' ? 'month' : 'year')
+                .format('YYYY-MM-DD');
               updateSchema([
-                { field: 'monthQy', ifShow: true, componentProps: { options: showOptions( value == '3' ? 12 : 5), } },
-                { field: 'count', suffix: ( count * monthQy ) + unitStr },
-                { field: 'incrementEndTime', componentProps: {
-                  // disabledDate: (current) => {
-                  //   return current && current < dayjs().subtract(1, 'day').add(1, value == '3' ? 'month' : 'year');
-                  // },
-                } }
+                {
+                  field: 'monthQy',
+                  ifShow: true,
+                  componentProps: { options: showOptions(value == '3' ? 12 : 5) },
+                },
+                { field: 'count', suffix: count * monthQy + unitStr },
+                {
+                  field: 'incrementEndTime',
+                  componentProps: {
+                    // disabledDate: (current) => {
+                    //   return current && current < dayjs().subtract(1, 'day').add(1, value == '3' ? 'month' : 'year');
+                    // },
+                  },
+                },
               ]);
               setFieldsValue({
                 monthQy: 1,
@@ -139,7 +157,7 @@
               let { incrementTypeId, count = 1 } = getFieldsValue();
               let unit = incrementTypeId == '3' ? 'month' : 'year';
               let unitStr = incrementTypeId == '3' ? '个月' : '年';
-              updateSchema({ field: 'count', suffix: ( count * data ) + unitStr });
+              updateSchema({ field: 'count', suffix: count * data + unitStr });
               setFieldsValue({
                 incrementEndTime: dayjs().add(data, unit).format('YYYY-MM-DD'),
               });
@@ -160,7 +178,7 @@
             onChange: (data = 1) => {
               let { incrementTypeId, monthQy = 1 } = getFieldsValue();
               let unit = incrementTypeId == '3' ? '个月' : '年';
-              updateSchema({ field: 'count', suffix: ( monthQy * data ) + unit });
+              updateSchema({ field: 'count', suffix: monthQy * data + unit });
             },
           },
           colProps: {
@@ -196,7 +214,7 @@
           componentProps: {
             precision: 2,
             min: 0,
-            step: 1
+            step: 1,
           },
         },
         {
@@ -219,7 +237,10 @@
         },
       ];
 
-      const [registerForm, { validate, getFieldsValue, resetFields, setFieldsValue, updateSchema }] = useForm({
+      const [
+        registerForm,
+        { validate, getFieldsValue, resetFields, setFieldsValue, updateSchema },
+      ] = useForm({
         labelWidth: 120,
         schemas: [...Addschemas, ...schemas, ...remarkschemas],
         showActionButtonGroup: false,
@@ -236,7 +257,16 @@
             field: 'useType',
             componentProps: {
               onChange: (value) => {
-                updateSchema({ field: 'projectNum', ifShow: value == '4' });
+                updateSchema([
+                  { field: 'projectNum', ifShow: value == '4' },
+                  { field: 'companyName', ifShow: value != '3' },
+                  { field: 'businessDept', ifShow: value != '3' },
+                  { field: 'businessName', ifShow: value != '3' },
+                  { field: 'customerPayTime', ifShow: value != '3' },
+                  { field: 'customerName', ifShow: value != '3' },
+                  { field: 'customerType', ifShow: value != '3' },
+                  { field: 'endCustomer', ifShow: value != '3' },
+                ]);
               },
             },
           },
@@ -269,7 +299,7 @@
       });
       async function onDataReceive(data) {
         let incrementEndTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
-        if( data.incrementTypeId ){
+        if (data.incrementTypeId) {
           const res = await getAddUserIncrementTime({
             id: data.id,
             userId: data.userId,
@@ -287,17 +317,17 @@
           // incrementEndTime: dayjs(incrementEndTime).add(1, data.incrementTypeId == '3' ? 'month' : 'year').format('YYYY-MM-DD'),
         });
       }
-      function showOptions(type = 5){
-        let uint = type == 5 ? '年' : '个月'
-        let arr = []
+      function showOptions(type = 5) {
+        let uint = type == 5 ? '年' : '个月';
+        let arr = [];
         for (let index = 0; index < type; index++) {
           arr.push({
-            label: (index+1) + uint,
-            value: index+1,
-            key: index+1,
+            label: index + 1 + uint,
+            value: index + 1,
+            key: index + 1,
           });
         }
-        return arr || []
+        return arr || [];
       }
       async function handleConfirm() {
         await validate();

+ 127 - 17
src/views/account/overview/data.tsx

@@ -4,6 +4,7 @@ import { Button } from '/@/components/Button';
 import { FormSchema } from '/@/components/Form/index';
 import { incrementUseTypeList } from '/@/api/account';
 import { Badge } from 'ant-design-vue';
+import moment from 'moment';
 
 export const refundData = {
   a1: '1000000000',
@@ -216,6 +217,128 @@ export const remarkschemas: FormSchema[] = [
 ];
 export const Addschemas: FormSchema[] = [
   {
+    field: 'useType',
+    component: 'ApiSelect',
+    required: true,
+    label: '使用类型',
+    componentProps: {
+      // filterOption: onFilterOption,
+      // showSearch: true,
+      api: incrementUseTypeList,
+      labelField: 'name',
+      valueField: 'id',
+      immediate: true,
+    },
+    itemProps: {
+      autoLink: false,
+    },
+    colProps: {
+      span: 20,
+    },
+  },
+  {
+    field: 'companyName',
+    component: 'Select',
+    label: '合同所属公司',
+    rules: [{ required: true }],
+    colProps: {
+      span: 20,
+    },
+    itemProps: {
+      autoLink: false,
+    },
+    componentProps: {
+      options: [
+        {
+          label: '珠海市四维时代网络科技有限公司',
+          value: '珠海市四维时代网络科技有限公司',
+          key: '珠海市四维时代网络科技有限公司',
+        },
+        {
+          label: '广东四维看看智能设备有限公司',
+          value: '广东四维看看智能设备有限公司',
+          key: '广东四维看看智能设备有限公司',
+        },
+        {
+          label: '四维看看(香港)有限公司',
+          value: '四维看看(香港)有限公司',
+          key: '四维看看(香港)有限公司',
+        },
+        {
+          label: '四维看看(北京)数据科技有限公司',
+          value: '四维看看(北京)数据科技有限公司',
+          key: '四维看看(北京)数据科技有限公司',
+        },
+      ],
+    },
+  },
+  {
+    field: 'businessDept',
+    component: 'Select',
+    label: '业务部门',
+    rules: [{ required: true }],
+    colProps: {
+      span: 20,
+    },
+    itemProps: {
+      autoLink: false,
+    },
+    componentProps: {
+      options: [
+        {
+          label: '数字营销事业部',
+          value: '数字营销事业部',
+          key: '数字营销事业部',
+        },
+        {
+          label: '政企事业部',
+          value: '政企事业部',
+          key: '政企事业部',
+        },
+        {
+          label: '海外事业部',
+          value: '海外事业部',
+          key: '海外事业部',
+        },
+        {
+          label: '市场部',
+          value: '市场部',
+          key: '市场部',
+        },
+        {
+          label: '总经办',
+          value: '总经办',
+          key: '总经办',
+        },
+      ],
+    },
+  },
+  {
+    field: 'businessName',
+    component: 'Input',
+    label: '业务员',
+    required: true,
+    componentProps: {
+      maxlength: 50,
+    },
+    colProps: { span: 20 },
+  },
+  {
+    field: 'customerPayTime',
+    component: 'DatePicker',
+    label: '客户付款时间',
+    required: true,
+    colProps: {
+      span: 16,
+    },
+    componentProps: {
+      showTime: true, //{ defaultValue: moment('23:59:59', 'HH:mm:ss') }
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
+      // defaultValue: dayjs().add(7, 'day').format('YYYY-MM-DD') + ' 23:59:59',
+      format: 'YYYY-MM-DD HH:mm:ss',
+    },
+  },
+  {
     field: 'customerName',
     component: 'Input',
     label: '客户名称',
@@ -228,6 +351,9 @@ export const Addschemas: FormSchema[] = [
     label: '客户类别',
     required: true,
     colProps: { span: 20 },
+    itemProps: {
+      autoLink: false,
+    },
     componentProps: {
       options: [
         {
@@ -250,23 +376,7 @@ export const Addschemas: FormSchema[] = [
     required: true,
     colProps: { span: 20 },
   },
-  {
-    field: 'useType',
-    component: 'ApiSelect',
-    required: true,
-    label: '使用类型',
-    componentProps: {
-      // filterOption: onFilterOption,
-      // showSearch: true,
-      api: incrementUseTypeList,
-      labelField: 'name',
-      valueField: 'id',
-      immediate: true,
-    },
-    colProps: {
-      span: 20,
-    },
-  },
+
   {
     field: 'projectNum',
     component: 'Input',

+ 6 - 0
src/views/empower/AddCameraModal.vue

@@ -65,6 +65,12 @@
           colProps: { span: 20 },
         },
         {
+          field: 'modelAuthCode',
+          component: 'Input',
+          label: '算法授权码',
+          colProps: { span: 20 },
+        },
+        {
           field: 'snCodes',
           component: 'InputTextArea',
           required: true,

+ 34 - 5
src/views/empower/camera.vue

@@ -75,10 +75,30 @@
       const [registerDetail, { openModal: opendetailModel }] = useModal();
       const columns: BasicColumn[] = [
         {
+          title: '合同所属公司',
+          dataIndex: 'companyName',
+          ellipsis: true,
+          width: 230,
+        },{
+          title: '业务部门',
+          dataIndex: 'businessDept',
+          ellipsis: true,
+          width: 120,
+        },{
+          title: '业务员',
+          dataIndex: 'businessName',
+          ellipsis: true,
+          width: 120,
+        },{
+          title: '客户付款时间',
+          dataIndex: 'customerPayTime',
+          ellipsis: true,
+          width: 160,
+        },{
           title: '客户名称',
           dataIndex: 'customerName',
           ellipsis: true,
-          width: 250,
+          width: 100,
         },
         {
           title: '客户类别',
@@ -108,10 +128,10 @@
           width: 120,
         },
         {
-          title: '设备UUID',
+          title: '机器码',
           ellipsis: true,
           slots: { customRender: 'copy' },
-          dataIndex: 'machineUuid',
+          dataIndex: 'machineCode',
           width: 120,
         },
         // {
@@ -214,8 +234,17 @@
             },
           },
           {
-            field: 'authorizeKey',
-            label: '安装授权Key',
+            field: 'modelAuthCode',
+            label: '算法授权码',
+            component: 'Input',
+            colProps: {
+              xl: 8,
+              xxl: 8,
+            },
+          },
+          {
+            field: 'snCodes',
+            label: '授权SN码',
             component: 'Input',
             colProps: {
               xl: 8,

+ 122 - 17
src/views/empower/data.ts

@@ -16,6 +16,128 @@ export const remarkschemas: FormSchema[] = [
 ];
 export const Addschemas: FormSchema[] = [
   {
+    field: 'useType',
+    component: 'ApiSelect',
+    required: true,
+    label: '使用类型',
+    componentProps: {
+      // filterOption: onFilterOption,
+      // showSearch: true,
+      api: incrementUseTypeList,
+      labelField: 'name',
+      valueField: 'id',
+      immediate: true,
+    },
+    itemProps: {
+      autoLink: false,
+    },
+    colProps: {
+      span: 20,
+    },
+  },
+  {
+    field: 'companyName',
+    component: 'Select',
+    label: '合同所属公司',
+    rules: [{ required: true }],
+    colProps: {
+      span: 20,
+    },
+    itemProps: {
+      autoLink: false,
+    },
+    componentProps: {
+      options: [
+        {
+          label: '珠海市四维时代网络科技有限公司',
+          value: '珠海市四维时代网络科技有限公司',
+          key: '珠海市四维时代网络科技有限公司',
+        },
+        {
+          label: '广东四维看看智能设备有限公司',
+          value: '广东四维看看智能设备有限公司',
+          key: '广东四维看看智能设备有限公司',
+        },
+        {
+          label: '四维看看(香港)有限公司',
+          value: '四维看看(香港)有限公司',
+          key: '四维看看(香港)有限公司',
+        },
+        {
+          label: '四维看看(北京)数据科技有限公司',
+          value: '四维看看(北京)数据科技有限公司',
+          key: '四维看看(北京)数据科技有限公司',
+        },
+      ],
+    },
+  },
+  {
+    field: 'businessDept',
+    component: 'Select',
+    label: '业务部门',
+    rules: [{ required: true }],
+    colProps: {
+      span: 20,
+    },
+    itemProps: {
+      autoLink: false,
+    },
+    componentProps: {
+      options: [
+        {
+          label: '数字营销事业部',
+          value: '数字营销事业部',
+          key: '数字营销事业部',
+        },
+        {
+          label: '政企事业部',
+          value: '政企事业部',
+          key: '政企事业部',
+        },
+        {
+          label: '海外事业部',
+          value: '海外事业部',
+          key: '海外事业部',
+        },
+        {
+          label: '市场部',
+          value: '市场部',
+          key: '市场部',
+        },
+        {
+          label: '总经办',
+          value: '总经办',
+          key: '总经办',
+        },
+      ],
+    },
+  },
+  {
+    field: 'businessName',
+    component: 'Input',
+    label: '业务员',
+    required: true,
+    colProps: { span: 20 },
+    componentProps: {
+      maxlength: 50,
+    },
+  },
+  {
+    field: 'customerPayTime',
+    component: 'DatePicker',
+    label: '客户付款时间',
+    required: true,
+    colProps: {
+      span: 16,
+    },
+    componentProps: {
+      showTime: true, //{ defaultValue: moment('23:59:59', 'HH:mm:ss') }
+      valueFormat: 'YYYY-MM-DD HH:mm:ss',
+      // defaultValue: dayjs().add(7, 'day').format('YYYY-MM-DD') + ' 23:59:59',
+      format: 'YYYY-MM-DD HH:mm:ss',
+    },
+  },
+  {
     field: 'customerName',
     component: 'Input',
     label: '客户名称',
@@ -51,23 +173,6 @@ export const Addschemas: FormSchema[] = [
     colProps: { span: 20 },
   },
   {
-    field: 'useType',
-    component: 'ApiSelect',
-    required: true,
-    label: '使用类型',
-    componentProps: {
-      // filterOption: onFilterOption,
-      // showSearch: true,
-      api: incrementUseTypeList,
-      labelField: 'name',
-      valueField: 'id',
-      immediate: true,
-    },
-    colProps: {
-      span: 18,
-    },
-  },
-  {
     field: 'projectNum',
     component: 'Input',
     label: '项目号',