You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.3 KiB
JavaScript
62 lines
2.3 KiB
JavaScript
3 years ago
|
import { makeAutoObservable, runInAction } from "mobx";
|
||
|
import * as dd from "dingtalk-jsapi";
|
||
|
import * as config from "../config";
|
||
|
import * as comm from "../utils/commons";
|
||
|
|
||
|
//销售数据
|
||
|
class SaleStore {
|
||
|
constructor(rootStore) {
|
||
|
this.rootStore = rootStore;
|
||
|
makeAutoObservable(this);
|
||
|
}
|
||
|
|
||
|
loading = false;
|
||
|
active_tab_key = "overview"; //当前选择的标签
|
||
|
group_select_mode = false;
|
||
|
date_type = "applyDate";
|
||
|
groups = ["1,2,28,7"];
|
||
|
date_title='date_title';//日期段,只用于显示,防止日期选择控件的变化导致页面刷新
|
||
|
|
||
|
//选择事业部
|
||
|
group_handleChange(value) {
|
||
|
this.groups = value;
|
||
|
}
|
||
|
|
||
|
//切换标签页
|
||
|
onChange_Tabs(active_key) {
|
||
|
this.active_tab_key = active_key;
|
||
|
//this.getOrderCountByType_sub(ordertype, ordertype_sub, this.active_tab_key_sub);
|
||
|
}
|
||
|
|
||
|
//下单日期或者出发日期
|
||
|
onChange_datetype(e) {
|
||
|
this.date_type = e.target.value;
|
||
|
}
|
||
|
|
||
|
//获取业绩信息
|
||
|
getxxxxx(ordertype, ordertype_sub) {
|
||
|
// this.loading = true;
|
||
|
// const date_picker_store = this.rootStore.date_picker_store;
|
||
|
// let url = '/service-web/QueryData/GetOrderCount'
|
||
|
// url += `?OrderType=${ordertype}&OrderType_val=${ordertype_sub}`;
|
||
|
// url += '&WebCode=' + this.webcode + '&COLI_ApplyDate1=' + date_picker_store.start_date.format(config.DATE_FORMAT) + '&COLI_ApplyDate2=' + date_picker_store.end_date.format(config.DATE_FORMAT) + '%2023:59:59';
|
||
|
// if (date_picker_store.start_date_cp && date_picker_store.end_date_cp) {
|
||
|
// url += '&COLI_ApplyDateold1=' + date_picker_store.start_date_cp.format(config.DATE_FORMAT) + '&COLI_ApplyDateold2=' + date_picker_store.end_date_cp.format(config.DATE_FORMAT) + '%2023:59:59';
|
||
|
// }
|
||
|
// fetch(config.HT_HOST + url)
|
||
|
// .then((response) => response.json())
|
||
|
// .then((json) => {
|
||
|
// runInAction(() => {
|
||
|
// this.orderCountData_type = this.format_data_source(json, date_picker_store.start_date, date_picker_store.start_date_cp);
|
||
|
// this.loading = false;
|
||
|
// })
|
||
|
// })
|
||
|
// .catch((error) => {
|
||
|
// this.loading = false;
|
||
|
// console.log('fetch data failed', error);
|
||
|
// });
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default SaleStore;
|