From a2b5d58d080bd399b8b41c2290573015785d684f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 22 二月 2022 15:09:38 +0800 Subject: [PATCH] 2022-02-22 --- src/assets/css/viewstyle.scss | 7 +++ src/tabviews/custom/components/module/voucher/index.jsx | 40 +++++++++++++++++++- src/tabviews/custom/components/module/voucher/index.scss | 31 +++++++++++++++ 3 files changed, 75 insertions(+), 3 deletions(-) diff --git a/src/assets/css/viewstyle.scss b/src/assets/css/viewstyle.scss index feace16..6c1f120 100644 --- a/src/assets/css/viewstyle.scss +++ b/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 { diff --git a/src/tabviews/custom/components/module/voucher/index.jsx b/src/tabviews/custom/components/module/voucher/index.jsx index 0abd8f6..59ea03c 100644 --- a/src/tabviews/custom/components/module/voucher/index.jsx +++ b/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> ) } diff --git a/src/tabviews/custom/components/module/voucher/index.scss b/src/tabviews/custom/components/module/voucher/index.scss index 5a70b9e..856d44b 100644 --- a/src/tabviews/custom/components/module/voucher/index.scss +++ b/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; + } + } + } } -- Gitblit v1.8.0