|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
|
import style from './index.less';
|
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
|
import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin,whichTemp,floderSlide,floderAction,folderModal,clearSearchTemplateNorms } from '@store/actions/tabTemplate';
|
|
|
-import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder } from '@store/async-actions/tabTemplate';
|
|
|
+import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder,addTemplateQuote } from '@store/async-actions/tabTemplate';
|
|
|
import { connect } from "react-redux";
|
|
|
import store from '@store';
|
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
@@ -53,7 +53,8 @@ class PushContainer extends Component {
|
|
|
folderId:'',
|
|
|
spell:'',
|
|
|
fstName:'',
|
|
|
- tmpFolder:''
|
|
|
+ tmpFolder:'',
|
|
|
+ hasCalcIndex: false
|
|
|
}
|
|
|
this.$cont = React.createRef();
|
|
|
this.itemList = null;
|
|
@@ -104,7 +105,7 @@ class PushContainer extends Component {
|
|
|
* 引用模板id
|
|
|
* @param {模板id} id
|
|
|
*/
|
|
|
- handleContentClick(id, sex) {
|
|
|
+ handleContentClick(id, sex,hasCalcIndex) {
|
|
|
let baseSex = store.getState().patInfo.message.sex
|
|
|
this.setState({
|
|
|
message: this.content(sex, baseSex),
|
|
@@ -113,11 +114,15 @@ class PushContainer extends Component {
|
|
|
okText: '引用',
|
|
|
okBorderColor: '#3B9ED0',
|
|
|
okColor: '#fff',
|
|
|
- oKBg: '#3B9ED0'
|
|
|
+ oKBg: '#3B9ED0',
|
|
|
}, () => {
|
|
|
store.dispatch(changeVisible(true))
|
|
|
})
|
|
|
+ this.setState({
|
|
|
+ hasCalcIndex: hasCalcIndex
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
content(sex, baseSex) {
|
|
|
if (sex != 3 && sex != baseSex) {
|
|
|
return <p className={style['center']}>确认引用该模板?<p style={{ fontSize: '12px', color: '#6b6969', marginTop: '10px' }}>引用该模版可能显示有误</p></p>
|
|
@@ -399,6 +404,13 @@ class PushContainer extends Component {
|
|
|
store.dispatch(setPageViewAdmin(id))
|
|
|
}else{
|
|
|
store.dispatch(setPageView(id))
|
|
|
+ const hasCalcIndex = this.state.hasCalcIndex
|
|
|
+ if(hasCalcIndex) {
|
|
|
+ store.dispatch(addTemplateQuote(id))
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ hasCalcIndex: false
|
|
|
+ })
|
|
|
}
|
|
|
store.dispatch(changeVisible(false))
|
|
|
} else if(type == 6) { //删除文件夹
|
|
@@ -413,6 +425,9 @@ class PushContainer extends Component {
|
|
|
}
|
|
|
handleClose() {
|
|
|
store.dispatch(changeVisible(false));
|
|
|
+ this.setState({
|
|
|
+ hasCalcIndex: false
|
|
|
+ })
|
|
|
}
|
|
|
whichTemp(tab){
|
|
|
store.dispatch(whichTemp(tab))
|