From 547e5fe219ee7bee309ecd67db74bc8df66b5433 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 23 八月 2023 11:47:45 +0800
Subject: [PATCH] 2023-08-23

---
 src/templates/zshare/verifycard/baseform/index.jsx |   58 ++++------------------------------------------------------
 1 files changed, 4 insertions(+), 54 deletions(-)

diff --git a/src/templates/zshare/verifycard/baseform/index.jsx b/src/templates/zshare/verifycard/baseform/index.jsx
index b5d04f2..611e4ef 100644
--- a/src/templates/zshare/verifycard/baseform/index.jsx
+++ b/src/templates/zshare/verifycard/baseform/index.jsx
@@ -3,11 +3,9 @@
 import { fromJS } from 'immutable'
 import { Form, Row, Col, Select, Radio, Tooltip, Input, notification } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
-import moment from 'moment'
 
 import Api from '@/api'
-import Utils from '@/utils/utils.js'
-import { queryPrintSql } from '@/utils/option.js'
+import MkPrintTemps from '@/menu/components/share/actioncomponent/actionform/mkPrintTemps'
 import './index.scss'
 
 const sysTempsIds = ['8IFltwzyKcu15iA8fqSyb6m-pMa88a3ZTu0No3vDHgo', 'LOB-bbt9jVncGh7IOAUdESh1Sgzcbt62UwOqSqcK9ok']
@@ -25,8 +23,7 @@
   state = {
     wxTemps: [],
     selectTemp: null,
-    miniTemps: [],
-    printTemps: []
+    miniTemps: []
   }
 
   componentDidMount() {
@@ -80,47 +77,6 @@
       wxTemps = JSON.parse(wxTemps)
 
       this.resetTemps(wxTemps)
-    }
-
-    this.checkPrintTemp()
-  }
-
-  checkPrintTemp = () => {
-    if (!window.GLOB.printTemps) {
-      let param = {
-        func: 'sPC_Get_SelectedList',
-        LText: Utils.formatOptions(queryPrintSql),
-        obj_name: 'data',
-        arr_field: 'PN,ID,Images'
-      }
-  
-      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      param.secretkey = Utils.encrypt(param.LText, param.timestamp)
-  
-      param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 浜戠鏁版嵁楠岃瘉
-  
-      Api.getCloudConfig(param).then(res => {
-        if (!res.status) {
-          notification.warning({
-            top: 92,
-            message: res.message,
-            duration: 5
-          })
-        }
-
-        let temps = (res.data || []).map(temp => {
-          return {
-            value: temp.ID,
-            text: temp.PN
-          }
-        })
-
-        window.GLOB.printTemps = temps
-        
-        this.setState({printTemps: temps})
-      })
-    } else {
-      this.setState({printTemps: window.GLOB.printTemps || []})
     }
   }
 
@@ -324,7 +280,7 @@
 
   render() {
     const { unionFields, verify, notes, card, appType } = this.props
-    const { wxTemps, selectTemp, printTemps } = this.state
+    const { wxTemps, selectTemp } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -467,13 +423,7 @@
           </Col> : null}
           {verify.printEnable === 'true' ? <Col span={8}>
             <Form.Item label="鎵撳嵃妯℃澘" required>
-              <Select value={verify.printTempId} onSelect={this.onPrintIdChange}>
-                {printTemps.map(option =>
-                  <Select.Option key={option.value} value={option.value}>
-                    {option.text}
-                  </Select.Option>
-                )}
-              </Select>
+              <MkPrintTemps value={verify.printTempId} onChange={this.onPrintIdChange}/>
             </Form.Item>
           </Col> : null}
           <Col span={24}></Col>

--
Gitblit v1.8.0