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