+ hasRight &&
this.handleMenuClick(key)}
@@ -438,6 +438,6 @@ export default class RankScheme extends React.Component {
onCancel={() => rankScheme.setVisible(false)}
/>
- )
+ )
}
}
\ No newline at end of file
diff --git a/pc4mobx/organization/index.js b/pc4mobx/organization/index.js
index e73f6ed..7b49088 100644
--- a/pc4mobx/organization/index.js
+++ b/pc4mobx/organization/index.js
@@ -32,7 +32,8 @@ import ResourceBasicInfo from "./components/resource/ResourceBasicInfo";
import ResourceCard from "./components/resource/ResourceCard";
import ManagerDetach from "./components/detach/ManagerDetach";
import ColumnSetting from "./components/columnSetting";
-import PersonnelResume from "./components/resource/PersonnelResume"
+import PersonnelResume from "./components/resource/PersonnelResume";
+import QuickSearch from "./components/fieldDefinedSet/QuickSearch";
import stores from "./stores";
import "./style/index";
@@ -98,7 +99,7 @@ const Routes = (
-
+
);
diff --git a/pc4mobx/organization/stores/index.js b/pc4mobx/organization/stores/index.js
index e0d8271..da356c6 100644
--- a/pc4mobx/organization/stores/index.js
+++ b/pc4mobx/organization/stores/index.js
@@ -26,7 +26,8 @@ import {ImportDialogStore} from "./importDialog";
import {ResourceCardStore} from "./resourceCard";
import {ManagerDetachStore} from "./managerDetach";
import {ColumnSetting} from './columnSetting';
-import {PersonnelResumeStore} from './personnelResume'
+import {PersonnelResumeStore} from './personnelResume';
+import { QuickSearchStore } from "./quickSearch";
module.exports = {
@@ -58,5 +59,6 @@ module.exports = {
resourceCard:new ResourceCardStore(),
managerDetach: new ManagerDetachStore(),
columnSetting: new ColumnSetting(),
- personnelResume:new PersonnelResumeStore()
+ personnelResume:new PersonnelResumeStore(),
+ quickSearch:new QuickSearchStore()
};
diff --git a/pc4mobx/organization/stores/quickSearch.js b/pc4mobx/organization/stores/quickSearch.js
new file mode 100644
index 0000000..8fccec9
--- /dev/null
+++ b/pc4mobx/organization/stores/quickSearch.js
@@ -0,0 +1,175 @@
+import {
+ observable,
+ action
+} from 'mobx';
+import * as mobx from 'mobx';
+import * as API from '../apis/quickSearch';
+import {
+ WeaForm
+} from 'comsMobx';
+import {
+ Modal,
+ message,
+} from 'antd'
+import {
+ i18n
+} from '../public/i18n';
+import { WeaLocaleProvider } from 'ecCom';
+
+const toJS = mobx.toJS;
+const getLabel = WeaLocaleProvider.getLabel;
+
+
+export class QuickSearchStore {
+
+ @observable quickSearchForm = new WeaForm();
+ @observable qcSelectedRowKeys = [];
+ @observable quickSearchData = {
+ datas: [],//表格记录record
+ setting: {},
+ options: [],
+ };
+ @observable quickSearchDetailVisable = false;
+ @observable qcData = { qcType: '', cid: '', fieldid: '' };//快速查询明细type
+ @observable quickSearchDetailData = [];
+ @observable precision = 0;
+
+ /**** ==============quickSearchForm ===============*/
+ @observable quickSearchFields = [
+ {
+ domkey: ['isquicksearch'],
+ conditionType: 'SWITCH',
+ label: getLabel('387493', "快捷搜索条件"),
+ labelcol: 5,
+ fieldcol: 19,
+ viewAttr: 3,
+ }
+ ]
+
+
+ @action("初始化页面") initList = () => {
+ this.quickSearchForm.initFormFields([{ items: this.quickSearchFields.slice() }]);
+ this.getQuickSearchInfo();
+ }
+
+ @action clearQuciSearchData = () => {
+ this.quickSearchData.setting = {};
+ this.quickSearchData.datas = [];
+ this.quickSearchData.options = [];
+ }
+
+ @action("数据获取") getQuickSearchInfo = () => {
+ this.clearQuciSearchData();
+ API.getQuickSearchInfo({ customid: 382 }).then(action(({ status, errorCode, error, setting, datas, options, groupidOptions }) => {
+ if (status == '1') {
+ this.quickSearchData.setting = setting;
+ this.quickSearchData.datas = datas.map(d => {
+ return { ...d, visible: false }
+ });
+ this.quickSearchData.groupidOptions = groupidOptions;
+ this.quickSearchData.options = options;
+ this.quickSearchForm.updateFields({
+ isquicksearch: setting.isquicksearch,
+ });
+ } else {
+ message.error(`[${getLabel(127353, "错误") + errorCode}]:${error}`);
+ }
+ }));
+ }
+
+
+
+ @action("保存页面") saveQuickSearchInfo = (params) => {
+ // let datas = this.quickSearchData.datas;
+ // datas.map((data, index) => {
+ // data.orderid = index
+ // });
+
+ // let formparm = this.quickSearchForm.getFormParams();
+ // if (!this.checkQuickSearchData()) {
+ // message.error(getLabel('387954', "条件字段不能重复"));
+ // return;
+ // }
+ // let id = this.quickSearchData.setting.id;
+ // if (id == null) {
+ // return;
+ // }
+ // if (params) {
+ // formparm = params;
+ // }
+ // API.saveQuickSearchInfo({
+ // id: id,
+ // customid: this.customid,
+ // data: JSON.stringify(datas), ...formparm
+ // }).then(({ status, errorCode, error, setting, datas, options }: any) => {
+ // if (status == '1') {
+ // message.success(getLabel(83551, '保存成功!'));
+ // this.qcSelectedRowKeys = [];
+ // this.getQuickSearchInfo();
+ // } else {
+ // message.error(`[${getLabel(127353, "错误") + errorCode}]:${error}`);
+ // }
+ // });
+ // this.quickSearchData.setting.id = null;
+ }
+
+
+
+ @action setQuickSearchData = (datas) => {
+ this.quickSearchData.datas = datas;
+ }
+
+
+ /**============================quickdetail===================== */
+ @action("设置") openQuickSearchDetail = (record) => {
+ this.quickSearchDetailVisable = true;
+ this.qcData.qcType = record.type;
+ this.qcData.cid = record.cid;
+ this.qcData.fieldid = record.fieldid;
+ this.getQuickSearchDetailInfo(record.cid);
+ }
+
+ @action getQuickSearchDetailInfo = (cid) => {
+ API.getQuickSearchDetailInfo({ cid: cid }).then(({ status, errorCode, error, setting, datas, precision }) => {
+ if (status == '1') {
+ this.quickSearchDetailData = datas;
+ this.precision = precision;
+ } else {
+ message.error(`[${getLabel(127353, "错误") + errorCode}]:${error}`);
+ }
+ });
+ }
+
+
+
+ /**===========================buttons=========================== */
+ rightMenu = [
+ {
+ "isBatch": "0",
+ "isTop": "1",
+ "menuFun": "save",
+ "menuIcon": "icon-coms-Preservation",
+ "menuName": "保存",
+ "type": "BTN_save"
+ },
+ // {
+ // "isBatch": "0",
+ // "isTop": "0",
+ // "menuFun": "log",
+ // "menuIcon": "icon-coms-Print-log",
+ // "menuName": "日志",
+ // "type": "BTN_log"
+ // }
+ ];
+ topMenu = [
+ {
+ "isBatch": "1",
+ "isTop": "1",
+ "menuFun": "save",
+ "menuIcon": "icon-coms-Preservation",
+ "menuName": "保存",
+ "type": "BTN_save"
+ }
+ ]
+
+}
\ No newline at end of file