Browse Source

Merge pull request '修改发布' (#161) from xuxiaoming into develop

Reviewed-on: http://101.201.121.115:3000/leo/LAPP_AdvancedPlanner_Front/pulls/161
pull/163/head
xuxiaoming 3 years ago
parent
commit
2638a69c6a
9 changed files with 192 additions and 53 deletions
  1. +2
    -0
      .gitignore
  2. +6
    -0
      src/server/productionPlanning/customerForecastDemandReview.js
  3. +1
    -24
      src/store/productionPlanning/customerForecastDemandReview.js
  4. +1
    -1
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/index.vue
  5. +64
    -4
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/public.vue
  6. +71
    -0
      src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/publicDetail.vue
  7. +35
    -7
      src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/index.vue
  8. +11
    -17
      src/views/productionPlanning/customerForecastDemandReview/resourceContent/index.vue
  9. +1
    -0
      src/views/productionPlanning/productInventory/index.vue

+ 2
- 0
.gitignore View File

@ -21,3 +21,5 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
/src/server/request.js

+ 6
- 0
src/server/productionPlanning/customerForecastDemandReview.js View File

@ -74,3 +74,9 @@ export const exportData = (data) => post("/admin/ap/balance/mpsplanexport",data)
export const publishIdentify = ()=> get("admin/ap/planorderversion/publishidentify")
export const publishedVersion = ()=> get("/admin/ap/articledemand/publishedversion")
export const planOrderQuery = (param)=> get("/admin/ap/planorder/query",param)
export const republish = (data) => post("/admin/ap/planorderversion/relpublish",data)

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

@ -62,10 +62,7 @@ const customerForecastDemandReview = {
editButtonClass: "disable_button",
// 发布按钮
publicButtonClass: "disable_button",
evaluationLoadPercent: 0,
evaluationLoadInterval: {},
},
mutations: {
// 初始化所有数据
@ -224,26 +221,6 @@ const customerForecastDemandReview = {
SET_publicButtonClass(state, payload) {
state.publicButtonClass = payload
},
SET_evaluationLoadPercent(state, payload) {
if (payload) {
let load = 1
let temp = 100
state.evaluationLoadInterval = setInterval(() => {
if (load > 10) {
temp++
}
load++
state.evaluationLoadPercent = parseInt(load / temp * 100)
}, 1000)
} else {
state.evaluationLoadPercent = 100
clearInterval(state.evaluationLoadInterval)
setTimeout(() => {
state.evaluationLoadPercent = 0
}, 1000)
}
},
TOGGLE_showChar(state) {
state.showChar = !state.showChar
},


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

@ -302,7 +302,7 @@
"SET_evaluationSecondResourceListData",
"SET_evaluationMainResourceLoading",
"SET_evaluationSecondResourceLoading",
"SET_articleDemandLoading"
"SET_articleDemandLoading",
]),
getPublishedVersion() {


+ 64
- 4
src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/public.vue View File

@ -27,12 +27,27 @@
<el-form-item label="本周已发布版本ID">
<ul style="height:200px;white-space: nowrap; overflow-y: scroll;">
<li v-for="(history,index) in historyList"
:key="index">{{history}}</li>
:key="index">ID{{history.publishedVersionNr}}状态{{statusList[history.status]}}
<el-button size="mini"
style="float:right"
class="edit-button-style"
type="text"
@click="republishHandler(history.planOrderId)"
:disabled="history.status!=100"> 再次发布</el-button>
<el-button size="mini"
style="float:right;margin-right: 20px;"
class="edit-button-style"
type="text"
:disabled="history.status!=100"
@click="lookDetailHandler(history.publishedVersionNr)"> 查看</el-button>
</li>
</ul>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button type="primary"
@ -42,13 +57,21 @@
@click="cancelHandle"> </el-button>
</span>
</template>
<PublicDetail
v-if="showPublicDetail"
:showPublicDetail="showPublicDetail"
:versionNr="versionNr"
/>
</el-dialog>
</template>
<script>
import { publishIdentify, publicData } from '@/server/productionPlanning/customerForecastDemandReview'
import { publishIdentify, publicData, planOrderQuery, republish } from '@/server/productionPlanning/customerForecastDemandReview'
import PublicDetail from "./publicDetail.vue"
export default {
emits: ["cancelHandle"],
components:{
PublicDetail
},
props: {
showPublicDialog: {
type: Boolean,
@ -68,20 +91,57 @@
},
loading: false,
message: "",
statusList: {},
historyList: [],
formData: {}, //
detailData:[],
showPublicDetail:false
};
},
created() {
this.getStanderOne({ statid: "PlanOrderVersion-Status" }).then(({ data = [] }) => {
data.forEach(item => {
this.statusList[item["Stdef-StdefTyp"]] = item["Stdef-Bez"]
})
});
this.publishIdentify();
},
methods: {
republishHandler(orderId) {
this.loading = true
republish({ planOrderId: orderId }).then(({ msg = "" }) => {
this.$message({ type: "success", message: msg });
this.loading = false
}).catch((e) => {
this.$message({ type: "error", message: "重新发布信息失败" });
this.loading = false
});
},
lookDetailHandler(versionNr) {
this.showPublicDetail = true
this.versionNr = versionNr
// planOrderQuery({
// versionnr: versionNr,
// pageNumber: 1,
// pageSize: 50
// }).then(({ data = [] }) => {
// this.loading = false
// this.detailData = data
// this.showPublicDetail = true
// }).catch((e) => {
// this.$message({ type: "error", message: "" });
// this.loading = false
// });
},
publishIdentify() {
this.loading = true
publishIdentify().then(({ data = [] }) => {
this.formData["version"] = data.version
this.message = data.message
this.historyList = data.publishedVersionNr
this.historyList = data.publishedVersionLi
this.loading = false
}).catch((e) => {
this.$message({ type: "error", message: "获取发布信息失败" + e });


+ 71
- 0
src/views/productionPlanning/customerForecastDemandReview/demandPlanning/articleDemand/publicDetail.vue View File

@ -0,0 +1,71 @@
<template>
<el-dialog title="详情"
v-model="showPublicDetail"
width="800px"
height="400px">
<el-table
style="width: 100%"
:data="tableData"
border
size="mini"
height="350px">
<el-table-column
v-for="item in headers"
:key="item"
:label="getColumnName(item)"
:prop="item"
:show-overflow-tooltip="true" >
</el-table-column>
</el-table>
<Pagination v-show="pagination.total > 0"
v-model:pagination="pagination"
@change="getList" />
</el-dialog>
</template>
<script>
import {
ListMixin
} from "@/mixins/newListMixin";
import { planOrderQuery as queryTableData } from '@/server/productionPlanning/customerForecastDemandReview'
export default {
mixins: [ListMixin],
props: {
versionNr: {
type: String,
default: ""
},
showPublicDetail:{
default:false
}
},
data(){
return {
queryTableData: queryTableData,
loading: false,
tableData: [],
tableHeight:0,
headers: [
"AP_PlanOrder-ArtId",
"AP_PlanOrder-PlanDate",
"AP_PlanOrder-PlanQty"
],
}
},
mounted() {
this.queryParams.versionnr = this.versionNr
this.queryParams.operator = "*"
this.getList();
},
methods: {
}
}
</script>

+ 35
- 7
src/views/productionPlanning/customerForecastDemandReview/resourceContent/evaluation/index.vue View File

@ -12,10 +12,10 @@
</div>
<template v-if="showChar">
<el-progress type="circle"
:percentage="evaluationLoadPercent"
v-if="evaluationLoadPercent"></el-progress>
:percentage="loadPercent"
v-if="loadPercent != 0"></el-progress>
<div class="char_box"
v-if="evaluationMainResourceData.length && evaluationLoadPercent==0">
v-if="evaluationMainResourceData.length && loadPercent==0">
<Char :DataList="evaluationMainResourceData"
Title="主要资源"></Char>
</div>
@ -36,7 +36,7 @@
<script>
import Char from './char'
import refreshImageUrl from '@/assets/icon/refresh.png'
import { mapState, mapMutations } from 'vuex'
import { mapState } from 'vuex'
export default {
components: {
@ -46,11 +46,12 @@
return {
showChar: false,
refreshImageUrl: refreshImageUrl,
loadPercent:0,
evaluationLoadInterval:0
};
},
created() {
},
computed: {
...mapState("customerForecastDemandReview", [
'evaluationLoadPercent',
@ -61,7 +62,27 @@
])
},
methods: {
...mapMutations("customerForecastDemandReview", ["SET_evaluationLoadPercent"])
startLoading(){
let load = 1
let temp = 100
this.loadPercent = 0
clearInterval(this.evaluationLoadInterval)
this.evaluationLoadInterval = setInterval(() => {
if (load > 10) {
temp++
}
load++
this.loadPercent = parseInt(load / temp * 100)
console.log('%cindex.vue line:161 this.loadPercent', 'color: #007acc;', this.loadPercent);
}, 100)
},
endLoading(){
clearInterval(this.evaluationLoadInterval)
this.loadPercent = 100
setTimeout(()=> {
this.loadPercent = 0
},1000)
}
},
};
</script>
@ -72,21 +93,25 @@
width: 100%;
display: flex;
flex-direction: column;
:deep(.el-progress-circle) {
margin: 100px auto;
}
.tool_list {
width: 100%;
height: 30px;
display: flex;
justify-content: flex-end;
.button_list {
width: 120px;
height: 32px;
display: flex;
margin-right: 50px;
align-items: center;
.image_button {
margin: 2px 5px;
width: 24px;
@ -94,12 +119,14 @@
box-shadow: 2px 2px 0px 0px #DADADA;
border: 1px solid #FFFFFF;
}
.image_button:hover {
background: #DFDFDF;
box-shadow: 2px 2px 0px 0px #FFFFFF;
border-radius: 1px;
border: 1px solid #DADADA;
}
.button_split {
width: 1px;
height: 30px;
@ -109,6 +136,7 @@
}
}
}
.char_box {
width: 100%;
height: 300px


+ 11
- 17
src/views/productionPlanning/customerForecastDemandReview/resourceContent/index.vue View File

@ -2,9 +2,9 @@
<ContentContainer class="homepage-beta-wrapper">
<el-tabs v-model="activeName"
type="card">
<el-tab-pane label="资源负荷"
name="evaluation">
<Evaluation />
<el-tab-pane label="资源负荷"
name="evaluation" >
<Evaluation ref="evaluationChar" />
</el-tab-pane>
<el-tab-pane label="资源产能评估"
name="resourceLoad">
@ -28,7 +28,7 @@
},
data() {
return {
activeName: 'evaluation'
activeName: 'evaluation',
}
},
@ -126,8 +126,7 @@
"SET_selectArticleDemandRow",
"INIT_selectArticleDemandRow",
"SET_evaluationSecondResourceListData",
"INIT_evaluationSecondResourceListData",
"SET_evaluationLoadPercent"
"INIT_evaluationSecondResourceListData"
]),
setEvaluationSecondResource(data) {
this.SET_evaluationMainResourceData(data['ArticleResourceMpsGroupLst'] || [])
@ -140,18 +139,13 @@
setLoading(flag) {
this.SET_evaluationSecondResourceLoading(flag)
this.SET_evaluationMainResourceLoading(flag)
this.SET_evaluationLoadPercent(flag)
if(flag){
this.$refs.evaluationChar.startLoading()
} else {
this.$refs.evaluationChar.endLoading()
}
},
//
// handlePublic(param) {
// param.data = JSON.stringify(param.data);
// saveMpsPlan(param).then(({ code }) => {
// if (code == 200) {
// this.$message({ showClose: true, message: "", type: "success" });
// this.SET_evaluationMainResourceData(this.evaluationSecondResourceData)
// }
// });
// },
},
}
</script>


+ 1
- 0
src/views/productionPlanning/productInventory/index.vue View File

@ -85,6 +85,7 @@
},
mounted() {
this.getList();
this.$nextTick(() => {
this.tableHeight = this.calculationTableHeight(


Loading…
Cancel
Save