Browse Source

uas手机版
报表详情弹框

RaoMeng 5 years ago
parent
commit
bc4b7ac6ee

+ 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',
         },
       ],

+ 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)
         }
       })
     }

+ 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;

+ 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;
+  }
+}

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

@@ -9,6 +9,8 @@ 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 {
 
@@ -24,6 +26,12 @@ class ServiceDetail extends Component {
     document.title = ''
 
     this.requestFormData()
+
+    GlobalEvent.on(CURRENCY_DETAIL_DATA_REFRESH, (billGroupModelList) => {
+      this.setState({
+        billGroupList: billGroupModelList,
+      })
+    })
   }
 
   componentWillUnmount () {

+ 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'

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

@@ -143,7 +143,7 @@ export function analysisFormData () {
           billModel.value = fieldItem.value
           billModel.display = fieldItem.display
           billModel.defValue = fieldItem.defValue
-          billModel.allowBlank = fieldItem.allowBlank
+          billModel.allowBlank = fieldItem.allowBlank ? 'T' : 'F'
 
           if (billModel.isdefault) {
             showBillFields.push(billModel)

+ 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 (