king
2024-05-21 8a6ce370f1aa1c061b76fa3e9d2d4d1df53ca4c5
src/menu/components/module/invoice/index.jsx
@@ -2,7 +2,7 @@
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Popover, Button, Modal } from 'antd'
import { EditOutlined, ToolOutlined, DeleteOutlined, FontColorsOutlined, EllipsisOutlined, SettingOutlined } from '@ant-design/icons'
import { EditOutlined, ToolOutlined, DeleteOutlined, LeftOutlined, FontColorsOutlined, EllipsisOutlined, SettingOutlined } from '@ant-design/icons'
import moment from 'moment'
import Utils from '@/utils/utils.js'
@@ -37,12 +37,13 @@
      let _card = {
        uuid: card.uuid,
        type: card.type,
        format: 'object',   // 组件属性 - 数据格式
        format: 'array',    // 组件属性 - 数据格式
        pageable: false,    // 组件属性 - 是否可分页
        switchable: false,  // 组件属性 - 数据是否可切换
        width: card.width || 24,
        name: '发票',
        subtype: card.subtype,
        fixedCol: true,
        wrap: { name: '发票', width: card.width || 24, datatype: 'static' },
        style: { paddingLeft: '20px', paddingRight: '20px', paddingTop: '10px', paddingBottom: '10px' },
        setting: { interType: 'system', primaryKey: 'ID' },
@@ -51,6 +52,7 @@
        buyer: {
          pageable: true,
          format: 'array',
          fixedCol: true,
          subtype: 'invTable',
          setting: { interType: 'system' },
          columns: [],
@@ -63,6 +65,7 @@
        detail: {
          pageable: true,
          format: 'array',
          fixedCol: true,
          subtype: 'invTable',
          setting: { interType: 'system' },
          columns: [],
@@ -72,8 +75,8 @@
            {field: 'productcode', label: '商品编码', initval: '', type: 'text', match: 'like', uuid: Utils.getuuid()},
          ],
        },
        billSaveBtn: {type: 'billsave', intertype: 'system', label: '保存单据'},
        billOutBtn: {type: 'billout', intertype: 'custom', label: '提交开票', procMode: 'system'},
        billSaveBtn: {type: 'billsave', parId: card.uuid, intertype: 'system', label: '保存单据'},
        billOutBtn: {type: 'billout', parId: card.uuid, intertype: 'custom', label: '提交开票', procMode: 'system'},
      }
      let buys = [
@@ -102,11 +105,12 @@
        ['单价', 'unitprice', 'Decimal(18,10)'],
        ['税务分类编码', 'tax_classify_code'],
        ['税务分类名称', 'tax_classify_name'],
        // ['税率', 'tax_rate', 'Decimal(18,2)'],
        ['一般纳税人税率', 'general_tax_rate', 'Decimal(18,2)'],
        ['小规模纳税人征收率', 'small_tax_rate', 'Decimal(18,2)'],
        ['是否享受优惠政策', 'free_tax_mark'],
        ['优惠政策类型', 'vat_special_management'],
        ['征税项目', 'tax_item'],
        ['计税方法', 'tax_method'],
      ]
      details.forEach((cell, index) => {
@@ -117,6 +121,7 @@
        ['ID', 'ID'],
        ['开票申请单号', 'io'],
        ['发票种类', 'invoice_type'],
        ['开票类型', 'business_type', 'Nvarchar(20)'],
        ['购买方名称', 'from_to_name'],
        ['购买方税号', 'from_to_tax_no'],
        ['购买方地址', 'from_to_addr', 'Nvarchar(100)'],
@@ -136,6 +141,7 @@
        ['收款人', 'payee'],
        ['复核人', 'reviewer'],
        ['开票人', 'drawer'],
        ['jskey', 'jskey'],
        ['行号', 'invoice_lp'],
        ['商品编码', 'productcode'],
        ['商品名称', 'productname'],
@@ -148,6 +154,14 @@
        ['税务分类名称', 'tax_classify_name'],
        ['税率', 'tax_rate', 'Decimal(18,2)'],
        ['税额', 'tax_amount', 'Decimal(18,2)'],
        ['是否享受优惠政策', 'free_tax_mark'],
        ['优惠政策类型', 'vat_special_management'],
        ['征税项目', 'tax_item'],
        ['计税方法', 'tax_method'],
        ['发票号码', 'invoice_no'],
        ['发票代码', 'invoice_code'],
        ['开票日期', 'invoice_date'],
        ['只读(true)', 'read_only'],
      ]
      cols.forEach((cell, index) => {
@@ -289,6 +303,8 @@
          <ToolOutlined />
        </Popover>
        <div className="inv-action">
          {card.wrap.backBtn === 'show' ? <Button className="mk-back"><LeftOutlined />返回</Button> : null}
          <Button className="mk-addinv">新增发票</Button>
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
              <EditOutlined style={{color: '#1890ff'}} onClick={() => this.setState({btn: card.billSaveBtn})} title="编辑"/>