king
2022-02-22 a2b5d58d080bd399b8b41c2290573015785d684f
2022-02-22
3个文件已修改
78 ■■■■■ 已修改文件
src/assets/css/viewstyle.scss 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/index.jsx 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/module/voucher/index.scss 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/css/viewstyle.scss
@@ -416,9 +416,14 @@
  .system-color {
    color: $color6;
  }
  .system-background {
    background: $color6;
    border-color: $color6;
    color: #ffffff;
  }
  .ant-timeline.system {
    .ant-timeline-item-tail {
      border-color: $color2;;
      border-color: $color2;
    }
  }
  .custom-tab-form-box .mk-normal-form-title.mkbtn {
src/tabviews/custom/components/module/voucher/index.jsx
@@ -1,6 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Button, Select, Input, DatePicker } from 'antd'
// import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined } from '@ant-design/icons'
// import MKEmitter from '@/utils/events.js'
@@ -19,6 +20,9 @@
    loading: false,            // 数据加载状态
    data: null,                // 数据
    searchkey: null,           // 过滤条件
    disableAdd: true,
    disableSave: true,
    typeOptions: []
  }
  UNSAFE_componentWillMount () {
@@ -53,12 +57,44 @@
  }
  triggeradd = () => {
  }
  triggersave = () => {
  }
  triggerprint = () => {
  }
  render() {
    const { config } = this.state
    const { config, disableSave, disableAdd, typeOptions } = this.state
    return (
      <div className="menu-voucher-wrap" style={config.style}>
        <div className="voucher-header">
          <Button className="system-background header-btn" disabled={disableAdd} onClick={this.triggeradd}>新增</Button>
          <Button className="system-background header-btn" disabled={disableSave} onClick={this.triggersave}>保存</Button>
          <Button className="system-background header-btn" disabled={disableSave} onClick={this.triggerprint}>打印</Button>
        </div>
        <div className="voucher-body">
          <div className="pre-wrap">
            <div className="voucher-code">
              <Select>
                {typeOptions.map(option =>
                  <Select.Option value={option.value}>{option.label}</Select.Option>
                )}
              </Select>
              <Input autoComplete="off" />号
            </div>
            <div className="voucher-date">
              日期:<DatePicker onChange={this.onChange}/>
            </div>
          </div>
        </div>
      </div>
    )
  }
src/tabviews/custom/components/module/voucher/index.scss
@@ -8,6 +8,37 @@
  min-height: 150px;
  overflow-y: auto;
  .voucher-header {
    padding: 10px;
    border-bottom: 1px solid #eeeeee;
    .header-btn {
      height: 28px;
      min-width: 80px;
      margin-right: 10px;
    }
  }
  .voucher-body {
    .voucher-code {
      display: inline-block;
      width: 160px;
      margin-right: 15px;
      .ant-select {
        width: 65px;
        margin-right: 10px;
      }
      .ant-input {
        width: 60px;
      }
    }
    .voucher-date {
      display: inline-block;
      .ant-calendar-picker {
        width: 120px;
      }
    }
  }
}