diff --git a/src/store/productionPlanning/customerForecastDemandReview.js b/src/store/productionPlanning/customerForecastDemandReview.js index 3c8df8f..02fd364 100644 --- a/src/store/productionPlanning/customerForecastDemandReview.js +++ b/src/store/productionPlanning/customerForecastDemandReview.js @@ -1,4 +1,4 @@ -import { getStanderOne } from "@/server/api.js"; +import { get, getStanderOne } from "@/server/api.js"; import { getMpsModeList } from "@/server/productionPlanning/customerForecastDemandReview"; const customerForecastDemandReview = { @@ -55,6 +55,10 @@ const customerForecastDemandReview = { // 设置需求表格高度 articleCharHeight: "100%", + // + transLabel:{}, + + transLabel1:{}, // 是否显示表单 showChar: false, @@ -221,6 +225,19 @@ const customerForecastDemandReview = { SET_publicButtonClass(state, payload) { state.publicButtonClass = payload }, + + // 初始化最大覆盖期类型选项 + SET_transLabel(state, payload) { + + state.transLabel = payload + }, + + SET_transLabel1(state, payload) { + + state.transLabel1 = payload + }, + + TOGGLE_showChar(state) { state.showChar = !state.showChar }, @@ -257,6 +274,16 @@ const customerForecastDemandReview = { }) }); }, + getTransLabel({ commit }) { + get('/user/week_to_date_mps').then(({data})=>{ + commit('SET_transLabel', data || {}) + }) + }, + getTransLabel1({ commit }) { + get('/user/week_to_date').then(({data})=>{ + commit('SET_transLabel1', data || {}) + }) + }, // 获得Mps规则选项 getMpsRuleOptions({ commit }) { commit('INIT_mpsRuleOptions') diff --git a/src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue b/src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue index c2d3f8e..da280c4 100644 --- a/src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue +++ b/src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue @@ -282,6 +282,7 @@ import Public from "./public"; "selectArticleDemandRow", "editButtonClass", "publicButtonClass", + "transLabel" ]), calcWidth() { return function (index) { @@ -302,13 +303,14 @@ import Public from "./public"; if (item == "Label") { return "标签"; } else { - if (index < 8) { + if (index < 7) { return getColumnName(item); } else { if (item.charAt(item.length - 1) == "*") { - return item.substr(0, item.length - 1); + return this.transLabel[item.substr(0, item.length - 1)]; } else { - return item; + + return this.transLabel[item]; } } } diff --git a/src/views/productionPlanning/customerForecastDemandReview/index.vue b/src/views/productionPlanning/customerForecastDemandReview/index.vue index 55d26b4..79fc94f 100644 --- a/src/views/productionPlanning/customerForecastDemandReview/index.vue +++ b/src/views/productionPlanning/customerForecastDemandReview/index.vue @@ -63,14 +63,14 @@ // 需求计划 import DemandPlanning from "./demandPlanning"; // 资源内容 - import ResourceContent from "./resourceContent"; - import { mapMutations, mapState } from "vuex"; + import { mapActions, mapMutations, mapState } from "vuex"; +import ResourceContent from "./resourceContent"; // api import { - customertree, - getMainResourceList, - getSecondaryResourceList - } from "@/server/productionPlanning/customerForecastDemandReview"; +customertree, +getMainResourceList, +getSecondaryResourceList +} from "@/server/productionPlanning/customerForecastDemandReview"; export default { components: { @@ -99,7 +99,8 @@ filterCustomer: "", topWrapHeight: "calc(50% - 15px)", bottomWrapHeight: "calc(50% - 5px)", - showBottomWrap: true + showBottomWrap: true, + }; }, created() { @@ -107,6 +108,9 @@ // this.getCustomerTreeData(); // 获取资源Tree数据 this.getResourceTreeData(); + + this.getTransLabel() + this.getTransLabel1() }, mounted() { this.dragChangeSize((moveLen, bottomHeight) => { @@ -144,6 +148,7 @@ "RESET_articleChar", "INIT_all" ]), + ...mapActions("customerForecastDemandReview", ['getTransLabel','getTransLabel1']), // // toggleBottom(){ // if(this.showBottomWrap = !this.showBottomWrap) { diff --git a/src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/char.vue b/src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/char.vue index 4f109a5..f93b636 100644 --- a/src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/char.vue +++ b/src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/char.vue @@ -7,6 +7,7 @@