wangxy 2 years ago
parent
commit
ac92bf49d7
5 changed files with 57 additions and 17 deletions
  1. +28
    -1
      src/store/productionPlanning/customerForecastDemandReview.js
  2. +5
    -3
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue
  3. +12
    -7
      src/views/productionPlanning/customerForecastDemandReview/index.vue
  4. +6
    -1
      src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/char.vue
  5. +6
    -5
      src/views/productionPlanning/customerForecastDemandReview/resourceContent/resourceLoad/index.vue

+ 28
- 1
src/store/productionPlanning/customerForecastDemandReview.js View File

@ -1,4 +1,4 @@
import { getStanderOne } from "@/server/api.js";
import { get, getStanderOne } from "@/server/api.js";
import { getMpsModeList } from "@/server/productionPlanning/customerForecastDemandReview"; import { getMpsModeList } from "@/server/productionPlanning/customerForecastDemandReview";
const customerForecastDemandReview = { const customerForecastDemandReview = {
@ -55,6 +55,10 @@ const customerForecastDemandReview = {
// 设置需求表格高度 // 设置需求表格高度
articleCharHeight: "100%", articleCharHeight: "100%",
//
transLabel:{},
transLabel1:{},
// 是否显示表单 // 是否显示表单
showChar: false, showChar: false,
@ -221,6 +225,19 @@ const customerForecastDemandReview = {
SET_publicButtonClass(state, payload) { SET_publicButtonClass(state, payload) {
state.publicButtonClass = payload state.publicButtonClass = payload
}, },
// 初始化最大覆盖期类型选项
SET_transLabel(state, payload) {
state.transLabel = payload
},
SET_transLabel1(state, payload) {
state.transLabel1 = payload
},
TOGGLE_showChar(state) { TOGGLE_showChar(state) {
state.showChar = !state.showChar 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规则选项 // 获得Mps规则选项
getMpsRuleOptions({ commit }) { getMpsRuleOptions({ commit }) {
commit('INIT_mpsRuleOptions') commit('INIT_mpsRuleOptions')


+ 5
- 3
src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue View File

@ -282,6 +282,7 @@ import Public from "./public";
"selectArticleDemandRow", "selectArticleDemandRow",
"editButtonClass", "editButtonClass",
"publicButtonClass", "publicButtonClass",
"transLabel"
]), ]),
calcWidth() { calcWidth() {
return function (index) { return function (index) {
@ -302,13 +303,14 @@ import Public from "./public";
if (item == "Label") { if (item == "Label") {
return "标签"; return "标签";
} else { } else {
if (index < 8) {
if (index < 7) {
return getColumnName(item); return getColumnName(item);
} else { } else {
if (item.charAt(item.length - 1) == "*") { if (item.charAt(item.length - 1) == "*") {
return item.substr(0, item.length - 1);
return this.transLabel[item.substr(0, item.length - 1)];
} else { } else {
return item;
return this.transLabel[item];
} }
} }
} }


+ 12
- 7
src/views/productionPlanning/customerForecastDemandReview/index.vue View File

@ -63,14 +63,14 @@
// //
import DemandPlanning from "./demandPlanning"; import DemandPlanning from "./demandPlanning";
// //
import ResourceContent from "./resourceContent";
import { mapMutations, mapState } from "vuex";
import { mapActions, mapMutations, mapState } from "vuex";
import ResourceContent from "./resourceContent";
// api // api
import { import {
customertree,
getMainResourceList,
getSecondaryResourceList
} from "@/server/productionPlanning/customerForecastDemandReview";
customertree,
getMainResourceList,
getSecondaryResourceList
} from "@/server/productionPlanning/customerForecastDemandReview";
export default { export default {
components: { components: {
@ -99,7 +99,8 @@
filterCustomer: "", filterCustomer: "",
topWrapHeight: "calc(50% - 15px)", topWrapHeight: "calc(50% - 15px)",
bottomWrapHeight: "calc(50% - 5px)", bottomWrapHeight: "calc(50% - 5px)",
showBottomWrap: true
showBottomWrap: true,
}; };
}, },
created() { created() {
@ -107,6 +108,9 @@
// this.getCustomerTreeData(); // this.getCustomerTreeData();
// Tree // Tree
this.getResourceTreeData(); this.getResourceTreeData();
this.getTransLabel()
this.getTransLabel1()
}, },
mounted() { mounted() {
this.dragChangeSize((moveLen, bottomHeight) => { this.dragChangeSize((moveLen, bottomHeight) => {
@ -144,6 +148,7 @@
"RESET_articleChar", "RESET_articleChar",
"INIT_all" "INIT_all"
]), ]),
...mapActions("customerForecastDemandReview", ['getTransLabel','getTransLabel1']),
// //
// toggleBottom(){ // toggleBottom(){
// if(this.showBottomWrap = !this.showBottomWrap) { // if(this.showBottomWrap = !this.showBottomWrap) {


+ 6
- 1
src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/char.vue View File

@ -7,6 +7,7 @@
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import { mapState } from "vuex";
require("echarts/theme/macarons"); // echarts theme require("echarts/theme/macarons"); // echarts theme
const animationDuration = 1000 const animationDuration = 1000
export default { export default {
@ -37,6 +38,9 @@ export default {
customeLegend:"资源每周产能上限" customeLegend:"资源每周产能上限"
} }
}, },
computed: {
...mapState("customerForecastDemandReview",["transLabel"])
},
mounted () { mounted () {
this.clearData() this.clearData()
this.initData(this.DataList); this.initData(this.DataList);
@ -53,7 +57,8 @@ export default {
initData(DataList){ initData(DataList){
this.legendList.push(this.customeLegend) this.legendList.push(this.customeLegend)
DataList.forEach((item) => { DataList.forEach((item) => {
this.weeksList.push("WK" + item.DemandKey.slice(5));
// this.weeksList.push("WK" + item.DemandKey.slice(5));
this.weeksList.push(this.transLabel[item.DemandKey]);
this.resourceWorkTime.push(item["ResourceWorkTime"]); this.resourceWorkTime.push(item["ResourceWorkTime"]);
item["ArticleDemandLst"].forEach(article => { item["ArticleDemandLst"].forEach(article => {
if( this.legendList.indexOf(article['AP_ArticleDemand-ArtId']) == -1 ){ if( this.legendList.indexOf(article['AP_ArticleDemand-ArtId']) == -1 ){


+ 6
- 5
src/views/productionPlanning/customerForecastDemandReview/resourceContent/resourceLoad/index.vue View File

@ -7,7 +7,7 @@
<div class="versionTable"> <div class="versionTable">
<el-tabs tab-position="left" v-model="versionSelect" type="border-card"> <el-tabs tab-position="left" v-model="versionSelect" type="border-card">
<el-tab-pane disabled label="版本时间" ></el-tab-pane> <el-tab-pane disabled label="版本时间" ></el-tab-pane>
<el-tab-pane v-for="item in tabList" :key="item.label" :name="item.label" :label="item.label">
<el-tab-pane v-for="item in tabList" :key="item.label" :name="item.label" :label="transLabel1?.[item.label]||item.label">
<el-table <el-table
v-loading="versionLoading" v-loading="versionLoading"
:data="item.data" :data="item.data"
@ -108,10 +108,10 @@
</template> </template>
<script> <script>
import { getVersionList,getResourceCapacity,getCustomerDemand } from "@/server/productionPlanning/customerForecastDemandReview";
import pending from "@/assets/img/pending.png"
import published from "@/assets/img/published.png"
import { mapState,mapMutations } from 'vuex'
import pending from "@/assets/img/pending.png";
import published from "@/assets/img/published.png";
import { getCustomerDemand, getResourceCapacity, getVersionList } from "@/server/productionPlanning/customerForecastDemandReview";
import { mapMutations, mapState } from 'vuex';
export default { export default {
name : "resourceLoad", name : "resourceLoad",
@ -180,6 +180,7 @@ export default {
}, },
computed: { computed: {
...mapState("customerForecastDemandReview",[ ...mapState("customerForecastDemandReview",[
'transLabel1',
'resourceId', 'resourceId',
'resourceType', 'resourceType',
'isSelectResource', 'isSelectResource',


Loading…
Cancel
Save