shaogen1995 před 11 měsíci
rodič
revize
db33e8666c

+ 4 - 0
src/assets/styles/base.css

@@ -172,3 +172,7 @@ textarea {
 .lLtxtRight p {
   min-height: 10px;
 }
+.ant-notification-notice {
+  max-height: 500px !important;
+  overflow-y: auto !important;
+}

+ 5 - 0
src/assets/styles/base.less

@@ -279,3 +279,8 @@ textarea {
     min-height: 10px;
   }
 }
+
+.ant-notification-notice {
+  max-height: 500px !important;
+  overflow-y: auto !important;
+}

+ 14 - 8
src/pages/A1Camera/AddCamera/index.tsx

@@ -35,11 +35,12 @@ function AddCamera({ openInfo, closeFu, upTableFu, addTableFu, isLoc, existSn }:
 
   useEffect(() => {
     if (openInfo.txt === '新增') {
+      setCameraType('KJ')
     } else getInfoFu(openInfo.id)
   }, [getInfoFu, openInfo])
 
   // 相机类型
-  const [cameraType, setCameraType] = useState<'KK' | 'KJ'>('KJ')
+  const [cameraType, setCameraType] = useState<'KK' | 'KJ' | ''>('')
 
   // 没有通过校验
   const onFinishFailed = useCallback(() => {}, [])
@@ -65,13 +66,13 @@ function AddCamera({ openInfo, closeFu, upTableFu, addTableFu, isLoc, existSn }:
 
         if (topRes.code === 0) {
           if (topRes.data && topRes.data.length > 0) {
-            return MessageFu.warning('SN码重复!')
-          } else {
-            MessageFu.success('新增成功!')
-            obj.idxx = Date.now() + ''
-            addTableFu(obj)
-            closeFu()
+            // return MessageFu.warning('SN码重复!')
+            obj.id = topRes.data[0].id
           }
+          MessageFu.success('新增成功!')
+          obj.idxx = Date.now() + ''
+          addTableFu(obj)
+          closeFu()
         }
       } else {
         const res = await A1_APIadd(obj)
@@ -120,7 +121,12 @@ function AddCamera({ openInfo, closeFu, upTableFu, addTableFu, isLoc, existSn }:
             rules={[{ required: true, message: '请输入SN编码!' }]}
             getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
           >
-            <Input maxLength={20} showCount placeholder='请输入内容' />
+            <Input
+              disabled={openInfo.txt === '编辑'}
+              maxLength={20}
+              showCount
+              placeholder='请输入内容'
+            />
           </Form.Item>
 
           <Form.Item label='备注' name='remark'>

+ 4 - 0
src/pages/A1Camera/data.ts

@@ -94,6 +94,10 @@ export const typeInOptions = [
   {
     value: 'app',
     label: '移动端'
+  },
+  {
+    value: 'order',
+    label: '订单'
   }
 ]
 

+ 3 - 3
src/pages/A1Camera/index.tsx

@@ -159,7 +159,7 @@ function A1Camera() {
               statusSale: item.statusSale || '空',
               statusSupport: item.statusSupport || '空',
               statusStock: item.statusStock || '空',
-              typeIn: item.typeIn ? (item.typeIn === 'pc' ? '系统' : '移动端') : '空',
+              typeIn: item.typeIn ? typeInOptions.find(v => v.value === item.typeIn)?.label : '空',
               creatorName: item.creatorName || '空',
               updateTime: item.updateTime || '空'
             })),
@@ -241,7 +241,7 @@ function A1Camera() {
       {
         title: '相机来源',
         render: (item: A1ListType) =>
-          item.typeIn ? (item.typeIn === 'pc' ? '系统' : '移动端') : '(空)'
+          item.typeIn ? typeInOptions.find(v => v.value === item.typeIn)?.label : '(空)'
       },
       {
         title: '编辑人',
@@ -419,7 +419,7 @@ function A1Camera() {
             新增
           </Button>
           <a href='/xlsx/相机列表导入模板.xlsx' download>
-            <Button type='primary'>下载导入模</Button>
+            <Button type='primary'>下载导入模</Button>
           </a>
           <UpXlsx
             url='cms/camera/upload/excel'

+ 3 - 2
src/pages/A2Abusiness/AddBusiness/index.tsx

@@ -233,7 +233,7 @@ function AddBusiness({ topType, openInfo, closeFu, upTableFu, addTableFu }: Prop
           <Form.Item
             label='钉钉审批编号'
             name='dingNum'
-            rules={[{ required: true, message: '请输入内容!' }]}
+            // rules={[{ required: true, message: '请输入内容!' }]}
             getValueFromEvent={e => e.target.value.replace(/\s+/g, '')}
           >
             <Input maxLength={20} showCount placeholder='请输入内容' />
@@ -294,6 +294,7 @@ function AddBusiness({ topType, openInfo, closeFu, upTableFu, addTableFu }: Prop
               rules={[{ required: true, message: '请输入内容!' }]}
             >
               <InputNumber
+                maxLength={8}
                 style={{ width: 300 }}
                 placeholder='请输入数字,支持小数点后两位'
                 precision={2}
@@ -381,7 +382,7 @@ function AddBusiness({ topType, openInfo, closeFu, upTableFu, addTableFu }: Prop
             <div>相机清单</div>
             <div>
               <a href='/xlsx/相机列表导入模板.xlsx' download>
-                <Button type='primary'>下载模</Button>
+                <Button type='primary'>下载模</Button>
               </a>
               <UpXlsx
                 url='cms/order/upload/excel'

+ 61 - 35
src/pages/A2Abusiness/index.tsx

@@ -159,6 +159,35 @@ function A2Abusiness() {
     if (res.code === 0) {
       if (res.data.records.length <= 0) return MessageFu.warning('当前搜索条件没有数据!')
 
+      let sheetFilterTemp: string[] = ['num', 'dingNum', 'dateStart']
+      let sheetHeaderTemp: string[] = [
+        '订单编号',
+        '钉钉审批号',
+        `${A2AtopTypeEditLabel(topType)}日期`
+      ]
+
+      if (['ZL', 'WX'].includes(topType)) {
+        sheetFilterTemp.push('dateEnd')
+        sheetHeaderTemp.push(topType === 'ZL' ? '预计归还日期' : '完成日期')
+      }
+      sheetFilterTemp = [...sheetFilterTemp, 'zlName', 'myCity', 'zlUser', 'zlPhone', 'pcs']
+      sheetHeaderTemp = [
+        ...sheetHeaderTemp,
+        `${Reflect.get(A2AtopTypeObj, topType)}名称`,
+        '地区',
+        '负责人',
+        '联系方式',
+        '设备台数'
+      ]
+
+      if (topType === 'DS') {
+        sheetFilterTemp.push('user')
+        sheetHeaderTemp.push('报损单发送对象')
+      }
+
+      sheetFilterTemp = [...sheetFilterTemp, 'creatorName', 'updateTime']
+      sheetHeaderTemp = [...sheetHeaderTemp, '编辑人', '更新日期']
+
       const option = {
         fileName: name,
         datas: [
@@ -180,33 +209,9 @@ function A2Abusiness() {
               updateTime: item.updateTime || '空'
             })),
             sheetName: name,
-            sheetFilter: [
-              'num',
-              'dingNum',
-              'dateStart',
-              'dateEnd',
-              'zlName',
-              'myCity',
-              'zlUser',
-              'zlPhone',
-              'pcs',
-              'creatorName',
-              'updateTime'
-            ],
-            sheetHeader: [
-              '订单编号',
-              '钉钉审批号',
-              '租赁日期',
-              '预计归还日期',
-              '租赁方名称',
-              '地区',
-              '负责人',
-              '联系方式',
-              '设备台数',
-              '编辑人',
-              '更新日期'
-            ],
-            columnWidths: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
+            sheetFilter: sheetFilterTemp,
+            sheetHeader: sheetHeaderTemp,
+            columnWidths: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
           }
         ]
       }
@@ -217,7 +222,7 @@ function A2Abusiness() {
   }, [A2ATableList.list.length, A2ATableList.total, tableSelect, topType])
 
   const columns = useMemo(() => {
-    return [
+    let arr: any = [
       {
         title: '订单编号',
         render: (item: A2AListType) => item.num || '(空)'
@@ -227,15 +232,23 @@ function A2Abusiness() {
         render: (item: A2AListType) => item.dingNum || '(空)'
       },
       {
-        title: '租赁日期',
+        title: `${A2AtopTypeEditLabel(topType)}日期`,
         render: (item: A2AListType) => item.dateStart || '(空)'
-      },
-      {
-        title: '预计归还日期',
+      }
+    ]
+
+    if (['ZL', 'WX'].includes(topType)) {
+      arr.push({
+        title: topType === 'ZL' ? '预计归还日期' : '完成日期',
         render: (item: A2AListType) => item.dateEnd || '(空)'
-      },
+      })
+    }
+
+    arr = [
+      ...arr,
+
       {
-        title: '租赁方名称',
+        title: `${Reflect.get(A2AtopTypeObj, topType)}名称`,
         render: (item: A2AListType) => item.zlName || '(空)'
       },
       {
@@ -256,7 +269,18 @@ function A2Abusiness() {
       {
         title: '设备台数',
         render: (item: A2AListType) => item.pcs || '(空)'
-      },
+      }
+    ]
+
+    if (topType === 'DS') {
+      arr.push({
+        title: '报损单发送对象',
+        render: (item: A2AListType) => item.user || '(空)'
+      })
+    }
+
+    arr = [
+      ...arr,
 
       {
         title: '编辑人',
@@ -290,6 +314,8 @@ function A2Abusiness() {
         )
       }
     ]
+
+    return arr
   }, [delByIdFu, topType])
 
   // 点击新增和编辑的数据

+ 1 - 1
src/pages/A2Blogistics/AddLogistics/index.tsx

@@ -299,7 +299,7 @@ function AddLogistics({ openInfo, closeFu, upTableFu, addTableFu, orderNumTemp }
               </Button>
 
               <a href='/xlsx/相机列表导入模板.xlsx' download>
-                <Button type='primary'>下载模</Button>
+                <Button type='primary'>下载模</Button>
               </a>
               <UpXlsx
                 url='cms/logistics/upload/excel'

+ 1 - 0
src/pages/ALookPage/A1List/index.module.scss

@@ -43,6 +43,7 @@
         }
         .lLtxtRight {
           width: calc(100% - 100px);
+          word-break: break-all;
         }
       }
     }

+ 1 - 0
src/pages/ALookPage/A2BLog/index.module.scss

@@ -47,6 +47,7 @@
         }
         .lLtxtRight {
           width: calc(100% - 100px);
+          word-break: break-all;
         }
       }
     }

+ 1 - 0
src/pages/ALookPage/A2BLog/index.tsx

@@ -120,6 +120,7 @@ function A2BLog() {
                 title: '操作',
                 render: (item: A2AListCamerasType) => (
                   <Button
+                    disabled={item.isDelete === 1}
                     size='small'
                     type='text'
                     onClick={() => history.push(`/lookList/${item.id}`)}

+ 1 - 0
src/pages/ALookPage/A2LookIndex/index.tsx

@@ -127,6 +127,7 @@ function A2Index({ pageTit }: Props) {
                 title: '操作',
                 render: (item: A2AListCamerasType) => (
                   <Button
+                    disabled={item.isDelete === 1}
                     size='small'
                     type='text'
                     onClick={() => history.push(`/lookList/${item.id}`)}

+ 1 - 0
src/pages/ALookPage/components/LookTxt/index.module.scss

@@ -14,6 +14,7 @@
       }
       .lLtxtRight {
         width: calc(100% - 120px);
+        word-break: break-all;
         img {
           max-width: 300px;
           max-height: 300px;

+ 1 - 1
src/pages/ALookPage/components/LookTxt/index.tsx

@@ -23,7 +23,7 @@ function LookTxt({ info }: Props) {
         <div className='lLtxtLeft'>
           <span>*</span> 钉钉审批编号:
         </div>
-        <div className='lLtxtRight'>{info.dingNum}</div>
+        <div className='lLtxtRight'>{info.dingNum || '空'}</div>
       </div>
 
       <div className='lLtxt'>

+ 1 - 0
src/pages/ALookPage/components/LookTxt2/index.module.scss

@@ -14,6 +14,7 @@
       }
       .lLtxtRight {
         width: calc(100% - 110px);
+        word-break: break-all;
         img {
           max-width: 300px;
           max-height: 300px;

+ 8 - 5
src/pages/B1Plan/B1tab1.tsx

@@ -219,11 +219,14 @@ function B1tab1() {
       {/* 顶部筛选 */}
       <div className='B1top'>
         <div>
-          <Button onClick={resetSelectFu}>重置</Button>&emsp;
-          <Button type='primary' onClick={clickSearch}>
-            查询
-          </Button>
-          &emsp;
+          <div hidden>
+            <Button onClick={resetSelectFu}>重置</Button>&emsp;
+            <Button type='primary' onClick={clickSearch}>
+              查询
+            </Button>
+            &emsp;
+          </div>
+
           <Button type='primary' onClick={deriveFu}>
             导出表格
           </Button>

+ 1 - 0
src/types/api/A2Abusiness.ts

@@ -8,6 +8,7 @@ export type A2AListCamerasType = {
   remark: string
   id: number
   idxx: number
+  isDelete: 0 | 1
 }
 
 export type A2AListType = {

+ 2 - 2
src/utils/http.ts

@@ -7,9 +7,9 @@ import { domShowFu } from './domShow'
 
 const envFlag = process.env.NODE_ENV === 'development'
 
-// const baseUrlTemp = "https://sit-tieta3d.4dage.com"; // 测试环境
+const baseUrlTemp = 'https://sit-tieta3d.4dage.com' // 测试环境
 // const baseUrlTemp = "https://tower3d.4dkankan.com"; // 正式环境
-const baseUrlTemp = 'http://192.168.20.61:8057' // 线下环境
+// const baseUrlTemp = 'http://192.168.20.61:8057' // 线下环境
 
 const baseFlag = baseUrlTemp.includes('https://')