king
2022-02-18 8212992d4cd6963c9fe7837e065765b28741914f
2022-02-18
8个文件已修改
220 ■■■■■ 已修改文件
public/options.json 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/normal-form/index.jsx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/form/tab-form/index.jsx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/customscript/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/verifycard/index.scss 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/options.json
@@ -1,17 +1,17 @@
{
  "appId": "202108312122504607B107A83F55B40C98CCF",
  "appkey": "20210831212235413F287EC3BF489424496C8",
  "appId": "201912040924165801464FF1788654BC5AC73",
  "appkey": "20191106103859640976D6E924E464D029CF0",
  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
  "systemType": "",
  "externalDatabase": "false",
  "lineColor": "",
  "filter": "false",
  "defaultApp": "mkindustry",
  "defaultApp": "mk",
  "defaultLang": "zh-CN",
  "WXAppID": "",
  "debugger": false,
  "licenseKey": "7EFE13KIKKILIJ7C8CFC",
  "probation": "2021-12-31",
  "host": "http://demo.mk9h.cn",
  "service": "erp_new/"
  "licenseKey": "",
  "probation": "",
  "host": "http://qingqiumarket.cn",
  "service": "MKWMS/"
}
src/tabviews/custom/components/form/normal-form/index.jsx
@@ -50,12 +50,12 @@
      if (_sync && data && data[config.dataName]) {
        _data = data[config.dataName]
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
        _sync = false
      }
    } else {
      _data = {}
      _data = {$$empty: true}
    }
    if (!config.wrap.groupLabel) {
@@ -158,12 +158,12 @@
    const { sync, config, group } = this.state
    if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
      let _data = {}
      let _data = {$$empty: true}
      let _group = group
      if (nextProps.data && nextProps.data[config.dataName]) {
        _data = nextProps.data[config.dataName]
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
      }
      if (config.wrap.statusControl && _data[config.wrap.statusControl]) {
@@ -262,7 +262,7 @@
    if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) {
      this.setState({
        data: {}
        data: {$$empty: true}
      })
      return
    }
@@ -283,7 +283,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      let _data = result.data && result.data[0] ? result.data[0] : {$$empty: true}
      let _group = group
      if (type === 'refresh') {
@@ -298,7 +298,7 @@
      this.setState({
        group: null,
        step: _group.sort - 1,
        data: _data || {},
        data: _data || {$$empty: true},
        loading: false
      }, () => {
        this.setState({group: _group})
@@ -382,7 +382,7 @@
            btn={group.subButton}
            setting={config.setting}
            columns={config.columns}
            selectedData={[data]}
            selectedData={data.$$empty ? [] : [data]}
          />
          {group.nextButton.enable === 'true' && group.sort !== config.subcards.length ? <Button type="link" className="skip" onClick={this.nextStep} style={group.nextButton.style}>{group.nextButton.label}</Button> : null}
        </div> : null}
src/tabviews/custom/components/form/tab-form/index.jsx
@@ -49,12 +49,12 @@
      if (_sync && data && data[config.dataName]) {
        _data = data[config.dataName]
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
        _sync = false
      }
    } else {
      _data = {}
      _data = {$$empty: true}
    }
    if (!config.wrap.groupLabel) {
@@ -144,12 +144,12 @@
    const { sync, config, group } = this.state
    if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
      let _data = {}
      let _data = {$$empty: true}
      let _group = group
      if (nextProps.data && nextProps.data[config.dataName]) {
        _data = nextProps.data[config.dataName]
        if (Array.isArray(_data)) {
          _data = _data[0] || {}
          _data = _data[0] || {$$empty: true}
        }
      }
@@ -233,7 +233,7 @@
    if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) {
      this.setState({
        data: {}
        data: {$$empty: true}
      })
      return
    }
@@ -254,13 +254,13 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      let _data = result.data && result.data[0] ? result.data[0] : {}
      let _data = result.data && result.data[0] ? result.data[0] : {$$empty: true}
      let _group = group
      this.setState({
        group: null,
        data: _data || {},
        data: _data || {$$empty: true},
        loading: false
      }, () => {
        this.setState({group: _group})
@@ -328,7 +328,7 @@
            btn={group.subButton}
            setting={config.setting}
            columns={config.columns}
            selectedData={[data]}
            selectedData={data.$$empty ? [] : [data]}
          />
        </div> : null}
      </div>
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -172,13 +172,39 @@
  }
  actionSubmit = (res) => {
    const { btn } = this.props
    const { btn, setting, BID } = this.props
    const { selines } = this.state
    if (btn.uuid !== res.menuId) return
    let data = selines || []
    if (setting.supModule && !BID) {
      notification.warning({
        top: 92,
        message: '需要上级主键值!',
        duration: 3
      })
      return
    } else if (btn.Ot !== 'notRequired' && data.length === 0) {
      notification.warning({
        top: 92,
        message: '请选择行!',
        duration: 5
      })
      return
    } else if (btn.Ot === 'requiredSgl' && data.length !== 1) {
      notification.warning({
        top: 92,
        message: '请选择单行数据!',
        duration: 5
      })
      return
    }
    this.setState({ loading: true })
    this.execSubmit(this.state.selines, () => {}, res.form)
    this.execSubmit(data, () => {}, res.form)
  }
  resetModuleParam = (menuId, btnId, param) => {
src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx
@@ -131,6 +131,23 @@
          {i === 0 && column.length > 0 && setting.tableType === 'radio' ?
            <div className="page-card" style={{flex: 60}}></div> : null
          }
          {i === 0 && gridBtn && gridBtn.display && gridBtn.position === 'left' ?
            <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
              <div className="mk-popover-control">
                <EditOutlined className="edit" onClick={handleGridBtn}/>
              </div>
            } trigger="hover">
              <div className="page-card" style={{flex: gridBtn.Width}}>
                <div style={{cursor: 'default'}}>
                  <span className="ant-table-header-column">
                    <div className="ant-table-column-sorters" title={gridBtn.label} style={{textAlign: gridBtn.Align}}>
                      <span className="ant-table-column-title">{gridBtn.label}</span>
                    </div>
                  </span>
                </div>
              </div>
            </Popover> : null
          }
          {column.map(card => (
            <Card
              key={card.uuid}
@@ -144,7 +161,7 @@
              findCard={findCard}
            />
          ))}
          {i === (columns.length - 1) && gridBtn && gridBtn.display ?
          {i === (columns.length - 1) && gridBtn && gridBtn.display && gridBtn.position !== 'left' ?
            <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
              <div className="mk-popover-control">
                <EditOutlined className="edit" onClick={handleGridBtn}/>
src/templates/sharecomponent/columncomponent/gridbtnform/index.jsx
@@ -52,11 +52,11 @@
        initVal: this.props.card.position || 'right',
        required: true,
        options: [{
          MenuID: 'right',
          text: '右侧'
        }, {
          MenuID: 'left',
          text: '左侧'
        }, {
          MenuID: 'right',
          text: '右侧'
        }]
      }
    ]
src/templates/zshare/verifycard/customscript/index.jsx
@@ -32,10 +32,16 @@
      editItem: record
    })
    this.props.form.setFieldsValue({
      sql: record.sql,
      position: record.position || 'back'
    })
    if (this.props.type) {
      this.props.form.setFieldsValue({
        sql: record.sql
      })
    } else {
      this.props.form.setFieldsValue({
        sql: record.sql,
        position: record.position || 'back'
      })
    }
  }
  handleConfirm = () => {
@@ -44,6 +50,7 @@
    this.props.form.validateFieldsAndScroll((err, values) => {
      if (!err) {
        values.uuid = editItem ? editItem.uuid : ''
        values.position = values.position || (editItem ? editItem.position : 'front')
        let _quot = values.sql.match(/'{1}/g)
        let _lparen = values.sql.match(/\({1}/g)
@@ -98,20 +105,22 @@
        this.props.customScripts.forEach(item => {
          if (item.status === 'false' && values.uuid !== item.uuid) return
          if (item.position === 'init') {
          let _item = values.uuid === item.uuid ? values : item
          if (_item.position === 'init') {
            _initCustomScript += `
            /* 初始化脚本 */
            ${values.uuid === item.uuid ? values.sql : item.sql}
            ${_item.sql}
            `
          } else if (item.position === 'front') {
          } else if (_item.position === 'front') {
            _prevCustomScript += `
            /* 默认sql前脚本 */
            ${values.uuid === item.uuid ? values.sql : item.sql}
            ${_item.sql}
            `
          } else {
            _backCustomScript += `
            /* 默认sql后脚本 */
            ${values.uuid === item.uuid ? values.sql : item.sql}
            ${_item.sql}
            `
          }
        })
@@ -253,7 +262,7 @@
              {usefulfields}
            </Form.Item>
          </Col> : null}
          <Col span={8} style={{whiteSpace: 'nowrap'}}>
          {!_type ?<Col span={8} style={{whiteSpace: 'nowrap'}}>
            <Form.Item style={{marginBottom: 0}} label={
              <Tooltip placement="bottomLeft" title={'自定义脚本与默认sql位置关系。'}>
                <QuestionCircleOutlined className="mk-form-tip" />
@@ -270,8 +279,8 @@
                </Radio.Group>
              )}
            </Form.Item>
          </Col>
          <Col span={10}>
          </Col> : null}
          {!_type ?<Col span={10}>
            <Form.Item label={'快捷添加'} style={{marginBottom: 0}}>
              <Select
                showSearch
@@ -288,7 +297,7 @@
                )}
              </Select>
            </Form.Item>
          </Col>
          </Col> : null}
          <Col span={6} className="add">
            <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
              保存
src/templates/zshare/verifycard/index.scss
@@ -83,6 +83,9 @@
.model-custom-scripts-modal {
  .ant-modal {
    top: 30px;
    .ant-modal-header {
      padding: 10px 24px;
    }
    .ant-modal-footer {
      display: none;
    }
@@ -90,12 +93,16 @@
      display: none;
    }
    .ant-modal-body {
      height: calc(100vh - 110px);
      overflow-y: auto;
      padding: 0;
      height: calc(100vh - 100px);
      overflow: hidden;
      display: flex;
      .script-table-wrap {
        width: 220px;
        width: 240px;
        overflow-y: auto;
        overflow-x: hidden;
        height: calc(100vh - 100px);
        .operation-btn {
          display: inline-block;
@@ -106,23 +113,37 @@
        }
        .script-item {
          border: 1px solid #eeeeee;
          padding: 5px;
          margin-bottom: 10px;
          border-bottom: 1px solid #eeeeee;
          padding: 15px 10px 5px;
        }
        .script-item.active {
          border-color: #1890ff;
          background-color: #bae7ff;
        }
        .ant-typography {
          margin-bottom: 5px;
        }
      }
      .script-table-wrap::-webkit-scrollbar {
        width: 7px;
      }
      .script-table-wrap::-webkit-scrollbar-thumb {
        border-radius: 5px;
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
        background: rgba(0, 0, 0, 0.13);
      }
      .script-table-wrap::-webkit-scrollbar-track {
        box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
        border-radius: 3px;
        border: 1px solid rgba(0, 0, 0, 0.07);
        background: rgba(0, 0, 0, 0);
      }
      .unfull-scripts {
        position: absolute;
        right: 20px;
        z-index: 2;
        top: 18px;
        top: 10px;
        color: #1890ff;
        width: 26px;
        cursor: pointer;
@@ -132,20 +153,24 @@
      .verify-form {
        flex: 1;
        >.ant-row {
          margin: 0!important;
          position: unset;
        }
        .sql {
          .ant-col-sm-8 {
            width: 10.5%;
          padding: 0!important;
          .ant-form-item-label {
            display: none;
          }
          .ant-col-sm-16 {
            width: 89.5%;
            padding-top: 4px;
          .ant-form-item-control-wrapper {
            width: 100%;
          }
          .CodeMirror {
            height: auto;
            min-height: calc(100vh - 230px);
            height: calc(100vh - 100px);
            border-radius: 0;
          }
          .CodeMirror-scroll {
            min-height: calc(100vh - 230px);
          .code-mirror-area {
            border-radius: 0;
          }
        }
        .sqlfield {
@@ -169,23 +194,18 @@
          }
        }
        .add {
          padding-top: 4px;
          position: absolute;
          top: 10px;
          z-index: 1;
          .ant-btn {
            height: 28px;
          }
          .mk-green {
            margin-left: 0!important;
            margin-right: 10px;
          }
        }
      }
    }
    .ant-modal-body::-webkit-scrollbar {
      width: 7px;
    }
    .ant-modal-body::-webkit-scrollbar-thumb {
      border-radius: 5px;
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
      background: rgba(0, 0, 0, 0.13);
    }
    .ant-modal-body::-webkit-scrollbar-track {
      box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
      border-radius: 3px;
      border: 1px solid rgba(0, 0, 0, 0.07);
      background: rgba(0, 0, 0, 0);
    }
  }
}