Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/uas-office-integration into dev

 Conflicts:
	uas-office-web/uas-mobile/src/configs/api.config.js
samhoo 5 years ago
parent
commit
30a07bc27d
20 changed files with 1174 additions and 87 deletions
  1. 0 9
      uas-office-web/uas-mobile/src/components/common/currencyDetail/CurrencyDetail.jsx
  2. 25 7
      uas-office-web/uas-mobile/src/components/common/currencyList/CurrencyList.jsx
  3. 7 4
      uas-office-web/uas-mobile/src/components/common/currencyList/CurrencyListItem.jsx
  4. 2 2
      uas-office-web/uas-mobile/src/components/common/currencyList/currency-list-item.less
  5. 80 13
      uas-office-web/uas-mobile/src/components/common/currencyList/visitApplyBill.js
  6. 1 1
      uas-office-web/uas-mobile/src/components/common/func/FuncGroup.jsx
  7. 2 2
      uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx
  8. 10 1
      uas-office-web/uas-mobile/src/components/private/report/ReportSearchItem.jsx
  9. 1 1
      uas-office-web/uas-mobile/src/components/private/subscribe/comp-subscrive.less
  10. 3 3
      uas-office-web/uas-mobile/src/configs/api.config.js
  11. 7 2
      uas-office-web/uas-mobile/src/configs/router.config.js
  12. 871 5
      uas-office-web/uas-mobile/src/pages/private/report/ReportList.jsx
  13. 22 0
      uas-office-web/uas-mobile/src/pages/private/report/report.less
  14. 62 0
      uas-office-web/uas-mobile/src/pages/private/service/ServiceDetail.jsx
  15. 1 1
      uas-office-web/uas-mobile/src/pages/private/service/ServiceList.jsx
  16. 0 6
      uas-office-web/uas-mobile/src/redux/actions/mainState.js
  17. 3 3
      uas-office-web/uas-mobile/src/utils/common/eventbus/eventbus.js
  18. 3 0
      uas-office-web/uas-mobile/src/utils/common/eventbus/events.types.js
  19. 62 25
      uas-office-web/uas-mobile/src/utils/common/form.request.js
  20. 12 2
      uas-office-web/uas-mobile/src/utils/common/form.util.js

+ 0 - 9
uas-office-web/uas-mobile/src/components/common/currencyDetail/CurrencyDetail.jsx

@@ -7,8 +7,6 @@ import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import './currency-detail.less'
 import { getFormItems } from '../../../utils/common/form.util'
-import { Toast } from 'antd-mobile'
-import { analysisFormData } from '../../../utils/common/form.request'
 
 class CurrencyDetail extends Component {
 
@@ -19,7 +17,6 @@ class CurrencyDetail extends Component {
   }
 
   componentDidMount () {
-    this.requestFormData()
   }
 
   componentWillUnmount () {
@@ -42,12 +39,6 @@ class CurrencyDetail extends Component {
     )
   }
 
-  requestFormData = () => {
-    Toast.loading('单据获取中', 0)
-    setTimeout(() => {
-      analysisFormData()
-    }, 1000)
-  }
 }
 
 let mapStateToProps = (state) => ({})

+ 25 - 7
uas-office-web/uas-mobile/src/components/common/currencyList/CurrencyList.jsx

@@ -20,12 +20,14 @@ import UasIcon from '../../../configs/iconfont.conig'
 import LoadingMore from '../loading/LoadingMore'
 import ReactDOM from 'react-dom'
 import { Prompt } from 'react-router-dom'
-import { getFormItems } from '../../../utils/common/form.util'
+import { getFormAndGrid, getFormItems } from '../../../utils/common/form.util'
 import { isObjEmpty, isObjNull } from '../../../utils/common/common.util'
 import CurrencyTabItem
   from './CurrencyTabItem'
 import { saveListState } from '../../../redux/actions/listState'
 import { LIST_PAGE_SIZE } from '../../../configs/constans.config'
+import { GlobalEvent } from '../../../utils/common/eventbus/eventbus'
+import { CURRENCY_DETAIL_DATA_REFRESH } from '../../../utils/common/eventbus/events.types'
 
 class CurrencyList extends Component {
 
@@ -67,6 +69,14 @@ class CurrencyList extends Component {
     if (isObjEmpty(filterList) && !isObjNull(requestSearchConfig)) {
       requestSearchConfig()
     }
+    GlobalEvent.on(CURRENCY_DETAIL_DATA_REFRESH, (billGroupModelList) => {
+      saveListState({
+        filterList: billGroupModelList,
+      })
+      setTimeout(() => {
+        this.forceUpdate()
+      }, 0)
+    }, this)
   }
 
   componentWillUnmount () {
@@ -74,7 +84,7 @@ class CurrencyList extends Component {
   }
 
   render () {
-    const { listState: { tabList, tabSelect, listData } } = this.props
+    const { listState: { tabList, tabSelect, listData }, rowCount } = this.props
     const { listDataSource, height, hasNextPage, filterOpen } = this.state
 
     const refreshLayout = this.getRefreshLayout()
@@ -124,6 +134,7 @@ class CurrencyList extends Component {
           }}
           renderRow={(rowData, sectionID, rowID) => {
             return <CurrencyListItem
+              rowCount={rowCount}
               rowData={rowData}
               onItemClick={this.onItemClick}/>
           }}
@@ -163,6 +174,7 @@ class CurrencyList extends Component {
 
   getFilterLayout = () => {
     const { listState: { filterList } } = this.props
+    console.log(filterList)
     const formItems = getFormItems(filterList)
     return (
       <div
@@ -175,6 +187,7 @@ class CurrencyList extends Component {
           <Button
             className='currency-list-content-filter-func-button'
             type="primary"
+            onClick={this.onFilterCommit.bind(this)}
             inline>确认</Button>
           <Button
             className='currency-list-content-filter-func-button'
@@ -195,13 +208,12 @@ class CurrencyList extends Component {
     //Todo 解决redux修改数据不同步问题
     setTimeout(() => {
       this.loadDataList()
-    }, 100)
+    }, 0)
   }
 
   loadDataList = () => {
     const { requestList, listState: { tabList, tabSelect } } = this.props
-    console.log(tabList)
-    console.log(tabSelect)
+
     requestList && requestList(tabList ? tabList[tabSelect].CODE : '')
       .then(() => {
         this.setState({
@@ -214,9 +226,9 @@ class CurrencyList extends Component {
       })
   }
 
-  onItemClick = () => {
+  onItemClick = (rowData) => {
     const { onItemClick } = this.props
-    onItemClick && onItemClick()
+    onItemClick && onItemClick(rowData)
   }
 
   onFilterOpen = () => {
@@ -239,6 +251,12 @@ class CurrencyList extends Component {
       return true
     }
   }
+
+  onFilterCommit = () => {
+    const { listState: { filterList } } = this.props
+    let formAndGrid = getFormAndGrid(filterList)
+    console.log(formAndGrid)
+  }
 }
 
 let mapStateToProps = (state) => ({

+ 7 - 4
uas-office-web/uas-mobile/src/components/common/currencyList/CurrencyListItem.jsx

@@ -6,7 +6,7 @@
 import React, { Component } from 'react'
 import './currency-list-item.less'
 import CurrencyRow from './CurrencyRow'
-import { isObjEmpty } from '../../../utils/common/common.util'
+import { isObjEmpty, isObjNull } from '../../../utils/common/common.util'
 
 export default class CurrencyListItem extends Component {
 
@@ -25,11 +25,13 @@ export default class CurrencyListItem extends Component {
   }
 
   render () {
-    const { rowData: { rowList } } = this.props
+    const { rowData: { rowList }, rowCount } = this.props
     const rowItems = []
     if (!isObjEmpty(rowList)) {
       rowList.forEach((item, index) => {
-        rowItems.push(<CurrencyRow rowObj={item}/>)
+        if (isObjNull(rowCount) || index < rowCount) {
+          rowItems.push(<CurrencyRow rowObj={item}/>)
+        }
       })
     }
 
@@ -44,6 +46,7 @@ export default class CurrencyListItem extends Component {
   }
 
   onItemClick = () => {
-    this.props.onItemClick && this.props.onItemClick()
+    const { rowData } = this.props
+    this.props.onItemClick && this.props.onItemClick(rowData)
   }
 }

+ 2 - 2
uas-office-web/uas-mobile/src/components/common/currencyList/currency-list-item.less

@@ -3,7 +3,7 @@
   padding: 8px;
   width: 100vw;
   background-color: white;
-  border-bottom: 1px solid @com-color-divide-gray-line;
+  border-top: 1px solid @com-color-divide-gray-line;
 }
 
 
@@ -14,7 +14,7 @@
   font-size: @com-form-fontsize-normal;
 
   .currency-row-caption {
-    width: 80px;
+    width: 90px;
     overflow: hidden;
     word-wrap: break-word;
     word-break: normal;

+ 80 - 13
uas-office-web/uas-mobile/src/components/common/currencyList/visitApplyBill.js

@@ -84,8 +84,8 @@ export function visitApplyBill () {
         {
           ...billModel,
           type: 'S',
-          caption: '被拜访对象ID',
-          field: 'objectId',
+          caption: '微信openid',
+          field: 'openid',
           readOnly: 'T',
           value: '',
           display: '',
@@ -95,19 +95,86 @@ export function visitApplyBill () {
         {
           ...billModel,
           type: 'S',
-          caption: '微信openid',
-          field: 'openid',
+          caption: '学校ID',
+          field: 'schoolId',
           readOnly: 'T',
           value: '',
           display: '',
           defValue: '',
           allowBlank: 'T',
         },
+      ],
+    },
+    {
+      ...billGroup,
+      isForm: false,
+      group: '条件明细',
+      lastInType: true,
+      showBillFields: [
         {
           ...billModel,
           type: 'S',
-          caption: '学校ID',
-          field: 'schoolId',
+          caption: '单号',
+          field: 'name',
+          readOnly: 'F',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'F',
+        },
+        {
+          ...billModel,
+          type: 'S',
+          caption: '币别',
+          field: 'idCard',
+          readOnly: 'F',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'F',
+        },
+        {
+          ...billModel,
+          type: 'N',
+          caption: '手机号',
+          field: 'mobile',
+          readOnly: 'F',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'F',
+          // inputType: 'phone',
+        },
+        {
+          ...billModel,
+          type: 'S',
+          caption: '仓管员',
+          field: 'objectName',
+          readOnly: 'F',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'F',
+        },
+        {
+          ...billModel,
+          type: 'D',
+          caption: '日期',
+          field: 'visitTime',
+          readOnly: 'F',
+          value: now.getFullYear() + '-' + (now.getMonth() + 1) + '-' +
+            now.getDate(),
+          display: now.getTime(),
+          defValue: '',
+          allowBlank: 'F',
+        },
+      ],
+      hideBillFields: [
+        {
+          ...billModel,
+          type: 'S',
+          caption: '拜访者ID',
+          field: 'visitorId',
           readOnly: 'T',
           value: '',
           display: '',
@@ -117,8 +184,8 @@ export function visitApplyBill () {
         {
           ...billModel,
           type: 'S',
-          caption: '公众号ID',
-          field: 'appId',
+          caption: '微信openid',
+          field: 'openid',
           readOnly: 'T',
           value: '',
           display: '',
@@ -128,12 +195,12 @@ export function visitApplyBill () {
         {
           ...billModel,
           type: 'S',
-          caption: '截止拜访时间',
-          field: 'visitEndTime',
+          caption: '学校ID',
+          field: 'schoolId',
           readOnly: 'T',
-          value: null,
-          display: null,
-          defValue: null,
+          value: '',
+          display: '',
+          defValue: '',
           allowBlank: 'T',
         },
       ],

+ 1 - 1
uas-office-web/uas-mobile/src/components/common/func/FuncGroup.jsx

@@ -78,7 +78,7 @@ export default class FuncGroup extends Component {
       <div
         className={card ? 'func-group-card' : 'func-group-normal'}>
         <FuncTitle funcTitle={funcGroup}
-                   card
+                   card={card}
                    rightIcon={rightIcon || funcGroup.rightIcon}
                    onRightClick={onRightClick}/>
         <div

+ 2 - 2
uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx

@@ -31,13 +31,13 @@ class FuncItem extends Component {
         funcObj.sup = response.data
         this.props.onFuncDataChange && this.props.onFuncDataChange(funcObj)
         if (funcObj.funcType === FUNC_TYPE_DOC) {
-          GlobalEvent.emit(EVENT_DOC_FUNC_COUNT, this, funcObj)
+          GlobalEvent.emit(EVENT_DOC_FUNC_COUNT, funcObj)
         }
       }).catch(error => {
         funcObj.sup = 0
         this.props.onFuncDataChange && this.props.onFuncDataChange(funcObj)
         if (funcObj.funcType === FUNC_TYPE_DOC) {
-          GlobalEvent.emit(EVENT_DOC_FUNC_COUNT, this, funcObj)
+          GlobalEvent.emit(EVENT_DOC_FUNC_COUNT, funcObj)
         }
       })
     }

+ 10 - 1
uas-office-web/uas-mobile/src/components/private/report/ReportSearchItem.jsx

@@ -5,6 +5,7 @@
 
 import React, { Component } from 'react'
 import './comp-report.less'
+import { Icon } from 'antd-mobile'
 
 export default class ReportSearchItem extends Component {
 
@@ -28,7 +29,15 @@ export default class ReportSearchItem extends Component {
       <div
         className='report-search-item-root'
         onClick={this.onSubItemClick}>
-        <img src={reportObj.img} className='report-search-item-img'/>
+        {
+          reportObj.img ?
+            <img src={reportObj.img}
+                 className='report-search-item-img'/> :
+            <Icon
+              className='report-search-item-img'
+              type={reportObj.icon || 'uas-func-default'}/>
+        }
+
         <span className='report-search-item-name'>{reportObj.name}</span>
       </div>
     )

+ 1 - 1
uas-office-web/uas-mobile/src/components/private/subscribe/comp-subscrive.less

@@ -112,7 +112,7 @@
 
 .comp-sub-already-item-root {
   .com-row-flex;
-  padding: 10px 14px;
+  padding: 8px 12px;
   align-items: center;
   background-color: white;
   border-bottom: 1px solid @com-color-divide-gray-line;

+ 3 - 3
uas-office-web/uas-mobile/src/configs/api.config.js

@@ -4,9 +4,9 @@
  */
 
 export const _host = window.location.origin
-// && 'http://10.1.7.104:8090/ERP'//吴炳
-// && 'http://10.1.7.44:8081/erp'//吴雨骁
-// && 'http://usoft.f3322.net:10007/uas'
+  // && 'http://10.1.7.104:8090/ERP'//吴炳
+  // && 'http://10.1.7.44:8081/erp'//吴雨骁
+  // && 'http://usoft.f3322.net:10007/uas'
 
 export const _baseURL = _host + (process.env.REACT_APP_ROUTER_BASE_NAME || '')
 

+ 7 - 2
uas-office-web/uas-mobile/src/configs/router.config.js

@@ -55,6 +55,8 @@ const OftenFuncManage = PageLoadable(
   import(/* webpackChunkName:'subscribe' */'@/pages/private/oftenFunc/OftenFuncManage'))
 const ServiceList = PageLoadable(
   import(/* webpackChunkName:'subscribe' */'@/pages/private/service/ServiceList'))
+const ServiceDetail = PageLoadable(
+  import(/* webpackChunkName:'subscribe' */'@/pages/private/service/ServiceDetail'))
 
 /**
  * 自定义页面返回事件拦截框
@@ -118,14 +120,17 @@ class Routes extends React.Component {
           {/***************************************报表******************************************/}
           {/*报表搜索*/}
           <Route path='/reportSearch' component={ReportSearch}/>
-          {/*报表列表*/}
+          {/*报表数据列表*/}
           <Route path='/reportList/:caller/:title?' component={ReportList}/>
 
           {/***************************************应用*******************************************/}
           {/*常用应用管理*/}
           <Route path='/oftenFuncManage' component={OftenFuncManage}/>
-          {/*应用列表*/}
+          {/*应用数据列表*/}
           <Route path='/serviceList/:caller/:title?' component={ServiceList}/>
+          {/*应用单据详情*/}
+          <Route path='/ServiceDetail'
+                 component={ServiceDetail}/>
 
           {/*所有错误路由跳转页面*/}
           <Route render={() => (

+ 871 - 5
uas-office-web/uas-mobile/src/pages/private/report/ReportList.jsx

@@ -13,13 +13,20 @@ import { LIST_PAGE_SIZE } from '../../../configs/constans.config'
 import { isObjEmpty } from '../../../utils/common/common.util'
 import { message } from 'antd'
 import { visitApplyBill } from '../../../components/common/currencyList/visitApplyBill'
+import { Prompt } from 'react-router-dom'
+import { Drawer } from 'antd-mobile'
+import CurrencyListItem
+  from '../../../components/common/currencyList/CurrencyListItem'
 
 class ReportList extends Component {
 
   constructor () {
     super()
 
-    this.state = {}
+    this.state = {
+      detailOpen: false,
+      detailData: [],
+    }
   }
 
   componentDidMount () {
@@ -33,9 +40,22 @@ class ReportList extends Component {
   }
 
   render () {
+    const { detailOpen } = this.state
+
+    const detailLayout = this.getDetailLayout()
     return (
       <div>
+        <Prompt message={this.handlePrompt}/>
+        <Drawer
+          sidebar={detailLayout}
+          onOpenChange={this.onFilterOpen}
+          open={detailOpen}
+          position={'bottom'}
+          className='currency-list-content-filter-root'
+          onOpenChange={this.onOpenChange}
+        />
         <CurrencyList
+          rowCount={5}
           requestList={this.requestList.bind(this)}
           requestSearchConfig={this.requestSearchConfig.bind(this)}
           onItemClick={this.onItemClick.bind(this)}
@@ -53,9 +73,826 @@ class ReportList extends Component {
     let { listState: { listData, pageIndex } } = this.props
     saveListState({
       listData: [
-        [{}, {}, {}],
-        [{}, {}, {}],
-        [{}, {}, {}],
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'GN0073',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '西乡福伴超市',
+            },
+            {
+              'caption': '简称',
+              'value': 'XXFB',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2020-02-20',
+            },
+            {
+              'caption': '联系人名',
+              'value': 'DDD',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 70408,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C190700011',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '金好电子有限公司1',
+            },
+            {
+              'caption': '简称',
+              'value': '金好1',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2019-07-10',
+            },
+            {
+              'caption': '联系人名',
+              'value': '陈小姐',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 70190,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'SISS000007',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': 'wyx预录入客户01',
+            },
+            {
+              'caption': '简称',
+              'value': 'wyx预录入客户01',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2019-01-18',
+            },
+            {
+              'caption': '联系人名',
+              'value': '1',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 69787,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C18090007',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '926客户1',
+            },
+            {
+              'caption': '简称',
+              'value': '926客户1',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-09-26',
+            },
+            {
+              'caption': '联系人名',
+              'value': '联系人1',
+            },
+            {
+              'caption': '职务',
+              'value': '1',
+            },
+            {
+              'caption': '电话',
+              'value': '1',
+            },
+          ],
+          'id': 68827,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C18080002',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '帕诺迪(测试)',
+            },
+            {
+              'caption': '简称',
+              'value': 'null',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': null,
+            },
+            {
+              'caption': '录入日期',
+              'value': null,
+            },
+            {
+              'caption': '联系人名',
+              'value': '帕诺迪',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': 'null',
+            },
+          ],
+          'id': 68468,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'LJ000000000002',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '测试1235678',
+            },
+            {
+              'caption': '简称',
+              'value': '测试1234445565',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-08-06',
+            },
+            {
+              'caption': '联系人名',
+              'value': '233223323',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 68249,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'SISS000004',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': 'QYtest0711',
+            },
+            {
+              'caption': '简称',
+              'value': 'testQY0711',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-07-11',
+            },
+            {
+              'caption': '联系人名',
+              'value': '詹国胜',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 67887,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'SISS000001',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '网络营销大客户部',
+            },
+            {
+              'caption': '简称',
+              'value': '网络大客户部',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-06-25',
+            },
+            {
+              'caption': '联系人名',
+              'value': '网络',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 67687,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C20002220000',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '测试带空格123456',
+            },
+            {
+              'caption': '简称',
+              'value': '测试带空格12345',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': null,
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-06-14',
+            },
+            {
+              'caption': '联系人名',
+              'value': '招',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 67590,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': '中央音乐学院',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '阳丽琴',
+            },
+            {
+              'caption': '简称',
+              'value': null,
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-10-12',
+            },
+            {
+              'caption': '联系人名',
+              'value': '175555',
+            },
+            {
+              'caption': '职务',
+              'value': '北京中南海',
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 67468,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C18060002',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '对对对',
+            },
+            {
+              'caption': '简称',
+              'value': '对对对',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-06-04',
+            },
+            {
+              'caption': '联系人名',
+              'value': 'cc',
+            },
+            {
+              'caption': '职务',
+              'value': '哦哟凸轮',
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 67431,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C18050008',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '测试2221',
+            },
+            {
+              'caption': '简称',
+              'value': '从此错',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-05-31',
+            },
+            {
+              'caption': '联系人名',
+              'value': '123',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 67409,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'cus001',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '东盛集团',
+            },
+            {
+              'caption': '简称',
+              'value': '东盛',
+            },
+            {
+              'caption': '审核状态',
+              'value': '已审核',
+            },
+            {
+              'caption': '财务状态',
+              'value': '挂起',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-06-11',
+            },
+            {
+              'caption': '联系人名',
+              'value': 'lili',
+            },
+            {
+              'caption': '职务',
+              'value': 'cio',
+            },
+            {
+              'caption': '电话',
+              'value': '075587675555',
+            },
+          ],
+          'id': 67187,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C18050004',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '客户预录入',
+            },
+            {
+              'caption': '简称',
+              'value': '客户',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-05-15',
+            },
+            {
+              'caption': '联系人名',
+              'value': '郑先生',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 67167,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C18050003',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '新建客户名称',
+            },
+            {
+              'caption': '简称',
+              'value': '新建',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-05-04',
+            },
+            {
+              'caption': '联系人名',
+              'value': '01',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 67047,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'CM00007',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '测试附近',
+            },
+            {
+              'caption': '简称',
+              'value': '测试123412',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-04-19',
+            },
+            {
+              'caption': '联系人名',
+              'value': '1231',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 66910,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C20000000',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '测试带空格1',
+            },
+            {
+              'caption': '简称',
+              'value': '测试带空格1',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': null,
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-04-08',
+            },
+            {
+              'caption': '联系人名',
+              'value': '招',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': null,
+            },
+          ],
+          'id': 66787,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C18040001',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '安捷诚',
+            },
+            {
+              'caption': '简称',
+              'value': null,
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': null,
+            },
+            {
+              'caption': '录入日期',
+              'value': null,
+            },
+            {
+              'caption': '联系人名',
+              'value': '章总',
+            },
+            {
+              'caption': '职务',
+              'value': '总经理',
+            },
+            {
+              'caption': '电话',
+              'value': '0755-32589857',
+            },
+          ],
+          'id': 66767,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'C18030011',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '优软paas有限公司',
+            },
+            {
+              'caption': '简称',
+              'value': 'null',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': null,
+            },
+            {
+              'caption': '录入日期',
+              'value': null,
+            },
+            {
+              'caption': '联系人名',
+              'value': '董必伟',
+            },
+            {
+              'caption': '职务',
+              'value': null,
+            },
+            {
+              'caption': '电话',
+              'value': 'null',
+            },
+          ],
+          'id': 66527,
+        },
+        {
+          'rowList': [
+            {
+              'caption': 'CODE',
+              'value': 'GN0068',
+            },
+            {
+              'caption': 'CUSTOMER NAME',
+              'value': '测试客户',
+            },
+            {
+              'caption': '简称',
+              'value': '测试121',
+            },
+            {
+              'caption': '审核状态',
+              'value': '在录入',
+            },
+            {
+              'caption': '财务状态',
+              'value': '长期',
+            },
+            {
+              'caption': '录入日期',
+              'value': '2018-03-14',
+            },
+            {
+              'caption': '联系人名',
+              'value': '刘思',
+            },
+            {
+              'caption': '职务',
+              'value': '销售经理',
+            },
+            {
+              'caption': '电话',
+              'value': '145678908074',
+            },
+          ],
+          'id': 66187,
+        },
       ],
     })
     pageIndex++
@@ -102,11 +939,40 @@ class ReportList extends Component {
     })
   }
 
+  /**
+   * 详情布局
+   */
+  getDetailLayout = () => {
+    const { detailData } = this.state
+    return (
+      <div
+        className='report-detail-root'>
+        <div className='report-detail-title'>
+          报表详情
+        </div>
+        <div className='report-detail-content'>
+          <CurrencyListItem
+            rowData={detailData}/>
+        </div>
+      </div>
+    )
+  }
+
   /**
    * 列表点击事件
    */
-  onItemClick = () => {
+  onItemClick = (rowData) => {
+    console.log(rowData)
+    const rowList = rowData.rowList
+    rowData.rowList = rowList.concat(rowList, rowList, rowList, rowList)
+    this.setState({
+      detailOpen: true,
+      detailData: rowData,
+    })
+  }
 
+  onOpenChange = () => {
+    this.setState({ detailOpen: !this.state.detailOpen })
   }
 }
 

+ 22 - 0
uas-office-web/uas-mobile/src/pages/private/report/report.less

@@ -9,3 +9,25 @@
     background: white;
   }
 }
+
+.report-detail-root {
+  width: 100%;
+  height: 80vh;
+  background-color: white;
+  overflow: auto;
+  display: flex;
+  flex-direction: column;
+
+  .report-detail-title {
+    width: 100%;
+    padding: 8px;
+    font-size: 14px;
+    text-align: center;
+    font-weight: bold;
+  }
+
+  .report-detail-content {
+    flex: 1;
+    overflow-y: scroll;
+  }
+}

+ 62 - 0
uas-office-web/uas-mobile/src/pages/private/service/ServiceDetail.jsx

@@ -0,0 +1,62 @@
+/**
+ * Created by RaoMeng on 2020/12/11
+ * Desc: 应用详情
+ */
+
+import React, { Component } from 'react'
+import { connect } from 'react-redux'
+import { Toast } from 'antd-mobile'
+import { analysisFormData } from '../../../utils/common/form.request'
+import CurrencyDetail
+  from '../../../components/common/currencyDetail/CurrencyDetail'
+import { GlobalEvent } from '../../../utils/common/eventbus/eventbus'
+import { CURRENCY_DETAIL_DATA_REFRESH } from '../../../utils/common/eventbus/events.types'
+
+class ServiceDetail extends Component {
+
+  constructor () {
+    super()
+
+    this.state = {
+      billGroupList: [],
+    }
+  }
+
+  componentDidMount () {
+    document.title = ''
+
+    this.requestFormData()
+
+    GlobalEvent.on(CURRENCY_DETAIL_DATA_REFRESH, (billGroupModelList) => {
+      this.setState({
+        billGroupList: billGroupModelList,
+      })
+    })
+  }
+
+  componentWillUnmount () {
+
+  }
+
+  render () {
+    const { billGroupList } = this.state
+    return (
+      <div>
+        <CurrencyDetail formGroups={billGroupList}/>
+      </div>
+    )
+  }
+
+  requestFormData = () => {
+    Toast.loading('单据获取中', 0)
+    setTimeout(() => {
+      Toast.hide()
+      const billGroupList = analysisFormData()
+      this.setState({ billGroupList })
+    }, 1000)
+  }
+}
+
+let mapStateToProps = (state) => ({})
+
+export default connect(mapStateToProps)(ServiceDetail)

+ 1 - 1
uas-office-web/uas-mobile/src/pages/private/service/ServiceList.jsx

@@ -131,7 +131,7 @@ class ServiceList extends Component {
    * 列表点击事件
    */
   onItemClick = () => {
-
+    this.props.history.push('/ServiceDetail')
   }
 }
 

+ 0 - 6
uas-office-web/uas-mobile/src/redux/actions/mainState.js

@@ -29,9 +29,3 @@ export const clearMainState = () => {
     type: CLEAR_MAIN_STATE,
   })
 }
-
-const test = () => {
-  GlobalEvent.on('test', (value) => {
-    console.log('raomeng', value)
-  })
-}

+ 3 - 3
uas-office-web/uas-mobile/src/utils/common/eventbus/eventbus.js

@@ -73,18 +73,18 @@ export class EventBus {
    * @param {object} target The caller
    * @param {...any} args Any number of args to be passed to the callback
    */
-  emit (type, target, ...args) {
+  emit (type, ...args) {
     if (typeof this.events[type] === 'undefined') { // Check if any event of the passed type exists
       return // If not, quit method
     }
 
-    let bag = { type, target }
+    // let bag = { type, target }
 
     const events = this.events[type].slice() // Little hack to clone array
 
     for (const event of events) { // Iterate all events
       if (event && event.callback) { // Check if callback of event is set
-        event.callback.apply(event.scope, [bag, ...args, ...event.args]) // Call callback
+        event.callback.apply(event.scope, [...args, ...event.args]) // Call callback
       }
     }
   }

+ 3 - 0
uas-office-web/uas-mobile/src/utils/common/eventbus/events.types.js

@@ -3,4 +3,7 @@
  * Desc: 全局事件type
  */
 
+//应用红点刷新
 export const EVENT_DOC_FUNC_COUNT = 'EVENT_DOC_FUNC_COUNT'
+//通用表单数据变化
+export const CURRENCY_DETAIL_DATA_REFRESH = 'CURRENCY_DETAIL_DATA_REFRESH'

+ 62 - 25
uas-office-web/uas-mobile/src/utils/common/form.request.js

@@ -5,6 +5,7 @@
 import { Toast } from 'antd-mobile'
 import { isObjEmpty } from './common.util'
 import BillGroupModel from '../../model/common/BillGroupModel'
+import BillModel from '../../model/common/BillModel'
 
 const testForm = [
   {
@@ -14,10 +15,11 @@ const testForm = [
     'groupCaller': 'test',
     'fieldList': [
       {
-        'appwidth': '字符宽度',
+        'appwidth': 100,
+        'length': 100,
         'isdefault': true,
         'caption': '姓名',
-        'value': 'raomeng',
+        'value': '饶猛',
         'display': '饶猛',
         'type': 'S',
         'readOnly': true,
@@ -27,10 +29,11 @@ const testForm = [
         'localDatas': [],
       },
       {
-        'appwidth': '字符宽度',
+        'appwidth': 100,
+        'length': 100,
         'isdefault': true,
-        'caption': '姓名',
-        'value': 'raomeng',
+        'caption': '性别',
+        'value': '',
         'display': '饶猛',
         'type': 'S',
         'readOnly': true,
@@ -40,10 +43,11 @@ const testForm = [
         'localDatas': [],
       },
       {
-        'appwidth': '字符宽度',
+        'appwidth': 100,
+        'length': 100,
         'isdefault': true,
-        'caption': '姓名',
-        'value': 'raomeng',
+        'caption': '年龄',
+        'value': '25',
         'display': '饶猛',
         'type': 'S',
         'readOnly': true,
@@ -53,10 +57,11 @@ const testForm = [
         'localDatas': [],
       },
       {
-        'appwidth': '字符宽度',
+        'appwidth': 100,
+        'length': 100,
         'isdefault': true,
-        'caption': '姓名',
-        'value': 'raomeng',
+        'caption': '籍贯',
+        'value': '江西',
         'display': '饶猛',
         'type': 'S',
         'readOnly': true,
@@ -66,10 +71,11 @@ const testForm = [
         'localDatas': [],
       },
       {
-        'appwidth': '字符宽度',
+        'appwidth': 100,
+        'length': 100,
         'isdefault': true,
-        'caption': '姓名',
-        'value': 'raomeng',
+        'caption': '公司',
+        'value': '深圳市优软科技有限公司',
         'display': '饶猛',
         'type': 'S',
         'readOnly': true,
@@ -79,10 +85,11 @@ const testForm = [
         'localDatas': [],
       },
       {
-        'appwidth': '字符宽度',
+        'appwidth': 100,
+        'length': 100,
         'isdefault': true,
-        'caption': '姓名',
-        'value': 'raomeng',
+        'caption': '学校',
+        'value': '南昌大学',
         'display': '饶猛',
         'type': 'S',
         'readOnly': true,
@@ -92,10 +99,11 @@ const testForm = [
         'localDatas': [],
       },
       {
-        'appwidth': '字符宽度',
+        'appwidth': 100,
+        'length': 100,
         'isdefault': true,
-        'caption': '姓名',
-        'value': 'raomeng',
+        'caption': '高中',
+        'value': '金溪一中',
         'display': '饶猛',
         'type': 'S',
         'readOnly': true,
@@ -109,19 +117,48 @@ const testForm = [
 ]
 
 export function analysisFormData () {
+  let billGroupList = []
   if (!isObjEmpty(testForm)) {
-    let billGroupList = []
     testForm.forEach((groupItem, groupIndex) => {
       let billGroup = new BillGroupModel()
       billGroup.group = groupItem.groupTitle
-      billGroup.isForm = groupIndex.isForm
-      billGroup.keyField = groupIndex.keyField
-      billGroup.billCaller = groupIndex.groupCaller
+      billGroup.isForm = groupItem.isForm
+      billGroup.keyField = groupItem.keyField
+      billGroup.billCaller = groupItem.groupCaller
       billGroup.groupIndex = groupIndex
 
+      let showBillFields = [], hideBillFields = []
       if (!isObjEmpty(groupItem.fieldList)) {
-        groupItem.fieldList.forEach(() => {})
+        groupItem.fieldList.forEach((fieldItem, filedIndex) => {
+          let billModel = new BillModel()
+
+          billModel.groupIndex = groupIndex
+          billModel.appwidth = fieldItem.appwidth
+          billModel.length = fieldItem.length
+          billModel.isdefault = fieldItem.isdefault
+          billModel.caption = fieldItem.caption
+          billModel.type = fieldItem.type
+          billModel.readOnly = fieldItem.readOnly ? 'T' : 'F'
+          billModel.field = fieldItem.field
+          billModel.value = fieldItem.value
+          billModel.display = fieldItem.display
+          billModel.defValue = fieldItem.defValue
+          billModel.allowBlank = fieldItem.allowBlank ? 'T' : 'F'
+
+          if (billModel.isdefault) {
+            showBillFields.push(billModel)
+          } else {
+            hideBillFields.push(billModel)
+          }
+        })
       }
+
+      billGroup.showBillFields = showBillFields
+      billGroup.hideBillFields = hideBillFields
+
+      billGroupList.push(billGroup)
     })
   }
+
+  return billGroupList
 }

+ 12 - 2
uas-office-web/uas-mobile/src/utils/common/form.util.js

@@ -14,11 +14,15 @@ import BillModel, {
 import FormTitle from '../../components/common/formNew/FormTitle'
 import BillGroupModel from '../../model/common/BillGroupModel'
 import { _baseURL } from '../../configs/api.config'
+import { GlobalEvent } from './eventbus/eventbus'
+import { CURRENCY_DETAIL_DATA_REFRESH } from './eventbus/events.types'
+import { Modal } from 'antd-mobile'
 
 /**
  * Created by RaoMeng on 2020/11/6
  * Desc: 通用表单生成组件工具类
  */
+const alert = Modal.alert
 
 /**
  * 通过json数据获取表单组件列表
@@ -53,6 +57,7 @@ export function getFormItems (billGroupModelList) {
                     <FormInput billModel={billModel} groupIndex={g}
                                childIndex={i}
                                baseUrl={_baseURL}
+                               key={g + 'formInput' + i}
                                onTextChange={onTextChange.bind(this,
                                  billGroupModelList)}
                                onInputClick={onInputClick.bind(this,
@@ -76,8 +81,10 @@ export function getFormItems (billGroupModelList) {
           if (billGroup.isForm == false && billGroup.lastInType == true) {
             //如果是最后一个从表,则添加【新增】按钮
             formItems.push(
-              <FormAdd billModel={getAddModel(g)} groupIndex={g}
+              <FormAdd billModel={getAddModel(g)}
+                       groupIndex={g}
                        onAddClick={onAddClick.bind(this, billGroupModelList)}
+                       key={'formAdd' + g}
               />,
             )
           }
@@ -98,6 +105,7 @@ function onAddClick (billGroupModelList, groupIndex) {
   let newBillGroup = newGridBillGroup(groupIndex,
     billGroupModelList[groupIndex])
   billGroupModelList.push(newBillGroup)
+  GlobalEvent.emit(CURRENCY_DETAIL_DATA_REFRESH, billGroupModelList)
 }
 
 function newGridBillGroup (groupIndex, oldBillGroup) {
@@ -203,7 +211,8 @@ function addGroupTitle (
 }
 
 function onDeleteClick (billGroupModelList, groupIndex) {
-  this.deleteAlert = alert('提示', '确认删除该明细?', [
+  // this.deleteAlert =
+  alert('提示', '确认删除该明细?', [
     {
       text: '取消',
       onPress: () => {},
@@ -241,6 +250,7 @@ function deleteGroup (billGroupModelList, groupIndex) {
   } else {
     billGroupModelList.splice(groupIndex, 1)
   }
+  GlobalEvent.emit(CURRENCY_DETAIL_DATA_REFRESH, billGroupModelList)
 }
 
 function onTextChange (