From 4c2ef2d3a98d7d9a2592721db2f5858528eb5c86 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 26 十二月 2019 11:33:48 +0800
Subject: [PATCH] 2019-12-26

---
 src/tabviews/tableshare/actionList/index.jsx |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/tabviews/commontable/mainAction/index.jsx b/src/tabviews/tableshare/actionList/index.jsx
similarity index 97%
rename from src/tabviews/commontable/mainAction/index.jsx
rename to src/tabviews/tableshare/actionList/index.jsx
index ed6be69..f5ef28f 100644
--- a/src/tabviews/commontable/mainAction/index.jsx
+++ b/src/tabviews/tableshare/actionList/index.jsx
@@ -2,7 +2,7 @@
 import PropTypes from 'prop-types'
 import moment from 'moment'
 import { Button, Affix, Modal, notification, Spin } from 'antd'
-import MutilForm from '../mutilform'
+import MutilForm from '@/tabviews/tableshare/mutilform'
 import Utils from '@/utils/utils.js'
 import Api from '@/api'
 import './index.scss'
@@ -11,6 +11,8 @@
 
 class MainAction extends Component {
   static propTpyes = {
+    BID: PropTypes.string,
+    type: PropTypes.string,
     MenuID: PropTypes.string,
     actions: PropTypes.array, // 鎼滅储鏉′欢鍒楄〃
     dict: PropTypes.object, // 瀛楀吀椤�
@@ -26,6 +28,10 @@
     loadingUuid: '',
     btnloading: false,
     configMap: {}
+  }
+
+  UNSAFE_componentWillMount() {
+    console.log(this.props.type)
   }
   
   refreshdata = (item, type) => {
@@ -120,7 +126,8 @@
         (btn.OpenType === 'pop' && !btn.innerFunc && btn.sql && btn.sqlType === 'insert')
       ) {
         let param = { // 绯荤粺瀛樺偍杩囩▼
-          func: 'sPC_TableData_InUpDe'
+          func: 'sPC_TableData_InUpDe',
+          BID: this.props.BID
         }
 
         if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') { // 鏄惁寮规鎴栫洿鎺ユ墽琛�
@@ -135,7 +142,6 @@
           }
 
           param.ID = ID
-          param.BID = ''
 
           if (btn.innerFunc) {
             param.func = btn.innerFunc
@@ -159,18 +165,13 @@
             if (!param.hasOwnProperty('ID') && setting.primaryKey && data[0] && data[0][setting.primaryKey]) {
               param.ID = data[0][setting.primaryKey]
             }
-            if (!param.hasOwnProperty('BID')) {
-              param.BID = ''
-            }
           } else if (btn.sql && btn.sqlType === 'insert') {
             param.ID = Utils.getguid()
-            param.BID = ''
             param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata)) // 鏁版嵁婧�
             param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
             param.secretkey = Utils.encrypt(param.LText, param.timestamp)
           } else if (btn.sql) {
             param.ID = data[0][setting.primaryKey]
-            param.BID = ''
             param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata)) // 鏁版嵁婧�
             param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
             param.secretkey = Utils.encrypt(param.LText, param.timestamp)
@@ -189,12 +190,12 @@
       } else if (btn.Ot === 'required' || (btn.Ot === 'requiredOnce' && btn.OpenType === 'pop')) {
         let deffers = data.map(cell => {
           let param = {
-            func: 'sPC_TableData_InUpDe'
+            func: 'sPC_TableData_InUpDe',
+            BID: this.props.BID
           }
 
           if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') { // 鏄惁寮规鎴栫洿鎺ユ墽琛�
             param.ID = cell[setting.primaryKey]
-            param.BID = ''
 
             if (btn.innerFunc) {
               param.func = btn.innerFunc
@@ -218,7 +219,6 @@
               }
             } else if (btn.sql) {
               param.ID = cell[setting.primaryKey]
-              param.BID = ''
               param.LText = Utils.formatOptions(Utils.getSysDefaultSql(btn, setting, formdata)) // 鏁版嵁婧�
               param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
               param.secretkey = Utils.encrypt(param.LText, param.timestamp)
@@ -263,7 +263,7 @@
       /** *********************璋冪敤澶栭儴鎺ュ彛************************* */
       let param = {
         ID: '',
-        BID: ''
+        BID: this.props.BID
       }
 
       if (!btn.interface) { // 鎺ュ彛鍦板潃涓嶅瓨鍦ㄦ椂鎶ラ敊
@@ -359,7 +359,7 @@
           if (btn.innerFunc) {
             let deffers = data.map(cell => {
               let _param = {
-                BID: '',
+                BID: this.props.BID,
                 func: btn.innerFunc
               }
               _param.ID = cell[setting.primaryKey]
@@ -393,7 +393,7 @@
           } else {
             let params = data.map(cell => {
               return {
-                BID: '',
+                BID: this.props.BID,
                 ID: cell[setting.primaryKey]
               }
             })
@@ -781,7 +781,7 @@
   render() {
     const { loadingUuid, btnloading } = this.state
 
-    if (this.props.setting.actionfixed) { // 鎸夐挳鏄惁鍥哄畾鍦ㄥご閮�
+    if (this.props.setting.actionfixed && this.props.type === 'main') { // 鎸夐挳鏄惁鍥哄畾鍦ㄥご閮�
       return (
         <Affix offsetTop={48}>
           <div className="button-list" id={this.props.MenuID + 'mainaction'}>

--
Gitblit v1.8.0