king
2021-01-27 34f4be5727bf4d0d231e0691a503cf0c9e5d00d3
2021-01-27
26个文件已修改
3个文件已添加
667 ■■■■ 已修改文件
src/assets/mobimg/sandbox.png 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modelsource/option.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/pastecontroller/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/pastecontroller/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/picturecontroller/index.jsx 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/picturecontroller/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/popview/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecombcontrolbutton/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/stylecombcontrolbutton/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/commontable/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/formtab/actionList/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtable/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/subtabtable/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/verupmanage/actionList/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/excelInbutton/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/settingcomponent/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/callbackcustomscript/index.jsx 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-datamanage.js 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils-update.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/billprint/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/printmenuform/index.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/mobimg/sandbox.png
src/menu/modelsource/option.jsx
@@ -10,6 +10,7 @@
import NormalTable from '@/assets/mobimg/normal-table.png'
import Pie from '@/assets/mobimg/pie.png'
import Editor from '@/assets/mobimg/editor.png'
import SandBox from '@/assets/mobimg/sandbox.png'
import Pie1 from '@/assets/mobimg/ring.png'
import Pie2 from '@/assets/mobimg/nightingale.png'
import Mainsearch from '@/assets/mobimg/mainsearch.png'
@@ -29,7 +30,7 @@
  { type: 'menu', url: Pie, component: 'pie', subtype: 'pie', title: '饼图', width: 12 },
  { type: 'menu', url: Pie1, component: 'pie', subtype: 'ring', title: '环图', width: 12 },
  { type: 'menu', url: Editor, component: 'editor', subtype: 'brafteditor', title: '富文本', width: 24 },
  { type: 'menu', url: Editor, component: 'code', subtype: 'sandbox', title: '自定义', width: 24 },
  { type: 'menu', url: SandBox, component: 'code', subtype: 'sandbox', title: '自定义', width: 24 },
  { type: 'menu', url: Pie2, component: 'pie', subtype: 'nightingale', title: '南丁格尔图', width: 12 },
  { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '分组', width: 24, forbid: ['billPrint'] },
]
src/menu/pastecontroller/index.jsx
@@ -241,7 +241,7 @@
    return (
      <div style={{display: 'inline-block'}}>
        {type !== 'menu' ? <Icon type="snippets" style={{color: 'purple'}} onClick={() => {this.setState({visible: true})}} /> : null}
        {type === 'menu' ? <Button type="link" style={{padding: '5px'}} icon="snippets" onClick={() => {this.setState({visible: true})}}>粘贴</Button> : null}
        {type === 'menu' ? <Button className="Menu-config-paste" icon="snippets" onClick={() => {this.setState({visible: true})}}>粘贴</Button> : null}
        <Modal
          title="粘贴"
          visible={visible}
src/menu/pastecontroller/index.scss
@@ -0,0 +1,4 @@
.Menu-config-paste {
  border-color: #40a9ff;
  color: #40a9ff;
}
src/menu/picturecontroller/index.jsx
New file
@@ -0,0 +1,52 @@
import React, {Component} from 'react'
// import { fromJS } from 'immutable'
import { Modal, Button } from 'antd'
// import Utils from '@/utils/utils.js'
// import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
// const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform'))
class PasteController extends Component {
  state = {
    visible: false
  }
  addSource = () => {
  }
  render() {
    const { visible } = this.state
    return (
      <div style={{display: 'inline-block'}}>
        <Button className="mk-border-purple" icon="picture" onClick={() => {this.setState({visible: true})}}>资源管理</Button>
        <Modal
          title="粘贴"
          visible={visible}
          width={600}
          maskClosable={false}
          onOk={this.pasteSubmit}
          onCancel={() => {this.setState({visible: false})}}
          footer={[
            <Button key="back" type="link" icon="plus" onClick={this.addSource}>
              添加
            </Button>,
            <Button key="colse" onClick={() => {this.setState({visible: false})}}>
              关闭
            </Button>
          ]}
          destroyOnClose
        >
          <div>
          </div>
        </Modal>
      </div>
    )
  }
}
export default PasteController
src/menu/picturecontroller/index.scss
New file
@@ -0,0 +1,4 @@
.Menu-config-paste {
  border-color: #40a9ff;
  color: #40a9ff;
}
src/menu/popview/index.jsx
@@ -585,10 +585,10 @@
              {customComponents && customComponents.length ? <Panel header="自定义组件" key="cuscomponent">
                <SourceWrap components={customComponents} MenuType={MenuType} />
              </Panel> : null}
              <Panel header={'背景'} key="background">
              <Panel header={'页面背景'} key="background">
                {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null}
              </Panel>
              <Panel header={'内边距'} key="padding">
              <Panel header={'页面内边距'} key="padding">
                {config ? <PaddingController config={config} updateConfig={this.updateConfig} /> : null}
              </Panel>
            </Collapse>
src/menu/stylecombcontrolbutton/index.jsx
@@ -148,7 +148,7 @@
  render() {
    const { label } = this.state
    return (
      <Button className="style-control-button" type="link" icon="font-colors" title="调整样式" onClick={this.triggerStyleChange}>{label}</Button>
      <Button className="style-control-button" icon="font-colors" title="调整样式" onClick={this.triggerStyleChange}>{label}</Button>
    )
  }
}
src/menu/stylecombcontrolbutton/index.scss
@@ -1,6 +1,7 @@
.style-control-button.ant-btn-link, .style-control-button.ant-btn-link:hover, .style-control-button.ant-btn-link:focus {
.style-control-button, .style-control-button:hover, .style-control-button:focus {
  color: orange;
  border-color: orange;
  position: relative;
  z-index: 13;
  background: #ffffff;
src/tabviews/commontable/index.jsx
@@ -10,7 +10,7 @@
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import UtilsUpdate from '@/utils/utils-update.js'
import { updateCommonTable } from '@/utils/utils-update.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import MKEmitter from '@/utils/events.js'
@@ -151,7 +151,7 @@
      }
      // 版本兼容
      config = UtilsUpdate.updateCommonTable(config)
      config = updateCommonTable(config)
      // 权限过滤
      if (this.props.menuType !== 'HS') {
@@ -565,9 +565,6 @@
  customCallbackRequest = (result) => {
    const { setting } = this.state
    let lines = []
    let pre = setting.callbackType === 'script' ? '@' : ''
    let errSql = ''
    if (result.$ErrCode === 'E') {
      errSql = `
@@ -578,68 +575,11 @@
      delete result.$ErrMesg
    }
    let getDefaultSql = (obj, tb, bid, level) => {
      let keys = []
      let vals = []
      let subObjs = []
      let id = Utils.getuuid()
      delete obj.$$key
      Object.keys(obj).forEach(key => {
        let val = obj[key]
        if (val === null || val === undefined) return
        if (typeof(val) === 'object') {
          if (Array.isArray(val)) {
            val.forEach(item => {
              if (typeof(item) !== 'object' || Array.isArray(item)) return
              if (Object.keys(item).length > 0) {
                item.$$key = tb + '_' + key
                subObjs.push(item)
              }
            })
          } else if (Object.keys(val).length > 0) {
            val.$$key = tb + '_' + key
            subObjs.push(val)
          }
        } else {
          keys.push(key)
          vals.push(`'${val}'`)
        }
      })
      lines.push({
        table: tb,
        insert: `Insert into ${pre}${tb} (${keys.join(',')},mk_level,mk_id,mk_bid)`,
        select: `Select ${vals.join(',')},'${level}','${id}','${bid}'`
      })
      subObjs.forEach(item => {
        getDefaultSql(item, item.$$key, id, level + 1)
      })
    }
    getDefaultSql(result, setting.cbTable, '', 1)
    let lineMap = new Map()
    lines.forEach(line => {
      if (lineMap.has(line.table)) {
        let _line = lineMap.get(line.table)
        _line.selects.push(line.select)
        lineMap.set(line.table, _line)
      } else {
        lineMap.set(line.table, {
          table: line.table,
          insert: line.insert,
          selects: [line.select]
        })
      }
    })
    let lines = UtilsDM.getCallBackSql(setting, result)
    let param = {}
    if (setting.callbackType === 'script') { // 使用自定义脚本
      let sql = [...lineMap.values()].map(item => (`
      let sql = lines.map(item => (`
        ${item.insert}
        ${item.selects.join(` union all
        `)}
@@ -657,7 +597,7 @@
      }
    } else {
      param.func = 's_ex_result_back'
      param.s_ex_result = [...lineMap.values()].map((item, index) => ({
      param.s_ex_result = lines.map((item, index) => ({
        MenuID: this.state.config.MenuID,
        MenuName: this.state.config.MenuName,
        TableName: item.table,
@@ -666,7 +606,7 @@
      }))
      if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) {
        let sql = [...lineMap.values()].map(item => (`
        let sql = lines.map(item => (`
          ${item.insert}
          ${item.selects.join(` union all
          `)}
src/tabviews/formtab/actionList/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import moment from 'moment'
import { Button, Modal, notification, message } from 'antd'
import Utils from '@/utils/utils.js'
import Utils, { getSysDefaultSql } from '@/utils/utils.js'
import options from '@/store/options.js'
import Api from '@/api'
import './index.scss'
@@ -121,7 +121,7 @@
      if (btn.sql && btn.sqlType === 'insert') { // 系统函数添加时,生成uuid
        param.ID = Utils.getguid()
        param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源
        param.LText = getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt('', param.timestamp)
        param.LText = Utils.formatOptions(param.LText)
@@ -129,7 +129,7 @@
        _primaryId = param.ID
      } else if (btn.sql && btn.sqlType === 'insertOrUpdate') { // 系统函数添加或修改时
        param.ID = primaryId || Utils.getguid()
        param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源
        param.LText = getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt('', param.timestamp)
        param.LText = Utils.formatOptions(param.LText)
@@ -137,7 +137,7 @@
        _primaryId = param.ID
      } else if (btn.sql) {
        param.ID = primaryId
        param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源
        param.LText = getSysDefaultSql(btn, setting, formdata, param, data, []) // 数据源
        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
        param.secretkey = Utils.encrypt('', param.timestamp)
        param.LText = Utils.formatOptions(param.LText)
src/tabviews/subtable/index.jsx
@@ -10,7 +10,7 @@
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import UtilsUpdate from '@/utils/utils-update.js'
import { updateSubTable } from '@/utils/utils-update.js'
import { modifyTabview } from '@/store/action'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
@@ -135,7 +135,7 @@
      let absFields = []     // 绝对值字段
      // 版本兼容
      config = UtilsUpdate.updateSubTable(config)
      config = updateSubTable(config)
      // 权限过滤
      if (this.props.menuType !== 'HS') {
@@ -494,9 +494,6 @@
  customCallbackRequest = (result) => {
    const { setting } = this.state
    let lines = []
    let pre = setting.callbackType === 'script' ? '@' : ''
    let errSql = ''
    if (result.$ErrCode === 'E') {
      errSql = `
@@ -507,68 +504,11 @@
      delete result.$ErrMesg
    }
    let getDefaultSql = (obj, tb, bid, level) => {
      let keys = []
      let vals = []
      let subObjs = []
      let id = Utils.getuuid()
      delete obj.$$key
      Object.keys(obj).forEach(key => {
        let val = obj[key]
        if (val === null || val === undefined) return
        if (typeof(val) === 'object') {
          if (Array.isArray(val)) {
            val.forEach(item => {
              if (typeof(item) !== 'object' || Array.isArray(item)) return
              if (Object.keys(item).length > 0) {
                item.$$key = tb + '_' + key
                subObjs.push(item)
              }
            })
          } else if (Object.keys(val).length > 0) {
            val.$$key = tb + '_' + key
            subObjs.push(val)
          }
        } else {
          keys.push(key)
          vals.push(`'${val}'`)
        }
      })
      lines.push({
        table: tb,
        insert: `Insert into ${pre}${tb} (${keys.join(',')},mk_level,mk_id,mk_bid)`,
        select: `Select ${vals.join(',')},'${level}','${id}','${bid}'`
      })
      subObjs.forEach(item => {
        getDefaultSql(item, item.$$key, id, level + 1)
      })
    }
    getDefaultSql(result, setting.cbTable, '', 1)
    let lineMap = new Map()
    lines.forEach(line => {
      if (lineMap.has(line.table)) {
        let _line = lineMap.get(line.table)
        _line.selects.push(line.select)
        lineMap.set(line.table, _line)
      } else {
        lineMap.set(line.table, {
          table: line.table,
          insert: line.insert,
          selects: [line.select]
        })
      }
    })
    let lines = UtilsDM.getCallBackSql(setting, result)
    let param = {}
    if (setting.callbackType === 'script') { // 使用自定义脚本
      let sql = [...lineMap.values()].map(item => (`
      let sql = lines.map(item => (`
        ${item.insert}
        ${item.selects.join(` union all
        `)}
@@ -586,7 +526,7 @@
      }
    } else {
      param.func = 's_ex_result_back'
      param.s_ex_result = [...lineMap.values()].map((item, index) => ({
      param.s_ex_result = lines.map((item, index) => ({
        MenuID: this.props.MenuID,
        MenuName: this.props.Tab.label,
        TableName: item.table,
@@ -595,7 +535,7 @@
      }))
      if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) {
        let sql = [...lineMap.values()].map(item => (`
        let sql = lines.map(item => (`
          ${item.insert}
          ${item.selects.join(` union all
          `)}
src/tabviews/subtabtable/index.jsx
@@ -10,7 +10,7 @@
import Utils from '@/utils/utils.js'
import options from '@/store/options.js'
import UtilsDM from '@/utils/utils-datamanage.js'
import UtilsUpdate from '@/utils/utils-update.js'
import { updateSubTable } from '@/utils/utils-update.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncSpinComponent from '@/utils/asyncSpinComponent'
import NotFount from '@/components/404'
@@ -111,7 +111,7 @@
      let absFields = []     // 绝对值字段
      // 版本兼容
      config = UtilsUpdate.updateSubTable(config)
      config = updateSubTable(config)
      // 不支持funcbutton、popview 类型按钮
      let labels = []
@@ -455,9 +455,6 @@
  customCallbackRequest = (result) => {
    const { setting } = this.state
    let lines = []
    let pre = setting.callbackType === 'script' ? '@' : ''
    let errSql = ''
    if (result.$ErrCode === 'E') {
      errSql = `
@@ -468,68 +465,11 @@
      delete result.$ErrMesg
    }
    let getDefaultSql = (obj, tb, bid, level) => {
      let keys = []
      let vals = []
      let subObjs = []
      let id = Utils.getuuid()
      delete obj.$$key
      Object.keys(obj).forEach(key => {
        let val = obj[key]
        if (val === null || val === undefined) return
        if (typeof(val) === 'object') {
          if (Array.isArray(val)) {
            val.forEach(item => {
              if (typeof(item) !== 'object' || Array.isArray(item)) return
              if (Object.keys(item).length > 0) {
                item.$$key = tb + '_' + key
                subObjs.push(item)
              }
            })
          } else if (Object.keys(val).length > 0) {
            val.$$key = tb + '_' + key
            subObjs.push(val)
          }
        } else {
          keys.push(key)
          vals.push(`'${val}'`)
        }
      })
      lines.push({
        table: tb,
        insert: `Insert into ${pre}${tb} (${keys.join(',')},mk_level,mk_id,mk_bid)`,
        select: `Select ${vals.join(',')},'${level}','${id}','${bid}'`
      })
      subObjs.forEach(item => {
        getDefaultSql(item, item.$$key, id, level + 1)
      })
    }
    getDefaultSql(result, setting.cbTable, '', 1)
    let lineMap = new Map()
    lines.forEach(line => {
      if (lineMap.has(line.table)) {
        let _line = lineMap.get(line.table)
        _line.selects.push(line.select)
        lineMap.set(line.table, _line)
      } else {
        lineMap.set(line.table, {
          table: line.table,
          insert: line.insert,
          selects: [line.select]
        })
      }
    })
    let lines = UtilsDM.getCallBackSql(setting, result)
    let param = {}
    if (setting.callbackType === 'script') { // 使用自定义脚本
      let sql = [...lineMap.values()].map(item => (`
      let sql = lines.map(item => (`
        ${item.insert}
        ${item.selects.join(` union all
        `)}
@@ -548,7 +488,7 @@
    } else {
      let name = this.props.Tab ? (this.props.Tab.label || '') : ''
      param.func = 's_ex_result_back'
      param.s_ex_result = [...lineMap.values()].map((item, index) => ({
      param.s_ex_result = lines.map((item, index) => ({
        MenuID: this.props.MenuID,
        MenuName: name,
        TableName: item.table,
@@ -557,7 +497,7 @@
      }))
      if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) {
        let sql = [...lineMap.values()].map(item => (`
        let sql = lines.map(item => (`
          ${item.insert}
          ${item.selects.join(` union all
          `)}
src/tabviews/verupmanage/actionList/index.jsx
@@ -3,7 +3,7 @@
import moment from 'moment'
import { Button, Modal, notification, message } from 'antd'
import MutilForm from '@/tabviews/zshare/mutilform'
import Utils from '@/utils/utils.js'
import Utils, { getSysDefaultSql } from '@/utils/utils.js'
import options from '@/store/options.js'
import Api from '@/api'
import './index.scss'
@@ -171,7 +171,7 @@
            }
          } else if (btn.sql) {
            param.ID = primaryId
            param.LText = Utils.getSysDefaultSql(btn, setting, '', param, data[0], columns) // 数据源
            param.LText = getSysDefaultSql(btn, setting, '', param, data[0], columns) // 数据源
            
            param.exec_type = 'y' // 后台解码
            param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -199,7 +199,7 @@
              }
            }
            param.ID = primaryId || Utils.getguid()
            param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns) // 数据源
            param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns) // 数据源
            
            param.exec_type = 'y' // 后台解码
            param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -207,7 +207,7 @@
            param.LText = Utils.formatOptions(param.LText)
          } else if (btn.sql) {
            param.ID = primaryId
            param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns) // 数据源
            param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns) // 数据源
            
            param.exec_type = 'y' // 后台解码
            param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -253,7 +253,7 @@
              }
            } else if (btn.sql) {
              param.ID = primaryId
              param.LText = Utils.getSysDefaultSql(btn, setting, '', param, cell, columns) // 数据源
              param.LText = getSysDefaultSql(btn, setting, '', param, cell, columns) // 数据源
              param.exec_type = 'y' // 后台解码
              param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -277,7 +277,7 @@
              }
            } else if (btn.sql && btn.sqlType === 'insert') { // 系统函数添加时,生成uuid
              param.ID = _formPrimaryId || Utils.getguid()
              param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns) // 数据源
              param.LText = getSysDefaultSql(btn, setting, formdata, param, cell, columns) // 数据源
              param.exec_type = 'y' // 后台解码
              param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
@@ -294,7 +294,7 @@
              }
              param.ID = primaryId
              param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns) // 数据源
              param.LText = getSysDefaultSql(btn, setting, formdata, param, cell, columns) // 数据源
              param.exec_type = 'y' // 后台解码
              param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
src/tabviews/zshare/actionList/excelInbutton/index.jsx
@@ -6,7 +6,7 @@
import { Button, Modal, notification, message } from 'antd'
import ExcelIn from './excelin'
import Utils from '@/utils/utils.js'
import Utils, { getExcelInSql } from '@/utils/utils.js'
import options from '@/store/options.js'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/main.js'
@@ -238,7 +238,7 @@
      })
    }
    let result = Utils.getExcelInSql(btn, data, this.state.dict, (this.props.BID || ''))
    let result = getExcelInSql(btn, data, this.state.dict, (this.props.BID || ''))
    if (result.errors) {
      notification.warning({
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -6,7 +6,7 @@
import { Button, Modal, notification, message } from 'antd'
import Api from '@/api'
import Utils from '@/utils/utils.js'
import Utils, { getSysDefaultSql } from '@/utils/utils.js'
import options from '@/store/options.js'
import zhCN from '@/locales/zh-CN/main.js'
import enUS from '@/locales/en-US/main.js'
@@ -239,7 +239,14 @@
      if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') { // 是否弹框或直接执行
        param.ID = primaryId
        param.LText = Utils.getSysDefaultSql(btn, setting, '', param, data[0], columns, this.props.Tab, retmsg) // 数据源
        if (retmsg) {
          const { sql, callbacksql } = getSysDefaultSql(btn, setting, '', param, data[0], columns, this.props.Tab, retmsg) // 数据源
          param.LText = sql
          param.$callbacksql = callbacksql
        } else {
          param.LText = getSysDefaultSql(btn, setting, '', param, data[0], columns, this.props.Tab) // 数据源
        }
        if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
          param.LText = param.LText.replace(/\$@/ig, '/*')
@@ -274,7 +281,14 @@
          }
          param.ID = primaryId || Utils.getguid()
          param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab, retmsg) // 数据源
          if (retmsg) {
            const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab, retmsg) // 数据源
            param.LText = sql
            param.$callbacksql = callbacksql
          } else {
            param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab) // 数据源
          }
          
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
            param.LText = param.LText.replace(/\$@/ig, '/*')
@@ -299,7 +313,14 @@
          param.LText = Utils.formatOptions(param.LText)
        } else {
          param.ID = primaryId
          param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab, retmsg) // 数据源
          if (retmsg) {
            const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab, retmsg) // 数据源
            param.LText = sql
            param.$callbacksql = callbacksql
          } else {
            param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab) // 数据源
          }
          
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
            param.LText = param.LText.replace(/\$@/ig, '/*')
@@ -354,7 +375,14 @@
        if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') { // 是否弹框或直接执行
          param.ID = primaryId
          param.LText = Utils.getSysDefaultSql(btn, setting, '', param, cell, columns, this.props.Tab, retmsg) // 数据源
          if (retmsg) {
            const { sql, callbacksql } = getSysDefaultSql(btn, setting, '', param, cell, columns, this.props.Tab, retmsg) // 数据源
            param.LText = sql
            param.$callbacksql = callbacksql
          } else {
            param.LText = getSysDefaultSql(btn, setting, '', param, cell, columns, this.props.Tab) // 数据源
          }
          
          if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
            param.LText = param.LText.replace(/\$@/ig, '/*')
@@ -380,7 +408,14 @@
          if (btn.sqlType === 'insert') { // 系统函数添加时,生成uuid
            param.ID = Utils.getguid()
            param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab, retmsg) // 数据源
            if (retmsg) {
              const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab, retmsg) // 数据源
              param.LText = sql
              param.$callbacksql = callbacksql
            } else {
              param.LText = getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab) // 数据源
            }
            
            if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
              param.LText = param.LText.replace(/\$@/ig, '/*')
@@ -396,7 +431,14 @@
            param.LText = Utils.formatOptions(param.LText)
          } else {
            param.ID = primaryId
            param.LText = Utils.getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab, retmsg) // 数据源
            if (retmsg) {
              const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab, retmsg) // 数据源
              param.LText = sql
              param.$callbacksql = callbacksql
            } else {
              param.LText = getSysDefaultSql(btn, setting, formdata, param, cell, columns, this.props.Tab) // 数据源
            }
            
            if (sessionStorage.getItem('dataM') === 'true') { // 数据权限
              param.LText = param.LText.replace(/\$@/ig, '/*')
@@ -638,6 +680,14 @@
      loadingNumber: params.length || ''
    })
    let record = {
      BID: param.BID || '',
      ID: param.ID || '',
      callbacksql: param.$callbacksql || ''
    }
    delete param.$callbacksql
    Api.genericInterface(param).then(res => {
      if (res.status) {
        if (res.mk_ex_invoke === 'false' && params.length === 0) {
@@ -646,7 +696,7 @@
        } else if (res.mk_ex_invoke === 'false' && params.length > 0) {
          this.customLoopRequest(params, _resolve)
        } else {
          this.customOuterRequest(params, res, _resolve)
          this.customOuterRequest(params, res, record, _resolve)
        }
      } else if (res.ErrCode === 'C' && this.state.checkParam) {
        const _this = this
@@ -663,7 +713,7 @@
                  } else if (result.mk_ex_invoke === 'false' && params.length > 0) {
                    _this.customLoopRequest(params, _resolve)
                  } else {
                    _this.customOuterRequest(params, result, _resolve)
                    _this.customOuterRequest(params, result, record, _resolve)
                  }
                } else {
                  _this.execError(result)
@@ -696,7 +746,7 @@
  /**
   * @description 自定义请求循环执行
   */
  customOuterRequest = (params, result, _resolve) => {
  customOuterRequest = (params, result, record, _resolve) => {
    const { btn } = this.props
    let url = ''
@@ -736,10 +786,10 @@
          $ErrMesg: error
        }
        this.customCallbackRequest(params, result, _resolve)
        this.customCallbackRequest(params, result, record, _resolve)
      } else {
        res.mk_api_key = mkey
        this.customCallbackRequest(params, res, _resolve)
        this.customCallbackRequest(params, res, record, _resolve)
      }
    }, () => {
      this.updateStatus('over')
@@ -750,7 +800,7 @@
  /**
   * @description 回调请求循环执行
   */
  customCallbackRequest = (params, result, _resolve) => {
  customCallbackRequest = (params, result, record, _resolve) => {
    const { btn } = this.props
    let lines = []
    let pre = btn.callbackType === 'script' ? '@' : ''
@@ -828,11 +878,14 @@
    if (btn.callbackType === 'script') { // 使用自定义脚本
      param.func = 'sPC_TableData_InUpDe'
      
      if (this.props.BID) {
      if (record.BID) {
        param.BID = this.props.BID
      }
      if (record.ID) {
        param.ID = record.ID
      }
      let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000)
      let _prevCustomScript = `${record.callbacksql || 'declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000)'}
        Select @ErrorCode='',@retmsg=''
        ${errSql}
      `
src/tabviews/zshare/mutilform/index.jsx
@@ -1284,16 +1284,18 @@
            if (!_item) return
            if (item.type === 'date' || item.type === 'datemonth' || item.type === 'datetime') {
              if (_item.value && _item.value.format) {
                _item.value = _item.value.format(_format[item.type])
              } else if (!_item.value) {
                _item.value = ''
              }
            }
            if (_item.value === undefined) {
              _item.value = ''
            } else if (item.type === 'date' || item.type === 'datemonth' || item.type === 'datetime') {
              if (!_item.value) {
                _item.value = ''
              } else if (_item.value.format) {
                _item.value = _item.value.format(_format[item.type])
              }
            } else if (item.type === 'text' && _item.value) { // 特殊字段替换
              _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey)
              _item.value = _item.value.replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || ''))
              _item.value = _item.value.replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || ''))
            }
            search.push(_item)
@@ -1316,19 +1318,20 @@
            }
            let _value = ''
            if (this.state.datatype[key] === 'datetime') {
            let _type = this.state.datatype[key]
            if (_type === 'datetime') {
              _value = values[key] ? moment(values[key]).format('YYYY-MM-DD HH:mm:ss') : ''
            } else if (this.state.datatype[key] === 'datemonth') {
            } else if (_type === 'datemonth') {
              _value = values[key] ? moment(values[key]).format('YYYY-MM') : ''
            } else if (this.state.datatype[key] === 'date') {
            } else if (_type === 'date') {
              _value = values[key] ? moment(values[key]).format('YYYY-MM-DD') : ''
            } else if (this.state.datatype[key] === 'number') {
            } else if (_type === 'number') {
              _value = values[key]
            } else if (this.state.datatype[key] === 'multiselect' || this.state.datatype[key] === 'checkbox') {
            } else if (_type === 'multiselect' || _type === 'checkbox') {
              _value = values[key] ? values[key].join(',') : ''
            } else if (this.state.datatype[key] === 'fileupload') {
            } else if (_type === 'fileupload') {
              let vals = []
              if (values[key] && values[key].length > 0) {
@@ -1342,12 +1345,17 @@
              }
              _value = vals.join(',')
            } else if (this.state.datatype[key] === 'text' || this.state.datatype[key] === 'textarea') {
            } else if (_type === 'text' || _type === 'textarea') {
              _value = values[key].replace(/\t*|\v*/g, '') // 去除制表符
              if (intercepts.includes(key)) {              // 去除首尾空格
                _value = _value.replace(/(^\s*|\s*$)/g, '')
              }
              if (_type === 'text' && _value) { // 特殊字段替换
                _value = _value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey)
                _value = _value.replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || ''))
                _value = _value.replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || ''))
              }
            } else {
              _value = values[key]
            }
src/tabviews/zshare/settingcomponent/index.jsx
@@ -5,7 +5,7 @@
import Api from '@/api'
import MKEmitter from '@/utils/events.js'
import UtilsUpdate from '@/utils/utils-update.js'
import { updateSubTable } from '@/utils/utils-update.js'
import options from '@/store/options.js'
import asyncComponent from '@/utils/asyncSpinComponent'
import './index.scss'
@@ -252,7 +252,7 @@
          if (!subconfig || !subconfig.enabled) return
          subconfig = UtilsUpdate.updateSubTable(subconfig)
          subconfig = updateSubTable(subconfig)
          let _comp = {title: res.tab.label, uuid: res.tab.uuid, action: []}
src/templates/comtableconfig/index.jsx
@@ -9,7 +9,7 @@
import Api from '@/api'
import Utils from '@/utils/utils.js'
import UtilsUpdate from '@/utils/utils-update.js'
import { updateCommonTable } from '@/utils/utils-update.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
@@ -90,7 +90,7 @@
    _config.easyCode = _config.easyCode || ''
    // 版本兼容
    _config = UtilsUpdate.updateCommonTable(_config)
    _config = updateCommonTable(_config)
    
    let _oriActions = []
    if (_config.type === 'user') {
src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx
@@ -430,6 +430,11 @@
                id, bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id{usefulFields ? ', ' + usefulFields : ''}
              </Form.Item>
            </Col> : null}
            {!usefulFields ? <Col span={24} className="sqlfield">
              <Form.Item label={'可用字段'}>
                id, bid, loginuid, sessionuid, userid, username, fullname, appkey, time_id
              </Form.Item>
            </Col> : null}
            {!usefulFields ? <Col span={8} style={{whiteSpace: 'nowrap'}}>
              <Form.Item style={{marginBottom: 0}} label="执行位置">
                {getFieldDecorator('position', {
src/templates/subtableconfig/index.jsx
@@ -11,7 +11,7 @@
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import Utils from '@/utils/utils.js'
import UtilsUpdate from '@/utils/utils-update.js'
import { updateSubTable } from '@/utils/utils-update.js'
import asyncComponent from '@/utils/asyncComponent'
import SearchComponent from '@/templates/sharecomponent/searchcomponent'
@@ -106,7 +106,7 @@
    let _activeKey =  editSubTab ? editSubTab.activeKey : editTab.activeKey
    // 版本兼容
    _config = UtilsUpdate.updateSubTable(_config)
    _config = updateSubTable(_config)
    this.setState({
      openEdition: editSubTab ? (editSubTab.open_edition || '') : (editTab.open_edition || ''),
src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -12,6 +12,8 @@
  static propTpyes = {
    dict: PropTypes.object,         // 字典项
    btn: PropTypes.object,          // 按钮信息
    initsql: PropTypes.string,      // 初始化脚本
    usefulfields: PropTypes.string, // 可用字段
    systemScripts: PropTypes.array, // 系统脚本
    customScripts: PropTypes.array, // 自定义脚本
    scriptsChange: PropTypes.func   // 表单
@@ -82,8 +84,6 @@
          return
        }
        let prev = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000)
        `
        let tail = `
          aaa:
        `
@@ -110,11 +110,12 @@
        let param = {
          func: 's_debug_sql',
          exec_type: 'y',
          LText: prev +  _prevCustomScript + _backCustomScript + tail
          LText: this.props.initsql +  _prevCustomScript + _backCustomScript + tail
        }
        // 数据权限
        param.LText = param.LText.replace(/@\$|\$@/ig, '')
        // check
        param.LText = param.LText.replace(/\$check@|@check\$/ig, '')
@@ -184,7 +185,7 @@
  }
  render() {
    const { systemScripts, btn } = this.props
    const { usefulfields, systemScripts, btn } = this.props
    const { getFieldDecorator } = this.props.form
    const formItemLayout = {
      labelCol: {
@@ -210,6 +211,11 @@
              ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT), retmsg
            </Form.Item>
          </Col>
          {usefulfields ? <Col span={24} className="sqlfield">
            <Form.Item label={'可用字段'}>
              {usefulfields}
            </Form.Item>
          </Col> : null}
          <Col span={8} style={{whiteSpace: 'nowrap'}}>
            <Form.Item style={{marginBottom: 0}} label={
              <Tooltip placement="bottomLeft" title={'自定义脚本与默认sql位置关系。'}>
src/templates/zshare/verifycard/index.jsx
@@ -1570,12 +1570,12 @@
            </span>
          } key="6">
            <CustomScript
              usefulfields={this.state.usefulfields}
              initsql={this.state.initsql}
              dict={this.props.dict}
              btn={this.props.card}
              dict={this.props.dict}
              initsql={this.state.initsql}
              customScripts={verify.scripts}
              defaultsql={this.state.defaultsql}
              usefulfields={this.state.usefulfields}
              systemScripts={this.state.systemScripts}
              scriptsChange={this.scriptsChange}
              wrappedComponentRef={(inst) => this.scriptsForm = inst}
@@ -1589,9 +1589,11 @@
            </span>
          } key="6a">
            <CallBackCustomScript
              dict={this.props.dict}
              btn={this.props.card}
              dict={this.props.dict}
              initsql={this.state.initsql}
              customScripts={verify.cbScripts}
              usefulfields={this.state.usefulfields}
              systemScripts={this.state.systemScripts}
              scriptsChange={this.cbScriptsChange}
              wrappedComponentRef={(inst) => this.cbscriptsForm = inst}
src/utils/utils-datamanage.js
@@ -441,8 +441,17 @@
      func: 'sPC_TableData_InUpDe',
      exec_type: 'y',
    }
    let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000)
        Select @ErrorCode='',@retmsg=''
    let userName = sessionStorage.getItem('User_Name') || ''
    let fullName = sessionStorage.getItem('Full_Name') || ''
    if (sessionStorage.getItem('isEditState') === 'true') {
      userName = sessionStorage.getItem('CloudUserName') || ''
      fullName = sessionStorage.getItem('CloudFullName') || ''
    }
    let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50)
        Select @ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}'
        ${errSql}
    `
    let _backCustomScript = `
@@ -490,4 +499,72 @@
    return param
  }
  /**
   * @description 获取回调sql
   */
  static getCallBackSql (setting, result) {
    let lines = []
    let pre = setting.callbackType === 'script' ? '@' : ''
    let getDefaultSql = (obj, tb, bid, level) => {
      let keys = []
      let vals = []
      let subObjs = []
      let id = Utils.getuuid()
      delete obj.$$key
      Object.keys(obj).forEach(key => {
        let val = obj[key]
        if (val === null || val === undefined) return
        if (typeof(val) === 'object') {
          if (Array.isArray(val)) {
            val.forEach(item => {
              if (typeof(item) !== 'object' || Array.isArray(item)) return
              if (Object.keys(item).length > 0) {
                item.$$key = tb + '_' + key
                subObjs.push(item)
              }
            })
          } else if (Object.keys(val).length > 0) {
            val.$$key = tb + '_' + key
            subObjs.push(val)
          }
        } else {
          keys.push(key)
          vals.push(`'${val}'`)
        }
      })
      lines.push({
        table: tb,
        insert: `Insert into ${pre}${tb} (${keys.join(',')},mk_level,mk_id,mk_bid)`,
        select: `Select ${vals.join(',')},'${level}','${id}','${bid}'`
      })
      subObjs.forEach(item => {
        getDefaultSql(item, item.$$key, id, level + 1)
      })
    }
    getDefaultSql(result, setting.cbTable, '', 1)
    let lineMap = new Map()
    lines.forEach(line => {
      if (lineMap.has(line.table)) {
        let _line = lineMap.get(line.table)
        _line.selects.push(line.select)
        lineMap.set(line.table, _line)
      } else {
        lineMap.set(line.table, {
          table: line.table,
          insert: line.insert,
          selects: [line.select]
        })
      }
    })
    return [...lineMap.values()]
  }
}
src/utils/utils-update.js
@@ -1,13 +1,9 @@
import { fromJS } from 'immutable'
import Utils from './utils.js'
export default class UpdateUtils {
  /**
   * @description 升级主表信息
   * @param {Object}   config      页面配置信息
   * @return {Object}  config
   */
  static updateCommonTable (config) {
export function updateCommonTable (config) {
    if (!config.version || config.version < '1.0') {
      config.version = '1.0'
      // 兼容标签
@@ -18,7 +14,7 @@
        config.tabgroups.forEach(groupId => {
          let _group = {
            uuid: groupId,
            sublist: fromJS(config[groupId]).toJS()
          sublist: config[groupId]
          }
  
          delete config[groupId]
@@ -32,7 +28,7 @@
      // 兼容图表
      if (!config.charts) {
        config.expand = true
        config.charts = [{ uuid: Utils.getuuid(), label: '', title: '', chartType: 'table', icon: 'table', Hide: 'false', blacklist: [] }]
      config.charts = [{ uuid: '$$normaltable', label: '', title: '', chartType: 'table', icon: 'table', Hide: 'false', blacklist: [] }]
      } else {
        config.charts.forEach(card => {
          if (card.chartType === 'card') {
@@ -92,14 +88,14 @@
   * @param {Object}   config      页面配置信息
   * @return {Object}  config
   */
  static updateSubTable (config) {
export function updateSubTable (config) {
    if (!config.version || config.version < '1.0') {
      config.version = '1.0'
      // 兼容图表
      if (!config.charts) {
        config.expand = false
        config.charts = [{
          uuid: Utils.getuuid(),
        uuid: '$$normalsubtable',
          label: '',
          title: '',
          chartType: 'table',
@@ -165,5 +161,4 @@
    config.Template = 'SubTable'
    return config
  }
}
src/utils/utils.js
@@ -723,13 +723,14 @@
      field: arrfield
    }
  }
}
  /**
   * @description 获取excel导入参数
   * @return {String} btn   按钮
   * @return {String} data  excel数据
   */
  static getExcelInSql (item, data, dict, BID) {
export function getExcelInSql (item, data, dict, BID) {
    let btn = item.verify
    let keys = ['delete', 'drop', 'insert', 'truncate', 'update']
    let userName = sessionStorage.getItem('User_Name') || ''
@@ -743,9 +744,20 @@
    let database = item.sheet.match(/(.*)\.(.*)\./ig) || ''
    let sheet = item.sheet.replace(/(.*)\.(.*)\./ig, '')
  let getuuid = () => {
    let uuid = []
    let timestamp = new Date().getTime()
    let _options = '0123456789abcdefghigklmnopqrstuv'
    for (let i = 0; i < 19; i++) {
      uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
    }
    uuid = timestamp + uuid.join('')
    return uuid
  }
    let errors = []
    let _topline = btn.range || 0
    let upId = this.getuuid()
  let upId = getuuid()
    let _initCustomScript = '' // 初始化脚本
    let _prevCustomScript = '' // 默认sql前执行脚本
@@ -1016,14 +1028,13 @@
   * @return {String} type   执行类型
   * @return {String} table  表名
   */
  static getSysDefaultSql (btn, setting, formdata, param, data, columns, tab, retmsg) {
export function getSysDefaultSql (btn, setting, formdata, param, data, columns, tab, retmsg = false) {
    let primaryId = param.ID
    let BID = param.BID
    let verify = btn.verify || {}
    let datavars = {}                 // 声明的变量,表单及显示列
    let _actionType = null
    let appkey = window.GLOB.appkey || ''
    let sessionUid = localStorage.getItem('SessionUid') || ''
  let _callbacksql = ''
    if (verify.default !== 'false') { // 判断是否使用默认sql
      _actionType = btn.sqlType
@@ -1070,12 +1081,6 @@
    // 获取字段键值对
    formdata && formdata.forEach(form => {
      if (form.type === 'text' && form.value) { // 特殊字段替换
        form.value = form.value.replace(/^(\s*)@appkey@(\s*)$/ig, appkey)
        form.value = form.value.replace(/^(\s*)@SessionUid@(\s*)$/ig, sessionUid)
        form.value = form.value.replace(/^(\s*)@bid@(\s*)$/ig, BID)
      }
      let _key = form.key.toLowerCase()
      datavars[_key] = form.value
@@ -1195,6 +1200,10 @@
        /* 显示列变量赋值 */
        select ${_initColfields.join(',')}
        `
  }
  if (retmsg) {
    _callbacksql = _sql
    }
    // 去除禁用的验证
@@ -1660,10 +1669,16 @@
    }
    if ((window.GLOB.systemType !== 'production' && options.sysType !== 'cloud') || window.debugger === true) {
      _sql = _sql.replace(/\n\s{8}/ig, '\n')
    // _sql = _sql.replace(/\n\s{8}/ig, '\n')
      console.info(_sql)
    }
  if (retmsg) {
    return {
      sql: _sql,
      callbacksql: _callbacksql
    }
  } else {
    return _sql
  }
}
src/views/billprint/index.jsx
@@ -121,26 +121,26 @@
          A4: {
            vertical: 980,
            horizontal: 1200,
            verticaldefault: 1.45789,
            verticalwithout: 1.41428,
            horizontaldefault: 0.683,
            horizontalwithout: 0.705,
            verticaldefault: 1.455,
            verticalwithout: 1.411,
            horizontaldefault: 0.679,
            horizontalwithout: 0.701,
          },
          A3: {
            vertical: 1200,
            horizontal: 1600,
            verticaldefault: 1.44404,
            verticalwithout: 1.41414,
            horizontaldefault: 0.6923,
            horizontalwithout: 0.707,
            verticaldefault: 1.441,
            verticalwithout: 1.410,
            horizontaldefault: 0.688,
            horizontalwithout: 0.703,
          },
          A5: {
            vertical: 700,
            horizontal: 1000,
            verticaldefault: 1.482,
            verticalwithout: 1.417,
            horizontaldefault: 0.6736,
            horizontalwithout: 0.7047,
            verticaldefault: 1.478,
            verticalwithout: 1.413,
            horizontaldefault: 0.669,
            horizontalwithout: 0.700,
          }
        }
src/views/menudesign/index.jsx
@@ -34,6 +34,7 @@
const PasteController = asyncComponent(() => import('@/menu/pastecontroller'))
const PaddingController = asyncComponent(() => import('@/menu/padcontroller'))
const StyleController = asyncComponent(() => import('@/menu/stylecontroller'))
// const PictureController = asyncComponent(() => import('@/menu/picturecontroller'))
const StyleCombController = asyncComponent(() => import('@/menu/stylecombcontroller'))
const StyleCombControlButton = asyncComponent(() => import('@/menu/stylecombcontrolbutton'))
const ModalController = asyncComponent(() => import('@/menu/modalconfig/controller'))
@@ -101,6 +102,7 @@
    MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent)
    this.updateCustomComponent()
    // this.getAppPictures()
  }
  /**
@@ -117,6 +119,19 @@
    MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
    MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent)
  }
  // getAppPictures = () => {
  //   Api.getSystemConfig({
  //     func: 's_url_db_adduptdel',
  //     id: '',
  //     PageIndex: 0, // 0 代表全部
  //     PageSize: 0,  // 0 代表全部
  //     typecharone: 'image',
  //     type: 'search'
  //   }).then(res => {
  //   })
  // }
  updateCustomComponent = () => {
    Api.getSystemConfig({
@@ -900,10 +915,10 @@
                  {customComponents && customComponents.length ? <Panel header="自定义组件" key="cuscomponent">
                    <SourceWrap components={customComponents} MenuType={MenuType} />
                  </Panel> : null}
                  <Panel header={'背景'} key="background">
                  <Panel header={'页面背景'} key="background">
                    {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null}
                  </Panel>
                  <Panel header={'内边距'} key="padding">
                  <Panel header={'页面内边距'} key="padding">
                    {config ? <PaddingController config={config} updateConfig={this.updateConfig} /> : null}
                  </Panel>
                </Collapse>
@@ -913,6 +928,7 @@
                  <div> {config && config.MenuName} </div>
                } bordered={false} extra={
                  <div>
                    {/* <PictureController/> */}
                    <StyleCombControlButton menu={config} />
                    <PasteController type="menu" Tab={null} insert={this.insert} />
                    {config ? <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config.enabled} onChange={this.onEnabledChange} /> : null}
src/views/menudesign/printmenuform/index.jsx
@@ -36,8 +36,12 @@
    this.props.updateConfig({...this.props.config, pageSize: val})
  }
  onRadioChange = (val) => {
  onLayoutChange = (val) => {
    this.props.updateConfig({...this.props.config, pageLayout: val})
  }
  onPaddingChange = (val) => {
    this.props.updateConfig({...this.props.config, pagePadding: val})
  }
  render() {
@@ -87,7 +91,7 @@
                  }
                ]
              })(
                <Radio.Group onChange={(e) => {this.onRadioChange(e.target.value)}}>
                <Radio.Group onChange={(e) => {this.onLayoutChange(e.target.value)}}>
                  <Radio value="vertical">纵向</Radio>
                  <Radio value="horizontal">横向</Radio>
                </Radio.Group>
@@ -105,7 +109,7 @@
                  }
                ]
              })(
                <Radio.Group onChange={(e) => {this.onRadioChange(e.target.value)}}>
                <Radio.Group onChange={(e) => {this.onPaddingChange(e.target.value)}}>
                  <Radio value="default">默认</Radio>
                  <Radio value="without">无</Radio>
                </Radio.Group>