From 5df578ff69f6b02e821d59a8883bc75d78695a62 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 十一月 2020 11:07:31 +0800 Subject: [PATCH] 2020-11-10 --- src/templates/sharecomponent/actioncomponent/index.jsx | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 53 insertions(+), 4 deletions(-) diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx index 1c9d9bc..9d03aa8 100644 --- a/src/templates/sharecomponent/actioncomponent/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/index.jsx @@ -43,6 +43,7 @@ actionlist: null, // 鎸夐挳缁� copying: false, // 鎸夐挳澶嶅埗涓� visible: false, // 妯℃�佹鎺у埗 + printTemps: [], // 鍗曟嵁鎵撳嵃妯℃澘 profVisible: false // 楠岃瘉淇℃伅妯℃�佹 } @@ -67,6 +68,54 @@ } else if (!is(fromJS(nextProps.config.action), fromJS(this.props.config.action)) && !is(fromJS(nextProps.config.action), fromJS(actionlist))) { this.setState({actionlist: fromJS(nextProps.config.action).toJS()}) } + } + + componentDidMount () { + this.getBillPrintTemp() + } + + getBillPrintTemp = () => { + let _sql = `select PrintTempNO,Images,PrintTempNO+PrintTempName as PN from sPrintTemplate + where appkey= @appkey@ and Deleted=0 and typechartwo='web_print' + union select ID,Images,a.PrintTempNO+PrintTempName as PN + from (select * from sPrintTemplate where appkey= '' and Deleted=0 and typechartwo='web_print') a + left join (select PrintTempNO from sPrintTemplate where appkey= @appkey@ and Deleted=0 ) b + on a.PrintTempNO=b.PrintTempNO + left join (select Srcid from sPrintTemplate_Log where appkey='' and apicode= @appkey@ and Deleted=0 ) c + on a.ID=c.Srcid where b.PrintTempNO is null and c.Srcid is null` + + let param = { + func: 'sPC_Get_SelectedList', + LText: Utils.formatOptions(_sql), + obj_name: 'data', + arr_field: 'PN,PrintTempNO,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.getSystemConfig(param).then(res => { + if (res.status) { + let temps = res.data.map(temp => { + return { + value: temp.PrintTempNO, + text: temp.PN + } + }) + + this.setState({ + printTemps: temps + }) + } else { + notification.warning({ + top: 92, + message: res.message, + duration: 5 + }) + } + }) } /** @@ -154,14 +203,14 @@ this.setState({ visible: true, card: card, - formlist: getActionForm(card, functip, this.props.config, this.props.usefulFields, this.props.type, menulist) + formlist: getActionForm(card, functip, this.props.config, this.props.usefulFields, this.props.type, menulist, this.state.printTemps) }) }) } else { this.setState({ visible: true, card: card, - formlist: getActionForm(card, functip, this.props.config, this.props.usefulFields, this.props.type, menulist) + formlist: getActionForm(card, functip, this.props.config, this.props.usefulFields, this.props.type, menulist, this.state.printTemps) }) } } @@ -400,7 +449,7 @@ Align: 'center', IsSort: 'false', uuid: Utils.getuuid(), - label: this.state.dict['model.form.column.action'], + label: this.state.dict['model.operation'], type: 'action', style: 'button', show: 'horizontal', @@ -621,7 +670,7 @@ Align: 'center', IsSort: 'false', uuid: Utils.getuuid(), - label: this.state.dict['model.form.column.action'], + label: this.state.dict['model.operation'], type: 'action', style: 'button', show: 'horizontal', -- Gitblit v1.8.0