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";
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')


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

@ -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];
}
}
}


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

@ -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) {


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

@ -7,6 +7,7 @@
<script>
import * as echarts from "echarts";
import { mapState } from "vuex";
require("echarts/theme/macarons"); // echarts theme
const animationDuration = 1000
export default {
@ -37,6 +38,9 @@ export default {
customeLegend:"资源每周产能上限"
}
},
computed: {
...mapState("customerForecastDemandReview",["transLabel"])
},
mounted () {
this.clearData()
this.initData(this.DataList);
@ -53,7 +57,8 @@ export default {
initData(DataList){
this.legendList.push(this.customeLegend)
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"]);
item["ArticleDemandLst"].forEach(article => {
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">
<el-tabs tab-position="left" v-model="versionSelect" type="border-card">
<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
v-loading="versionLoading"
:data="item.data"
@ -108,10 +108,10 @@
</template>
<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 {
name : "resourceLoad",
@ -180,6 +180,7 @@ export default {
},
computed: {
...mapState("customerForecastDemandReview",[
'transLabel1',
'resourceId',
'resourceType',
'isSelectResource',


Loading…
Cancel
Save