From 4453a9e63e8e176c70c432b03fd4ba3ebf00a04c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 二月 2023 14:55:20 +0800
Subject: [PATCH] 2023-02-09

---
 src/menu/components/chart/antv-bar/chartcompile/index.jsx            |   41 +
 src/menu/datasource/verifycard/utils.jsx                             |    4 
 src/utils/utils-datamanage.js                                        |    8 
 src/tabviews/custom/components/chart/antv-bar-line/index.jsx         |   70 ++
 src/menu/components/chart/antv-bar/chartcompile/index.scss           |   11 
 src/tabviews/zshare/normalTable/index.jsx                            |    6 
 src/menu/datasource/verifycard/customscript/index.jsx                |    2 
 src/tabviews/custom/components/card/cardItem/index.jsx               |    3 
 src/menu/components/card/cardcellcomponent/elementform/index.jsx     |    2 
 src/templates/sharecomponent/fieldscomponent/editcard/index.jsx      |    4 
 src/menu/components/card/cardcellcomponent/dragaction/card.jsx       |   19 
 src/tabviews/custom/components/carousel/data-card/index.jsx          |    8 
 src/menu/stylecontroller/index.scss                                  |    5 
 src/tabviews/custom/components/share/normalTable/index.jsx           |    6 
 src/tabviews/custom/components/card/data-card/index.scss             |   80 +++
 src/tabviews/custom/components/card/data-card/index.jsx              |   89 +++
 src/assets/css/main.scss                                             |   11 
 src/menu/components/module/voucher/options.jsx                       |    1 
 src/tabviews/custom/components/card/cardcellList/index.jsx           |    9 
 src/tabviews/custom/components/module/voucher/index.jsx              |  342 ++++++++++++----
 src/menu/components/carousel/data-card/options.jsx                   |    1 
 src/menu/components/card/cardcellcomponent/index.jsx                 |    9 
 src/menu/components/card/data-card/options.jsx                       |    5 
 src/menu/stylecontroller/index.jsx                                   |   14 
 src/tabviews/zshare/actionList/printbutton/index.jsx                 |   10 
 src/menu/components/card/cardcellcomponent/formconfig.jsx            |   24 
 src/tabviews/custom/components/carousel/prop-card/index.jsx          |    8 
 src/tabviews/custom/components/module/voucher/voucherTable/index.jsx |  423 +++++++++++--------
 src/menu/components/table/base-table/columns/index.jsx               |    2 
 src/menu/components/table/normal-table/columns/index.jsx             |    2 
 src/menu/components/card/cardcomponent/options.jsx                   |   13 
 31 files changed, 876 insertions(+), 356 deletions(-)

diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss
index eb2dcfb..e5ada0e 100644
--- a/src/assets/css/main.scss
+++ b/src/assets/css/main.scss
@@ -17,6 +17,17 @@
   }
 }
 
+.table-col-1, .table-col-2, .table-col-3, .table-col-4 {
+  .ant-table colgroup > col.ant-table-selection-col {
+    width: 40px!important;
+  }
+}
+.table-col-5, .table-col-6, .table-col-7 {
+  .ant-table colgroup > col.ant-table-selection-col {
+    width: 50px!important;
+  }
+}
+
 /* 璁剧疆iconfont鏍囩font-family */ 
 [class^="icon-"],[class*=" icon-"] {
   font-family: "iconfont";
diff --git a/src/menu/components/card/cardcellcomponent/dragaction/card.jsx b/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
index 197c671..8069bcf 100644
--- a/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
+++ b/src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -101,32 +101,29 @@
       //   </div>
       // )
     } else if (card.eleType === 'picture') {
-      let _imagestyle = {}
+      let _imagestyle = {
+        backgroundSize: card.style.backgroundSize || 'cover',
+        backgroundPosition: card.style.backgroundPosition || 'center',
+        backgroundRepeat: card.style.backgroundRepeat || 'no-repeat',
+        borderRadius: card.style.borderRadius || 0
+      }
       let url = card.url !== '@icon@' ? card.url : sessionStorage.getItem('CloudAvatar')
 
       if (url) {
         url = url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)
-        _imagestyle = {backgroundImage: `url('${url}')`}
+        _imagestyle.backgroundImage = `url('${url}')`
       } else {
         let index = card.uuid.match(/\d{1}/g)
         index = index.slice(-1)[0] % 5
         let demos = [demo1, demo2, demo3, demo4, demo5]
 
-        _imagestyle = {backgroundImage: `url('${demos[index]}')`}
-      }
-
-      if (card.style && card.style.borderRadius) {
-        _imagestyle.borderRadius = card.style.borderRadius
+        _imagestyle.backgroundImage = `url('${demos[index]}')`
       }
 
       if (PicRadio[card.lenWidRadio]) {
         _imagestyle.paddingTop = PicRadio[card.lenWidRadio]
       } else {
         _imagestyle.paddingTop = '100%'
-      }
-
-      if (card.backgroundSize) {
-        _imagestyle.backgroundSize = card.backgroundSize
       }
 
       return (
diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
index cb4f601..d2a553f 100644
--- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -17,7 +17,7 @@
   sequence: ['eleType', 'width'],
   text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'anchors', 'noValue', 'bgImage', 'fixStyle', 'copyable'],
   number: ['eleType', 'datatype', 'width', 'height', 'prefix', 'postfix', 'noValue', 'fixStyle'],
-  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'backgroundSize', 'maxWidth', 'link', 'noValue'],
+  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'noValue'],
   video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'startTime', 'noValue', 'posterType'],
   icon: ['eleType', 'datatype', 'width', 'tooltip'],
   slider: ['eleType', 'datatype', 'width', 'color', 'maxValue', 'showInfo', 'showType', 'strokeWidth', 'strokeLinecap', 'trailColor'],
diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx
index c63b76f..7d87970 100644
--- a/src/menu/components/card/cardcellcomponent/formconfig.jsx
+++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -440,18 +440,18 @@
         { value: '9:16', text: '9:16' },
       ]
     },
-    {
-      type: 'radio',
-      key: 'backgroundSize',
-      label: '鍥惧儚澶у皬',
-      initVal: card.backgroundSize || 'cover',
-      required: false,
-      options: [
-        { value: 'cover', text: '瑕嗙洊' },
-        { value: 'contain', text: '鍖呭惈' },
-        { value: 'auto', text: '鑷�傚簲' },
-      ]
-    },
+    // {
+    //   type: 'radio',
+    //   key: 'backgroundSize',
+    //   label: '鍥惧儚澶у皬',
+    //   initVal: card.backgroundSize || 'cover',
+    //   required: false,
+    //   options: [
+    //     { value: 'cover', text: '瑕嗙洊' },
+    //     { value: 'contain', text: '鍖呭惈' },
+    //     { value: 'auto', text: '鑷�傚簲' },
+    //   ]
+    // },
     {
       type: 'number',
       key: 'maxWidth',
diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index f3d2af6..454f5a9 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -155,7 +155,7 @@
         _style.float = element.wrapStyle.textAlign || 'left'
       }
     } else if (element.eleType === 'picture') {
-      options = ['border', 'margin']
+      options = ['background', 'border', 'margin']
     } else if (element.eleType === 'color') {
       options = ['border', 'margin', 'padding']
     } else if (element.eleType === 'text') {
@@ -173,7 +173,7 @@
       card: element
     })
 
-    MKEmitter.emit('changeStyle', options, _style, this.getStyle)
+    MKEmitter.emit('changeStyle', options, _style, this.getStyle, 'mk-' + element.eleType)
   }
 
   getStyle = (style) => {
@@ -242,6 +242,9 @@
         _card.wrapStyle = {textAlign: style.float}
         delete _card.style.float
       }
+    } else if (_card.eleType === 'picture') {
+      _card.style = style
+      delete _card.style.backgroundImage
     } else {
       _card.style = style
     }
@@ -402,6 +405,8 @@
             }
       
             res.innerHeight = res.barHeight + (res.displayValue === 'true' ? fontSize + 2 : 0)
+          } else if (res.eleType === 'picture') {
+            delete res.style.backgroundImage
           }
           
           return res
diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx
index f3f79aa..dbcca49 100644
--- a/src/menu/components/card/cardcomponent/options.jsx
+++ b/src/menu/components/card/cardcomponent/options.jsx
@@ -237,6 +237,19 @@
       forbid: appType === 'mob'
     },
     {
+      type: 'radio',
+      field: 'checkAll',
+      label: '鍏ㄩ��',
+      initval: setting.checkAll || 'hidden',
+      tooltip: '鍏ㄩ�変粎鍦ㄦ暟鎹崱鍙閫夛紝涓旈�変腑椋庢牸涓哄嬀閫夋鏃舵湁鏁堛��',
+      required: false,
+      options: [
+        {value: 'hidden', label: '闅愯棌'},
+        {value: 'show', label: '鏄剧ず'},
+      ],
+      forbid: cardType !== 'extendCard'
+    },
+    {
       type: 'table',
       field: 'menus',
       label: '鑿滃崟缁�',
diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index a01a35f..a98a24c 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -237,7 +237,10 @@
         {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'},
         {value: 'font', label: '鏂囧瓧'},
         {value: 'tabs', label: '鏍囩椤�'},
-        ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '鍕鹃��'}] : [])
+        ...(subtype === 'datacard' ? [
+          {value: 'check', label: '鍕鹃�夛紙鍦嗘锛�'},
+          {value: 'check square', label: '鍕鹃�夛紙鏂规锛�'}
+        ] : [])
       ],
       forbid: subtype === 'tablecard'
     },
diff --git a/src/menu/components/carousel/data-card/options.jsx b/src/menu/components/carousel/data-card/options.jsx
index e6ac38e..8c6e414 100644
--- a/src/menu/components/carousel/data-card/options.jsx
+++ b/src/menu/components/carousel/data-card/options.jsx
@@ -79,6 +79,7 @@
       field: 'modalContent',
       label: '寮圭獥鍐呭',
       initval: wrap.modalContent || 'message',
+      tooltip: '浣跨敤绯荤粺鏇存柊鏃讹紝濡傛灉杩斿洖鍊肩殑ErrCode涓�-1锛屽彧浼氬仛绯荤粺閰嶇疆鏇存柊涓嶄細鏄剧ず寮圭獥銆傛敞锛氭暟鎹簮浣跨敤鍚屾鏌ヨ鏃舵棤鏁堛��',
       required: false,
       options: [
         {value: 'message', label: '娑堟伅鎻愰啋'},
diff --git a/src/menu/components/chart/antv-bar/chartcompile/index.jsx b/src/menu/components/chart/antv-bar/chartcompile/index.jsx
index 7feda4a..f0bfcc6 100644
--- a/src/menu/components/chart/antv-bar/chartcompile/index.jsx
+++ b/src/menu/components/chart/antv-bar/chartcompile/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { Modal, Form, Row, Col, Select, Radio, Tooltip, Input, InputNumber, Tabs, Button } from 'antd'
-import { QuestionCircleOutlined, EditOutlined } from '@ant-design/icons'
+import { QuestionCircleOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons'
 
 import Utils from '@/utils/utils.js'
 import { chartColors } from '@/utils/option.js'
@@ -44,6 +44,18 @@
         inputType: 'color',
         editable: true,
         width: '40%',
+        render: (text, record) => {
+          return (<div style={{width: '80px', height: '23px', background: text}}></div>)
+        }
+      },
+    ],
+    barColorColumns: [
+      {
+        title: '棰滆壊',
+        dataIndex: 'color',
+        inputType: 'color',
+        editable: true,
+        width: '70%',
         render: (text, record) => {
           return (<div style={{width: '80px', height: '23px', background: text}}></div>)
         }
@@ -745,10 +757,28 @@
     this.setState({plot})
   }
 
+  addbarColor = () => {
+    let plot = fromJS(this.state.plot).toJS()
+    plot.barcolors = plot.barcolors || []
+
+    plot.barcolors.push({
+      uuid: Utils.getuuid(),
+      color: 'rgb(91, 143, 249)'
+    })
+
+    this.setState({plot})
+  }
+
   changeColor = (colors) => {
     const { plot } = this.state
 
     this.setState({plot: {...plot, colors}})
+  }
+
+  changebarColor = (colors) => {
+    const { plot } = this.state
+
+    this.setState({plot: {...plot, barcolors: colors}})
   }
 
   changeCustom = (customs) => {
@@ -759,7 +789,7 @@
 
   render() {
     const { config } = this.props
-    const { view, visible, datatype, plot, ramp, colorColumns, rampColorColumns, statColorColumns, rampStatColorColumns, cusColumns, baseFormlist } = this.state
+    const { view, visible, datatype, plot, ramp, colorColumns, barColorColumns, rampColorColumns, statColorColumns, rampStatColorColumns, cusColumns, baseFormlist } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -818,9 +848,14 @@
                 {datatype === 'statistics' ? <Button className="color-add mk-green" onClick={this.addColor}>娣诲姞</Button> : null}
                 {datatype === 'statistics' ? <EditTable actions={['edit', 'move', 'del']} data={plot.colors || []} columns={ramp ==='true' ? rampStatColorColumns : statColorColumns} onChange={this.changeColor}/> : null}
                 {datatype !== 'statistics' ? <EditTable actions={['edit']} data={plot.colors || []} columns={ramp ==='true' ? rampColorColumns : colorColumns} onChange={this.changeColor}/> : null}
+                {plot.chartType === 'bar' && plot.datatype === 'query' ? <div className="mk-bar-colors">
+                  <p>鏌卞舰棰滆壊锛氬彲鏍规嵁鏌卞浘搴忓彿璁剧疆棰滆壊锛堣璁剧疆鏌卞舰瀹藉害锛夈�傛敞锛氫娇鐢ㄨ嚜瀹氫箟鍥惧舰璁剧疆鎴栧鏍规煴鍥炬椂鏃犳晥銆�</p>
+                  <div className="bar-color-add"><PlusOutlined onClick={this.addbarColor}/></div>
+                  <EditTable actions={['edit', 'move', 'del']} data={plot.barcolors || []} columns={barColorColumns} onChange={this.changebarColor}/>
+                </div> : null}
               </div>
             </TabPane> : null}
-            {plot ? <TabPane tab="鑷畾涔夎缃�" disabled={datatype === 'statistics'} key="custom">
+            {plot ? <TabPane tab="鑷畾涔夊浘褰㈣缃�" disabled={datatype === 'statistics'} key="custom">
               <Col span={12}>
                 <Form {...formItemLayout}>
                   <Form.Item label="鏄惁鍚敤" style={{marginBottom: 10}}>
diff --git a/src/menu/components/chart/antv-bar/chartcompile/index.scss b/src/menu/components/chart/antv-bar/chartcompile/index.scss
index abcff08..4fe430a 100644
--- a/src/menu/components/chart/antv-bar/chartcompile/index.scss
+++ b/src/menu/components/chart/antv-bar/chartcompile/index.scss
@@ -22,6 +22,17 @@
   .ant-table-column-title {
     white-space: nowrap;
   }
+  .mk-bar-colors {
+    padding-top: 30px;
+
+    .bar-color-add {
+      text-align: right;
+      color: #26C281;
+      font-size: 24px;
+      padding-right: 10px;
+      margin-top: -40px;
+    }
+  }
 }
 
 
diff --git a/src/menu/components/module/voucher/options.jsx b/src/menu/components/module/voucher/options.jsx
index b453c3c..9867b17 100644
--- a/src/menu/components/module/voucher/options.jsx
+++ b/src/menu/components/module/voucher/options.jsx
@@ -45,6 +45,7 @@
         {field: 'voucherType', values: ['createVoucher', 'checkVoucher']},
         {field: 'voucherTypeText', values: ['createVoucher', 'checkVoucher']},
         {field: 'voucherSign', values: ['createVoucher', 'checkVoucher']},
+        {field: 'supModule', values: ['checkTemp', 'checkVoucher']},
       ]
     },
     {
diff --git a/src/menu/components/table/base-table/columns/index.jsx b/src/menu/components/table/base-table/columns/index.jsx
index b7cd7e3..27b02ee 100644
--- a/src/menu/components/table/base-table/columns/index.jsx
+++ b/src/menu/components/table/base-table/columns/index.jsx
@@ -650,7 +650,7 @@
     }
 
     return (
-      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''}`} id={tableId}>
+      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''} table-col-${columns.length}`} id={tableId}>
         <div className="col-control">
           <FieldsComponent config={config} type="columns" />
           <CopyOutlined title="澶嶅埗鏄剧ず鍒�" onClick={this.copycolumn} />
diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx
index 1097ef5..6477d10 100644
--- a/src/menu/components/table/normal-table/columns/index.jsx
+++ b/src/menu/components/table/normal-table/columns/index.jsx
@@ -607,7 +607,7 @@
     const columns = this.handlecolumns(this.state.columns, fields, config)
 
     return (
-      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''}`} id={tableId}>
+      <div className={`normal-table-columns ${config.setting.laypage} ${config.wrap.tableType} ${config.wrap.mode || ''} table-vertical-${config.wrap.vertical || ''} table-col-${columns.length}`} id={tableId}>
         <div className="col-control">
           <CopyOutlined title="澶嶅埗鏄剧ず鍒�" onClick={this.copycolumn} />
           <MarkColumn columns={fields} type="line" marks={lineMarks} onSubmit={this.updateLineMarks} />
diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx
index a673fea..2631584 100644
--- a/src/menu/datasource/verifycard/customscript/index.jsx
+++ b/src/menu/datasource/verifycard/customscript/index.jsx
@@ -234,7 +234,7 @@
           </Col>
           <Col span={24} className="sqlfield">
             <Form.Item label={'鍙敤瀛楁'}>
-              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
+              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鍏叡鍊硷紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, time_id</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'绯荤粺鍙橀噺锛岀郴缁熶細瀹氫箟鍙橀噺骞惰祴鍊笺��'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'鎺掑簭銆佸垎椤典互鍙婃悳绱㈡潯浠跺彉閲忥紝璇锋寜鐓xxx@鏍煎紡浣跨敤銆�'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}</Tooltip>
               <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url鍙橀噺锛岃鎸夌収@xxx@鏍煎紡浣跨敤銆�'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip>
diff --git a/src/menu/datasource/verifycard/utils.jsx b/src/menu/datasource/verifycard/utils.jsx
index 6296192..8b3fd5a 100644
--- a/src/menu/datasource/verifycard/utils.jsx
+++ b/src/menu/datasource/verifycard/utils.jsx
@@ -44,8 +44,8 @@
     //   error = '绯荤粺鍑芥暟' + _customScript.match(/\$ex@.{1,50}@ex\$/g)[0].replace(/\$ex@|@ex\$/g, '') + '鏈畾涔�'
     // }
 
-    _dataresource = _dataresource.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'${timestamp}'`)
-    _customScript = _customScript.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'${timestamp}'`)
+    _dataresource = _dataresource.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'${timestamp}'`)
+    _customScript = _customScript.replace(/@(BID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|upid)@/ig, `'${timestamp}'`)
 
     _dataresource = _dataresource.replace(/@\$|\$@/ig, '')
     _customScript = _customScript.replace(/@\$|\$@/ig, '')
diff --git a/src/menu/stylecontroller/index.jsx b/src/menu/stylecontroller/index.jsx
index b9e30ca..b795e25 100644
--- a/src/menu/stylecontroller/index.jsx
+++ b/src/menu/stylecontroller/index.jsx
@@ -55,7 +55,8 @@
     fonts: null,
     backgroundImage: '',
     options: [],
-    borposition: 'outer'
+    borposition: 'outer',
+    type: ''
   }
 
   callback = null
@@ -78,7 +79,7 @@
     MKEmitter.removeListener('changeStyle', this.initStyle)
   }
 
-  initStyle = (options, style = {}, callback) => {
+  initStyle = (options, style = {}, callback, type) => {
     let backgroundImage = ''
     if (style.backgroundImage && /^url/ig.test(style.backgroundImage)) {
       backgroundImage = style.backgroundImage.replace(/^url\(/ig, '').replace(/\)$/ig, '')
@@ -116,6 +117,7 @@
 
     this.setState({
       visible: true,
+      type: type || '',
       fonts: fonts,
       card: card,
       options: options,
@@ -466,7 +468,7 @@
   }
 
   render () {
-    const { card, options, backgroundImage, borposition, fonts } = this.state
+    const { card, options, backgroundImage, borposition, fonts, type } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -494,7 +496,7 @@
         maskStyle={{opacity: 0.1}}
         visible={this.state.visible}
       >
-        <div className="menu-style-controller">
+        <div className={'menu-style-controller ' + (type || '')}>
           <Form {...formItemLayout}>
             {card ? <Collapse expandIconPosition="right" destroyInactivePanel={true} defaultActiveKey={options[0]}>
               {options.includes('width') ? <Panel header="瀹藉害" key="width">
@@ -625,7 +627,7 @@
                 </Col> : null}
               </Panel> : null}
               {options.includes('background') || options.includes('backgroundColor') ? <Panel header="鑳屾櫙" key="background">
-                <Col span={24}>
+                <Col span={24} className="bg-color-panel">
                   <Form.Item
                     colon={false}
                     label={<BgColorsOutlined title="鑳屾櫙棰滆壊"/>}
@@ -650,7 +652,7 @@
                     <Input value={card.background || ''} onChange={(e) => this.changeBackground(e.target.value)} />
                   </Form.Item>
                 </Col> : null}
-                {!options.includes('backgroundColor') ? <Col span={24}>
+                {!options.includes('backgroundColor') ? <Col span={24} className="bg-image-panel">
                   <Form.Item
                     colon={false}
                     label={<PictureOutlined title="鑳屾櫙鍥剧墖"/>}
diff --git a/src/menu/stylecontroller/index.scss b/src/menu/stylecontroller/index.scss
index 514e0b1..02bccdb 100644
--- a/src/menu/stylecontroller/index.scss
+++ b/src/menu/stylecontroller/index.scss
@@ -126,6 +126,11 @@
     }
   }
 }
+.menu-style-controller.mk-picture {
+  .bg-image-panel {
+    display: none;
+  }
+}
 
 .margin-popover {
   padding-top: 0px;
diff --git a/src/tabviews/custom/components/card/cardItem/index.jsx b/src/tabviews/custom/components/card/cardItem/index.jsx
index 84d3eec..6e46720 100644
--- a/src/tabviews/custom/components/card/cardItem/index.jsx
+++ b/src/tabviews/custom/components/card/cardItem/index.jsx
@@ -161,7 +161,7 @@
   }
 
   render() {
-    const { card, data, cards } = this.props
+    const { card, data, cards, children } = this.props
     let style = {...card.style}
 
     let bg = null
@@ -178,6 +178,7 @@
     return (
       <div className={'card-item-box ' + (card.setting.btnControl || '')} style={style} onClick={this.openView} onDoubleClick={this.doubleClick}>
         {bg}
+        {children}
         <CardCellComponent data={data} cards={cards} cardCell={card} elements={card.elements}/>
         {card.setting.type === 'multi' ? <div className={'back-side ' + card.setting.transform} style={card.backStyle}>
           <CardCellComponent data={data} cards={cards} cardCell={card} elements={card.backElements}/>
diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx
index 8f74c29..a8a0620 100644
--- a/src/tabviews/custom/components/card/cardcellList/index.jsx
+++ b/src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -558,10 +558,6 @@
         if (url === '' && card.noValue === 'hide') { // 绌哄�奸殣钘�
           return null
         }
-
-        if (_style.borderRadius) {
-          _imagestyle.borderRadius = _style.borderRadius
-        }
   
         if (PicRadio[card.lenWidRadio]) {
           _imagestyle.paddingTop = PicRadio[card.lenWidRadio]
@@ -569,7 +565,10 @@
           _imagestyle.paddingTop = '100%'
         }
 
-        _imagestyle.backgroundSize = card.backgroundSize || 'cover'
+        _imagestyle.borderRadius = _style.borderRadius || 0
+        _imagestyle.backgroundSize = _style.backgroundSize || 'cover'
+        _imagestyle.backgroundPosition = _style.backgroundPosition || 'center'
+        _imagestyle.backgroundRepeat = _style.backgroundRepeat || 'no-repeat'
   
         if (card.link) {
           _style.cursor = 'pointer'
diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index ec98383..edc216a 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -452,15 +452,29 @@
     if (config.uuid !== menuId) return
 
     if (checked) {
+      let index = ''
+      let keys = []
+      let items = []
+      let last = ''
+
+      data.forEach((item, i) => {
+        if (item.$disabled) return
+
+        items.push(item)
+        keys.push(i)
+        index = i
+        last = item
+      })
+
       this.setState({
-        activeKey: '',
-        selectKeys: data.map((item, index) => index),
-        selectedData: data
+        activeKey: index,
+        selectKeys: keys,
+        selectedData: items
       })
   
-      MKEmitter.emit('resetSelectLine', config.uuid, '', '')
-      MKEmitter.emit('syncBalconyData', config.uuid, data, data.length > 0)
-      if (data.length === 0) {
+      MKEmitter.emit('resetSelectLine', config.uuid, last ? last.$$uuid : '', last)
+      MKEmitter.emit('syncBalconyData', config.uuid, items, data.length > 0 && data.length === keys.length)
+      if (items.length === 0) {
         message.warning('鏈幏鍙栧埌鏁版嵁锛�')
       }
     } else {
@@ -472,6 +486,50 @@
   
       MKEmitter.emit('resetSelectLine', config.uuid, '', '')
       MKEmitter.emit('syncBalconyData', config.uuid, [], false)
+    }
+  }
+
+  checkAll = () => {
+    const { config, data, selectedData } = this.state
+
+    if (!data || data.length === 0) return
+    
+    if (selectedData.length === 0 || selectedData.length < data.length) {
+      let index = ''
+      let keys = []
+      let items = []
+      let last = ''
+
+      data.forEach((item, i) => {
+        if (item.$disabled) return
+
+        items.push(item)
+        keys.push(i)
+        index = i
+        last = item
+      })
+
+      this.setState({
+        activeKey: index,
+        selectKeys: keys,
+        selectedData: items
+      })
+  
+      MKEmitter.emit('resetSelectLine', config.uuid, last ? last.$$uuid : '', last)
+      if (config.setting.$hasSyncModule) {
+        MKEmitter.emit('syncBalconyData', config.uuid, items, data.length === keys.length)
+      }
+    } else {
+      this.setState({
+        activeKey: '',
+        selectKeys: [],
+        selectedData: []
+      })
+  
+      MKEmitter.emit('resetSelectLine', config.uuid, '', '')
+      if (config.setting.$hasSyncModule) {
+        MKEmitter.emit('syncBalconyData', config.uuid, [], false)
+      }
     }
   }
 
@@ -878,6 +936,13 @@
       extendData = {...extendData, ...data[0]}
     }
 
+    let checkAll = ''
+    if (config.wrap.selStyle.indexOf('check') > -1) {
+      if (selectedData.length > 0) {
+        checkAll = selectedData.length < data.length ? ' half' : ' whole'
+      }
+    }
+
     return (
       <div className="custom-data-card-box" id={'anchor' + config.uuid} style={config.style}>
         {loading ?
@@ -902,7 +967,9 @@
           <Row className={'card-row-list ' + config.wrap.layout}>
             {precards.map((item, index) => (
               <Col key={'pre' + index} className="extend-card" span={item.setting.width || 6}>
-                <CardItem card={item} cards={config} data={extendData}/>
+                <CardItem card={item} cards={config} data={extendData}>
+                  {item.setting.checkAll === 'show' ? <span onClick={this.checkAll} className={'circle-select' + checkAll}></span> : null}
+                </CardItem>
               </Col>
             ))}
             {data && data.map((item, index) => {
@@ -922,13 +989,17 @@
 
               return (
                 <Col className={className} key={index} span={card.setting.width} onClick={() => {this.changeCard(index, item)}}>
-                  <CardItem card={card} cards={config} data={item}/>
+                  <CardItem card={card} cards={config} data={item}>
+                    <span className="circle-select"></span>
+                  </CardItem>
                 </Col>
               )
             })}
             {nextcards.map((item, index) => (
               <Col key={'next' + index} className="extend-card" span={item.setting.width || 6}>
-                <CardItem card={item} cards={config} data={extendData}/>
+                <CardItem card={item} cards={config} data={extendData}>
+                  {item.setting.checkAll === 'show' ? <span onClick={this.checkAll} className={'circle-select' + checkAll}></span> : null}
+                </CardItem>
               </Col>
             ))}
           </Row>
diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss
index f0750ac..9325019 100644
--- a/src/tabviews/custom/components/card/data-card/index.scss
+++ b/src/tabviews/custom/components/card/data-card/index.scss
@@ -162,6 +162,86 @@
     cursor: not-allowed;
     color: #bcbcbc;
   }
+  .mk-disabled {
+    .circle-select {
+      border-color: #e8e8e8!important;
+      cursor: not-allowed;
+    }
+  }
+  .circle-select {
+    position: relative;
+    display: none;
+    width: 16px;
+    height: 16px;
+    border: 1px solid #cccccc;
+    border-radius: 50%;
+    box-sizing: content-box;
+    margin: auto;
+    margin-right: 5px;
+    background-color: #ffffff;
+    transition: border-color 0.2s;
+    cursor: pointer;
+  }
+  .circle-select::before {
+    position: relative;
+    top: 1px;
+    left: 6px;
+    content: ' ';
+    display: block;
+    width: 5px;
+    height: 11px;
+    border-style: solid;
+    border-width: 0 2px 2px 0;
+    border-color: #ffffff;
+    transform: rotate(45deg);
+  }
+
+  .data-zoom.check.square {
+    .circle-select {
+      border-radius: 0!important;
+    }
+  }
+  .data-zoom.check {
+    .mk-card.active, .mk-card.selected {
+      .circle-select {
+        border-color: var(--mk-sys-color);
+        background: var(--mk-sys-color);
+      }
+    }
+    .circle-select.whole {
+      border-color: var(--mk-sys-color);
+      background: var(--mk-sys-color);
+    }
+    .circle-select.half {
+      border-color: var(--mk-sys-color);
+    }
+    .circle-select.half::before {
+      display: none;
+    }
+    .circle-select.half::after {
+      position: absolute;
+      top: 4px;
+      left: 4px;
+      content: ' ';
+      display: block;
+      width: 8px;
+      height: 8px;
+      background: var(--mk-sys-color);
+    }
+    .card-item-box {
+      width: 100%;
+      display: flex;
+    }
+    .card-cell-list {
+      flex: 1;
+    }
+    .circle-select {
+      display: block;
+    }
+    .circle-select:hover {
+      border-color: var(--mk-sys-color);
+    }
+  }
 }
 .custom-data-card-box::-webkit-scrollbar {
   width: 7px;
diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx
index 90e9116..9bed413 100644
--- a/src/tabviews/custom/components/carousel/data-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -194,7 +194,7 @@
     this.timer && this.timer.stop()
   }
 
-  openModal = () => {
+  openModal = (ErrCode) => {
     const { config, data } = this.state
     
     if (config.wrap.display !== 'modal' || !data || data.length === 0) return
@@ -208,6 +208,10 @@
       localStorage.setItem(code, data[0].$$uuid + data.length)
 
       Api.getAppVersion(true)
+
+      if (ErrCode === '-1') {
+        return
+      }
     }
 
     setTimeout(() => {
@@ -314,7 +318,7 @@
         }),
         loading: false
       }, () => {
-        this.openModal()
+        this.openModal(result.ErrCode)
       })
     } else {
       this.setState({
diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx
index 0b5782b..dde0ca0 100644
--- a/src/tabviews/custom/components/carousel/prop-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -198,7 +198,7 @@
     }
   }
 
-  openModal = () => {
+  openModal = (ErrCode) => {
     const { config, data } = this.state
     
     let code = config.wrap.code || ('modal' + config.uuid)
@@ -210,6 +210,10 @@
       localStorage.setItem(code, data.$$uuid || 'true')
 
       Api.getAppVersion(true)
+
+      if (ErrCode === '-1') {
+        return
+      }
     }
 
     setTimeout(() => {
@@ -335,7 +339,7 @@
         loading: false
       }, () => {
         if (config.wrap.display === 'modal') {
-          this.openModal()
+          this.openModal(result.ErrCode)
         }
       })
     } else {
diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
index 5bc343a..dc80392 100644
--- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -1478,6 +1478,7 @@
     let _valfield = 'value'
     let _typefield = 'key'
     let colorIndex = 0
+    let barcolors = {}
 
     if (plot.datatype === 'statistics') {
       _valfield = plot.InfoValue
@@ -1490,6 +1491,16 @@
       if (plot.enabled === 'true') {
         this.customrender(data)
         return
+      }
+
+      if (plot.barcolors && plot.barcolors.length > 0 && plot.Yaxis.length === 1) {
+        data.forEach((item, i) => {
+          if (plot.barcolors[i]) {
+            barcolors[item[plot.Xaxis]] = plot.barcolors[i].color
+          }
+        })
+      } else {
+        barcolors = null
       }
 
       const ds = new DataSet()
@@ -1624,14 +1635,28 @@
 
       if (plot.$colors) {
         let limit = chartColors.length
-        _chart.color(_typefield, (key) => {
-          if (plot.$colors.has(key)) {
-            return plot.$colors.get(key)
-          } else {
-            colorIndex++
-            return chartColors[(colorIndex - 1) % limit]
-          }
-        })
+
+        if (barcolors) {
+          _chart.color(`${_typefield}*${plot.Xaxis}`, (key, label) => {
+            if (barcolors[label]) {
+              return barcolors[label]
+            } else if (plot.$colors.has(key)) {
+              return plot.$colors.get(key)
+            } else {
+              colorIndex++
+              return chartColors[(colorIndex - 1) % limit]
+            }
+          })
+        } else {
+          _chart.color(`${_typefield}`, (key) => {
+            if (plot.$colors.has(key)) {
+              return plot.$colors.get(key)
+            } else {
+              colorIndex++
+              return chartColors[(colorIndex - 1) % limit]
+            }
+          })
+        }
       } else {
         _chart.color(_typefield)
       }
@@ -1686,14 +1711,27 @@
 
       if (plot.$colors) {
         let limit = chartColors.length
-        _chart.color(_typefield, (key) => {
-          if (plot.$colors.has(key)) {
-            return plot.$colors.get(key)
-          } else {
-            colorIndex++
-            return chartColors[(colorIndex - 1) % limit]
-          }
-        })
+        if (barcolors) {
+          _chart.color(`${_typefield}*${plot.Xaxis}`, (key, label) => {
+            if (barcolors[label]) {
+              return barcolors[label]
+            } else if (plot.$colors.has(key)) {
+              return plot.$colors.get(key)
+            } else {
+              colorIndex++
+              return chartColors[(colorIndex - 1) % limit]
+            }
+          })
+        } else {
+          _chart.color(`${_typefield}`, (key) => {
+            if (plot.$colors.has(key)) {
+              return plot.$colors.get(key)
+            } else {
+              colorIndex++
+              return chartColors[(colorIndex - 1) % limit]
+            }
+          })
+        }
       } else {
         _chart.color(_typefield)
       }
diff --git a/src/tabviews/custom/components/module/voucher/index.jsx b/src/tabviews/custom/components/module/voucher/index.jsx
index 82e9e79..31b0296 100644
--- a/src/tabviews/custom/components/module/voucher/index.jsx
+++ b/src/tabviews/custom/components/module/voucher/index.jsx
@@ -37,7 +37,8 @@
     remarkVisible: false,
     attachments: 0,
     title: '',
-    delItems: [],
+    orgcode: '',
+    orgname: '',
     status: '' // 鏂板缓鏃讹紝empty銆乧hange銆乻aved
   }
 
@@ -56,16 +57,40 @@
       BID = BData.$BID || ''
     }
 
+    let book = null
+    let vouDate = null
+    if (config.wrap.supBook) {
+      book = window.GLOB.CacheData.get(config.wrap.supBook) || null
+
+      if (book) {
+        let month = book.months
+        vouDate = moment()
+  
+        if (month && month < moment().format('YYYY-MM')) {
+          vouDate = moment(month, 'YYYY-MM').endOf('month')
+        }
+      }
+    }
+
     window.GLOB.CacheVoucher.delete(config.uuid)
     let type = config.wrap.type || 'createVoucher'
 
+    // type = 'checkVoucher'
+    // BID = '202302081418373862P8Q29OUD19CT1AVMU6'
+
+    if (type === 'createVoucher' || type === 'createTemp') {
+      BID = Utils.getguid()
+    }
+
     this.setState({
+      book: book,
+      vouDate: vouDate,
       config: fromJS(config).toJS(),
       type: type,
       BID: BID || '',
-      status: 'empty',
-      book: window.GLOB.CacheData.get(config.wrap.supBook) || null
+      status: 'empty'
     }, () => {
+      this.loadData()
       this.getVoucher()
     })
   }
@@ -90,7 +115,7 @@
   }
 
   resetParentParam = (MenuID, id, data) => {
-    const { config } = this.state
+    const { config, type } = this.state
 
     if (config.wrap.supBook === MenuID) {
       let month = data.months
@@ -102,20 +127,21 @@
 
       this.setState({ book: data, vouDate }, () => {
         this.loadData()
+        this.getVoucher()
       })
       return
     }
 
-    if (!config.wrap.supModule || config.wrap.supModule !== MenuID) return
+    if (!config.wrap.supModule || config.wrap.supModule !== MenuID || type === 'createVoucher' || type === 'createTemp') return
     if (id !== this.state.BID || id !== '') {
-      this.setState({ BID: id, BData: data }, () => {
+      this.setState({ BID: id }, () => {
         this.getVoucher()
       })
     }
   }
 
   loadData = () => {
-    const { book, config } = this.state
+    const { book, config, type } = this.state
 
     if (!book) return
 
@@ -123,6 +149,8 @@
       func: 's_get_fcc_account_data',
       // account_code: book.account_code || '',
       fcc_date: book.months ? book.months + '-01' : moment().format('YYYY-MM-DD'),
+      account_year_code: book.account_year_code || '',
+      months: book.months ? book.months : moment().format('YYYY-MM'),
       BID: book.id
     }
 
@@ -137,13 +165,22 @@
       }
 
       let typeOptions = res.char || []
+      if (type === 'createVoucher') {
+        let charInt = typeOptions[0] ? typeOptions[0].voucher_char_int + 1 : 1
 
-      this.setState({
-        typeOptions: typeOptions,
-        charType: typeOptions[0] ? typeOptions[0].voucher_class : '',
-        charName: typeOptions[0] ? typeOptions[0].voucher_char : '',
-        charInt: typeOptions[0] ? typeOptions[0].voucher_char_int : '',
-      })
+        this.setState({
+          typeOptions: typeOptions,
+          charType: typeOptions[0] ? typeOptions[0].voucher_class : '',
+          charName: typeOptions[0] ? typeOptions[0].voucher_char : '',
+          charInt: charInt,
+          orgcode: res.orgcode,
+          orgname: res.orgname,
+        })
+      } else {
+        this.setState({
+          typeOptions: typeOptions
+        })
+      }
 
       let names = {}
       let supplier = []
@@ -153,6 +190,7 @@
       let inventory = []
       let employee = []
       let cash_flow = []
+      let others = []
 
       res.sup && res.sup.forEach(item => {
         names[item.sup_type_code] = item.sup_type_name
@@ -186,6 +224,10 @@
         cash_flow.push({value: item.cash_flow_code, label: item.cash_flow_name})
       })
 
+      res.others && res.others.forEach(item => {
+        others.push({value: item.sup_acc_code, label: item.sup_acc_name, parentId: item.sup_acc_type})
+      })
+
       let message = {
         subjects: res.subjects || [],
         names: names,
@@ -197,8 +239,7 @@
         currency: res.currency || [],
         employee: employee,
         cash_flow: cash_flow,
-        orgcode: res.orgcode,
-        orgname: res.orgname,
+        others: others,
         account_code: res.account_code,
         account_year_code: res.account_year_code
       }
@@ -208,21 +249,15 @@
   }
 
   getVoucher = () => {
-    const { BID, type } = this.state
+    const { book, BID, type } = this.state
 
-    if (!BID || type === 'createVoucher' || type === 'createTemp') return
+    if (!book || !BID || type === 'createVoucher' || type === 'createTemp') return
 
     let param = {
       func: 's_get_fcc_voucher',
-      BID: BID
+      BID: book.id,
+      ID: BID
     }
-
-    let data = [
-      {remark: '鎻愮幇', subjectscode: '1001', subjectsname: '搴撳瓨鐜伴噾', debtor: 124, creditor: ''},
-      {remark: '璐叆鍥哄畾璧勪骇', subjectscode: '1001', subjectsname: '搴撳瓨鐜伴噾', debtor: '', creditor: 124},
-      {remark: '杞粨閿�鍞垚鏈�', subjectscode: '1001', subjectsname: '搴撳瓨鐜伴噾', debtor: -524, creditor: ''},
-      {remark: '鎻愮幇', subjectscode: '1001', subjectsname: '搴撳瓨鐜伴噾', debtor: 34, creditor: '', i: Math.random()},
-    ]
 
     Api.genericInterface(param).then(res => {
       if (!res.status) {
@@ -234,25 +269,62 @@
         return
       }
 
+      let data = []
+      if (res.voucher) {
+        data = res.voucher.map(line => {
+          line.uuid = line.subject_id || ''
+
+          if (line.direction_type === 'credit') {
+            line.credit = line.net_amount || 0
+            line.debit = ''
+          } else {
+            line.debit = line.net_amount || 0
+            line.credit = ''
+          }
+
+          line.unitratio = line.foreign_unitratio || 0
+          line.exratecode = line.foreign_exratecode || ''
+          line.exratename = line.foreign_exratename || ''
+          line.local_currency = line.local_exratecode || ''
+          line.foreign_currency_type = line.foreign_type || ''
+
+          if (line.sup) {
+            line.supAccounts = line.sup.map(cell => {
+              cell.uuid = cell.sup_id
+              return cell
+            })
+            delete line.sup
+          }
+
+          return line
+        })
+      }
+
       this.setState({
         data: data,
-        tbdata: fromJS(data).toJS()
+        vouDate: res.fibvoucherdate ? moment(res.fibvoucherdate, 'YYYY-MM-DD') : null,
+        charType: res.voucher_class,
+        charName: res.voucher_char,
+        charInt: res.voucher_char_int,
+        orgcode: res.orgcode,
+        orgname: res.orgname,
+        tbdata: fromJS(data).toJS(),
+        status: 'saved'
       })
     })
   }
 
   triggersave = (t) => {
-    const { tbdata, delItems } = this.state
+    const { tbdata } = this.state
 
     let err = ''
     let tip = ''
     let list = []
-    let _Items = [...delItems]
 
     tbdata.forEach((line, index) => {
       if (err) return
       if (line.type === 'total') {
-        if (line.debtor !== line.creditor) {
+        if (line.debit !== line.credit) {
           err = '鍊熻捶涓嶅钩琛★紒'
         }
         return
@@ -260,41 +332,69 @@
 
       let _index = index + 1
 
-      if (!line.remark && !line.subjectscode && !line.debtor && line.debtor !== 0 && !line.creditor && line.creditor !== 0) {
+      if (!line.subject_voucher_text && !line.subject_code && !line.debit && line.debit !== 0 && !line.credit && line.credit !== 0) {
         if (_index === 1) {
           err = '绗�1琛屼笉鍙负绌恒��'
-        } else if (line.$origin) {
-          _Items.push(line)
         }
 
         return
       }
 
-      if (!line.remark) {
+      if (!line.subject_voucher_text) {
         err = `绗�${_index}琛岋紝鎽樿涓嶅彲涓虹┖銆俙
-      } else if (!line.subjectscode) {
+      } else if (!line.subject_code) {
         err = `绗�${_index}琛岋紝绉戠洰涓嶅彲涓虹┖銆俙
-      } else if (!line.debtor && line.debtor !== 0 && !line.creditor && line.creditor !== 0) {
+      } else if (!line.debit && line.debit !== 0 && !line.credit && line.credit !== 0) {
         err = `绗�${_index}琛岋紝璇疯緭鍏ラ噾棰濄�俙
-      } else if (line.debtor === 0 || line.creditor === 0) {
+      } else if (line.debit === 0 || line.credit === 0) {
         err = `绗�${_index}琛岋紝閲戦涓嶈兘涓�0銆俙
-      } else if (line.foreign_currency_type === 'Y' && !line.origin) {
+      } else if (line.foreign_currency_type === 'Y' && !line.foreign_amount) {
         err = `绗�${_index}琛岋紝鍘熷竵涓嶅彲涓虹┖鎴栦负0銆俙
-      } else if (line.sup_accounting) {
-        line.sup_accounting.split(',').forEach(item => {
-          if (!line[item]) {
+      } else if (line.sup_accounting && !line.supAccounts) {
+        err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+      } else if (line.sup_accounting && line.supAccounts) {
+        line.supAccounts.forEach(item => {
+          if (item.sup_acc_type === 'supplier') {
+            if (!item.suppliercode || !item.suppliername) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'customer') {
+            if (!item.customercode || !item.customername) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'department') {
+            if (!item.co_pro_code || !item.co_pro_name) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'project') {
+            if (!item.projectcode || !item.projectname) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'inventory') {
+            if (!item.productcode || !item.productname) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'employee') {
+            if (!item.workercode || !item.workername) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (item.sup_acc_type === 'cash_flow') {
+            if (!item.cash_flow_code || !item.cash_flow_name) {
+              err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
+            }
+          } else if (!item.sup_acc_type || !item.sup_acc_code || !item.sup_acc_name) {
             err = `绗�${_index}琛岋紝璇烽�夋嫨杈呭姪鏍哥畻銆俙
           }
         })
       }
 
       if (line.count_type === 'Y' && !err) {
-        if (!line.count) {
+        if (!line.fcc_count) {
           tip += `绗�${_index}琛岋紝鏁伴噺涓虹┖鎴栦负0锛侊紱`
-        } else if (line.price) {
-          if (line.debtor && line.debtor !== line.count * line.price) {
+        } else if (line.net_unitprice) {
+          if (line.debit && line.debit !== line.fcc_count * line.net_unitprice) {
             tip += `绗�${_index}琛岋紝鏁伴噺鍜岄噾棰濅笉鍖归厤锛侊紱`
-          } else if (line.creditor && line.creditor !== line.count * line.price) {
+          } else if (line.credit && line.credit !== line.fcc_count * line.net_unitprice) {
             tip += `绗�${_index}琛岋紝鏁伴噺鍜岄噾棰濅笉鍖归厤锛侊紱`
           }
         }
@@ -321,17 +421,17 @@
       confirm({
         content: tip + '纭瑕佷繚瀛樺悧锛�',
         onOk() {
-          _this.voucherSave(list, _Items, t)
+          _this.voucherSave(list, t)
         },
         onCancel() {}
       })
     } else {
-      this.voucherSave(list, _Items, t)
+      this.voucherSave(list, t)
     }
   }
 
-  voucherSave = (list, items, t) => {
-    const { config, charInt, charType, vouDate, book, remark, charName, attachments, title } = this.state
+  voucherSave = (list, t) => {
+    const { type, data, config, charInt, charType, vouDate, book, remark, charName, attachments, title, orgcode, orgname } = this.state
 
     if (!book) {
       notification.warning({
@@ -341,8 +441,6 @@
       })
       return
     }
-
-    let message = window.GLOB.CacheVoucher.get(config.uuid) || {}
 
     let param = {
       func: 's_fcc_voucher_addupt',
@@ -354,10 +452,11 @@
       account_year_code: book.account_year_code || '',
       voucher_type: config.wrap.voucherType || '',
       voucher_type_text: config.wrap.voucherTypeText || '',
-      orgcode: message.orgcode || '',
-      orgname: message.orgname || '',
+      orgcode: orgcode || '',
+      orgname: orgname || '',
       voucher_class: charType,
       years: book.years,
+      months: moment(vouDate).format('YYYY-MM'),
       business_type: config.wrap.businessType || '',
       voucher_sign: config.wrap.voucherSign || '',
       voucher_char: charName,
@@ -368,40 +467,93 @@
       FullName: sessionStorage.getItem('Full_Name') || '',
       attachments_int: attachments,
       sup_data: '',
-      subject_data: ''
+      subject_data: '',
+      attachments_data: ''
     }
 
-    // subject_id,subject_voucher_code,voucher_lp,subject_code,subject_name
-    // ,subject_voucher_text,fcc_count,net_unitprice,unit,net_amount,direction_type
+    // id,deleted
+    // 闄勪欢鍒楄〃
+
+    // subject_id,subject_voucher_code,voucher_lp,subject_code,subject_name,subject_voucher_text,fcc_count,net_unitprice,unit,net_amount,direction_type
     // ,exratecode,exratename,unitratio,sup_accounting ,direction_type_count,src_amount,deleted,local_exratecode
 
-    // sup_id,sup_voucher_code,sup_voucher_lp,voucher_sup_lp,sup_subject_code,sup_subject_name,sup_voucher_text,sup_direction_type,sup_net_amount,customercode,customername,suppliercode,suppliername,co_pro_code,co_pro_name,workercode,workername,project_code,project_name,productcode,productname,cash_flow_code,cash_flow_name,sup_acc_code_01,sup_acc_name_01,sup_acc_code_02,sup_acc_name_02,sup_acc_code_03,sup_acc_name_03,sup_acc_code_04,sup_acc_name_04,sup_acc_code_05,sup_acc_name_05,sup_acc_code_06,sup_acc_name_06,sup_acc_code_07,sup_acc_name_07,sup_acc_code_08,sup_acc_name_08,sup_acc_code_09,sup_acc_name_09,sup_acc_code_10,sup_acc_name_10,sup_bid
-
+    // sup_id,sup_voucher_code,sup_voucher_lp,voucher_sup_lp,sup_subject_code,sup_subject_name,sup_voucher_text,sup_direction_type,sup_net_amount,customercode,customername,suppliercode,suppliername,co_pro_code,co_pro_name,workercode,workername,project_code,project_name,productcode,productname,cash_flow_code,cash_flow_name,sup_acc_code,sup_acc_name,sup_acc_type,sup_bid,deleted
+    // 杈呭姪绉戠洰琛宨d锛屾柊澧炴椂绌猴紝鍑瘉琛屽彿绌猴紝杈呭姪绉戠洰琛屽彿绌猴紝绉戠洰缂栫爜锛岀鐩悕绉帮紝杈呭姪绉戠洰鎽樿绌猴紝鏂瑰悜'debit'銆�'credit'锛岃閲戦锛屽鎴风紪鐮侊紝瀹㈡埛鍚嶇О锛屼緵搴斿晢缂栫爜锛屼緵搴斿晢鍚嶇О锛岄儴闂ㄧ紪鐮侊紝閮ㄩ棬鍚嶇О锛岃亴鍛樼紪鐮侊紝鑱屽憳鍚嶇О锛岄」鐩紪鐮侊紝椤圭洰鍚嶇О锛屼骇鍝佺紪鐮侊紝浜у搧鍚嶇О锛岀幇閲戠紪鐮侊紝鐜伴噾鍚嶇О锛岃嚜瀹氫箟绉戠洰缂栫爜锛岃嚜瀹氫箟绉戠洰鍚嶇О锛岃緟鍔╃鐩被鍨嬶紝鍑瘉琛孖D锛屽垹闄ゆ爣璁�
+    
     let sup_data = []
+    let voucherMap = new Map()
+    let supMap = new Map()
+    let extract = localStorage.getItem(window.GLOB.host + '_voucher_extract')
+    extract = extract ? JSON.parse(extract) : []
+
+    data.forEach(item => {
+      voucherMap.set(item.uuid, item)
+
+      if (item.sup_accounting && item.supAccounts) {
+        item.supAccounts.forEach(cell => {
+          if (!cell.sup_acc_type) return
+
+          let _cell = {...cell}
+
+          _cell.sup_voucher_code = item.subject_voucher_code || ''
+          _cell.sup_voucher_lp = item.voucher_lp || ''
+          _cell.sup_subject_code = item.subject_code || ''
+          _cell.sup_subject_name = item.subject_name || ''
+          _cell.sup_bid = item.uuid || ''
+          _cell.sup_direct = item.debit ? 'debit' : 'credit'
+          _cell.sup_net_amount = item.debit || item.credit
+
+          supMap.set(item.uuid + cell.sup_acc_type, _cell)
+        })
+      }
+    })
     
     let subject_data = list.map(item => {
       let count = item.count_type === 'Y'
       let curr = item.foreign_currency_type === 'Y'
-      if (item.sup_accounting) {
-        item.sup_accounting.split(',').forEach(n => {
-          
+      let direct = item.debit ? 'debit' : 'credit'
+      
+      if (type === 'createVoucher' && item.subject_voucher_text && item.subject_voucher_text.length < 20) {
+        extract.unshift(item.subject_voucher_text)
+      }
+
+      if (voucherMap.has(item.uuid)) {
+        voucherMap.delete(item.uuid)
+      }
+      if (item.sup_accounting && item.supAccounts) {
+        item.supAccounts.forEach(n => {
+          if (supMap.has(item.uuid + n.sup_acc_type)) {
+            supMap.delete(item.uuid + n.sup_acc_type)
+          }
+
+          sup_data.push(`'${n.uuid}','${item.subject_voucher_code || ''}','${item.voucher_lp || ''}','${n.voucher_sup_lp || ''}','${item.subject_code}','${item.subject_name}','${n.sup_voucher_text || ''}','${direct}',${item.debit || item.credit},'${n.customercode || ''}','${n.customername || ''}','${n.suppliercode || ''}','${n.suppliername || ''}','${n.co_pro_code || ''}','${n.co_pro_name || ''}','${n.workercode || ''}','${n.workername || ''}','${n.project_code || ''}','${n.project_name || ''}','${n.productcode || ''}','${n.productname || ''}','${n.cash_flow_code || ''}','${n.cash_flow_name || ''}','${n.sup_acc_code || ''}','${n.sup_acc_name || ''}','${n.sup_acc_type || ''}','${item.uuid}',0`)
         })
       }
-      sup_data.push(`${item.uuid},sup_voucher_code,sup_voucher_lp,voucher_sup_lp,sup_subject_code,sup_subject_name,sup_voucher_text,sup_direction_type,sup_net_amount,customercode,customername,suppliercode,suppliername,co_pro_code,co_pro_name,workercode,workername,project_code,project_name,productcode,productname,cash_flow_code,cash_flow_name,sup_acc_code_01,sup_acc_name_01,sup_acc_code_02,sup_acc_name_02,sup_acc_code_03,sup_acc_name_03,sup_acc_code_04,sup_acc_name_04,sup_acc_code_05,sup_acc_name_05,sup_acc_code_06,sup_acc_name_06,sup_acc_code_07,sup_acc_name_07,sup_acc_code_08,sup_acc_name_08,sup_acc_code_09,sup_acc_name_09,sup_acc_code_10,sup_acc_name_10,sup_bid`)
-      return `${item.uuid},'','','${item.subjectscode}','${item.subjectsname}','${item.remark}',${count ? item.count || 0 : 0},${count ? item.price || 0 : 0},'${item.unit}',${item.debtor || item.creditor},'${item.debtor ? 'debit' : 'credit'}','${curr ? item.exratecode : '01010001'}','${curr ? item.exratename : 'CNY'}',${curr ? item.unitratio || 0 : 0},'${item.sup_accounting}',${item.debtor ? 1 : -1},${curr ? item.origin || 0 : 0},0,'${item.local_currency || ''}'`
+      return `'${item.uuid}','${item.subject_voucher_code || ''}','${item.voucher_lp || ''}','${item.subject_code}','${item.subject_name}','${item.subject_voucher_text || ''}',${count ? item.fcc_count || 0 : 0},${count ? item.net_unitprice || 0 : 0},'${item.unit}',${item.debit || item.credit},'${direct}','${curr ? item.exratecode : '01010001'}','${curr ? item.exratename : 'CNY'}',${curr ? item.unitratio || 0 : 0},'${item.sup_accounting}',${item.debit ? 1 : -1},${curr ? item.foreign_amount || 0 : 0},0,'${item.local_currency || ''}','${count ? 'Y' : ''}','${curr ? 'Y' : ''}'`
     })
 
-    items.forEach(item => {
+    if (type === 'createVoucher') {
+      extract = Array.from(new Set(extract))
+      if (extract.length > 20) {
+        extract.length = 20
+      }
+      localStorage.setItem(window.GLOB.host + '_voucher_extract', JSON.stringify(extract))
+    }
+
+    voucherMap.forEach(item => {
       let count = item.count_type === 'Y'
       let curr = item.foreign_currency_type === 'Y'
-      subject_data.push(`${item.uuid},'','','${item.subjectscode}','${item.subjectsname}','${item.remark}',${count ? item.count || 0 : 0},${count ? item.price || 0 : 0},'${item.unit}',${item.debtor || item.creditor},'${item.debtor ? 'debit' : 'credit'}','${curr ? item.exratecode : '01010001'}','${curr ? item.exratename : 'CNY'}',${curr ? item.unitratio || 0 : 0},'${item.sup_accounting}',${item.debtor ? 1 : -1},${curr ? item.origin || 0 : 0},1,'${item.local_currency || ''}'`)
+      let direct = item.debit ? 'debit' : 'credit'
+
+      subject_data.push(`'${item.uuid}','${item.subject_voucher_code || ''}','${item.voucher_lp || ''}','${item.subject_code}','${item.subject_name}','${item.subject_voucher_text || ''}',${count ? item.fcc_count || 0 : 0},${count ? item.net_unitprice || 0 : 0},'${item.unit}',${item.debit || item.credit},'${direct}','${curr ? item.exratecode : '01010001'}','${curr ? item.exratename : 'CNY'}',${curr ? item.unitratio || 0 : 0},'${item.sup_accounting}',${item.debit ? 1 : -1},${curr ? item.foreign_amount || 0 : 0},1,'${item.local_currency || ''}','${count ? 'Y' : ''}','${curr ? 'Y' : ''}'`)
+    })
+
+    supMap.forEach(n => {
+      sup_data.push(`'${n.uuid}','${n.sup_voucher_code}','${n.sup_voucher_lp}','${n.voucher_sup_lp || ''}','${n.sup_subject_code}','${n.sup_subject_name}','${n.sup_voucher_text || ''}','${n.sup_direct}',${n.sup_net_amount},'${n.customercode || ''}','${n.customername || ''}','${n.suppliercode || ''}','${n.suppliername || ''}','${n.co_pro_code || ''}','${n.co_pro_name || ''}','${n.workercode || ''}','${n.workername || ''}','${n.project_code || ''}','${n.project_name || ''}','${n.productcode || ''}','${n.productname || ''}','${n.cash_flow_code || ''}','${n.cash_flow_name || ''}','${n.sup_acc_code || ''}','${n.sup_acc_name || ''}','${n.sup_acc_type || ''}','${n.sup_bid}',1`)
     })
 
     param.subject_data = window.btoa(window.encodeURIComponent(subject_data.join(';un')))
-
-    if (param) {
-      return
-    }
+    param.sup_data = window.btoa(window.encodeURIComponent(sup_data.join(';un')))
 
     Api.genericInterface(param).then(res => {
       if (!res.status) {
@@ -413,19 +565,26 @@
         return
       }
 
+      notification.success({
+        top: 92,
+        message: '淇濆瓨鎴愬姛锛�' + (res.voucher_char_int !== charInt ? charInt + '鍙峰嚟璇佸彿宸茬粡瀛樺湪锛屽凡涓烘偍鏇存柊涓�' + res.voucher_char_int + '鍙峰嚟璇併��'  : ''),
+        duration: 5
+      })
+
       if (t === 'add') {
         this.setState({
           status: 'empty',
           remark: '',
           tbdata: [],
-          delItems: [],
-          charInt: charInt + 1
+          charInt: res.voucher_char_int + 1,
+          BID: Utils.getguid()
         })
         MKEmitter.emit('cleartable', config.uuid)
       } else {
         this.setState({
           status: 'saved',
-          delItems: [],
+          charInt: res.voucher_char_int || charInt,
+          data: fromJS(list).toJS()
         })
       }
     })
@@ -451,19 +610,11 @@
     this.setState({remark: val, remarkVisible: false})
   }
 
-  dataChange = (data, item) => {
-    if (item) {
-      this.setState({
-        status: 'change',
-        tbdata: data,
-        delItems: [...this.state.delItems, item]
-      })
-    } else {
-      this.setState({
-        status: 'change',
-        tbdata: data
-      })
-    }
+  dataChange = (data) => {
+    this.setState({
+      status: 'change',
+      tbdata: data
+    })
   }
 
   changeAttach = (val) => {
@@ -478,6 +629,18 @@
     this.setState({attachments: _val})
   }
 
+  triggermore = () => {
+
+  }
+
+  triggerclose = () => {
+
+  }
+
+  triggerAttach = () => {
+
+  }
+
   render() {
     const { type, status, loading, config, typeOptions, charType, charInt, data, vouDate, username, remark, remarkVisible, attachments, title } = this.state
 
@@ -487,10 +650,15 @@
           <Button className="add-background header-btn" disabled={status === 'empty'} onClick={() => this.triggersave('add')}>淇濆瓨骞舵柊澧�</Button>
           <Button className="add-background header-btn" disabled={status === 'empty' || status === 'saved'} onClick={() => this.triggersave()}>淇濆瓨</Button>
           <Button className="print-background header-btn" disabled={status !== 'saved'} onClick={this.triggerprint}>鎵撳嵃</Button>
-          <Button className="out-background header-btn" onClick={this.triggerprint}>鏇村</Button>
+          <Button className="out-background header-btn" onClick={this.triggermore}>鏇村</Button>
+        </div> : null}
+        {type === 'checkVoucher' ? <div className="voucher-header">
+          <Button className="add-background header-btn" disabled={status === 'empty' || status === 'saved'} onClick={() => this.triggersave()}>淇濆瓨</Button>
+          <Button className="print-background header-btn" disabled={status !== 'saved'} onClick={this.triggerprint}>鎵撳嵃</Button>
+          <Button className="out-background header-btn" onClick={this.triggerclose}>鍏抽棴</Button>
         </div> : null}
         <div className="voucher-body">
-          {type === 'createVoucher' ? <div className="pre-wrap">
+          {type === 'createVoucher' || type === 'checkVoucher' ? <div className="pre-wrap">
             <div className="voucher-code">
               <Select value={charType} dropdownClassName="mk-vcode-dropdown" onChange={(val, option) => this.setState({charType: val, charName: option.props.charName, charInt: option.props.charint})}>
                 {typeOptions.map(option =>
@@ -507,7 +675,7 @@
             </div>
             <div className="voucher-affix">
               闄勫崟鎹� <InputNumber precision={0} value={attachments || 0} autoComplete="off" onChange={this.changeAttach}/> 寮�
-              <Button type="link" className="" onClick={this.triggerprint}>闄勪欢</Button>
+              <Button type="link" className="" onClick={this.triggerAttach}>闄勪欢</Button>
               <Button type="link" className="" onClick={this.triggerprint}>澶囨敞</Button>
             </div>
           </div> : null}
diff --git a/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx b/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx
index 9a37f76..68aa28d 100644
--- a/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx
+++ b/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx
@@ -24,36 +24,39 @@
 
 class Accounting extends React.Component {
   state = {
-    subAccounts: [],
-    record: null
+    subAccounts: []
   }
 
   UNSAFE_componentWillMount() {
     const { data, tableId } = this.props
-    let subAccounts = data.sup_accounting.split(',')
+    let subAccounts = fromJS(data.supAccounts).toJS()
     let msg = window.GLOB.CacheVoucher.get(tableId) || {}
-    let names = msg.names || {}
 
-    subAccounts = subAccounts.map(n => {
-      let item = {
-        field: n,
-        label: names[n] || n,
-        initval: data[n] || '',
-        options: []
-      }
-
-      if (msg[n]) {
-        item.options = msg[n]
+    subAccounts = subAccounts.map(item => {
+      if (msg[item.field]) {
+        item.options = msg[item.field]
+      } else if (msg.others) {
+        item.options = msg.others.filter(cell => cell.parentId === item.field)
+      } else {
+        item.options = []
       }
 
       return item
     })
 
-    this.setState({subAccounts: subAccounts, record: fromJS(data).toJS()})
+    this.setState({subAccounts: subAccounts})
   }
 
-  selectChange = (val, item) => {
-    this.setState({record: {...this.state.record, [item.field]: val || ''}})
+  selectChange = (option, key) => {
+    this.setState({
+      subAccounts: fromJS(this.state.subAccounts).toJS().map(cell => {
+        if (key === cell.field) {
+          cell.value = option ? option.props.value : ''
+          cell.name = option ? option.props.name : ''
+        }
+        return cell
+      })
+    })
   }
 
   getFields() {
@@ -70,10 +73,10 @@
             defaultValue={item.initval}
             dropdownMatchSelectWidth={false}
             filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
-            onChange={(val) => this.selectChange(val, item)}
+            onChange={(val, option) => this.selectChange(option, item.field)}
           >
             {item.options.map((option, i) =>
-              <Select.Option key={i} value={option.value}>{option.label}</Select.Option>
+              <Select.Option key={i} name={option.label} value={option.value}>{option.label}</Select.Option>
             )}
           </Select>
         </Form.Item>
@@ -84,11 +87,12 @@
   }
 
   confirm = () => {
-    const { subAccounts, record } = this.state
+    const { data } = this.props
+    const { subAccounts } = this.state
 
     let empty = ''
     subAccounts.forEach(item => {
-      if (!empty && !record[item.field]) {
+      if (!empty && !item.value) {
         empty = item.label
       }
     })
@@ -100,7 +104,37 @@
         duration: 5
       })
     } else {
-      this.props.confirm(record)
+      let line = fromJS(data).toJS()
+      let account = {}
+
+      subAccounts.forEach(item => {
+        if (item.field === 'supplier') {
+          account[item.field] = {suppliercode: item.value, suppliername: item.name}
+        } else if (item.field === 'customer') {
+          account[item.field] = {customercode: item.value, customername: item.name}
+        } else if (item.field === 'department') {
+          account[item.field] = {co_pro_code: item.value, co_pro_name: item.name}
+        } else if (item.field === 'project') {
+          account[item.field] = {projectcode: item.value, projectname: item.name}
+        } else if (item.field === 'inventory') {
+          account[item.field] = {productcode: item.value, productname: item.name}
+        } else if (item.field === 'employee') {
+          account[item.field] = {workercode: item.value, workername: item.name}
+        } else if (item.field === 'cash_flow') {
+          account[item.field] = {cash_flow_code: item.value, cash_flow_name: item.name}
+        } else {
+          account[item.field] = {sup_acc_code: item.value, sup_acc_name: item.name}
+        }
+      })
+      
+      line.supAccounts = line.supAccounts.map(item => {
+        if (account[item.field]) {
+          item = {...item, ...account[item.field]}
+        }
+        return item
+      })
+
+      this.props.confirm(line)
     }
   }
 
@@ -157,43 +191,43 @@
     let line = {...record}
     line[col.field] = value
 
-    if (col.field === 'debtor') {
-      line.creditor = ''
-      if (isNaN(line.debtor)) {
-        line.debtor = ''
+    if (col.field === 'debit') {
+      line.credit = ''
+      if (isNaN(line.debit)) {
+        line.debit = ''
       }
     } else {
-      line.debtor = ''
-      if (isNaN(line.creditor)) {
-        line.creditor = ''
+      line.debit = ''
+      if (isNaN(line.credit)) {
+        line.credit = ''
       }
     }
 
-    if (line.count_type === 'Y' && line.count) {
-      if (line.debtor) {
-        line.price = Math.round(line.debtor / line.count * 10000) / 10000
-      } else if (line.creditor) {
-        line.price = Math.round(line.creditor / line.count * 10000) / 10000
+    if (line.count_type === 'Y' && line.fcc_count) {
+      if (line.debit) {
+        line.net_unitprice = Math.round(line.debit / line.fcc_count * 10000) / 10000
+      } else if (line.credit) {
+        line.net_unitprice = Math.round(line.credit / line.fcc_count * 10000) / 10000
       }
     }
 
-    if (line.foreign_currency_type === 'Y' && line.origin) {
-      if (line.debtor) {
-        line.unitratio = Math.round(line.debtor / line.origin * 100000) / 100000
-      } else if (line.creditor) {
-        line.unitratio = Math.round(line.creditor / line.origin * 100000) / 100000
+    if (line.foreign_currency_type === 'Y' && line.foreign_amount) {
+      if (line.debit) {
+        line.unitratio = Math.round(line.debit / line.foreign_amount * 100000) / 100000
+      } else if (line.credit) {
+        line.unitratio = Math.round(line.credit / line.foreign_amount * 100000) / 100000
       }
     }
 
     MKEmitter.emit('changeRecord', col.tableId, line)
 
     setTimeout(() => {
-      if (col.field === 'debtor' && (line.debtor || line.debtor === 0)) {
+      if (col.field === 'debit' && (line.debit || line.debit === 0)) {
         MKEmitter.emit('nextLine', col, record)
-      } else if (col.field === 'creditor') {
+      } else if (col.field === 'credit') {
         MKEmitter.emit('nextLine', col, record)
       } else {
-        let cl = {remark: 'subjectscode', subjectscode: 'debtor', debtor: 'creditor'}
+        let cl = {subject_voucher_text: 'subject_code', subject_code: 'debit', debit: 'credit'}
         MKEmitter.emit('tdFocus', cl[col.uuid] + record.uuid)
       }
     }, 50)
@@ -204,7 +238,7 @@
 
     if (record.type === 'total') return
 
-    if (col.field === 'subjectscode') {
+    if (col.field === 'subject_code') {
       this.setState({editing: true}, () => {
         let node = document.getElementById(col.uuid + record.uuid)
         node && node.click()
@@ -226,31 +260,31 @@
     if (value !== record[col.field]) {
       let line = {...record, [col.field]: value}
 
-      if (col.field === 'debtor') {
-        line.creditor = ''
-        if (isNaN(line.debtor)) {
-          line.debtor = ''
+      if (col.field === 'debit') {
+        line.credit = ''
+        if (isNaN(line.debit)) {
+          line.debit = ''
         }
       } else {
-        line.debtor = ''
-        if (isNaN(line.creditor)) {
-          line.creditor = ''
+        line.debit = ''
+        if (isNaN(line.credit)) {
+          line.credit = ''
         }
       }
 
-      if (line.count_type === 'Y' && line.count) {
-        if (line.debtor) {
-          line.price = Math.round(line.debtor / line.count * 10000) / 10000
-        } else if (line.creditor) {
-          line.price = Math.round(line.creditor / line.count * 10000) / 10000
+      if (line.count_type === 'Y' && line.fcc_count) {
+        if (line.debit) {
+          line.net_unitprice = Math.round(line.debit / line.fcc_count * 10000) / 10000
+        } else if (line.credit) {
+          line.net_unitprice = Math.round(line.credit / line.fcc_count * 10000) / 10000
         }
       }
 
-      if (line.foreign_currency_type === 'Y' && line.origin) {
-        if (line.debtor) {
-          line.unitratio = Math.round(line.debtor / line.origin * 100000) / 100000
-        } else if (line.creditor) {
-          line.unitratio = Math.round(line.creditor / line.origin * 100000) / 100000
+      if (line.foreign_currency_type === 'Y' && line.foreign_amount) {
+        if (line.debit) {
+          line.unitratio = Math.round(line.debit / line.foreign_amount * 100000) / 100000
+        } else if (line.credit) {
+          line.unitratio = Math.round(line.credit / line.foreign_amount * 100000) / 100000
         }
       }
 
@@ -293,9 +327,20 @@
 
     let line = {...record, ...option.props.extra}
 
-    if (record.sup_accounting && !line.sup_accounting) {
-      record.sup_accounting.split(',').forEach(item => {
-        line[item] = ''
+    line.supAccounts = []
+
+    if (line.sup_accounting) {
+      let msg = window.GLOB.CacheVoucher.get(col.tableId) || {}
+      let names = msg.names || {}
+
+      line.supAccounts = line.sup_accounting.split(',').map(item => {
+        return {
+          uuid: Utils.getguid(),
+          sup_acc_type: item,
+          field: item,
+          label: names[item] || item,
+          initval: ''
+        }
       })
     }
 
@@ -316,7 +361,7 @@
         this.setState({visible: true})
       }, 100)
     } else if (line.count_type === 'Y') {
-      this.setState({counting: true, value: line.count || 0}, () => {
+      this.setState({counting: true, value: line.fcc_count || 0}, () => {
         let node = document.getElementById(col.uuid + record.uuid + 'count')
         node && node.select()
       })
@@ -328,7 +373,7 @@
     } else {
       this.setState({editing: false, visible: false, counting: false, priceing: false})
       setTimeout(() => {
-        MKEmitter.emit('tdFocus', 'debtor' + record.uuid)
+        MKEmitter.emit('tdFocus', 'debit' + record.uuid)
       }, 50)
     }
   }
@@ -341,13 +386,13 @@
     this.setState({editing: false, visible: false})
 
     if (res.count_type === 'Y') {
-      this.setState({counting: true, value: res.count || 0}, () => {
+      this.setState({counting: true, value: res.fcc_count || 0}, () => {
         let node = document.getElementById(col.uuid + res.uuid + 'count')
         node && node.select()
       })
     } else {
       setTimeout(() => {
-        MKEmitter.emit('tdFocus', 'debtor' + res.uuid)
+        MKEmitter.emit('tdFocus', 'debit' + res.uuid)
       }, 50)
     }
   }
@@ -359,13 +404,10 @@
     record.count_type = ''
     record.foreign_currency_type = ''
     record.mnemonic_code = ''
-    record.subjectscode = ''
-    record.subjectsname = ''
-    record.sup_accounting.split(',').forEach(item => {
-      record[item] = ''
-    })
-
+    record.subject_code = ''
+    record.subject_name = ''
     record.sup_accounting = ''
+    record.supAccounts = []
 
     MKEmitter.emit('changeRecord', col.tableId, record)
 
@@ -376,7 +418,7 @@
     const { col, record } = this.props
     e.stopPropagation()
 
-    this.setState({counting: true, value: record.count || 0}, () => {
+    this.setState({counting: true, value: record.fcc_count || 0}, () => {
       let node = document.getElementById(col.uuid + record.uuid + 'count')
       node && node.select()
     })
@@ -386,7 +428,7 @@
     const { col, record } = this.props
     e.stopPropagation()
 
-    this.setState({priceing: true, value: record.price || 0}, () => {
+    this.setState({priceing: true, value: record.net_unitprice || 0}, () => {
       let node = document.getElementById(col.uuid + record.uuid + 'price')
       node && node.select()
     })
@@ -397,17 +439,17 @@
     const { value } = this.state
 
     let line = {...record}
-    line.count = value || 0
+    line.fcc_count = value || 0
 
-    if (isNaN(line.count)) {
-      line.count = 0
+    if (isNaN(line.fcc_count)) {
+      line.fcc_count = 0
     }
 
     this.countChange(line)
 
     MKEmitter.emit('changeRecord', col.tableId, line)
 
-    this.setState({counting: false, priceing: true, value: line.price || 0}, () => {
+    this.setState({counting: false, priceing: true, value: line.net_unitprice || 0}, () => {
       let node = document.getElementById(col.uuid + record.uuid + 'price')
       node && node.select()
     })
@@ -420,10 +462,10 @@
     this.setState({counting: false})
 
     let line = {...record}
-    line.count = value || 0
+    line.fcc_count = value || 0
 
-    if (isNaN(line.count)) {
-      line.count = 0
+    if (isNaN(line.fcc_count)) {
+      line.fcc_count = 0
     }
 
     this.countChange(line)
@@ -436,10 +478,10 @@
     const { value } = this.state
 
     let line = {...record}
-    line.price = value || 0
+    line.net_unitprice = value || 0
 
-    if (isNaN(line.price)) {
-      line.price = 0
+    if (isNaN(line.net_unitprice)) {
+      line.net_unitprice = 0
     }
 
     this.countChange(line)
@@ -448,7 +490,7 @@
 
     this.setState({priceing: false})
     setTimeout(() => {
-      MKEmitter.emit('tdFocus', 'debtor' + record.uuid)
+      MKEmitter.emit('tdFocus', 'debit' + record.uuid)
     }, 50)
   }
 
@@ -459,10 +501,10 @@
     this.setState({priceing: false})
 
     let line = {...record}
-    line.price = value || 0
+    line.net_unitprice = value || 0
 
-    if (isNaN(line.price)) {
-      line.price = 0
+    if (isNaN(line.net_unitprice)) {
+      line.net_unitprice = 0
     }
 
     this.countChange(line)
@@ -490,7 +532,7 @@
     MKEmitter.emit('changeRecord', col.tableId, line)
 
     if (line.exratename === 'CNY') {
-      this.setState({curring: false, origining: true, value: line.origin || 0}, () => {
+      this.setState({curring: false, origining: true, value: line.foreign_amount || 0}, () => {
         let node = document.getElementById(col.uuid + record.uuid + 'origin')
         node && node.select()
       })
@@ -527,7 +569,7 @@
 
     MKEmitter.emit('changeRecord', col.tableId, line)
 
-    this.setState({ratioing: false, origining: true, value: line.origin || 0}, () => {
+    this.setState({ratioing: false, origining: true, value: line.foreign_amount || 0}, () => {
       let node = document.getElementById(col.uuid + record.uuid + 'origin')
         node && node.select()
     })
@@ -555,7 +597,7 @@
     const { col, record } = this.props
     e.stopPropagation()
 
-    this.setState({origining: true, value: record.origin || 1}, () => {
+    this.setState({origining: true, value: record.foreign_amount || 1}, () => {
       let node = document.getElementById(col.uuid + record.uuid + 'origin')
       node && node.select()
     })
@@ -566,10 +608,10 @@
     const { value } = this.state
 
     let line = {...record}
-    line.origin = value || 0
+    line.foreign_amount = value || 0
 
-    if (isNaN(line.origin)) {
-      line.origin = 0
+    if (isNaN(line.foreign_amount)) {
+      line.foreign_amount = 0
     }
 
     this.currencyChange(line)
@@ -579,7 +621,7 @@
     this.setState({origining: false})
 
     setTimeout(() => {
-      MKEmitter.emit('tdFocus', 'debtor' + record.uuid)
+      MKEmitter.emit('tdFocus', 'debit' + record.uuid)
     }, 50)
   }
 
@@ -590,10 +632,10 @@
     this.setState({origining: false})
 
     let line = {...record}
-    line.origin = value || 0
+    line.foreign_amount = value || 0
 
-    if (isNaN(line.origin)) {
-      line.origin = 0
+    if (isNaN(line.foreign_amount)) {
+      line.foreign_amount = 0
     }
 
     this.currencyChange(line)
@@ -602,36 +644,36 @@
   }
 
   countChange = (line) => {
-    if (line.count && line.price) {
-      if (line.creditor) {
-        line.creditor = Math.round(line.count * line.price * 100) / 100
+    if (line.fcc_count && line.net_unitprice) {
+      if (line.credit) {
+        line.credit = Math.round(line.fcc_count * line.net_unitprice * 100) / 100
       } else {
-        line.debtor = Math.round(line.count * line.price * 100) / 100
+        line.debit = Math.round(line.fcc_count * line.net_unitprice * 100) / 100
       }
 
-      if (line.foreign_currency_type === 'Y' && line.origin) {
-        if (line.debtor) {
-          line.unitratio = Math.round(line.debtor / line.origin * 100000) / 100000
-        } else if (line.creditor) {
-          line.unitratio = Math.round(line.creditor / line.origin * 100000) / 100000
+      if (line.foreign_currency_type === 'Y' && line.foreign_amount) {
+        if (line.debit) {
+          line.unitratio = Math.round(line.debit / line.foreign_amount * 100000) / 100000
+        } else if (line.credit) {
+          line.unitratio = Math.round(line.credit / line.foreign_amount * 100000) / 100000
         }
       }
     }
   }
 
   currencyChange = (line) => {
-    if (line.unitratio && line.origin) {
-      if (line.creditor) {
-        line.creditor = Math.round(line.unitratio * line.origin * 100) / 100
+    if (line.unitratio && line.foreign_amount) {
+      if (line.credit) {
+        line.credit = Math.round(line.unitratio * line.foreign_amount * 100) / 100
       } else {
-        line.debtor = Math.round(line.unitratio * line.origin * 100) / 100
+        line.debit = Math.round(line.unitratio * line.foreign_amount * 100) / 100
       }
 
-      if (line.count_type === 'Y' && line.count) {
-        if (line.debtor) {
-          line.price = Math.round(line.debtor / line.count * 10000) / 10000
-        } else if (line.creditor) {
-          line.price = Math.round(line.creditor / line.count * 10000) / 10000
+      if (line.count_type === 'Y' && line.fcc_count) {
+        if (line.debit) {
+          line.net_unitprice = Math.round(line.debit / line.fcc_count * 10000) / 10000
+        } else if (line.credit) {
+          line.net_unitprice = Math.round(line.credit / line.fcc_count * 10000) / 10000
         }
       }
     }
@@ -645,8 +687,8 @@
     let colSpan = 1
     let extra = null
 
-    if (col.field === 'remark') {
-      let val = record.remark || ''
+    if (col.field === 'subject_voucher_text') {
+      let val = record.subject_voucher_text || ''
 
       if (record.type === 'total') {
         children = <div className="content-wrap" style={{lineHeight: '60px'}}>鍚堣: {val}</div>
@@ -655,7 +697,9 @@
         extra = <PlusOutlined onClick={this.plusLine}/>
 
         if (editing) {
-          let options = ['鐜伴噾', '鍙戠エ']
+          let options = localStorage.getItem(window.GLOB.host + '_voucher_extract')
+          options = options ? JSON.parse(options) : []
+
           children = <AutoComplete
             dataSource={options.map((cell, i) => <AutoComplete.Option value={cell} key={i}>
               {cell}
@@ -672,7 +716,7 @@
           children = <div className="content-wrap" onClick={this.focus}>{val}</div>
         }
       }
-    } else if (col.field === 'subjectscode') {
+    } else if (col.field === 'subject_code') {
       if (record.type === 'total') {
         colSpan = 0
       } else {
@@ -683,14 +727,14 @@
           children = <>
             <Select
               showSearch
-              defaultValue={record.subjectscode || ''}
+              defaultValue={record.subject_code || ''}
               dropdownClassName="edit-table-dropdown"
               id={col.uuid + record.uuid}
               onBlur={this.onSelectBlur}
               filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}
               onSelect={this.onSelectChange}
             >
-              {subjects.map((item, i) => (<Select.Option key={i} extra={item} value={item.subjectscode}>{item.subjectscode + ' ' + item.subjectsname}</Select.Option>))}
+              {subjects.map((item, i) => (<Select.Option key={i} extra={item} value={item.subject_code}>{item.subject_code + ' ' + item.subject_name}</Select.Option>))}
             </Select>
             <Popover overlayClassName="subject-pop-wrap" placement="bottom" title="" visible={visible} content={<Accounting confirm={this.confirm} cancel={this.cancel} tableId={col.tableId} data={record}/>}>
               <span className="pop-anchor"></span>
@@ -698,14 +742,30 @@
           </>
         } else {
           let val = ''
-          if (record.subjectscode) {
-            val = (record.subjectscode || '') + ' ' + (record.subjectsname || '')
+          if (record.subject_code) {
+            val = (record.subject_code || '') + ' ' + (record.subject_name || '')
 
-            record.sup_accounting && record.sup_accounting.split(',').forEach(item => {
-              if (record[item]) {
-                val += '_' + record[item]
-              }
-            })
+            if (record.sup_accounting && record.supAccounts) {
+              record.supAccounts.forEach(item => {
+                if (item.sup_acc_type === 'supplier') {
+                  val += item.suppliercode ? '_' + item.suppliercode : ''
+                } else if (item.sup_acc_type === 'customer') {
+                  val += item.customercode ? '_' + item.customercode : ''
+                } else if (item.sup_acc_type === 'department') {
+                  val += item.co_pro_code ? '_' + item.co_pro_code : ''
+                } else if (item.sup_acc_type === 'project') {
+                  val += item.projectcode ? '_' + item.projectcode : ''
+                } else if (item.sup_acc_type === 'inventory') {
+                  val += item.productcode ? '_' + item.productcode : ''
+                } else if (item.sup_acc_type === 'employee') {
+                  val += item.workercode ? '_' + item.workercode : ''
+                } else if (item.sup_acc_type === 'cash_flow') {
+                  val += item.cash_flow_code ? '_' + item.cash_flow_code : ''
+                } else if (item.sup_acc_code) {
+                  val += '_' + item.sup_acc_code
+                }
+              })
+            }
           }
 
           let countNode = null
@@ -716,33 +776,33 @@
               countNode = <div className="count-wrap">
                 <span style={{marginRight: '5px'}} onClick={(e) => e.stopPropagation()}>
                   <span>鏁伴噺锛�</span>
-                  <span><InputNumber precision={4} className="inner-input" id={col.uuid + record.uuid + 'count'} defaultValue={record.count || 0} onChange={(val) => this.onChange(val)} onPressEnter={this.countPress} onBlur={this.countBlur}/></span>
+                  <span><InputNumber precision={4} className="inner-input" id={col.uuid + record.uuid + 'count'} defaultValue={record.fcc_count || 0} onChange={(val) => this.onChange(val)} onPressEnter={this.countPress} onBlur={this.countBlur}/></span>
                 </span>
                 <span onClick={this.editPrice}>
                   <span>鍗曚环锛�</span>
-                  <span>{record.price || 0}</span>
+                  <span>{record.net_unitprice || 0}</span>
                 </span>
               </div>
             } else if (priceing) {
               countNode = <div className="count-wrap">
                 <span style={{marginRight: '5px'}} onClick={this.editCount}>
                   <span>鏁伴噺锛�</span>
-                  <span>{record.count || 0}</span>
+                  <span>{record.fcc_count || 0}</span>
                 </span>
                 <span onClick={(e) => e.stopPropagation()}>
                   <span>鍗曚环锛�</span>
-                  <span><InputNumber precision={4} className="inner-input" id={col.uuid + record.uuid + 'price'} defaultValue={record.price || 0} onChange={(val) => this.onChange(val)} onPressEnter={this.pricePress} onBlur={this.priceBlur}/></span>
+                  <span><InputNumber precision={4} className="inner-input" id={col.uuid + record.uuid + 'price'} defaultValue={record.net_unitprice || 0} onChange={(val) => this.onChange(val)} onPressEnter={this.pricePress} onBlur={this.priceBlur}/></span>
                 </span>
               </div>
             } else {
               countNode = <div className="count-wrap">
                 <span style={{marginRight: '5px'}} onClick={this.editCount}>
                   <span>鏁伴噺锛�</span>
-                  <span>{record.count || 0}</span>
+                  <span>{record.fcc_count || 0}</span>
                 </span>
                 <span onClick={this.editPrice}>
                   <span>鍗曚环锛�</span>
-                  <span>{record.price || 0}</span>
+                  <span>{record.net_unitprice || 0}</span>
                 </span>
               </div>
             }
@@ -775,7 +835,7 @@
                 </span>
                 <span onClick={this.editOrigin}>
                   <span>鍘熷竵锛�</span>
-                  <span>{record.origin || 0}</span>
+                  <span>{record.foreign_amount || 0}</span>
                 </span>
               </div>
             } else if (ratioing) {
@@ -790,7 +850,7 @@
                 </span>
                 <span onClick={this.editOrigin}>
                   <span>鍘熷竵锛�</span>
-                  <span>{record.origin || 0}</span>
+                  <span>{record.foreign_amount || 0}</span>
                 </span>
               </div>
             } else if (origining) {
@@ -805,7 +865,7 @@
                 </span>
                 <span onClick={(e) => e.stopPropagation()}>
                   <span>鍘熷竵锛�</span>
-                  <span><InputNumber precision={2} className="inner-input" id={col.uuid + record.uuid + 'origin'} defaultValue={record.origin || 0} onChange={(val) => this.onChange(val)} onPressEnter={this.originPress} onBlur={this.originBlur}/></span>
+                  <span><InputNumber precision={2} className="inner-input" id={col.uuid + record.uuid + 'origin'} defaultValue={record.foreign_amount || 0} onChange={(val) => this.onChange(val)} onPressEnter={this.originPress} onBlur={this.originBlur}/></span>
                 </span>
               </div>
             } else {
@@ -820,7 +880,7 @@
                 </span>
                 <span onClick={this.editOrigin}>
                   <span>鍘熷竵锛�</span>
-                  <span>{record.origin || 0}</span>
+                  <span>{record.foreign_amount || 0}</span>
                 </span>
               </div>
             }
@@ -833,11 +893,11 @@
           </div>
         }
       }
-    } else if (col.field === 'debtor') {
+    } else if (col.field === 'debit') {
       if (editing) {
-        children = <InputNumber id={col.uuid + record.uuid} precision={2} defaultValue={record.debtor} onChange={(val) => this.onChange(val)} onPressEnter={this.enterPress} onBlur={this.onBlur}/>
+        children = <InputNumber id={col.uuid + record.uuid} precision={2} defaultValue={record.debit} onChange={(val) => this.onChange(val)} onPressEnter={this.enterPress} onBlur={this.onBlur}/>
       } else {
-        let val = record.debtor
+        let val = record.debit
         let down = false
         let vals = []
         if (!isNaN(val) && val !== '') {
@@ -852,13 +912,13 @@
           <span>{vals[4] || ''}</span> <span>{vals[3] || ''}</span> <span>{vals[2] || ''}</span> <span>{vals[1] || ''}</span> <span className="last">{vals[0] || ''}</span>
         </div>
       }
-    } else if (col.field === 'creditor') {
+    } else if (col.field === 'credit') {
       extra = <CloseOutlined onClick={this.delRecord}/>
 
       if (editing) {
-        children = <InputNumber id={col.uuid + record.uuid} precision={2} defaultValue={record.creditor} onChange={(val) => this.onChange(val)} onPressEnter={this.enterPress} onBlur={this.onBlur}/>
+        children = <InputNumber id={col.uuid + record.uuid} precision={2} defaultValue={record.credit} onChange={(val) => this.onChange(val)} onPressEnter={this.enterPress} onBlur={this.onBlur}/>
       } else {
-        let val = record.creditor
+        let val = record.credit
         let down = false
         let vals = []
         if (!isNaN(val) && val !== '') {
@@ -902,22 +962,22 @@
     let columns = [
       {
         title: '鎽樿',
-        dataIndex: 'remark',
-        key: 'remark',
+        dataIndex: 'subject_voucher_text',
+        key: 'subject_voucher_text',
         width: '22%',
         onCell: record => ({
           record,
-          col: {uuid: 'remark', field: 'remark', tableId: config.uuid},
+          col: {uuid: 'subject_voucher_text', field: 'subject_voucher_text', tableId: config.uuid},
         })
       },
       {
         title: '浼氳绉戠洰',
-        dataIndex: 'subjectscode',
-        key: 'subjectscode',
+        dataIndex: 'subject_code',
+        key: 'subject_code',
         width: '34%',
         onCell: record => ({
           record,
-          col: {uuid: 'subjectscode', field: 'subjectscode', tableId: config.uuid},
+          col: {uuid: 'subject_code', field: 'subject_code', tableId: config.uuid},
         })
       },
       {
@@ -928,12 +988,12 @@
             <span>鐧�</span> <span>鍗�</span> <span>鍏�</span> <span>瑙�</span> <span className="last">鍒�</span>
           </div>
         </>),
-        dataIndex: 'debtor',
-        key: 'debtor',
+        dataIndex: 'debit',
+        key: 'debit',
         width: '22%',
         onCell: record => ({
           record,
-          col: {uuid: 'debtor', field: 'debtor', tableId: config.uuid},
+          col: {uuid: 'debit', field: 'debit', tableId: config.uuid},
         })
       },
       {
@@ -944,12 +1004,12 @@
             <span>鐧�</span> <span>鍗�</span> <span>鍏�</span> <span>瑙�</span> <span className="last">鍒�</span>
           </div>
         </>),
-        dataIndex: 'creditor',
-        key: 'creditor',
+        dataIndex: 'credit',
+        key: 'credit',
         width: '22%',
         onCell: record => ({
           record,
-          col: {uuid: 'creditor', field: 'creditor', tableId: config.uuid},
+          col: {uuid: 'credit', field: 'credit', tableId: config.uuid},
         })
       }
     ]
@@ -1018,14 +1078,13 @@
     let _data = data.map((item, i) => {
       // item.uuid = Utils.getguid()
       item.index = i
-      item.$origin = true
       
       return item
     })
 
     if (_data.length < 4) {
       for (let i = _data.length - 1; i < 4; i++) {
-        _data.push({uuid: Utils.getguid(), index: i + 1, remark: '', subjectscode: '', subjectsname: '', debtor: '', creditor: ''})
+        _data.push({uuid: Utils.getguid(), index: i + 1, subject_voucher_text: '', subject_code: '', subject_name: '', debit: '', credit: ''})
       }
     }
     return _data
@@ -1033,31 +1092,31 @@
 
   getTotalLine = (data) => {
     let totalLine = {uuid: Utils.getguid(), type: 'total'}
-    let debtor = ''
-    let creditor = ''
+    let debit = ''
+    let credit = ''
 
     data.forEach(item => {
-      if (!isNaN(item.debtor) && item.debtor !== '') {
-        if (debtor === '') {
-          debtor = 0
+      if (!isNaN(item.debit) && item.debit !== '') {
+        if (debit === '') {
+          debit = 0
         }
 
-        debtor += item.debtor
-      } else if (!isNaN(item.creditor) && item.creditor !== '') {
-        if (debtor === '') {
-          debtor = 0
+        debit += item.debit
+      } else if (!isNaN(item.credit) && item.credit !== '') {
+        if (debit === '') {
+          debit = 0
         }
-        if (creditor === '') {
-          creditor = 0
+        if (credit === '') {
+          credit = 0
         }
-        creditor += item.creditor
+        credit += item.credit
       }
     })
 
-    totalLine.debtor = debtor
-    totalLine.creditor = creditor
+    totalLine.debit = debit
+    totalLine.credit = credit
 
-    totalLine.remark = this.changeMoneyToChinese(debtor)
+    totalLine.subject_voucher_text = this.changeMoneyToChinese(debit)
     
     return totalLine
   }
@@ -1151,15 +1210,15 @@
     if (col.tableId !== tableId) return
 
     if (record.index < edData.length - 2) {
-      MKEmitter.emit('tdFocus', 'remark' + edData[record.index + 1].uuid)
+      MKEmitter.emit('tdFocus', 'subject_voucher_text' + edData[record.index + 1].uuid)
     } else {
       let _data = fromJS(edData).toJS()
-      let line = {uuid: Utils.getguid(), index: _data.length - 1, remark: record.remark || '', subjectscode: '', subjectsname: '', debtor: '', creditor: ''}
+      let line = {uuid: Utils.getguid(), index: _data.length - 1, subject_voucher_text: record.subject_voucher_text || '', subject_code: '', subject_name: '', debit: '', credit: ''}
 
       _data.splice(_data.length - 1, 0, line)
 
       this.setState({edData: _data}, () => {
-        MKEmitter.emit('tdFocus', 'remark' + line.uuid)
+        MKEmitter.emit('tdFocus', 'subject_voucher_text' + line.uuid)
       })
       this.props.onChange(_data)
     }
@@ -1171,7 +1230,7 @@
     if (tid !== tableId) return
 
     let _data = fromJS(edData).toJS()
-    let line = {uuid: Utils.getguid(), index: 0, remark: '', subjectscode: '', subjectsname: '', debtor: '', creditor: ''}
+    let line = {uuid: Utils.getguid(), index: 0, subject_voucher_text: '', subject_code: '', subject_name: '', debit: '', credit: ''}
 
     _data.splice(record.index, 0, line)
     _data = _data.map((item, index) => {
@@ -1194,7 +1253,7 @@
 
     if (_data.length < 4) {
       for (let i = _data.length; i < 4; i++) {
-        _data.push({uuid: Utils.getguid(), index: 0, remark: '', subjectscode: '', subjectsname: '', debtor: '', creditor: ''})
+        _data.push({uuid: Utils.getguid(), index: 0, subject_voucher_text: '', subject_code: '', subject_name: '', debit: '', credit: ''})
       }
     }
 
@@ -1206,7 +1265,7 @@
     _data.push(this.getTotalLine(_data))
 
     this.setState({edData: _data})
-    this.props.onChange(_data, record.$origin ? record : null)
+    this.props.onChange(_data)
   }
 
   changeRecord = (tableId, record) => {
@@ -1223,7 +1282,7 @@
     _data.pop()
 
     if (record.index === _data.length - 1) {
-      _data.push({uuid: Utils.getguid(), index: record.index + 1, remark: '', subjectscode: '', subjectsname: '', debtor: '', creditor: ''})
+      _data.push({uuid: Utils.getguid(), index: record.index + 1, subject_voucher_text: '', subject_code: '', subject_name: '', debit: '', credit: ''})
     }
 
     _data.push(this.getTotalLine(_data))
diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx
index 328ccb5..1926c23 100644
--- a/src/tabviews/custom/components/share/normalTable/index.jsx
+++ b/src/tabviews/custom/components/share/normalTable/index.jsx
@@ -936,7 +936,7 @@
 
   render() {
     const { setting, statFValue, lineMarks, data } = this.props
-    const { selectedRowKeys, activeIndex, pickup, tableId, pageOptions } = this.state
+    const { selectedRowKeys, activeIndex, pickup, tableId, pageOptions, columns } = this.state
 
     // 璁剧疆琛ㄦ牸閫夋嫨灞炴�э細鍗曢�夈�佸閫夈�佷笉鍙��
     let rowSelection = null
@@ -992,7 +992,7 @@
     }
 
     return (
-      <div className={`normal-custom-table ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''}`} id={tableId}>
+      <div className={`normal-custom-table ${setting.tableHeader || ''} ${height ? 'fixed-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || 'middle'} table-col-${columns.length}`} id={tableId}>
         {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ?
           <Switch title="鏀惰捣" className="main-pickup" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /> : null
         }
@@ -1001,7 +1001,7 @@
           size={setting.size || 'middle'}
           bordered={setting.bordered !== 'false'}
           rowSelection={rowSelection}
-          columns={this.state.columns}
+          columns={columns}
           dataSource={_data}
           loading={loading}
           scroll={{ x: '100%', y: height }}
diff --git a/src/tabviews/zshare/actionList/printbutton/index.jsx b/src/tabviews/zshare/actionList/printbutton/index.jsx
index dff3102..9fa8f51 100644
--- a/src/tabviews/zshare/actionList/printbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/printbutton/index.jsx
@@ -321,6 +321,16 @@
 
           // 鑷畾涔夋墦鍗�
           if (btn.verify.printMode === 'custom') {
+            result.list.forEach(cell => {
+              Object.keys(cell).forEach(key => {
+                let _key = key.toLowerCase()
+                if (['printtype', 'printcount'].includes(_key)) {
+                  cell[_key] = cell[key]
+                }
+              })
+              cell.printType = cell.printtype || ''
+              cell.printCount = +(cell.printcount || 1)
+            })
             this.execCustomPrint(result.list, formdata)
             resolve(false)
             return
diff --git a/src/tabviews/zshare/normalTable/index.jsx b/src/tabviews/zshare/normalTable/index.jsx
index 0ef8ec8..e08b2cb 100644
--- a/src/tabviews/zshare/normalTable/index.jsx
+++ b/src/tabviews/zshare/normalTable/index.jsx
@@ -1214,7 +1214,7 @@
 
   render() {
     const { setting, pickup, statFValue } = this.props
-    const { selectedRowKeys, lineMarks, activeIndex, pageOptions } = this.state
+    const { selectedRowKeys, lineMarks, activeIndex, pageOptions, columns } = this.state
 
     let components = {
       body: {}
@@ -1276,14 +1276,14 @@
     }
 
     return (
-      <div className={'normal-data-table mingke-table ' + (height ? 'fixed-height' : '')}>
+      <div className={'normal-data-table mingke-table ' + (height ? 'fixed-height' : '') + ` table-col-${columns.length}`}>
         <Table
           components={components}
           size={setting.size || 'middle'}
           style={style}
           bordered={setting.bordered !== 'false'}
           rowSelection={rowSelection}
-          columns={this.state.columns}
+          columns={columns}
           dataSource={_data}
           rowClassName={(record) => {
             let className = ''
diff --git a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
index f39eecc..d4eb344 100644
--- a/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
+++ b/src/templates/sharecomponent/fieldscomponent/editcard/index.jsx
@@ -22,7 +22,9 @@
           _type = 'text'
         }
       } else if (props.type === 'form') {
-        if (_type !== 'number') {
+        if (_type === 'datetime' || _type === 'date') {
+          _type = 'date'
+        } else if (_type !== 'number') {
           _type = 'text'
         }
       }
diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js
index 14883d2..29651eb 100644
--- a/src/utils/utils-datamanage.js
+++ b/src/utils/utils-datamanage.js
@@ -145,8 +145,8 @@
     _customScript = _customScript.replace(/\$sum@/ig, '/*')
     _customScript = _customScript.replace(/@sum\$/ig, '*/')
 
-    _dataresource = _dataresource.replace(/@ID@/ig, `''`)
-    _customScript = _customScript.replace(/@ID@/ig, `''`)
+    // _dataresource = _dataresource.replace(/@ID@/ig, `''`)
+    // _customScript = _customScript.replace(/@ID@/ig, `''`)
     _dataresource = _dataresource.replace(/@BID@/ig, `'${BID || ''}'`)
     _customScript = _customScript.replace(/@BID@/ig, `'${BID || ''}'`)
     _dataresource = _dataresource.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
@@ -348,8 +348,8 @@
     _customScript = _customScript.replace(/\$select@/ig, '/*')
     _customScript = _customScript.replace(/@select\$/ig, '*/')
 
-    _dataresource = _dataresource.replace(/@ID@/ig, `''`)
-    _customScript = _customScript.replace(/@ID@/ig, `''`)
+    // _dataresource = _dataresource.replace(/@ID@/ig, `''`)
+    // _customScript = _customScript.replace(/@ID@/ig, `''`)
     _dataresource = _dataresource.replace(/@BID@/ig, `'${BID || ''}'`)
     _customScript = _customScript.replace(/@BID@/ig, `'${BID || ''}'`)
     _dataresource = _dataresource.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)

--
Gitblit v1.8.0