From 2e5fe5427d6db393e0495598ff43d90a052f4791 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 28 四月 2024 14:06:42 +0800
Subject: [PATCH] 2024-04-28

---
 src/tabviews/zshare/actionList/exceloutbutton/index.jsx                         |   18 +++
 src/tabviews/custom/components/module/invoice/invoiceTable/index.scss           |   32 +++--
 src/templates/zshare/modalform/index.jsx                                        |    2 
 src/menu/components/module/invoice/verifycard/customscript/index.jsx            |   10 +-
 src/tabviews/custom/components/module/invoice/index.jsx                         |   65 ++++++++++--
 src/menu/components/module/invoice/index.jsx                                    |   10 +
 src/tabviews/zshare/mutilform/mkNumberInput/index.jsx                           |   20 +--
 src/templates/zshare/formconfig.jsx                                             |   15 +++
 src/menu/components/module/invoice/verifycard/index.jsx                         |   10 +-
 src/tabviews/custom/components/module/invoice/invoiceTable/index.jsx            |   40 +++++--
 src/templates/sharecomponent/actioncomponent/verifyexcelout/otherform/index.jsx |   20 +++
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx           |   14 ++
 12 files changed, 187 insertions(+), 69 deletions(-)

diff --git a/src/menu/components/module/invoice/index.jsx b/src/menu/components/module/invoice/index.jsx
index 6902bb1..48d84b3 100644
--- a/src/menu/components/module/invoice/index.jsx
+++ b/src/menu/components/module/invoice/index.jsx
@@ -45,7 +45,7 @@
         subtype: card.subtype,
         wrap: { name: '鍙戠エ', width: card.width || 24, datatype: 'static' },
         style: { paddingLeft: '20px', paddingRight: '20px', paddingTop: '10px', paddingBottom: '10px' },
-        setting: { interType: 'system' },
+        setting: { interType: 'system', primaryKey: 'ID' },
         columns: [],
         scripts: [],
         buyer: {
@@ -105,6 +105,8 @@
         // ['绋庣巼', 'tax_rate', 'Decimal(18,2)'],
         ['涓�鑸撼绋庝汉绋庣巼', 'general_tax_rate', 'Decimal(18,2)'],
         ['灏忚妯$撼绋庝汉寰佹敹鐜�', 'small_tax_rate', 'Decimal(18,2)'],
+        ['鏄惁浜彈浼樻儬鏀跨瓥', 'free_tax_mark'],
+        ['浼樻儬鏀跨瓥绫诲瀷', 'vat_special_management'],
       ]
 
       details.forEach((cell, index) => {
@@ -112,6 +114,8 @@
       })
 
       let cols = [
+        ['ID', 'ID'],
+        ['寮�绁ㄧ敵璇峰崟鍙�', 'io'],
         ['鍙戠エ绉嶇被', 'invoice_type'],
         ['璐拱鏂瑰悕绉�', 'from_to_name'],
         ['璐拱鏂圭◣鍙�', 'from_to_tax_no'],
@@ -132,6 +136,7 @@
         ['鏀舵浜�', 'payee'],
         ['澶嶆牳浜�', 'reviewer'],
         ['寮�绁ㄤ汉', 'drawer'],
+        ['琛屽彿', 'invoice_lp'],
         ['鍟嗗搧缂栫爜', 'productcode'],
         ['鍟嗗搧鍚嶇О', 'productname'],
         ['瑙勬牸鍨嬪彿', 'spec'],
@@ -152,9 +157,6 @@
       this.updateComponent(_card)
     } else {
       let _card = fromJS(card).toJS()
-
-      // _card.billSaveBtn = _card.billSaveBtn || {type: 'billsave', intertype: 'system', label: '淇濆瓨鍗曟嵁'}
-      // _card.billOutBtn = _card.billOutBtn || {type: 'billout', intertype: 'custom', label: '鎻愪氦寮�绁�', procMode: 'system'}
 
       this.setState({
         card: _card
diff --git a/src/menu/components/module/invoice/verifycard/customscript/index.jsx b/src/menu/components/module/invoice/verifycard/customscript/index.jsx
index 5ee1b2a..6886fa1 100644
--- a/src/menu/components/module/invoice/verifycard/customscript/index.jsx
+++ b/src/menu/components/module/invoice/verifycard/customscript/index.jsx
@@ -73,16 +73,16 @@
           
           /* 鍙戠エ涓昏〃瀛楁 */
           
-          Declare @invoice_type Nvarchar(50), @from_to_name Nvarchar(50), @from_to_tax_no Nvarchar(50), @from_to_addr Nvarchar(100), @from_to_tel Nvarchar(50), @from_to_bank_name Nvarchar(50), @from_to_account_no Nvarchar(50), @from_to_mob Nvarchar(50), @from_to_email Nvarchar(50), @from_to_code Nvarchar(50), @orgname Nvarchar(50), @tax_no Nvarchar(50), @addr Nvarchar(100), @tel Nvarchar(50), @bank_name Nvarchar(50), @account_no Nvarchar(50), @remark Nvarchar(512), @payee Nvarchar(50), @reviewer Nvarchar(50), @drawer Nvarchar(50)
+          Declare @invoice_type Nvarchar(50), @from_to_name Nvarchar(50), @from_to_tax_no Nvarchar(50), @from_to_addr Nvarchar(100), @from_to_tel Nvarchar(50), @from_to_bank_name Nvarchar(50), @from_to_account_no Nvarchar(50), @from_to_mob Nvarchar(50), @from_to_email Nvarchar(50), @from_to_code Nvarchar(50), @orgname Nvarchar(50), @tax_no Nvarchar(50), @addr Nvarchar(100), @tel Nvarchar(50), @bank_name Nvarchar(50), @account_no Nvarchar(50), @remark Nvarchar(512), @payee Nvarchar(50), @reviewer Nvarchar(50), @drawer Nvarchar(50), @io Nvarchar(50), @orgcode Nvarchar(50), @total_net_amount Decimal(18,2), @total_tax Decimal(18,2), @total_amount Decimal(18,2)
           
-          Select @invoice_type='', @from_to_name='', @from_to_tax_no='', @from_to_addr='', @from_to_tel='', @from_to_bank_name='', @from_to_account_no='', @from_to_mob='', @from_to_email='', @from_to_code='', @orgname='', @tax_no='', @addr='', @tel='', @bank_name='', @account_no='', @remark='', @payee='', @reviewer='', @drawer=''
+          Select @invoice_type='', @from_to_name='', @from_to_tax_no='', @from_to_addr='', @from_to_tel='', @from_to_bank_name='', @from_to_account_no='', @from_to_mob='', @from_to_email='', @from_to_code='', @orgname='', @tax_no='', @addr='', @tel='', @bank_name='', @account_no='', @remark='', @payee='', @reviewer='', @drawer='', @io='', @orgcode='', @total_net_amount=0, @total_tax=0, @total_amount=0
           
           /* 鍙戠エ鏄庣粏涓存椂琛� */
-          Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2))
+          Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50))
           
-          Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount)
+          Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, invoice_lp, jskey, data_type)
           
-          Select '', '', '', '', 0, 0, 0, '', '', 0, 0
+          Select '', '', '', '', 0, 0, 0, '', '', 0, 0, '', '', ''
 
         `
 
diff --git a/src/menu/components/module/invoice/verifycard/index.jsx b/src/menu/components/module/invoice/verifycard/index.jsx
index b61b9ec..5ffa0bd 100644
--- a/src/menu/components/module/invoice/verifycard/index.jsx
+++ b/src/menu/components/module/invoice/verifycard/index.jsx
@@ -562,20 +562,20 @@
               </p>
               <p className="note">{`/* 鍙戠エ涓昏〃瀛楁 */`}</p>
               <p>
-                Declare @invoice_type Nvarchar(50), @from_to_name Nvarchar(50), @from_to_tax_no Nvarchar(50), @from_to_addr Nvarchar(100), @from_to_tel Nvarchar(50), @from_to_bank_name Nvarchar(50), @from_to_account_no Nvarchar(50), @from_to_mob Nvarchar(50), @from_to_email Nvarchar(50), @from_to_code Nvarchar(50), @orgname Nvarchar(50), @tax_no Nvarchar(50), @addr Nvarchar(100), @tel Nvarchar(50), @bank_name Nvarchar(50), @account_no Nvarchar(50), @remark Nvarchar(512), @payee Nvarchar(50), @reviewer Nvarchar(50), @drawer Nvarchar(50)
+                Declare @invoice_type Nvarchar(50), @from_to_name Nvarchar(50), @from_to_tax_no Nvarchar(50), @from_to_addr Nvarchar(100), @from_to_tel Nvarchar(50), @from_to_bank_name Nvarchar(50), @from_to_account_no Nvarchar(50), @from_to_mob Nvarchar(50), @from_to_email Nvarchar(50), @from_to_code Nvarchar(50), @orgname Nvarchar(50), @tax_no Nvarchar(50), @addr Nvarchar(100), @tel Nvarchar(50), @bank_name Nvarchar(50), @account_no Nvarchar(50), @remark Nvarchar(512), @payee Nvarchar(50), @reviewer Nvarchar(50), @drawer Nvarchar(50), @io Nvarchar(50), @orgcode Nvarchar(50), @total_net_amount Decimal(18,2), @total_tax Decimal(18,2), @total_amount Decimal(18,2)
               </p>
               <p>
-                Select @invoice_type='', @from_to_name='', @from_to_tax_no='', @from_to_addr='', @from_to_tel='', @from_to_bank_name='', @from_to_account_no='', @from_to_mob='', @from_to_email='', @from_to_code='', @orgname='', @tax_no='', @addr='', @tel='', @bank_name='', @account_no='', @remark='', @payee='', @reviewer='', @drawer=''
+                Select @invoice_type='', @from_to_name='', @from_to_tax_no='', @from_to_addr='', @from_to_tel='', @from_to_bank_name='', @from_to_account_no='', @from_to_mob='', @from_to_email='', @from_to_code='', @orgname='', @tax_no='', @addr='', @tel='', @bank_name='', @account_no='', @remark='', @payee='', @reviewer='', @drawer='', @io='', @orgcode='', @total_net_amount=0, @total_tax=0, @total_amount=0
               </p>
               <p className="note">{`/* 鍙戠エ鏄庣粏涓存椂琛� */`}</p>
               <p>
-                Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2))
+                Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50))
               </p>
               <p>
-                Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount)
+                Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, invoice_lp, jskey, data_type)
               </p>
               <p>
-                Select '', '', '', '', 0, 0, 0, '', '', 0, 0
+                Select '', '', '', '', 0, 0, 0, '', '', 0, 0, '', '', ''
               </p>
               <p className="note">{`/* 鍓嶇疆鑴氭湰 */`}</p>
               <p>
diff --git a/src/tabviews/custom/components/module/invoice/index.jsx b/src/tabviews/custom/components/module/invoice/index.jsx
index 17eda8d..e0ca568 100644
--- a/src/tabviews/custom/components/module/invoice/index.jsx
+++ b/src/tabviews/custom/components/module/invoice/index.jsx
@@ -20,6 +20,8 @@
 
   state = {
     BID: '',
+    ID: Utils.getuuid(),
+    io: '',
     invTypes: [
       {value: '1', label: '鐢靛瓙鍙戠エ锛堝鍊肩◣涓撶敤鍙戠エ锛�'},
       {value: '2', label: '鐢靛瓙鍙戠エ锛堟櫘閫氬彂绁級'},
@@ -50,6 +52,7 @@
     reviewer: '',
     drawer: '',
     details: [],
+    oriDetails: [],
     book: null,
     loading: false,
     saveType: '',
@@ -146,7 +149,7 @@
           cell.field = 'tax_rate'
           cell.label = '绋庣巼'
         }
-        if (['Description', 'id', 'small_tax_rate'].includes(cell.field)) {
+        if (['Description', 'id', 'small_tax_rate', 'free_tax_mark', 'vat_special_management'].includes(cell.field)) {
           cell.Hide = 'true'
         } else if (['spec'].includes(cell.field)) {
           cell.Width = 150
@@ -292,6 +295,10 @@
     if (result.status) {
 
       this.setState({
+        ID: result.data[0][config.setting.primaryKey] || Utils.getuuid(),
+        io: '',
+        details: [],
+        oriDetails: [],
         loading: false
       })
 
@@ -357,7 +364,7 @@
   }
 
   saveBill = () => {
-    const { config, saveType } = this.state
+    const { config, book, saveType } = this.state
 
     if (saveType) return
 
@@ -370,6 +377,7 @@
           LText: sql,
           exec_type: window.GLOB.execType || 'y',
           timestamp: moment().format('YYYY-MM-DD HH:mm:ss'),
+          BID: book.id
         }
   
         param.secretkey = Utils.encrypt('', param.timestamp)
@@ -409,7 +417,7 @@
   }
 
   outBill = () => {
-    const { config, saveType } = this.state
+    const { config, book, saveType } = this.state
 
     if (saveType) return
 
@@ -419,11 +427,11 @@
   
         let param = {
           func: 'sPC_TableData_InUpDe',
-          // BID: BID || '',
           LText: sql,
           key_back_type: 'Y',
           exec_type: window.GLOB.execType || 'y',
           timestamp: moment().format('YYYY-MM-DD HH:mm:ss'),
+          BID: book.id
         }
   
         param.secretkey = Utils.encrypt('', param.timestamp)
@@ -442,8 +450,9 @@
   }
 
   getPreSql = (btn) => {
-    const { book, details, invoice_type, from_to_name, from_to_tax_no, from_to_addr, from_to_tel, from_to_bank_name, from_to_account_no, from_to_mob, from_to_email, from_to_code, orgname, tax_no, addr, tel, bank_name, account_no, remark, reviewer, drawer, payee } = this.state
+    const { book, ID, io, details, oriDetails, invoice_type, from_to_name, from_to_tax_no, from_to_addr, from_to_tel, from_to_bank_name, from_to_account_no, from_to_mob, from_to_email, from_to_code, orgname, tax_no, addr, tel, bank_name, account_no, remark, reviewer, drawer, payee } = this.state
 
+    let BID = book.id
     let userName = sessionStorage.getItem('User_Name') || '' 
     let fullName = sessionStorage.getItem('Full_Name') || ''
     let RoleID = sessionStorage.getItem('role_id') || ''
@@ -455,8 +464,40 @@
     let city = sessionStorage.getItem('city') || ''
     let district = sessionStorage.getItem('district') || ''
     let address = sessionStorage.getItem('address') || ''
+    let options = fromJS(oriDetails).toJS()
+    let price = 0
+    let tax = 0
 
-    let lines = details.map(line => `Select '${line.productcode}', '${line.productname}', '${line.spec}', '${line.unit}', ${line.bill_count}, ${line.unitprice}, ${line.amount_line}, '${line.tax_classify_code}', '${line.tax_classify_name}', ${line.tax_rate}, ${line.tax_amount}`)
+    let lines = details.map(line => {
+      let _sql = `Select '${line.productcode}', '${line.productname}', '${line.spec}', '${line.unit}', ${line.bill_count}, ${line.unitprice}, ${line.amount_line}, '${line.tax_classify_code}', '${line.tax_classify_name}', ${line.tax_rate}, ${line.tax_amount}, '${line.invoice_lp || ''}', '${line.uuid}'`
+      let data_type = 'add'
+
+      price += line.amount_line * 100
+      tax += line.tax_amount * 100
+
+      if (options.length) {
+        options = options.filter(option => {
+          if (option.uuid === line.uuid) {
+            data_type = 'upt'
+            return false
+          }
+          return true
+        })
+      }
+
+      return _sql + `, '${data_type}'`
+    })
+
+    let _total = (price - tax) / 100
+    price = price / 100
+    tax = tax / 100
+
+    if (options.length) {
+      options.forEach(line => {
+        lines.push(`Select '${line.productcode}', '${line.productname}', '${line.spec}', '${line.unit}', ${line.bill_count}, ${line.unitprice}, ${line.amount_line}, '${line.tax_classify_code}', '${line.tax_classify_name}', ${line.tax_rate}, ${line.tax_amount}, '${line.invoice_lp || ''}', '${line.uuid}', 'del'`)
+      })
+    }
+
     lines = lines.join(' union all ')
 
     let _script = ''
@@ -473,15 +514,15 @@
       Select @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @ErrorCode='', @retmsg='', @account_id='${book.account_id || ''}', @account_year_id='${book.account_year_id || ''}', @account_code='${book.account_code || ''}', @account_year_code='${book.account_year_code || ''}', @bid=''
 
       /* 鍙戠エ涓昏〃瀛楁 */
-      Declare @invoice_type Nvarchar(50), @from_to_name Nvarchar(50), @from_to_tax_no Nvarchar(50), @from_to_addr Nvarchar(100), @from_to_tel Nvarchar(50), @from_to_bank_name Nvarchar(50), @from_to_account_no Nvarchar(50), @from_to_mob Nvarchar(50), @from_to_email Nvarchar(50), @from_to_code Nvarchar(50), @orgname Nvarchar(50), @tax_no Nvarchar(50), @addr Nvarchar(100), @tel Nvarchar(50), @bank_name Nvarchar(50), @account_no Nvarchar(50), @remark Nvarchar(512), @payee Nvarchar(50), @reviewer Nvarchar(50), @drawer Nvarchar(50)
+      Declare @invoice_type Nvarchar(50), @from_to_name Nvarchar(50), @from_to_tax_no Nvarchar(50), @from_to_addr Nvarchar(100), @from_to_tel Nvarchar(50), @from_to_bank_name Nvarchar(50), @from_to_account_no Nvarchar(50), @from_to_mob Nvarchar(50), @from_to_email Nvarchar(50), @from_to_code Nvarchar(50), @orgname Nvarchar(50), @tax_no Nvarchar(50), @addr Nvarchar(100), @tel Nvarchar(50), @bank_name Nvarchar(50), @account_no Nvarchar(50), @remark Nvarchar(512), @payee Nvarchar(50), @reviewer Nvarchar(50), @drawer Nvarchar(50), @io Nvarchar(50), @orgcode Nvarchar(50), @total_net_amount Decimal(18,2), @total_tax Decimal(18,2), @total_amount Decimal(18,2)
 
-      Select @invoice_type='${invoice_type}', @from_to_name='${from_to_name}', @from_to_tax_no='${from_to_tax_no}', @from_to_addr='${from_to_addr}', @from_to_tel='${from_to_tel}', @from_to_bank_name='${from_to_bank_name}', @from_to_account_no='${from_to_account_no}', @from_to_mob='${from_to_mob}', @from_to_email='${from_to_email}', @from_to_code='${from_to_code}', @orgname='${orgname}', @tax_no='${tax_no}', @addr='${addr}', @tel='${tel}', @bank_name='${bank_name}', @account_no='${account_no}', @remark='${remark}', @payee='${payee}', @reviewer='${reviewer}', @drawer='${drawer}'
+      Select @invoice_type='${invoice_type}', @from_to_name='${from_to_name}', @from_to_tax_no='${from_to_tax_no}', @from_to_addr='${from_to_addr}', @from_to_tel='${from_to_tel}', @from_to_bank_name='${from_to_bank_name}', @from_to_account_no='${from_to_account_no}', @from_to_mob='${from_to_mob}', @from_to_email='${from_to_email}', @from_to_code='${from_to_code}', @orgname='${orgname}', @tax_no='${tax_no}', @addr='${addr}', @tel='${tel}', @bank_name='${bank_name}', @account_no='${account_no}', @remark='${remark}', @payee='${payee}', @reviewer='${reviewer}', @drawer='${drawer}', @io='${io}', @orgcode='${book.orgcode || ''}', @total_net_amount=${_total}, @total_tax=${tax}, @total_amount=${price}
 
       /* 鍙戠エ鏄庣粏涓存椂琛� */
 
-      Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2))
+      Declare @details_list table (productcode Nvarchar(50), productname Nvarchar(50), spec Nvarchar(50), unit Nvarchar(50), bill_count Decimal(18,10), unitprice Decimal(18,10), amount_line Decimal(18,2), tax_classify_code Nvarchar(50), tax_classify_name Nvarchar(50), tax_rate Decimal(18,2), tax_amount Decimal(18,2), invoice_lp Nvarchar(50), jskey Nvarchar(50), data_type Nvarchar(50))
 
-      Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount)
+      Insert into @details_list (productcode, productname, spec, unit, bill_count, unitprice, amount_line, tax_classify_code, tax_classify_name, tax_rate, tax_amount, invoice_lp, jskey, data_type)
 
       ${lines}
 
@@ -490,8 +531,8 @@
 
       aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg`
 
-    sql = sql.replace(/@ID@/ig, `''`)
-    sql = sql.replace(/@BID@/ig, `''`)
+    sql = sql.replace(/@ID@/ig, `'${ID}'`)
+    sql = sql.replace(/@BID@/ig, `'${BID}'`)
     sql = sql.replace(/@LoginUID@/ig, `'${sessionStorage.getItem('LoginUID') || ''}'`)
     sql = sql.replace(/@SessionUid@/ig, `'${localStorage.getItem('SessionUid') || ''}'`)
     sql = sql.replace(/@UserID@/ig, `'${sessionStorage.getItem('UserID') || ''}'`)
diff --git a/src/tabviews/custom/components/module/invoice/invoiceTable/index.jsx b/src/tabviews/custom/components/module/invoice/invoiceTable/index.jsx
index 9d2efd2..46c3243 100644
--- a/src/tabviews/custom/components/module/invoice/invoiceTable/index.jsx
+++ b/src/tabviews/custom/components/module/invoice/invoiceTable/index.jsx
@@ -32,6 +32,9 @@
 
     if (['bill_count', 'unitprice', 'amount_line'].includes(key)) {
       line[key] = value || 0
+      if (isNaN(line[key])) {
+        line[key] = 0
+      }
       if (line[key]) {
         if (key === 'bill_count') {
           line[key] = Math.round(line[key] * 10000000000) / 10000000000
@@ -51,6 +54,8 @@
             line.bill_count = Math.round(line.amount_line / line.unitprice * 10000000000) / 10000000000
           }
         }
+      } else if (key === 'amount_line') {
+        line.bill_count = 0
       }
 
       if (line.amount_line) {
@@ -87,16 +92,16 @@
         <Input defaultValue={line.unit || ''} onChange={(e) => this.onChange(e.target.value, 'unit')}/>
       </div>
       <div className="mk-td">
-        <InputNumber value={bill_count} onChange={(val) => this.setState({bill_count: val})} onBlur={(e) => this.onChange(e.target.value, 'bill_count')}/>
+        <InputNumber value={bill_count} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({bill_count: val})} onBlur={() => this.onChange(bill_count, 'bill_count')}/>
       </div>
       <div className="mk-td">
-        <InputNumber value={unitprice} onChange={(val) => this.setState({unitprice: val})} onBlur={(e) => this.onChange(e.target.value, 'unitprice')}/>
+        <InputNumber value={unitprice} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({unitprice: val})} onBlur={() => this.onChange(unitprice, 'unitprice')}/>
       </div>
       <div className="mk-td">
-        <InputNumber value={amount_line} onChange={(val) => this.setState({amount_line: val})} onBlur={(e) => this.onChange(e.target.value, 'amount_line')}/>
+        <InputNumber value={amount_line} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} onChange={(val) => this.setState({amount_line: val})} onBlur={() => this.onChange(amount_line, 'amount_line')}/>
       </div>
       <div className="mk-td mk-right">{line.tax_name}</div>
-      <div className="mk-td mk-right">{line.tax_amount.toFixed(2)} <span className="del-line" onClick={() => delLine(line.uuid)}></span> </div>
+      <div className="mk-td mk-right">{line.tax_amount.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ',')} <span className="del-line" onClick={() => delLine(line.uuid)}></span> </div>
     </div>
   }
 }
@@ -233,9 +238,12 @@
     data.forEach(item => {
       if (!item.productcode) return
 
-      price += item.amount_line
-      tax += item.tax_amount
+      price += item.amount_line * 100
+      tax += item.tax_amount * 100
     })
+
+    price = price / 100
+    tax = tax / 100
 
     this.setState({total: {price, tax, sum: price, sumName: this.changeMoneyToChinese(price)}})
   }
@@ -314,6 +322,10 @@
         item.tax_rate = prod.tax_rate || 0
         item.tax_name = prod.tax_rate * 100 + '%'
 
+        if (prod.vat_special_management && prod.free_tax_mark === 'true') {
+          item.tax_name = prod.vat_special_management
+        }
+
         item.productcode = prod.productcode
         item.Description = prod.Description
         item.tax_classify_code = prod.tax_classify_code
@@ -363,14 +375,14 @@
           }
 
           return <div className="mk-tr" key={item.uuid} onClick={() => this.checkLine(item.uuid)}>
-            <div className="mk-td mk-left">{item.productname || '**'}</div>
+            <div className="mk-td mk-left">{item.productname || ''}</div>
             <div className="mk-td mk-left">{item.spec || ''}</div>
             <div className="mk-td mk-left">{item.unit || ''}</div>
-            <div className="mk-td mk-right">{item.bill_count || ''}</div>
-            <div className="mk-td mk-right">{item.unitprice || ''}</div>
-            <div className="mk-td mk-right">{item.amount_line || ''}</div>
+            <div className="mk-td mk-right">{`${item.bill_count || ''}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}</div>
+            <div className="mk-td mk-right">{`${item.unitprice || ''}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}</div>
+            <div className="mk-td mk-right">{`${item.amount_line || ''}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}</div>
             <div className="mk-td mk-right">{item.tax_name}</div>
-            <div className="mk-td mk-right">{item.tax_amount.toFixed(2)}</div>
+            <div className="mk-td mk-right">{item.tax_amount.toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ',')}<span className="del-line" onClick={() => this.delLine(item.uuid)}></span></div>
           </div>
         })}
         <div className="mk-total">
@@ -379,14 +391,14 @@
           <div className="mk-td"></div>
           <div className="mk-td"></div>
           <div className="mk-td"></div>
-          <div className="mk-td">锟total.price}</div>
+          <div className="mk-td">锟`${total.price}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}</div>
           <div className="mk-td"></div>
-          <div className="mk-td">锟total.tax}</div>
+          <div className="mk-td">锟`${total.tax}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}</div>
         </div>
         <div className="mk-upcase">
           <div className="mk-td">浠风◣鍚堣锛堝ぇ鍐欙級</div>
           <div className="mk-td">{total.sumName}</div>
-          <div className="mk-td">锛堝皬鍐欙級锟total.sum}</div>
+          <div className="mk-td">锛堝皬鍐欙級锟`${total.sum}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}</div>
         </div>
         <Modal
           title="鍟嗗搧淇℃伅"
diff --git a/src/tabviews/custom/components/module/invoice/invoiceTable/index.scss b/src/tabviews/custom/components/module/invoice/invoiceTable/index.scss
index d0a87e3..2621d4a 100644
--- a/src/tabviews/custom/components/module/invoice/invoiceTable/index.scss
+++ b/src/tabviews/custom/components/module/invoice/invoiceTable/index.scss
@@ -6,8 +6,7 @@
     right: -40px;
     top: 5px;
     font-size: 26px;
-    border: 1px solid #d9d9d9;
-    border-radius: 32px;
+    border: 1px solid var(--inv-color, #13509c);
     width: 30px;
     height: 30px;
     transition: all 0.3s;
@@ -22,7 +21,7 @@
     top: 13px;
     width: 12px;
     height: 1px;
-    background: #b8b8b8;
+    background: var(--inv-color, #13509c);
     transition: all 0.3s;
   }
   .plus-line::after {
@@ -31,21 +30,26 @@
     top: 13px;
     width: 12px;
     height: 1px;
-    background: #b8b8b8;
+    background: var(--inv-color, #13509c);
     transform: rotate(90deg);
     transition: all 0.3s;
   }
-  .plus-line:hover {
-    border-color: #26C281;
+
+  .del-line {
+    display: none;
   }
-  .plus-line:hover::before, .plus-line:hover::after {
-    background: #26C281;
-  }
-  .del-line:hover {
-    border-color: #ff4d4f;
-  }
-  .del-line:hover::before {
-    background: #ff4d4f;
+  .mk-tr:hover {
+    .del-line {
+      display: flex;
+    }
+    .del-line::after {
+      content: ' ';
+      position: absolute;
+      top: -6px;
+      width: 12px;
+      height: 40px;
+      left: -12px;
+    }
   }
 
   .mk-th, .mk-tr, .mk-total {
diff --git a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
index f94347e..c0fd989 100644
--- a/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/exceloutbutton/index.jsx
@@ -605,6 +605,15 @@
               }
             }
 
+            if (val !== '') {
+              if (col.prefix) {
+                val = col.prefix + val
+              }
+              if (col.postfix) {
+                val = val + col.postfix
+              }
+            }
+
             _row[col.Column] = val
           })
   
@@ -707,6 +716,15 @@
               }
             }
 
+            if (val !== '') {
+              if (col.prefix) {
+                val = col.prefix + val
+              }
+              if (col.postfix) {
+                val = val + col.postfix
+              }
+            }
+
             _row[col.Column] = val
           })
   
diff --git a/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx b/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx
index b57a793..aa4d070 100644
--- a/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkNumberInput/index.jsx
@@ -78,22 +78,18 @@
   render() {
     const { config } = this.props
     const { value, precision } = this.state
-
-    if (precision === null) {
+    
+    if (config.format === 'thdSeparator') {
+      if (precision === null) {
+        return (<InputNumber id={config.uuid} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} value={value} disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleSubmit}/>)
+      } else {
+        return (<InputNumber id={config.uuid} formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')} parser={value => value.replace(/,*/g, '')} value={value} precision={precision} disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleSubmit} />)
+      }
+    } else if (precision === null) {
       return (<InputNumber id={config.uuid} value={value} disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleSubmit}/>)
     } else {
       return (<InputNumber id={config.uuid} value={value} precision={precision} disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleSubmit} />)
     }
-    // <InputNumber
-    //   id={config.uuid}
-    //   formatter={value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
-    //   parser={value => value.replace(/,*/g, '')}
-    //   value={value}
-    //   precision={precision}
-    //   disabled={config.readonly}
-    //   onChange={this.handleChange}
-    //   onPressEnter={this.handleSubmit}
-    // />
   }
 }
 
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index b754c1e..7b23dda 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -198,6 +198,12 @@
                 val += '鏍煎紡鍖栵細鐧惧垎姣旓紱'
               }
             }
+            if (record.prefix) {
+              val += `鍓嶇紑锛�${record.prefix}锛沗
+            }
+            if (record.postfix) {
+              val += `鍚庣紑锛�${record.postfix}锛沗
+            }
 
             return <div>{val}<EditOutlined className="edit-other" onClick={() => {this.setState({visible: true, line: fromJS(record).toJS()})}} /></div>
           } else if (record.type === 'text') {
@@ -215,6 +221,12 @@
               } else if (record.textFormat === 'YYYY-MM-DD HH:mm:ss') {
                 val += '鏍煎紡鍖栵細YYYY-MM-DD HH:mm:ss锛�'
               }
+            }
+            if (record.prefix) {
+              val += `鍓嶇紑锛�${record.prefix}锛沗
+            }
+            if (record.postfix) {
+              val += `鍚庣紑锛�${record.postfix}锛沗
             }
 
             return <div>{val}<EditOutlined className="edit-other" onClick={() => {this.setState({visible: true, line: fromJS(record).toJS()})}} /></div>
@@ -1205,7 +1217,7 @@
           onCancel={() => {this.setState({visible: false, line: null})}}
           destroyOnClose
         >
-          <OtherForm line={line} onChange={(values) => this.setState({line: values})}/>
+          <OtherForm line={line} submit={this.lineSubmit} onChange={(values) => this.setState({line: values})}/>
         </Modal>
       </div>
     )
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/otherform/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/otherform/index.jsx
index 068d8ee..9d79e04 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/otherform/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/otherform/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Radio, Tooltip, Select } from 'antd'
+import { Form, Row, Col, Radio, Tooltip, Select, Input } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 // import './index.scss'
 
@@ -105,6 +105,24 @@
               )}
             </Form.Item>
           </Col> : null}
+          <Col span={8}>
+            <Form.Item label="鍓嶇紑">
+              {getFieldDecorator('prefix', {
+                initialValue: line.prefix || ''
+              })(
+                <Input autoComplete="off" onChange={(e) => this.onChange('prefix', e.target.value)} onPressEnter={this.props.submit}/>
+              )}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label="鍚庣紑">
+              {getFieldDecorator('postfix', {
+                initialValue: line.postfix || ''
+              })(
+                <Input autoComplete="off" onChange={(e) => this.onChange('postfix', e.target.value)} onPressEnter={this.props.submit}/>
+              )}
+            </Form.Item>
+          </Col>
         </Row>
       </Form>
     )
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index 3414d0d..d39db79 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -1869,6 +1869,21 @@
     },
     {
       type: 'radio',
+      key: 'format',
+      label: '鏍煎紡鍖�',
+      tooltip: '浣跨敤鍗冨垎浣嶆椂锛屾暟鍊煎皢浠ュ崈鍒嗕綅鏍煎紡鏄剧ず锛屾彁浜ゆ椂涓哄師鏁板�笺��',
+      initVal: card.format || '',
+      forbid: appType === 'mob',
+      options: [{
+        value: '',
+        text: '鏃�'
+      }, {
+        value: 'thdSeparator',
+        text: '鍗冨垎浣�'
+      }]
+    },
+    {
+      type: 'radio',
       key: 'colorType',
       label: '棰滆壊绫诲瀷',
       initVal: card.colorType || 'hex',
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index 2397159..0984c6e 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -21,7 +21,7 @@
 
 const modalTypeOptions = {
   text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'encryption', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom', 'lenControl', 'inputType', 'constant', 'mkfocus'],
-  number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom', 'mkfocus'],
+  number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom', 'mkfocus', 'format'],
   select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom', 'pickerMode'],
   checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'splitline', 'arrange', 'marginTop', 'marginBottom'],
   radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'splitline', 'arrange', 'marginTop', 'marginBottom'],

--
Gitblit v1.8.0