From f0c2cd1084f44bdbd3bc38c8daac88e16ca917cc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 21 九月 2022 21:29:59 +0800
Subject: [PATCH] 2022-09-21

---
 src/templates/zshare/modalform/index.jsx                       |    2 +-
 src/menu/components/share/actioncomponent/actionform/index.jsx |    3 +++
 src/tabviews/zshare/fileupload/index.jsx                       |   14 +++++++++++++-
 src/templates/zshare/formconfig.jsx                            |   11 +++++++++++
 src/menu/components/share/actioncomponent/formconfig.jsx       |    7 ++++---
 src/menu/viewnodes/index.jsx                                   |    2 +-
 6 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index a6125a5..489073b 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -428,6 +428,9 @@
         shows.push('innerFunc', 'Ot', 'execSuccess', 'execError', 'urlkey')
       } else if (_funcType === 'pay') {
         shows.push('payType', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
+        if (this.record.openmenu && this.record.openmenu !== 'goback') {
+          shows.push('open')
+        }
         reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value))
       } else if (_funcType === 'refund') {
         shows.push('Ot', 'execSuccess', 'execError', 'syncComponent', 'openmenu')
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index dfce40a..149307b 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -281,9 +281,9 @@
       options: [{
         value: 'wxpay',
         text: '寰俊'
-      }, {
-        value: 'alipay',
-        text: '鏀粯瀹�'
+      // }, {
+      //   value: 'alipay',
+      //   text: '鏀粯瀹�'
       }]
     },
     {
@@ -737,6 +737,7 @@
       tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��',
       initVal: card.openmenu || (!appType ? [] : ''),
       help: appType === 'mob' || appType === 'pc' ? '鍙繑鍥炰笂涓�椤点��' : null,
+      extendName: 'MenuNo',
       required: false,
       allowClear: true,
       options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}] : menulist,
diff --git a/src/menu/viewnodes/index.jsx b/src/menu/viewnodes/index.jsx
index c0515df..ec0fd77 100644
--- a/src/menu/viewnodes/index.jsx
+++ b/src/menu/viewnodes/index.jsx
@@ -174,7 +174,7 @@
           return `
           <group>
             <rect draggable="true" style={{width: ${width}, height: 26, cursor: 'pointer', fill: 'transparent' }}>
-              <text style={{ fontSize: 12, fill: ${cfg.deleted ? '#959595' : 'black'}, marginLeft: 12, marginTop: 6 }}>${cfg.label}</text>
+              <text style={{ fontSize: 12, fill: ${cfg.deleted ? '#959595' : 'black'}, cursor: 'pointer', marginLeft: 12, marginTop: 6 }}>${cfg.label}</text>
             </rect>
             <rect style={{ fill: ${color}, width: ${width}, cursor: 'pointer', height: 2, x: 0, y: 32 }} />
           </group>
diff --git a/src/tabviews/zshare/fileupload/index.jsx b/src/tabviews/zshare/fileupload/index.jsx
index 54d9727..cb0be7b 100644
--- a/src/tabviews/zshare/fileupload/index.jsx
+++ b/src/tabviews/zshare/fileupload/index.jsx
@@ -24,6 +24,7 @@
     compress: 'false',
     fileType: 'text',
     showprogress: false,
+    maxSize: 0,
     filelist: []
   }
 
@@ -89,6 +90,7 @@
       filelist,
       compress,
       limit: config.limit || 2,
+      maxSize: config.maxSize || 0,
       maxFile: maxFile,
       fileType: config.fileType || 'text'
     })
@@ -218,7 +220,7 @@
   }
 
   beforeUpload = (file) => {
-    const { accepts, compress, limit, rduri } = this.state
+    const { accepts, compress, limit, rduri, maxSize } = this.state
 
     if (accepts && file.name) {
       let pass = false
@@ -235,6 +237,16 @@
         return false
       }
     }
+    if (maxSize) {
+      let fileSize = file.size / 1024 / 1024
+
+      if (fileSize > maxSize) {
+        setTimeout(() => {
+          this.onFail(`鏂囦欢澶у皬涓嶅彲瓒呰繃${maxSize}M`)
+        }, 10)
+        return false
+      }
+    }
 
     this.setState({
       showprogress: true,
diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx
index ff02ae6..0195364 100644
--- a/src/templates/zshare/formconfig.jsx
+++ b/src/templates/zshare/formconfig.jsx
@@ -3561,6 +3561,17 @@
     },
     {
       type: 'number',
+      key: 'maxSize',
+      min: 0.01,
+      max: 1024,
+      precision: 2,
+      label: '鏈�澶у�硷紙M锛�',
+      initVal: card.maxSize,
+      tooltip: '鏂囦欢鏈�澶у�硷紝瓒呭嚭鏃朵笉鍏佽涓婁紶锛屽�间负绌烘椂涓嶉檺鍒躲��',
+      required: false
+    },
+    {
+      type: 'number',
       key: 'span',
       min: 1,
       max: 24,
diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx
index 2b1a8e2..0865361 100644
--- a/src/templates/zshare/modalform/index.jsx
+++ b/src/templates/zshare/modalform/index.jsx
@@ -27,7 +27,7 @@
   checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'],
   multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'dropdown'],
   link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'],
-  fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom'],
+  fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom', 'maxSize'],
   switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'],
   date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'],
   datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'],

--
Gitblit v1.8.0