king
2020-03-04 96455706619a0a2a96a836714e106f4c7a3bfd40
2020-03-04
17个文件已修改
167 ■■■■ 已修改文件
src/components/header/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tabview/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/mainTable/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/formgroup/index.jsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/formgroup/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/managetable/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/subTable/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/mutilform/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/tableshare/mutilform/index.scss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/source.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/source.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycard/billcodeform/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/tableshare/verifycard/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/header/index.jsx
@@ -361,10 +361,6 @@
    this.loadmenu()
  }
  UNSAFE_componentWillReceiveProps () {
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
src/components/tabview/index.jsx
@@ -89,7 +89,7 @@
    } else if (view.type === 'TabForm') {
      return (<Comps.TabForm MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>)
    } else if (view.type === 'FormTab') {
      return (<Comps.FormTab MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>)
      return (<Comps.FormTab MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} menuType={view.param.menuType} key={view.MenuID} param={view.param}/>)
    } else if (view.type === 'iframe') {
      return (<Comps.Iframe key={view.MenuID} title={view.MenuName} MenuName={view.MenuName} url={service + view.LinkUrl}/>)
    } else {
@@ -171,7 +171,7 @@
          Comps.RoleManage = asyncComponent(() => import('@/tabviews/rolemanage'))
        } else if (!Comps.TabForm && newtab.type === 'TabForm') {
          Comps.TabForm = asyncComponent(() => import('@/tabviews/tabform'))
        } else if (!Comps.TabForm && newtab.type === 'FormTab') {
        } else if (!Comps.FormTab && newtab.type === 'FormTab') {
          Comps.FormTab = asyncComponent(() => import('@/tabviews/formtab'))
        }
      }
src/tabviews/commontable/index.jsx
@@ -721,6 +721,7 @@
        type: btn.tabTemplate,
        selected: true,
        param: {
          menuType: 'main',
          parentId: this.props.MenuID,
          btn: btn,
          data: data[0] || null,
@@ -877,6 +878,7 @@
              ref="mainButton"
              BID=""
              type="main"
              menuType="main"
              setting={setting}
              actions={actions}
              dict={this.state.dict}
@@ -931,6 +933,7 @@
                        {_tab.type === 'SubTable' ?
                          <SubTable
                            Tab={_tab}
                            menuType="main"
                            MenuID={_tab.linkTab}
                            SupMenuID={this.props.MenuID}
                            refreshtabs={this.state.refreshtabs}
@@ -967,6 +970,7 @@
          >
            {<SubTabTable 
              BID={''}
              menuType="main"
              SupMenuID={this.props.MenuID}
              MenuID={this.state.popAction.linkTab}
              BData={this.state.BIDs['mainTabledata'] || ''}
@@ -997,7 +1001,7 @@
          </Modal>
          {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
        </div> : null}
        {view === 'formtab' ? <FormTab MenuID={this.state.tabBtn.uuid} param={this.state.tabParam} refresh={this.refreshbyformtab}/> : null}
        {view === 'formtab' ? <FormTab menuType="main" MenuID={this.state.tabBtn.uuid} param={this.state.tabParam} refresh={this.refreshbyformtab}/> : null}
      </div>
    )
  }
src/tabviews/commontable/mainTable/index.jsx
@@ -160,7 +160,7 @@
        <div className={match ? item.color : ''}>
          <div className="background"></div>
          <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
            <Paragraph copyable ellipsis={{ rows: 3, expandable: true }}>{content}</Paragraph>
            {content ? <Paragraph copyable ellipsis={{ rows: 3, expandable: true }}>{content}</Paragraph> : null }
          </div>
        </div>
      )
src/tabviews/formtab/formgroup/index.jsx
@@ -355,6 +355,7 @@
                  showSearch
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  onChange={(value, option) => {this.selectChange(item, value, option)}}
                  disabled={item.readonly === 'true'}
                >
                  {item.options.map(option =>
                    <Select.Option id={option.key} data={hasSubField ? option : ''} title={option.Text} key={option.key} value={option.Value}>{option.Text}</Select.Option>
@@ -382,6 +383,7 @@
                  showSearch
                  mode="multiple"
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  disabled={item.readonly === 'true'}
                >
                  {item.options.map(option =>
                    <Select.Option id={option.key} title={option.Text} key={option.key} value={option.Value}>{option.Text}</Select.Option>
@@ -411,7 +413,7 @@
                  }
                ]
              })(
                <DatePicker />
                <DatePicker disabled={item.readonly === 'true'} />
              )}
            </Form.Item>
          </Col>
@@ -436,7 +438,7 @@
                  }
                ]
              })(
                <MonthPicker />
                <MonthPicker disabled={item.readonly === 'true'} />
              )}
            </Form.Item>
          </Col>
@@ -462,7 +464,7 @@
                  }
                ]
              })(
                <DatePicker showTime />
                <DatePicker showTime disabled={item.readonly === 'true'} />
              )}
            </Form.Item>
          </Col>
src/tabviews/formtab/formgroup/index.scss
@@ -33,4 +33,18 @@
    color: #1890ff;
    border-bottom: 1px solid #d9d9d9;
  }
  .ant-input-disabled {
    color: rgba(0, 0, 0, 0.65)!important;
    cursor: default!important;
  }
  .ant-input-number-input {
    color: rgba(0, 0, 0, 0.65)!important;
    cursor: default!important;
  }
  .ant-select-disabled {
    color: rgba(0, 0, 0, 0.65)!important;
    .ant-select-selection--multiple .ant-select-selection__choice {
      color: rgba(0, 0, 0, 0.65)!important;
    }
  }
}
src/tabviews/managetable/index.jsx
@@ -707,6 +707,7 @@
        type: btn.tabTemplate,
        selected: true,
        param: {
          menuType: 'HS',
          parentId: this.props.MenuID,
          btn: btn,
          data: data[0] || null,
src/tabviews/subtable/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { notification, Spin, Modal, Button} from 'antd'
import { notification, Spin, Modal, Button, Switch} from 'antd'
import moment from 'moment'
import Api from '@/api'
import SubTable from './subTable'
@@ -54,7 +54,8 @@
    configMap: {},        // 页面配置信息:下拉、按钮等
    popAction: false,     // 弹框页面,按钮信息
    popData: false,       // 弹框页面,所选的表格数据
    visible: false        // 弹框显示隐藏控制
    visible: false,       // 弹框显示隐藏控制
    pickup: false,         // 子表数据隐藏显示切换
  }
  /**
@@ -335,6 +336,7 @@
          return item
        }),
        total: result.total,
        pickup: false,
        loading: false
      })
    } else {
@@ -611,6 +613,17 @@
    })
  }
  /**
   * @description 数据展开合并切换
   */
  pickupChange = () => {
    const { pickup } = this.state
    this.setState({
      pickup: !pickup
    })
  }
  popclose = () => {
    this.setState({
      visible: false
@@ -623,8 +636,8 @@
    this.loadconfig()
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  shouldComponentUpdate (nextProps, nextState) { // handleMainTable 函数判断时不相等
    return !is(fromJS({...this.props, handleMainTable: '', handleTableId: ''}), fromJS({...nextProps, handleMainTable: '', handleTableId: ''})) || !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -637,7 +650,7 @@
  }
  render() {
    const { setting, searchlist, actions, columns, loadingview, viewlost } = this.state
    const { setting, searchlist, actions, columns, loadingview, viewlost, pickup } = this.state
    return (
      <div className="subtable" id={'subtable' + this.props.MenuID}>
@@ -669,20 +682,29 @@
            gettableselected={this.gettableselected}
          />
        }
        {columns &&
        {/* {this.state.data && this.state.data.length > 0 ?
          <Switch title="收起" className="subtable-pickup" checkedChildren="开" unCheckedChildren="关" defaultChecked={pickup} onChange={this.pickupChange} /> : null
        } */}
        {columns ?
          <div className="subtable-box">
            {this.state.data && this.state.data.length > 0 ?
              <Switch title="收起" className="subtable-pickup" checkedChildren="开" unCheckedChildren="关" defaultChecked={pickup} onChange={this.pickupChange} /> : null
            }
          <SubTable
            ref="subTable"
            dict={this.state.dict}
            MenuID={this.props.MenuID}
              pickup={pickup}
            setting={setting}
            columns={columns}
              dict={this.state.dict}
            data={this.state.data}
            total={this.state.total}
              MenuID={this.props.MenuID}
            loading={this.state.loading}
            refreshdata={this.refreshbytable}
            buttonTrigger={this.buttonTrigger}
            handleTableId={this.handleTableId}
          />
          </div> : null
        }
        <Modal
          className="popview-modal"
src/tabviews/subtable/index.scss
@@ -29,6 +29,15 @@
    left: calc(50% - 22px);
    top: 100px;
  }
  .subtable-box {
    position: relative;
    .subtable-pickup {
      position: absolute;
      right: 5px;
      top: -25px;
      z-index: 10;
    }
  }
}
.popview-modal {
  .ant-modal-body {
src/tabviews/subtable/subTable/index.jsx
@@ -1,5 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Table, message, Button, Typography } from 'antd'
import './index.scss'
@@ -16,7 +17,8 @@
    loading: PropTypes.bool,       // 表格加载中
    refreshdata: PropTypes.func,   // 表格中排序列、页码的变化时刷新
    buttonTrigger: PropTypes.func, // 表格中按钮触发操作
    handleTableId: PropTypes.func  // 控制表格数据切换时,更新在主表中的id
    handleTableId: PropTypes.func, // 控制表格数据切换时,更新在主表中的id
    pickup: PropTypes.any          // 数据展开合并控制
  }
  state = {
@@ -142,7 +144,7 @@
        <div className={match ? item.color : ''}>
          <div className="background"></div>
          <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}>
            <Paragraph copyable ellipsis={{ rows: 3, expandable: true }}>{content}</Paragraph>
            {content ? <Paragraph copyable ellipsis={{ rows: 3, expandable: true }}>{content}</Paragraph> : null}
          </div>
        </div>
      )
@@ -313,6 +315,10 @@
    this.props.handleTableId(_id, _data)
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))
  }
  render() {
    let { selectedRowKeys } = this.state
@@ -325,6 +331,11 @@
      }
    }
    let _data = this.props.data ? this.props.data : []
    if (this.props.pickup) {
      _data = _data.filter((item, index) => selectedRowKeys.includes(index))
    }
    return (
      <div className="sub-table">
        <Table
@@ -332,7 +343,7 @@
          bordered={true}
          rowSelection={rowSelection}
          columns={this.state.columns}
          dataSource={this.props.data ? this.props.data : []}
          dataSource={_data}
          loading={this.props.loading}
          scroll={{ x: '100%', y: false }}
          onRow={(record, index) => {
src/tabviews/tableshare/mutilform/index.jsx
@@ -114,7 +114,7 @@
      
      if (item.type === 'linkMain' && BData && BData.hasOwnProperty(item.field)) {
        item.initval = BData[item.field]
      } else if (_readin && !/^date/.test(item.type) && this.props.data && this.props.data.hasOwnProperty(item.field)) {
      } else if (item.type !== 'linkMain' && _readin && !/^date/.test(item.type) && this.props.data && this.props.data.hasOwnProperty(item.field)) {
        item.initval = this.props.data[item.field]
      }
@@ -354,6 +354,7 @@
                  showSearch
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  onChange={(value, option) => {this.selectChange(item, value, option)}}
                  disabled={item.readonly === 'true'}
                >
                  {item.options.map(option =>
                    <Select.Option id={option.key} data={hasSubField ? option : ''} title={option.Text} key={option.key} value={option.Value}>{option.Text}</Select.Option>
@@ -381,6 +382,7 @@
                  showSearch
                  mode="multiple"
                  filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                  disabled={item.readonly === 'true'}
                >
                  {item.options.map(option =>
                    <Select.Option id={option.key} title={option.Text} key={option.key} value={option.Value}>{option.Text}</Select.Option>
@@ -409,7 +411,7 @@
                  }
                ]
              })(
                <DatePicker />
                <DatePicker disabled={item.readonly === 'true'} />
              )}
            </Form.Item>
          </Col>
@@ -433,7 +435,7 @@
                  }
                ]
              })(
                <MonthPicker />
                <MonthPicker disabled={item.readonly === 'true'} />
              )}
            </Form.Item>
          </Col>
@@ -458,7 +460,7 @@
                ]
              })(
                // <DatePicker showTime getCalendarContainer={() => document.getElementById('form-box')} />
                <DatePicker showTime />
                <DatePicker showTime disabled={item.readonly === 'true'} />
              )}
            </Form.Item>
          </Col>
src/tabviews/tableshare/mutilform/index.scss
@@ -33,4 +33,18 @@
    color: #1890ff;
    border-bottom: 1px solid #d9d9d9;
  }
  .ant-input-disabled {
    color: rgba(0, 0, 0, 0.65)!important;
    cursor: default!important;
  }
  .ant-input-number-input {
    color: rgba(0, 0, 0, 0.65)!important;
    cursor: default!important;
  }
  .ant-select-disabled {
    color: rgba(0, 0, 0, 0.65)!important;
    .ant-select-selection--multiple .ant-select-selection__choice {
      color: rgba(0, 0, 0, 0.65)!important;
    }
  }
}
src/templates/comtableconfig/source.jsx
@@ -320,6 +320,12 @@
    },
    {
      type: 'columns',
      label: CommonDict['header.form.textarea'],
      subType: 'textarea',
      url: ''
    },
    {
      type: 'columns',
      label: CommonDict['header.form.colspan'],
      subType: 'colspan',
      url: ''
src/templates/subtableconfig/source.jsx
@@ -270,6 +270,12 @@
    },
    {
      type: 'columns',
      label: CommonDict['header.form.textarea'],
      subType: 'textarea',
      url: ''
    },
    {
      type: 'columns',
      label: CommonDict['header.form.colspan'],
      subType: 'colspan',
      url: ''
src/templates/tableshare/verifycard/billcodeform/index.jsx
@@ -8,6 +8,7 @@
class UniqueForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,         // 字典项
    btn: PropTypes.object,          // 按钮信息
    fields: PropTypes.array,        // 表单
    billcodes: PropTypes.array,     // 表单
    columns: PropTypes.array,       // 表单
@@ -38,12 +39,15 @@
        fieldMap.set(_field.field, true)
      }
    })
    if (this.props.btn.Ot !== 'notRequired') {
    this.props.columns.forEach(_field => {
      if (_field.type === 'text' && !fieldMap.has(_field.field)) {
        _billFields.push(_field)
        fieldMap.set(_field.field, true)
      }
    })
    }
    let _usedfields = this.props.billcodes.map(item => item.field)
src/templates/tableshare/verifycard/index.jsx
@@ -1088,6 +1088,7 @@
          <TabPane tab="单号生成" key="4">
            <BillcodeForm
              fields={fields}
              btn={this.props.card}
              billcodes={verify.billcodes}
              columns={this.props.columns}
              dict={this.props.dict}
src/utils/utils.js
@@ -607,13 +607,13 @@
    // 需要声明的变量集
    // let _vars = ['tbid', 'ErrorCode', 'retmsg', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'UserName', 'FullName', 'ID', 'BID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey']
    // let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'id', 'bid', 'loginuid', 'sessionuid', 'userid', 'appkey']
    let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname']
    let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode']
    // 主键字段
    let primaryKey = setting.primaryKey || 'id'
    // 系统变量声明与设置初始值
    let _sql = `Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50)
    let _sql = `Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@ModularDetailCode nvarchar(50)
      `
    // let _initvars = ['ID', 'BID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey'] // 已赋值字段集
@@ -828,16 +828,24 @@
    if (verify.billcodes && verify.billcodes.length > 0) {
      verify.billcodes.forEach(item => {
        let _ModularDetailCode = ''
        if (item.TypeCharOne === 'Lp' || item.TypeCharOne === 'BN') {
        let _lpline = ''
        if (item.TypeCharOne === 'Lp') {
          if (item.linkField === 'BID' && BID) { // 替换bid
            _lpline = `set @ModularDetailCode= 'Lp'+ right('${btn.uuid}'+@BID@,48)`
          } else {
            _lpline = `set @ModularDetailCode= 'Lp'+ right('${btn.uuid}'+@${item.linkField},48)`
          }
          _ModularDetailCode = '@ModularDetailCode'
        } else if (item.TypeCharOne === 'BN') {
          let _val = ''
          if (item.linkField === 'BID' && BID) { // 替换bid
            _val = BID
          } else if (data && data.hasOwnProperty(item.linkField)) {
            _val = data[item.linkField]
          }
          _ModularDetailCode = item.TypeCharOne + _val
          _ModularDetailCode = `'${item.TypeCharOne + _val}'`
        } else {
          _ModularDetailCode = item.ModularDetailCode
          _ModularDetailCode = `'${item.ModularDetailCode}'`
        }
        let _declare = ''
@@ -849,9 +857,10 @@
        }
        _sql += `${_declare}
          select @BillCode='', @${_key}=''
          select @BillCode='', @${_key}='', @ModularDetailCode=''
          ${_lpline}
          exec s_get_BillCode
            @ModularDetailCode='${_ModularDetailCode}',
            @ModularDetailCode=${_ModularDetailCode},
            @Type=${item.Type},
            @TypeCharOne='${item.TypeCharOne}',
            @TypeCharTwo ='${item.TypeCharTwo}',