瀏覽代碼

Merge branch 'develop' of http://120.55.44.4:10080/xujunjie/gt_client_pad into develop

Renxy 1 年之前
父節點
當前提交
e5382ae758

+ 5 - 1
src/global.less

@@ -74,6 +74,7 @@ a {
 table {
   border-collapse: collapse;
   border-spacing: 0;
+  background-color: white;
 }
 
 // Remove input styling for IE
@@ -187,7 +188,9 @@ input[type='reset'] {
   padding-top: 0;
   padding-bottom: 0;
 }
-.ant-table,
+.ant-table{
+  background-color: white!important;
+}
 .ant-table-cell,
 .ant-table-placeholder {
   background: transparent !important;
@@ -197,6 +200,7 @@ input[type='reset'] {
 .ant-table-wrapper table {
   border-radius: 0 !important;
 }
+
 .ant-table-container {
   border: none !important;
 }

+ 4 - 4
src/pages/TaskManage/Detail/TaskDetail/TaskDetail.tsx

@@ -135,10 +135,10 @@ function TaskDetail(props: IPropsType) {
                 <div className={styles.leftInfo}>
                   <Row style={{ marginBottom: '15px' }}>
                     <Col className={styles.fontS24} span={12}>
-                      工单编号:{record.Id}
+                      工单编号:{record.Id || '-'}
                     </Col>
                     <Col className={styles.fontS24} span={12}>
-                      时间:{record.CreateTime}
+                      时间:{record.CreateTime || '-'}
                     </Col>
                   </Row>
                   <Row>
@@ -147,14 +147,14 @@ function TaskDetail(props: IPropsType) {
                       <span style={{ color: '#5697e4' }}>
                         {typeof record.Status === 'number'
                           ? '-'
-                          : record.Status.label}
+                          : record.Status?.label}
                       </span>
                     </Col>
                     <Col className={styles.fontS24} span={12}>
                       工单负责人:
                       {typeof record.Responsible === 'number'
                         ? '-'
-                        : record.Responsible.CName}
+                        : record.Responsible?.CName}
                     </Col>
                   </Row>
                 </div>

+ 21 - 19
src/pages/TaskManage/Detail/TaskList/TaskList.tsx

@@ -17,7 +17,7 @@ import { connect, useLocation, useRequest } from '@umijs/max';
 import TopFilter from '@/pages/TaskManage/components/TopFilter';
 import { IMandateType } from '@/pages/TaskManage/index.types';
 import { useNavigate } from '@@/exports';
-import { UpOutlined } from '@ant-design/icons';
+import { DownOutlined } from '@ant-design/icons';
 import {
   Button,
   Col,
@@ -156,24 +156,26 @@ const TaskList: React.FC<IPropsType> = (props) => {
     setCurrentParams(params);
   };
 
-  const loadMoreMandate = !loadData ? (
-    <div
-      style={{
-        textAlign: 'center',
-        marginTop: 12,
-        height: 32,
-        lineHeight: '32px',
-      }}
-    >
-      <Button
-        onClick={() => {
-          getList(currentParams);
+  const loadMoreMandate =
+    !loadData && mandateListShow.length > mandatePage.total ? (
+      <div
+        style={{
+          textAlign: 'center',
+          marginTop: 12,
+          height: 32,
+          lineHeight: '32px',
+          fontSize: '28px',
         }}
       >
-        加载更多
-      </Button>
-    </div>
-  ) : null;
+        <Button
+          type="text"
+          size="large"
+          style={{ fontSize: '28px', height: '56px', width: '160px' }}
+        >
+          加载更多
+        </Button>
+      </div>
+    ) : null;
 
   const goTaskDetail = (mandate: IMandateType) => {
     navigate(
@@ -227,7 +229,7 @@ const TaskList: React.FC<IPropsType> = (props) => {
               <div className={styles.leftInfo}>
                 <Row style={{ marginBottom: '15px' }}>
                   <Col className={styles.fontS24} span={12}>
-                    工单编号:{order.Id}
+                    工单类型:{order.RecordType?.label || '-'}
                   </Col>
                   <Col className={styles.fontS24} span={12}>
                     时间:{order.CreateTime}
@@ -308,7 +310,7 @@ const TaskList: React.FC<IPropsType> = (props) => {
               className={styles.collapseLabel}
               ghost
               expandIcon={({ isActive }) => (
-                <UpOutlined
+                <DownOutlined
                   style={{ color: '#5697e4' }}
                   rotate={isActive ? 180 : 0}
                 />

+ 47 - 33
src/pages/TaskManage/Detail/TaskOrder/TaskOrder.tsx

@@ -11,6 +11,7 @@ import {
 import { useLocation } from '@@/exports';
 import { connect, useRequest } from '@umijs/max';
 import { Col, Row } from 'antd';
+import moment from 'moment';
 import { DefaultOptionType } from 'rc-select/es/Select';
 import React, { useEffect, useState } from 'react';
 import styles from './taskOrder.less';
@@ -26,6 +27,7 @@ interface IOrderInfo {
   RepairTime: string;
   Reason: string;
   Repairman: string | IUserType;
+  DispatchMan: string | IUserType;
   OrderStatus: string | DefaultOptionType;
   Lubrication?: number;
   Fasten?: number;
@@ -52,9 +54,9 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
     formatResult: (result) => {
       const temp = result.data.list[0];
       const tempDetail = {
-        CreateTime: temp.CreateTime,
-        PlanTime: temp.PlanTime,
-        RepairTime: '-',
+        CreateTime: moment(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
+        PlanTime: moment(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
+        RepairTime: moment(temp.RepairTime).format('YYYY-MM-DD HH:mm') || '-',
         Reason: temp.Note,
         Lubrication: temp.Lubrication,
         Fasten: temp.Fasten,
@@ -64,6 +66,9 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
         Check: temp.Check,
         Repairman:
           userList.find((item) => item.ID === temp.MaintenancePerson) || '-',
+        DispatchMan:
+          userList.find((item) => (item.ID = temp.Operators[0]?.Operator?.ID)) ||
+          '-',
         OrderStatus:
           OrderStatus.find((item) => item.value === temp.Status) || '-',
       };
@@ -77,11 +82,15 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
     formatResult: (result: any) => {
       const temp = result.data.list[0];
       const tempDetail: IOrderInfo = {
-        CreateTime: temp.CreateTime,
-        PlanTime: temp.PlanTime,
-        RepairTime: temp.RepairTime,
+        CreateTime: moment(temp.CreateTime).format('YYYY-MM-DD HH:mm'),
+        PlanTime: moment(temp.PlanTime).format('YYYY-MM-DD HH:mm'),
+        RepairTime: temp.RepairTime && moment(temp.RepairTime).format('YYYY-MM-DD HH:mm') || '-',
         Reason: temp.Reason,
         Repairman: userList.find((item) => item.ID === temp.Repairman) || '-',
+        DispatchMan:
+          userList.find((item) => {
+            item.ID === temp.operator_id;
+          }) || '-',
         OrderStatus:
           OrderStatus.find((item) => item.value === temp.AcceptanceStatus) ||
           '-',
@@ -96,11 +105,16 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
     formatResult: (result) => {
       const temp = result.data.list[0];
       const tempDetail = {
-        CreateTime: temp.start_time,
-        PlanTime: temp.plan_end_time,
-        RepairTime: temp.actual_end_time || '-',
+        CreateTime: moment(temp.start_time).format('YYYY-MM-DD HH:mm'),
+        PlanTime: moment(temp.plan_end_time).format('YYYY-MM-DD HH:mm'),
+        RepairTime:
+          (temp.actual_end_time &&
+            moment(temp.actual_end_time).format('YYYY-MM-DD HH:mm')) ||
+          '-',
         Reason: temp.detail,
-        Repairman: userList.find((item) => item.ID === temp.operator_id) || '-',
+        Repairman: userList.find((item) => item.ID === temp.checker_id) || '-',
+        DispatchMan:
+          userList.find((item) => item.ID === temp.operator_id) || '-',
         OrderStatus:
           OrderStatus.find((item) => item.value === temp.status) || '-',
       };
@@ -142,46 +156,46 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
             showStatus={orderInfo?.OrderStatus.value === 2}
             radius
           />
-          <div style={{ padding: '15px' }}>
+          <div style={{ padding: '15px', letterSpacing: '1.5px' }}>
             <Row className={styles.rowMargin}>
-              <Col className={styles.fontS24} span={16}>
-                时间:{'-'}
+              <Col className={styles.fontS28} span={16}>
+                {/*// @ts-ignore*/}
+                工单类型:
+                {order_type === 1 ? '工艺' : order_type === 2 ? '维修' : '保养'}
               </Col>
-              <Col className={styles.fontS24} span={8}>
+              <Col className={styles.fontS28} span={8}>
                 {/*// @ts-ignore*/}
                 工单负责人:{orderInfo?.Repairman?.CName || '-'}
               </Col>
             </Row>
-            <Row className={styles.rowMargin} >
-              <Col className={styles.fontS24} span={8}>
+            <Row className={styles.rowMargin}>
+              <Col className={styles.fontS28} span={16}>
                 {/*// @ts-ignore*/}
                 工单状态:{orderInfo?.OrderStatus?.label}
               </Col>
-              <Col className={styles.fontS24} span={8}>
+              <Col className={styles.fontS28} span={8}>
                 {/*// @ts-ignore*/}
-                工单类型:
-                {order_type === 1 ? '工艺' : order_type === 2 ? '维修' : '保养'}
+                派单人员:{orderInfo?.DispatchMan?.CName}
               </Col>
-              <Col className={styles.fontS24} span={8}>派单人员:{'-'}</Col>
             </Row>
             <Row className={styles.rowMargin}>
-              <Col className={styles.fontS24}>
+              <Col className={styles.fontS28}>
                 派单时间:{orderInfo?.CreateTime || '-'}
               </Col>
             </Row>
             <Row className={styles.rowMargin}>
-              <Col className={styles.fontS24}>
+              <Col className={styles.fontS28}>
                 计划完成时间:{orderInfo?.PlanTime || '-'}
               </Col>
             </Row>
             <Row className={styles.rowMargin}>
-              <Col className={styles.fontS24}>
+              <Col className={styles.fontS28}>
                 实际完成时间:{orderInfo?.RepairTime || '-'}
               </Col>
             </Row>
             <Row>
-              <Col className={styles.fontS24}>工单详情:</Col>
-              <Col className={styles.fontS24} span={20}>
+              <Col className={styles.fontS28}>工单详情:</Col>
+              <Col className={styles.fontS28} span={18}>
                 {orderInfo?.Reason}
                 {/*<Table />*/}
               </Col>
@@ -192,25 +206,25 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
           <div>
             <SubTitle title="维修内容" />
             <div style={{ padding: '15px' }}>
-              <Row className={styles.rowMargin} justify={'space-between'}>
-                <Col className={styles.fontS24}>
+              <Row className={styles.rowMargin} justify={'space-around'}>
+                <Col className={styles.fontS28} span={8}>
                   是否润滑/加油:{orderInfo?.Lubrication === 1 ? '是' : '否'}
                 </Col>
-                <Col className={styles.fontS24}>
+                <Col className={styles.fontS28} span={8}>
                   是否拆检:{orderInfo?.Check === 1 ? '是' : '否'}
                 </Col>
-                <Col className={styles.fontS24}>
+                <Col className={styles.fontS28} span={8}>
                   是否清洁:{orderInfo?.Clean === 1 ? '是' : '否'}
                 </Col>
               </Row>
-              <Row>
-                <Col className={styles.fontS24}>
+              <Row justify={'space-around'}>
+                <Col className={styles.fontS28} span={8}>
                   是否紧固:{orderInfo?.Fasten === 1 ? '是' : '否'}
                 </Col>
-                <Col className={styles.fontS24}>
+                <Col className={styles.fontS28} span={8}>
                   是否除锈:{orderInfo?.AntiCorrosive === 1 ? '是' : '否'}
                 </Col>
-                <Col className={styles.fontS24}>
+                <Col className={styles.fontS28} span={8}>
                   是否防腐:{orderInfo?.RustRemoval === 1 ? '是' : '否'}
                 </Col>
               </Row>

+ 4 - 0
src/pages/TaskManage/Detail/TaskOrder/taskOrder.less

@@ -18,6 +18,10 @@
   font-size: 28px;
 }
 
+.fontS26{
+  font-size: 26px;
+}
+
 .fontS24 {
   font-size: 24px;
 }

+ 2 - 2
src/pages/TaskManage/components/SubTitle.tsx

@@ -25,8 +25,8 @@ const SubTitle: React.FC<IPropsType> = ({
         paddingLeft: '20px',
         paddingRight: '10px',
         backgroundColor: '#d9e7f9',
-        fontSize: '26px',
-        height: '66px',
+        fontSize: '30px',
+        height: '80px',
         borderRadius: radius ? '8px 8px 0 0 ' : 'unset',
       }}
     >

+ 0 - 19
src/pages/TaskManage/components/TopFilter.tsx

@@ -31,25 +31,6 @@ const TopFilter: React.FC<IProps> = ({ filters, onChange }) => {
               placeholder={item.placeholder}
               options={item.options}
               popupMatchSelectWidth={250}
-              suffixIcon={
-                values[index]===null || values[index]===undefined ? (
-                  <CaretDownFilled
-                    style={{
-                      fontSize: '28px',
-                      color: 'black',
-                    }}
-                  />
-                ) : null
-              }
-              clearIcon={
-                <CloseCircleFilled
-                  style={{
-                    fontSize: '28px',
-                    color: 'black',
-                    paddingBottom: '20px',
-                  }}
-                />
-              }
               allowClear
               onChange={(value) => {
                 const temp = filters.map((f, i) => {

+ 23 - 15
src/pages/TaskManage/index.less

@@ -3,7 +3,7 @@
 
   .listItem {
     margin: 20px 20px 20px 0;
-    height: 16vh;
+    height: 12vh;
     box-shadow: 0 0 6px 3px rgba(0, 150, 255, 10%);
     border-radius: 10px;
     background-color: #ffffff;
@@ -24,46 +24,54 @@
   }
 }
 
-.ant-select-clear{
-  top: 32% !important;
-  opacity: 1!important;
-  transition: unset;
-  padding-left: 10px;
+.ant-select-clear {
+  opacity: 1 !important;
+  margin-top: -12px!important;
+  width: 24px!important;
+  height: 24px!important;
+  font-size: 24px!important;
+  color: black!important;
 }
 
 .antdSelect .ant-select-selection-item,
 .antdSelect .ant-select-selection-placeholder,
-.ant-select-item-option-content
-{
+.ant-select-item-option-content {
   font-size: 28px;
   color: black;
   margin-right: 10px;
 }
+.ant-select-item-option{
+  padding: 8px!important;
+}
+.ant-select-arrow {
+  font-size: 24px!important;
+  color: black!important;
+}
 
-.fontS28{
+.fontS28 {
   font-size: 28px;
 }
 
-.fontS26{
+.fontS26 {
   font-size: 26px;
 }
 
-.fontS24{
+.fontS24 {
   font-size: 24px;
 }
 
-.fontS22{
+.fontS22 {
   font-size: 22px;
 }
 
-.fontS20{
+.fontS20 {
   font-size: 20px;
 }
 
-.fontS18{
+.fontS18 {
   font-size: 18px;
 }
 
-.fontS16{
+.fontS16 {
   font-size: 16px;
 }