From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 四月 2025 12:18:03 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/custom/components/module/account/index.jsx |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/src/tabviews/custom/components/module/account/index.jsx b/src/tabviews/custom/components/module/account/index.jsx
index a4f2cb1..0218232 100644
--- a/src/tabviews/custom/components/module/account/index.jsx
+++ b/src/tabviews/custom/components/module/account/index.jsx
@@ -81,6 +81,10 @@
         map.set(item.id, true)
 
         if (item.selected === 'true' && !activeItem) {
+          if (res.invoice_type) {
+            item.invoice_type = res.invoice_type.map(cell => ({value: cell.invoice_type_code, label: cell.invoice_type_name}))
+          }
+          item.$$uuid = item.id
           activeItem = item
         }
         if (item.months) {
@@ -120,10 +124,12 @@
   }
 
   setBook = (item, resolve) => {
+    const { config } = this.props
+
     if (!resolve) {
       this.setState({activeItem: item})
   
-      MKEmitter.emit('resetSelectLine', this.props.config.uuid, item.id, item)
+      MKEmitter.emit('resetSelectLine', config.uuid, item.id, item)
     }
     
     let userid = sessionStorage.getItem('UserID') || ''
@@ -133,12 +139,12 @@
       LText: `delete  tmp_session_show_key where createuserid='${userid}' and key_type='fcc_years'
         insert into tmp_session_show_key ( key_id,key_type,createuserid,CreateUser,CreateStaff) 
         select '${item.id}','fcc_years','${userid}','${sid}','${sessionStorage.getItem('Full_Name') || ''}'`,
-      exec_type: 'y'
+      exec_type:  window.GLOB.execType || 'y'
     }
 
     param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
     param.secretkey = Utils.encrypt('', param.timestamp)
-    param.LText = Utils.formatOptions(param.LText)
+    param.LText = Utils.formatOptions(param.LText, param.exec_type)
 
     Api.genericInterface(param).then(res => {
       if (!res.status) {
@@ -152,6 +158,7 @@
       }
 
       if (resolve) {
+        sessionStorage.setItem('ThirdMenu', config.$pageId)
         window.location.reload()
       }
     })
@@ -160,24 +167,18 @@
   addBook = () => {
     const { config } = this.props
 
-    let menuId = config.wrap.MenuID
-    let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
-
-    if (!menu && config.wrap.MenuNo) {
-      menu = {
-        MenuID: menuId,
-        MenuName: config.wrap.MenuName,
-        MenuNo: config.wrap.MenuNo || '',
-        type: config.wrap.tabType
-      }
-    }
-
-    let newtab = {
-      ...menu,
+    let menu = {
+      MenuID: config.wrap.MenuID,
+      MenuName: config.wrap.MenuName,
+      type: config.wrap.tabType,
       param: {}
     }
 
-    MKEmitter.emit('modifyTabs', newtab, true)
+    if (window.GLOB.mkThdMenus.has(config.wrap.MenuID)) {
+      menu = {...window.GLOB.mkThdMenus.get(config.wrap.MenuID), param: {}}
+    }
+
+    MKEmitter.emit('modifyTabs', menu, true)
   }
 
   render() {
@@ -186,7 +187,7 @@
 
     return (
       <div className="menu-account-wrap" style={config.style}>
-        {config.wrap.MenuID ? <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} placeholder="璇烽�夋嫨璐﹀" onChange={this.changeBook} dropdownRender={menu => (
+        {config.wrap.MenuID ? <Select dropdownMatchSelectWidth={false} showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} placeholder="璇烽�夋嫨璐﹀" onChange={this.changeBook} dropdownRender={menu => (
           <div>
             {menu}
             <Divider style={{ margin: '4px 0' }} />
@@ -198,7 +199,7 @@
           {books.map(item => (
             <Option disabled={!item.months} title={item.account_name} key={item.id}>{item.account_name}</Option>
           ))}
-        </Select> : <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="璇烽�夋嫨璐﹀" onChange={this.changeBook}>
+        </Select> : <Select dropdownMatchSelectWidth={false} showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} value={activeItem ? activeItem.id : ''} disabled={config.wrap.readonly === 'true'} placeholder="璇烽�夋嫨璐﹀" onChange={this.changeBook}>
           {books.map(item => (
             <Option disabled={!item.months} title={item.account_name} key={item.id}>{item.account_name}</Option>
           ))}

--
Gitblit v1.8.0