king
2023-02-03 1ba430d58ea3fd662d09b99f6e22ed3b3564a356
src/menu/components/module/voucher/index.jsx
@@ -39,7 +39,7 @@
        name: '凭证',
        subtype: card.subtype,
        // setting: { interType: 'system' },
        wrap: { name: '凭证', title: '', width: card.width || 12, type: 'edit' },
        wrap: { name: '凭证', title: '', width: card.width || 12, type: 'createVoucher' },
        style: { marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px', paddingBottom: '20px' },
        headerStyle: {},
        columns: [],
@@ -84,7 +84,7 @@
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle)
    MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight'], card.style, this.getStyle)
  }
  getStyle = (style) => {
@@ -101,7 +101,6 @@
  updateWrap = (res) => {
    let _card = {...this.state.card, wrap: res}
    _card.switchable = res.type !== 'edit'
    this.updateComponent(_card)
  }
@@ -123,31 +122,48 @@
          <ToolOutlined />
        </Popover>
        <div className="voucher-box">
          <div className="voucher-header">
            <Button className="add-background header-btn">新增</Button>
          {card.wrap.type === 'createVoucher' ? <div className="voucher-header">
            <Button className="add-background header-btn">保存并新增</Button>
            <Button className="add-background header-btn">保存</Button>
            <Button className="print-background header-btn">打印</Button>
            <Button className="system-background header-btn">导入</Button>
            <Button className="out-background header-btn">导出</Button>
          </div>
            <Button className="out-background header-btn">更多</Button>
          </div> : null}
          {card.wrap.type === 'checkVoucher' ? <div className="voucher-header">
            <Button className="add-background header-btn">保存</Button>
            <Button className="print-background header-btn">打印</Button>
            <Button className="out-background header-btn">关闭</Button>
          </div> : null}
          <div className="voucher-body">
          <div className="pre-wrap">
            <div className="voucher-code">
              <div>记<DownOutlined/></div>
              <div>1</div>
              号
            </div>
            <div className="voucher-date">
              日期:<div>请选择日期 <CalendarOutlined /></div>
            </div>
            <div className="voucher-affix">
              附单据 <div>2</div> 张
              <Button type="link" className="">附件</Button>
              <Button type="link" className="">备注</Button>
            </div>
            {card.wrap.type === 'createVoucher' || card.wrap.type === 'checkVoucher' ? <div className="pre-wrap">
              <div className="voucher-code">
                <div>记<DownOutlined/></div>
                <div>1</div>
                号
              </div>
              <div className="voucher-date">
                日期:<div>请选择日期 <CalendarOutlined /></div>
              </div>
              <div className="voucher-affix">
                附单据 <div>2</div> 张
                <Button type="link" className="">附件</Button>
                <Button type="link" className="">备注</Button>
              </div>
            </div> : null}
            {card.wrap.type === 'createTemp' || card.wrap.type === 'checkTemp' ? <div className="pre-wrap">
              <div className="temp-code">
                模板名称:
                <div>&nbsp;</div>
              </div>
              <div className="temp-code">
                模板类型:
                <div>日常支出<DownOutlined/></div>
              </div>
              <Button className="out-background header-btn">关闭</Button>
              <Button className="add-background header-btn">保存</Button>
            </div> : null}
            <VoucherTable config={card}/>
            {card.wrap.type === 'createVoucher' || card.wrap.type === 'checkVoucher' ? <div className="user">制单人:</div> : null}
          </div>
          <VoucherTable config={card}/>
        </div>
        </div>
      </div>
    )