14 Commits

29 changed files with 364 additions and 132 deletions
Split View
  1. +2
    -2
      src/components/Pagination/index.vue
  2. +36
    -3
      src/components/queryComponent/index.vue
  3. +1
    -1
      src/mixins/ListMixin.js
  4. +1
    -1
      src/mixins/newListMixin.js
  5. +28
    -1
      src/store/productionPlanning/customerForecastDemandReview.js
  6. +2
    -2
      src/views/factoryModel/part/BOMConfiguration/index.vue
  7. +1
    -1
      src/views/factoryModel/part/material/BOMConfigure.vue
  8. +2
    -1
      src/views/plan/workbench/homePage/beta/index.vue
  9. +8
    -5
      src/views/plan/workbench/homePage/beta/predict/index.vue
  10. +13
    -3
      src/views/plan/workbench/homePage/beta/predict/predictEdit.vue
  11. +13
    -5
      src/views/plan/workbench/homePage/formal/analysis/commonLineChart.vue
  12. +3
    -3
      src/views/plan/workbench/homePage/formal/analysis/index.vue
  13. +13
    -5
      src/views/plan/workbench/homePage/formal/analysis/lineBarChart.vue
  14. +3
    -2
      src/views/plan/workbench/homePage/formal/index.vue
  15. +3
    -3
      src/views/plan/workbench/homePage/formal/versions/index.vue
  16. +12
    -3
      src/views/plan/workbench/homePage/index.vue
  17. +48
    -8
      src/views/plan/workbench/materialAnalysis/chart/commonLineChart.vue
  18. +15
    -13
      src/views/plan/workbench/materialAnalysis/chart/index.vue
  19. +56
    -16
      src/views/plan/workbench/materialAnalysis/chart/lineBarChart.vue
  20. +2
    -2
      src/views/plan/workbench/materialAnalysis/filter/index.vue
  21. +10
    -1
      src/views/plan/workbench/materialAnalysis/index.vue
  22. +5
    -5
      src/views/plan/workbench/materialAnalysis/version/index.vue
  23. +19
    -3
      src/views/plan/workbench/predictVersion/index.vue
  24. +18
    -4
      src/views/plan/workbench/predictionDeviation/index.vue
  25. +21
    -22
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue
  26. +3
    -2
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/index.vue
  27. +12
    -7
      src/views/productionPlanning/customerForecastDemandReview/index.vue
  28. +8
    -3
      src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/char.vue
  29. +6
    -5
      src/views/productionPlanning/customerForecastDemandReview/resourceContent/resourceLoad/index.vue

+ 2
- 2
src/components/Pagination/index.vue View File

@ -23,9 +23,9 @@ export default {
// eslint-disable-next-line vue/require-valid-default-prop
default: {
pageNumber: 1,
pageSize: 10,
pageSize: 100,
total: 0,
pageSizes:[10, 20, 30, 50]
pageSizes:[10, 20, 30, 50, 100]
},
},
},


+ 36
- 3
src/components/queryComponent/index.vue View File

@ -30,13 +30,27 @@
<el-radio v-model="status" label="0">未发布</el-radio>
<el-radio v-model="status" label="1">已发布</el-radio>
</div>
<el-input
<!-- <el-input
v-if="isShowAddButton"
v-model="VersionID"
placeholder="检索条件:版本号"
clearable
style="width: 300px;margin-bottom:10px;"
/>
/> -->
<el-select
v-if="isShowAddButton"
style="width: 300px;margin-bottom:10px;"
v-model="VersionID"
filterable
placeholder="请选择版本号"
>
<el-option
v-for="item in getSpecifiedVersion"
:key="item['AP_CustDemandVerHead-VersionId']"
:label="transLabelObj[item['AP_CustDemandVerHead-VersionId']]"
:value="item['AP_CustDemandVerHead-VersionId']"
/>
</el-select>
<el-input
v-model="SearchId"
:placeholder="isShowAddButton ? '检索条件:零件号' : '检索条件:零件号/版本号'"
@ -81,7 +95,7 @@
</template>
<script>
import { put, post } from "@/server/api.js";
import { get, put, post } from "@/server/api.js";
// isShowAddButton:
import uploadTemplate from "./upload.vue";
import { ElMessage } from 'element-plus'
@ -103,9 +117,28 @@ export default {
valid: undefined,
status: undefined,
isShowDialog: '',
getSpecifiedVersion: [],
transLabelObj: {},
}
},
created() {
this.getTransLabel()
this.getVersionOfCustom()
},
methods: {
getTransLabel() {
get('/user/week_to_date').then(({data})=>{
this.transLabelObj = data || {}
})
},
//
getVersionOfCustom() {
get(`/admin/ap/custdemandverhead/selectuinquelist`).then(({ code, data }) => {
if (code === 200) {
this.getSpecifiedVersion = data
}
})
},
//
batchHandle() {
if (this.batchImport.length === 0) {


+ 1
- 1
src/mixins/ListMixin.js View File

@ -7,7 +7,7 @@ export const ListMixin = {
pagination: {
// 分页参数
pageNumber: 1,
pageSize: 10,
pageSize: 100,
total: 0,
},
queryParams: {},


+ 1
- 1
src/mixins/newListMixin.js View File

@ -7,7 +7,7 @@ export const ListMixin = {
pagination: {
// 分页参数
pageNumber: 1,
pageSize: 10,
pageSize: 100,
total: 0,
},
queryParams: {},


+ 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')


+ 2
- 2
src/views/factoryModel/part/BOMConfiguration/index.vue View File

@ -9,8 +9,8 @@
size="mini"
style="width: 100%"
:height="bomHeight"
row-key="ArtCheckRule-AttriCode"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
row-key="ME_BomLst-CmatNr"
:tree-props="{ children: 'ME_BomLst-ItemLi', hasChildren: 'hasChildren' }"
>
<el-table-column
v-for="(item, index) in headers"


+ 1
- 1
src/views/factoryModel/part/material/BOMConfigure.vue View File

@ -257,7 +257,7 @@ export default {
}, //
treeData: [],
defaultProps: {
children: "children",
children: "ME_BomLst-ItemLi",
label: arg => `${arg['ME_BomLst-CmatNr']}/${arg['ME_BomLst-CmatName']}`
},
uomArray: [], // uom


+ 2
- 1
src/views/plan/workbench/homePage/beta/index.vue View File

@ -7,6 +7,7 @@
:CreateModel="CreateModel"
:isShowComponent="isShowComponent"
:tableHeight="tableHeight"
:transLabelObj="transLabelObj"
@calculateTableHeight="calculateTableHeight" />
</el-tab-pane>
<!-- <el-tab-pane label="正式订单" name="second">
@ -28,7 +29,7 @@ export default {
Order,
Product
},
props: ["customerId", "CreateModel","tableHeight"],
props: ["customerId", "CreateModel","tableHeight","transLabelObj"],
data() {
return {
activeName: 'first',


+ 8
- 5
src/views/plan/workbench/homePage/beta/predict/index.vue View File

@ -29,7 +29,7 @@
:key="item"
:width="getRowWidth(item)"
:label="getColumnName(item)"
:show-overflow-tooltip="true"
>
<template #default="scope">
@ -42,13 +42,16 @@
<span v-else-if="item === 'AP_CustDemandVerHead-GlobalPublish'">{{
scope.row["AP_CustDemandVerHead-GlobalPublish"] == 1 ? "是" : "否"
}}</span>
<span v-else-if="item === 'AP_CustDemandVerHead-VersionId'">{{
transLabelObj[scope.row["AP_CustDemandVerHead-VersionId"]]
}}</span>
<span v-else-if="item === 'AP_CustDemandVerHead-Valid'">{{
scope.row["AP_CustDemandVerHead-Valid"] == true ? "当前使用" : ""
}}</span>
<span v-else>{{ scope.row[item] }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="350" fixed="right">
<el-table-column align="center" label="操作" width="270" fixed="right">
<template #default="scope">
<el-button
class="edit-button-style"
@ -73,13 +76,13 @@
size="small"
>修改</el-button
>
<el-button
<!-- <el-button
class="edit-button-style"
@click="handleCopy(scope.row)"
icon="el-icon-document-copy"
size="small"
>复制</el-button
>
> -->
</template>
</el-table-column>
</el-table>
@ -99,7 +102,7 @@ export default {
components: {
queryComponent,
},
props: ["customerId", "CreateModel", "isShowComponent", "tableHeight"],
props: ["customerId", "CreateModel", "isShowComponent", "tableHeight", "transLabelObj"],
data() {
return {
tableData: [],


+ 13
- 3
src/views/plan/workbench/homePage/beta/predict/predictEdit.vue View File

@ -10,7 +10,7 @@
</el-col>
<el-col :span="6">
<el-form-item :label="getColumnName('AP_CustDemandVerHead-VersionId')" prop="AP_CustDemandVerHead-VersionId">
<el-input v-model="formData['AP_CustDemandVerHead-VersionId']" :disabled="item.title === '修改'" placeholder="请输入" />
<el-input v-model="formData['AP_CustDemandVerHead-VersionIdName']" :disabled="item.title === '修改'" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="6" v-if="item.title !== '修改' && item.title !== '复制'">
@ -114,7 +114,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column v-for="(item1, index) in headers" :key="index" :label="item1" width="130">
<el-table-column v-for="(item1, index) in headers" :key="index" :label="transLabelObj[item1]" width="130">
<template #default="scope">
<el-input
v-model="scope.row.Item[item1]"
@ -201,9 +201,11 @@ export default {
startWeekArray: [],
orgListArray: [],
CustDemandVerDetail: {},
transLabelObj: {},
}
},
mounted() {
this.getTransLabel()
this.getCreateModeData()
this.getOrgListData()
if (this.item.title === '修改') {
@ -216,6 +218,11 @@ export default {
}
},
methods: {
getTransLabel() {
get('/user/week_to_date').then(({data})=>{
this.transLabelObj = data || {}
})
},
/** 新增属性 */
handleAddValst() {
this.formData['AP_CustDemandVerHead-CustomerItem'].push({
@ -285,7 +292,10 @@ export default {
.then(res => {
if (res.code === 200) {
let formNewData = res.data
this.formData = formNewData
this.formData = {
...formNewData,
"AP_CustDemandVerHead-VersionIdName": this.transLabelObj[res.data['AP_CustDemandVerHead-VersionId']]
}
this.CustDemandVerDetail = res.data['CustDemandVerDetail']
if (formNewData['AP_CustDemandVerHead-CustomerItem'].length > 0) {
this.headers = (formNewData['AP_CustDemandVerHead-CustomerItem'][0].SortKeys)


+ 13
- 5
src/views/plan/workbench/homePage/formal/analysis/commonLineChart.vue View File

@ -17,7 +17,11 @@ export default {
customerId: {
type: String,
default: ''
}
},
transLabelObj: {
type: Object,
default: {}
}
},
data() {
return {
@ -26,6 +30,7 @@ export default {
seriesArray: [],
maxValue: '',
minValue: '',
copyXDataArray: [],
}
},
watch: {
@ -40,18 +45,21 @@ export default {
this.xDataArray = []
this.seriesArray = []
if (newValue.length > 0) {
this.xDataArray = newValue[0].SortKeys || []
this.copyXDataArray = JSON.parse(JSON.stringify(newValue[0].SortKeys))
this.xDataArray = newValue[0].SortKeys.map(el => {
return this.transLabelObj[el]
})
this.maxValue = newValue[0].PeriodOnPeriodUpperLimit
this.minValue = newValue[0].PeriodOverPeriodLowerLimit
}
newValue.forEach(el => {
receivableArray = []
this.xDataArray.forEach(elChild => {
this.copyXDataArray.forEach(elChild => {
receivableArray.push(el.Item[elChild])
})
this.seriesArray.push({
type: 'line',
name:el.VersionId,
name: this.transLabelObj[el.VersionId] || el.VersionId,
data: receivableArray,
markLine: {
data: [
@ -140,7 +148,7 @@ export default {
data: this.xDataArray,
axisLabel: { //
interval: 0,
rotate:'80',//
rotate:'10',//
},
},
yAxis: {


+ 3
- 3
src/views/plan/workbench/homePage/formal/analysis/index.vue View File

@ -61,10 +61,10 @@
</el-col>
<el-col :span="allTheSingle === '2' ? 16 : 20" style="height: 100%;">
<div class="analysis-chart-wrapper">
<CommonLineChart :dataList="dataList.PerCustomerDeviationDetailItem|| []" />
<CommonLineChart :dataList="dataList.PerCustomerDeviationDetailItem|| []" :transLabelObj="transLabelObj" />
</div>
<div class="analysis-chart-wrapper" style="margin-top: 30px;">
<LineBarChart :dataList="dataList.CustomerDeviationDetailItem || []" />
<LineBarChart :dataList="dataList.CustomerDeviationDetailItem || []" :transLabelObj="transLabelObj" />
</div>
</el-col>
<!-- <el-col :span="allTheSingle === '2' ? 9 : 11">
@ -87,7 +87,7 @@ import LineBarChart from './lineBarChart'
import { mapState } from "vuex"
export default {
name: "analysis",
props: ["customerId", "tableHeight"],
props: ["customerId", "tableHeight", "transLabelObj"],
components: {
CommonLineChart,
LineBarChart


+ 13
- 5
src/views/plan/workbench/homePage/formal/analysis/lineBarChart.vue View File

@ -17,13 +17,18 @@ export default {
customerId: {
type: String,
default: ''
}
},
transLabelObj: {
type: Object,
default: {}
}
},
data() {
return {
// chart: null,
xDataArray: [],
seriesArray: [],
copyXDataArray: [],
}
},
watch: {
@ -38,16 +43,19 @@ export default {
this.xDataArray = []
this.seriesArray = []
if (newValue.length > 0) {
this.xDataArray = newValue[0].SortKeys
this.copyXDataArray = JSON.parse(JSON.stringify(newValue[0].SortKeys))
this.xDataArray = newValue[0].SortKeys.map(el => {
return this.transLabelObj[el]
})
}
newValue.forEach(el => {
receivableArray = []
this.xDataArray.forEach(elChild => {
this.copyXDataArray.forEach(elChild => {
receivableArray.push(el.Item[elChild])
})
this.seriesArray.push({
type: 'bar',
name:el.VersionId,
name: this.transLabelObj[el.VersionId] || el.VersionId,
data: receivableArray,
animationDuration
})
@ -122,7 +130,7 @@ export default {
data: this.xDataArray,
axisLabel: { //
interval: 0,
rotate:'80',//
rotate:'10',//
},
},
yAxis: {


+ 3
- 2
src/views/plan/workbench/homePage/formal/index.vue View File

@ -6,10 +6,11 @@
:customerId="customerId"
:isShowComponent="isShowComponent"
:tableHeight="tableHeight"
:transLabelObj="transLabelObj"
@calculateTableHeight="calculateTableHeight"/>
</el-tab-pane>
<el-tab-pane label="偏差分析" name="second">
<Analysis :customerId="customerId" :tableHeight="tableHeight"/>
<Analysis :customerId="customerId" :transLabelObj="transLabelObj" :tableHeight="tableHeight"/>
</el-tab-pane>
<el-tab-pane label="客户零件清单" name="third">
<Parts
@ -31,7 +32,7 @@ export default {
Analysis,
Parts
},
props: ["customerId","tableHeight"],
props: ["customerId","tableHeight","transLabelObj"],
data() {
return {
activeName: 'first',


+ 3
- 3
src/views/plan/workbench/homePage/formal/versions/index.vue View File

@ -26,12 +26,12 @@
</el-table-column>
<el-table-column label="版本" min-width="150" key="VersionId" :width="getRowWidth('VersionId')" >
<template #default="scope">
{{scope.row['VersionId']}}
{{transLabelObj[scope.row['VersionId']]}}
</template>
</el-table-column>
<el-table-column v-for="(item, index) in headers"
:key="item"
:width="getRowWidth(item)" :label="item" min-width="150">
:width="getRowWidth(item)" :label="transLabelObj[item]" min-width="150">
<template v-slot="{ row }">{{ (row.Item?.[index]?.[item]) }}</template>
</el-table-column>
</el-table>
@ -42,7 +42,7 @@
import { get } from "@/server/api.js";
import queryComponent from '@/components/queryComponent'
export default {
props: ["customerId", "isShowComponent","tableHeight"],
props: ["customerId", "isShowComponent","tableHeight","transLabelObj"],
components: {
queryComponent
},


+ 12
- 3
src/views/plan/workbench/homePage/index.vue View File

@ -8,13 +8,13 @@
</div>
<!-- 右侧预测版本列表正式订单产品需求 -->
<div class="homepage-top-right-wrap">
<Beta :customerId="customerId" :CreateModel="CreateModel" @calculateTableHeight="calculateTableHeight" :tableHeight="tableHeight" />
<Beta :customerId="customerId" :CreateModel="CreateModel" @calculateTableHeight="calculateTableHeight" :tableHeight="tableHeight" :transLabelObj="transLabelObj" />
</div>
</div>
<DragBar />
<!-- 下面模块多版本比较偏差分析客户零件清单 -->
<div class="homepage-bottom-wrap" id="bottom">
<Formal :customerId="customerId" @calculateTableHeight="calculateFormalTableHeight" :tableHeight="formalTableHeight" />
<Formal :customerId="customerId" :transLabelObj="transLabelObj" @calculateTableHeight="calculateFormalTableHeight" :tableHeight="formalTableHeight" />
</div>
</ContentContainer>
</template>
@ -22,6 +22,7 @@
import Customer from './customer'
import Beta from './beta'
import Formal from './formal'
import { get } from "@/server/api.js";
export default {
components:{
Customer,
@ -35,6 +36,7 @@ export default {
customerId: "",
CreateModel: "",
currentCustomId: '',
transLabelObj: {},
}
},
methods: {
@ -47,10 +49,17 @@ export default {
},
calculateFormalTableHeight(height){
this.formalTableHeight = height
}
},
getTransLabel() {
get('/user/week_to_date').then(({data})=>{
this.transLabelObj = data || {}
})
},
},
created() {
this.getTransLabel()
this.currentCustomId = this.$route.query.CustomerId
},
mounted () {
this.dragChangeSize((topHeight,bottomHeight) => {


+ 48
- 8
src/views/plan/workbench/materialAnalysis/chart/commonLineChart.vue View File

@ -1,5 +1,5 @@
<template>
<div style="height:250px;width:100%;margin-top: 30px;" />
<div style="height:calc(100% - 5px);width:100%;margin-top: 0px;" />
</template>
<script>
import * as echarts from 'echarts'
@ -15,6 +15,10 @@ export default {
type: String,
default: ''
},
transLabelObj: {
type: Object,
default: {}
}
},
data() {
return {
@ -23,6 +27,7 @@ export default {
seriesArray: [],
maxValue: '',
minValue: '',
copyXDataArray: [],
}
},
watch: {
@ -41,16 +46,19 @@ export default {
this.xDataArray = []
this.seriesArray = []
if (currentValue && currentValue.SortKeys) {
this.xDataArray = currentValue.SortKeys
this.copyXDataArray = JSON.parse(JSON.stringify(currentValue.SortKeys))
this.xDataArray = currentValue.SortKeys.map(el => {
return this.transLabelObj[el]
})
}
newValue.PerCustomerDeviationDetailItem.forEach(el => {
(newValue.PerCustomerDeviationDetailItem || []).forEach(el => {
receivableArray = []
this.xDataArray.forEach(elChild => {
this.copyXDataArray.forEach(elChild => {
receivableArray.push(el.Item[elChild])
})
this.seriesArray.push({
type: 'line',
name: el.VersionId,
name: this.transLabelObj[el.VersionId] || el.VersionId,
data: receivableArray,
animationDuration
})
@ -72,11 +80,43 @@ export default {
this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({
color: ['#126db9'],
dataZoom: [
{
// start: 0,//0
// end: 100,//100
type: 'slider',
show: true,
// xAxisIndex: [0],
handleSize: 0,// 2
startValue: 0, //
endValue: 30, //
height: 10,//
left: '5%', //
right: '5%',//
bottom: 10,//
borderColor: "#000",
fillerColor: '#269cdb',
borderRadius: 5,
backgroundColor: '#33384b',//
showDataShadow: false,// auto
showDetail: false,// true
realtime: false, //
filterMode: 'filter',
},
//
{
type: 'inside',
show: true,
// xAxisIndex: [0],
start: 1,//1
end: 10,//100
},
],
grid: {
top: '10%',
left: '5%',
right: '15%',
bottom: '0%',
right: '5%',
bottom: '15%',
containLabel: true
},
xAxis: {
@ -84,7 +124,7 @@ export default {
data: this.xDataArray,
axisLabel: { //
interval: 0,
rotate:'80',//
rotate:'10',//
},
},
legend: {


+ 15
- 13
src/views/plan/workbench/materialAnalysis/chart/index.vue View File

@ -1,6 +1,5 @@
<template>
<div class="chart-analysis-container">
<div class="chart-normal-wrap">
<div class="chart-info clearfix">
<div class="fl">原材料</div>
@ -14,12 +13,12 @@
@download="download"
/>
</div>
<div class="chart-bottom-wrap clearfix">
<div class="chart-bottom-left fl">
<CommonLineChart :dataList="dataList" />
<div class="chart-bottom-wrap">
<div class="chart-bottom-top">
<CommonLineChart :dataList="dataList" :transLabelObj="transLabelObj" />
</div>
<div class="chart-bottom-right fl">
<LineBarChart :dataList="dataList" />
<div class="chart-bottom-bottom">
<LineBarChart :dataList="dataList" :transLabelObj="transLabelObj" />
</div>
</div>
</div>
@ -31,7 +30,7 @@ import CommonLineChart from './commonLineChart'
import LineBarChart from './lineBarChart'
export default {
name: "analysis",
props: ["queryParams", 'versionId'],
props: ["queryParams", 'versionId', 'transLabelObj'],
components: {
QueryComponent,
CommonLineChart,
@ -95,13 +94,16 @@ export default {
}
.chart-bottom-wrap {
height: calc(100% - 90px);
padding: 0 18px 20px 18px;
.chart-bottom-left, .chart-bottom-right {
width: 49%;
height: 100%;
// padding: 0 18px 20px 18px;
.chart-bottom-top, .chart-bottom-bottom {
width: 100%;
overflow-x: auto;
height: calc(50% - 15px);
min-height: 160px;
}
.chart-bottom-right {
margin-left: 2%;
.chart-bottom-bottom {
// margin-left: 2%;
margin-top: 30px;
}
}
}

+ 56
- 16
src/views/plan/workbench/materialAnalysis/chart/lineBarChart.vue View File

@ -1,5 +1,5 @@
<template>
<div style="height:250px;width:100%;margin-top: 30px;" />
<div style="height:calc(100% - 5px);width:100%;" />
</template>
<script>
import * as echarts from 'echarts'
@ -15,6 +15,10 @@ export default {
type: String,
default: ''
},
transLabelObj: {
type: Object,
default: {}
}
},
data() {
return {
@ -23,6 +27,7 @@ export default {
seriesArray: [],
maxValue: '',
minValue: '',
copyXDataArray: [],
}
},
watch: {
@ -41,16 +46,19 @@ export default {
this.xDataArray = []
this.seriesArray = []
if (currentValue && currentValue.SortKeys) {
this.xDataArray = currentValue.SortKeys
this.copyXDataArray = JSON.parse(JSON.stringify(currentValue.SortKeys))
this.xDataArray = currentValue.SortKeys.map(el => {
return this.transLabelObj[el]
})
}
newValue.CustomerDeviationDetailItem.forEach(el => {
receivableArray = []
this.xDataArray.forEach(elChild => {
this.copyXDataArray.forEach(elChild => {
receivableArray.push(el.Item[elChild])
})
this.seriesArray.push({
type: 'bar',
name: el.VersionId,
name: this.transLabelObj[el.VersionId] || el.VersionId,
data: receivableArray,
animationDuration
})
@ -71,12 +79,53 @@ export default {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({
tooltip: {
trigger: "axis",
textStyle: {
color: '#fff'
}
},
dataZoom: [
{
// start: 0,//0
// end: 100,//100
type: 'slider',
show: true,
// xAxisIndex: [0],
handleSize: 0,// 2
startValue: 0, //
endValue: 30, //
height: 10,//
left: '5%', //
right: '5%',//
bottom: 10,//
borderColor: "#000",
fillerColor: '#269cdb',
borderRadius: 5,
backgroundColor: '#33384b',//
showDataShadow: false,// auto
showDetail: false,// true
realtime: true, //
filterMode: 'filter',
},
//
{
type: 'inside',
show: true,
// xAxisIndex: [0],
start: 1,//1
end: 100,//100
},
],
color: ['#126db9'],
legend: {
data: this.seriesArray.map(e=>e.name)
},
grid: {
top: '10%',
left: '5%',
right: '15%',
bottom: '0%',
right: '5%',
bottom: '15%',
containLabel: true
},
xAxis: {
@ -84,21 +133,12 @@ export default {
data: this.xDataArray,
axisLabel: { //
interval: 0,
rotate:'80',//
rotate:'10',//
},
},
legend: {
data: this.seriesArray.map(e=>e.name)
},
yAxis: {
type: 'value',
},
tooltip: {
trigger: 'axis',
textStyle: {
color: '#fff'
}
},
series: this.seriesArray
})
}


+ 2
- 2
src/views/plan/workbench/materialAnalysis/filter/index.vue View File

@ -13,7 +13,7 @@
placeholder="请选择原材料">
<el-option v-for="item in specificationsData"
:key="item['Article-ArtId']"
:label="item['Article-Descr1']"
:label="item['Article-ArtId']+ '-' +item['Article-Descr1']"
:value="item['Article-ArtId']" />
</el-select>
</el-form-item>
@ -25,7 +25,7 @@
placeholder="请选择规格">
<el-option v-for="item in attributeData"
:key="item['Attribute-AttrCode']"
:label="item['Attribute-Descr']"
:label="item['Attribute-AttrCode']+'-'+item['Attribute-Descr']"
:value="item['Attribute-AttrCode']" />
</el-select>
</el-form-item>


+ 10
- 1
src/views/plan/workbench/materialAnalysis/index.vue View File

@ -7,13 +7,14 @@
<div class="material-top-right-wrap">
<Version
:withTheRingRadio="withTheRingRadio"
:transLabelObj="transLabelObj"
@versionEmit="versionEmit"
/>
</div>
</div>
<DragBar />
<div class="material-bottom-wrap" id="bottom">
<Chart :queryParams="queryParams" :versionId="versionId" />
<Chart :queryParams="queryParams" :versionId="versionId" :transLabelObj="transLabelObj" />
</div>
</ContentContainer>
</template>
@ -21,6 +22,7 @@
import Filter from './filter'
import Version from './version'
import Chart from './chart'
import { get } from "@/server/api.js";
export default {
components:{
Filter,
@ -32,9 +34,11 @@ export default {
withTheRingRadio: 'ring',
versionId: '',
queryParams: {},
transLabelObj: {},
}
},
mounted () {
this.getTransLabel()
this.dragChangeSize();
},
methods: {
@ -45,6 +49,11 @@ export default {
versionEmit(version) {
this.versionId = version
},
getTransLabel() {
get('/user/week_to_date').then(({data})=>{
this.transLabelObj = data || {}
})
},
},
}
</script>


+ 5
- 5
src/views/plan/workbench/materialAnalysis/version/index.vue View File

@ -11,7 +11,7 @@
placeholder="请选择">
<el-option v-for="item in getSpecifiedVersion"
:key="item['AP_CustDemandVerHead-VersionId']"
:label="item['AP_CustDemandVerHead-VersionId']"
:label="transLabelObj[item['AP_CustDemandVerHead-VersionId']]"
:value="item['AP_CustDemandVerHead-VersionId']" />
</el-select>
</el-form-item>
@ -25,7 +25,7 @@
border>
<el-table-column label="版本号" :show-overflow-tooltip="true" prop="AP_CustDemandVerHead-VersionId">
<template #default="scope">
<span>{{ scope.row['AP_CustDemandVerHead-VersionId'] }}</span>
<span>{{ transLabelObj[scope.row['AP_CustDemandVerHead-VersionId']] }}</span>
</template>
</el-table-column>
<el-table-column label="客户" :show-overflow-tooltip="true" prop="AP_CustDemandVerHead-CustomerId">
@ -53,7 +53,7 @@
placeholder="请选择">
<el-option v-for="item in getSpecifiedVersion"
:key="item['AP_CustDemandVerHead-VersionId']"
:label="item['AP_CustDemandVerHead-VersionId']"
:label="transLabelObj[item['AP_CustDemandVerHead-VersionId']]"
:value="item['AP_CustDemandVerHead-VersionId']" />
</el-select>
</el-form-item>
@ -67,7 +67,7 @@
border>
<el-table-column label="版本号" :show-overflow-tooltip="true" prop="AP_CustDemandVerHead-VersionId">
<template #default="scope">
<span>{{ scope.row['AP_CustDemandVerHead-VersionId'] }}</span>
<span>{{ transLabelObj[scope.row['AP_CustDemandVerHead-VersionId']] }}</span>
</template>
</el-table-column>
<el-table-column label="客户" :show-overflow-tooltip="true" prop="AP_CustDemandVerHead-CustomerId">
@ -88,7 +88,7 @@
<script>
import { get } from "@/server/api.js"
export default {
props: ["withTheRingRadio"],
props: ["withTheRingRadio", "transLabelObj"],
data() {
return {
loading1: false,


+ 19
- 3
src/views/plan/workbench/predictVersion/index.vue View File

@ -12,7 +12,7 @@
<el-option
v-for="item in getSpecifiedVersion"
:key="item['AP_CustDemandVerHead-VersionId']"
:label="item['AP_CustDemandVerHead-VersionId']"
:label="transLabelObj[item['AP_CustDemandVerHead-VersionId']]"
:value="item['AP_CustDemandVerHead-VersionId']"
/>
</el-select>
@ -102,6 +102,7 @@
show-overflow-tooltip
:label="getColumnName('AP_CustArtlst-ArtId')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["AP_CustArtlst-ArtId"] }}
@ -111,6 +112,7 @@
show-overflow-tooltip
:label="getColumnName('AP_CustArtlst-Descr1')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["AP_CustArtlst-Descr1"] }}
@ -120,6 +122,7 @@
show-overflow-tooltip
:label="getColumnName('Article-ArtSize2')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["Article-ArtSize2"] }}
@ -129,6 +132,7 @@
show-overflow-tooltip
:label="getColumnName('Customer-CustomerId')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["Customer-CustomerId"] }}
@ -138,6 +142,7 @@
show-overflow-tooltip
:label="getColumnName('AP_CustArtlst-CustArtId')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["AP_CustArtlst-CustArtId"] }}
@ -147,6 +152,7 @@
show-overflow-tooltip
:label="getColumnName('Customer-FcustId')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["Customer-FcustId"] }}
@ -156,6 +162,7 @@
show-overflow-tooltip
:label="getColumnName('Customer-Name1')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["Customer-Name1"] }}
@ -165,6 +172,7 @@
show-overflow-tooltip
:label="getColumnName('AP_CustArtlst-LastUser')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["AP_CustArtlst-LastUser"] }}
@ -174,6 +182,7 @@
show-overflow-tooltip
:label="getColumnName('User-Name')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["User-Name"] }}
@ -182,8 +191,8 @@
<el-table-column
v-for="item in headers"
:key="item"
:width="getRowWidth(item)"
:label="getColumnName(item)"
width="120"
:label="transLabelObj[getColumnName(item)]"
:show-overflow-tooltip="true"
>
<template #default="scope">
@ -217,6 +226,7 @@ export default {
customerLoading: false,
tableData1: [],
getSpecifiedVersion: [],
transLabelObj: {},
};
},
methods: {
@ -338,8 +348,14 @@ export default {
link.click();
})
},
getTransLabel() {
get('/user/week_to_date').then(({data})=>{
this.transLabelObj = data || {}
})
},
},
created() {
this.getTransLabel()
this.getVersionOfCustom()
this.pagination.pageSize = 100
},


+ 18
- 4
src/views/plan/workbench/predictionDeviation/index.vue View File

@ -12,7 +12,7 @@
<el-option
v-for="item in getSpecifiedVersion"
:key="item['AP_CustDemandVerHead-VersionId']"
:label="item['AP_CustDemandVerHead-VersionId']"
:label="transLabelObj[item['AP_CustDemandVerHead-VersionId']]"
:value="item['AP_CustDemandVerHead-VersionId']"
/>
</el-select>
@ -27,7 +27,7 @@
<el-option
v-for="item in getSpecifiedVersion"
:key="item['AP_CustDemandVerHead-VersionId']"
:label="item['AP_CustDemandVerHead-VersionId']"
:label="transLabelObj[item['AP_CustDemandVerHead-VersionId']]"
:value="item['AP_CustDemandVerHead-VersionId']"
/>
</el-select>
@ -111,6 +111,7 @@
show-overflow-tooltip
:label="getColumnName('AP_CustArtlst-ArtId')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["AP_CustArtlst-ArtId"] }}
@ -120,6 +121,7 @@
show-overflow-tooltip
:label="getColumnName('AP_CustArtlst-Descr1')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["AP_CustArtlst-Descr1"] }}
@ -129,6 +131,7 @@
show-overflow-tooltip
:label="getColumnName('Customer-CustomerId')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["Customer-CustomerId"] }}
@ -138,6 +141,7 @@
show-overflow-tooltip
:label="getColumnName('Customer-Name1')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["Customer-Name1"] }}
@ -147,6 +151,7 @@
show-overflow-tooltip
:label="getColumnName('AP_CustArtlst-LastUser')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["AP_CustArtlst-LastUser"] }}
@ -156,6 +161,7 @@
show-overflow-tooltip
:label="getColumnName('User-Name')"
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["User-Name"] }}
@ -164,6 +170,7 @@
<el-table-column
show-overflow-tooltip
align="center"
width="120"
>
<template #default="scope">
{{ scope.row["title"] }}
@ -172,8 +179,8 @@
<el-table-column
v-for="item in headers"
:key="item"
:width="getRowWidth(item)"
:label="getColumnName(item)"
width="120"
:label="transLabelObj[getColumnName(item)]"
:show-overflow-tooltip="true"
>
<template #default="scope">
@ -207,6 +214,7 @@ export default {
customerLoading: false,
tableData1: [],
getSpecifiedVersion: [],
transLabelObj: {},
};
},
methods: {
@ -326,8 +334,14 @@ export default {
link.click();
})
},
getTransLabel() {
get('/user/week_to_date').then(({data})=>{
this.transLabelObj = data || {}
})
},
},
created() {
this.getTransLabel()
this.getVersionOfCustom()
this.pagination.pageSize = 100
},


+ 21
- 22
src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue View File

@ -188,23 +188,20 @@
</div>
</template>
<script>
import AddOrEdit from "./addOrEdit";
import Public from "./public";
import Char from "./char";
import { mapActions, mapMutations, mapState } from "vuex";
import { baseURL } from "@/server/request"
import {
getArtIdList,
publishedVersion,
refreshData,
reloadData,
saveDemand,
searchResource,
exportData,
publishIdentifyAll
} from "@/server/productionPlanning/customerForecastDemandReview";
import { syncData } from "@/server/productionPlanning/productInventory";
import { getColumnName } from "@/utils/allField.js";
exportData, getArtIdList,
publishedVersion, publishIdentifyAll, refreshData,
reloadData,
saveDemand,
searchResource
} from "@/server/productionPlanning/customerForecastDemandReview";
import { syncData } from "@/server/productionPlanning/productInventory";
import { baseURL } from "@/server/request";
import { getColumnName } from "@/utils/allField.js";
import { mapActions, mapMutations, mapState } from "vuex";
import AddOrEdit from "./addOrEdit";
import Char from "./char";
import Public from "./public";
export default {
components: {
@ -252,9 +249,9 @@
editKeyList: [],
pagination:{
pageNumber: 1,
pageSize: 24, // 12 12 .../index.vue 171
pageSize: 26, // 13 13 .../index.vue 171 51
total: 0,
pageSizes:[12, 24, 36, 60]
pageSizes:[13, 26, 39, 65]
}
};
},
@ -285,10 +282,11 @@
"selectArticleDemandRow",
"editButtonClass",
"publicButtonClass",
"transLabel"
]),
calcWidth() {
return function (index) {
let width = "100px"
let width = "110px"
switch (index) {
case 0:
width = "150px"
@ -305,13 +303,14 @@
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];
}
}
}


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

@ -24,7 +24,7 @@
//
import ArticleDemand from "./articleDemand";
// vuex
import { mapState, mapMutations } from "vuex";
import { mapMutations, mapState } from "vuex";
export default {
//
@ -51,6 +51,7 @@
labelList: {
"AP_ArticleDemand-ForecastDemandQty": "预测需求",
"AP_ArticleDemand-OrderQty": "订单需求",
"AP_ArticleDemand-NetDemand": "净需求",
"AP_ArticleDemand-OutSourcingQty": "外购需求",
"AP_ArticleDemand-IndependentDemandQty": "独立需求",
"AP_ArticleDemand-WipQty": "在制量",
@ -168,7 +169,7 @@
data["Item"].forEach((item, index) => {
item.key = item["AP_ArticleDemand-ArtId"];
item.Label = this.labelList[item["AP_ArticleDemand-Label"]]??item["AP_ArticleDemand-Label"];
if (index % 12 == 0) { //
if (index % 13 == 0) { //
item.show = true;
} else {
item.show = false;


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


+ 8
- 3
src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/char.vue View File

@ -1,12 +1,13 @@
<template>
<div
:style="{height:Height,opacity:Opacity}"
style="padding: 10px;margin: 10px;border: 1px solid #ccc;width: 100%;"></div>
style="padding: 10px;margin: 10px;border: 1px solid #ccc;width: 95%;"></div>
</template>
<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 ){
@ -87,7 +92,7 @@ export default {
let option = {
title: { text: this.Title},
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
legend: { data: this.legendList,top:'%1',type:"scroll" },
legend: { data: this.legendList,top:'%1',left: "10%",type:"scroll" },
grid: { top: '19%', left: "3%", right: "3%", bottom: "1%", containLabel: true },
xAxis: [{ type: "category", data: this.weeksList }],
yAxis: [{ type: "value" }],


+ 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