|
@@ -95,6 +95,7 @@ const DiurnalStatisticsOne = React.createClass({
|
|
|
}
|
|
|
this.loadData(timeTypes,thedata);
|
|
|
this.selectSuperId();
|
|
|
+ this.selectSuperIdS();
|
|
|
}.bind(this),
|
|
|
}).always(function() {
|
|
|
this.setState({
|
|
@@ -113,7 +114,7 @@ const DiurnalStatisticsOne = React.createClass({
|
|
|
selectSuperId() {
|
|
|
this.state.data = []
|
|
|
$.ajax({
|
|
|
- method: "post",
|
|
|
+ method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
url: globalConfig.context + "/api/admin/organization/selectSuperId",
|
|
@@ -154,6 +155,52 @@ const DiurnalStatisticsOne = React.createClass({
|
|
|
});
|
|
|
}.bind(this));
|
|
|
},
|
|
|
+ //获取上级组织
|
|
|
+ selectSuperIdS() {
|
|
|
+ this.state.data = []
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + "/api/admin/organization/selectSuperIdS",
|
|
|
+ data:{
|
|
|
+
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let theArr = [];
|
|
|
+ let theId=[];//用于保存上级组织的ID和名称
|
|
|
+ let thedata=data.data;
|
|
|
+ if (!thedata) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ thedata = {};
|
|
|
+ };
|
|
|
+ var contactIds=[];
|
|
|
+ for(var i=0;i<data.data.length;i++){
|
|
|
+ let theData = data.data[i];
|
|
|
+ theArr.push(
|
|
|
+ <Select.Option value={theData.id} key={theData.id}>{theData.name}</Select.Option>
|
|
|
+ );
|
|
|
+ theId.push(
|
|
|
+ [theData.id,theData.name]
|
|
|
+ );
|
|
|
+ };
|
|
|
+ console.log(theArr);
|
|
|
+ this.setState({
|
|
|
+ SuperArr:thedata,
|
|
|
+ //contactsOption: theArr,
|
|
|
+ theId: theId,
|
|
|
+ orderStatusOptions:data.data,
|
|
|
+ });
|
|
|
+
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
//判断浏览器类型
|
|
|
getExplorer() {
|
|
|
var explorer = window.navigator.userAgent;
|