Commit 11f4c882 authored by renjintao's avatar renjintao

选择模型

parent b50a72d9
......@@ -507,6 +507,10 @@ export default {
if (res2.success) {
if (res2.result.res) {
this.$Message.success("排产计算成功");
//智能排产操作start
//只能排产操作end
this.circleModal = false;
this.$router.push({
path: "/ai/results"
......
......@@ -56,8 +56,7 @@
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
</template>
<template slot="buttons"></template>
</DataGrid>
<FooterToolbar extra v-if="footerBar">
<Row>
......@@ -87,6 +86,7 @@
<Modal v-model="scheduleModal" title="移入排产" width="800">
<p>&nbsp;</p>
<h4>请选择排产模型:</h4>
<!--
<Dictionary
code="aps.plan.scheduleType"
v-model="scheduleType"
......@@ -95,6 +95,21 @@
type="radio"
@on-change="onchangeScheduleType"
></Dictionary>
-->
<RadioGroup v-model="scheduleType" class="radioList" @on-change="onchangeScheduleType">
<Radio :label="1" border :disabled="this.$store.state.countAi>0">
<span >Aps排产</span>
</Radio>
<Radio :label="4" border :disabled="this.$store.state.countAps>0">
<span >智能排产</span>
</Radio>
<Radio :label="2" border>
<span >整机排产</span>
</Radio>
<Radio :label="3" border>
<span >流水排产</span>
</Radio>
</RadioGroup>
<p class="pl30 pt10" v-show="scheduleType!=null">
确定将订单
<span class="fwBold">{{resultsOrderList}}</span> 移入
......@@ -128,7 +143,7 @@ export default {
Detail,
Search,
Dispatch,
orderSupport
orderSupport,
},
data() {
return {
......@@ -136,8 +151,8 @@ export default {
easySearch: {
keys: {
op: "mesCode,projectNumber",
value: null
}
value: null,
},
},
addModal: false,
editModal: false,
......@@ -149,17 +164,17 @@ export default {
curId: 0,
columns: [
{
key:"selection",
title:'#',
key: "selection",
title: "#",
type: "selection",
width: 70,
align: "center"
align: "center",
},
{
title: this.l("mesCode"),
key: "mesCode",
width: 240,
align: "left"
align: "left",
},
{
key: "productName",
......@@ -168,42 +183,42 @@ export default {
easy: true,
width: 160,
high: true,
tooltip: true
tooltip: true,
},
{
key: "status",
title: this.l("status"),
align: "center",
high: true,
code: "plan.order.status"
code: "plan.order.status",
},
{
key: "mainRoutingSetStatus",
title: this.l("mainRoutingSetStatus"),
align: "center",
high: true,
code: "aps.plan.mainRoutingStatus"
code: "aps.plan.mainRoutingStatus",
},
{
key: "isSupportingFinish",
title: this.l("isSupportingFinish"),
align: "center",
high: true,
code: "aps.plan.supportingStatus"
code: "aps.plan.supportingStatus",
},
{
key: "projectNumber",
title: this.l("projectNumber"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "batchNumber",
title: this.l("batchNumber"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "urgencyLevel",
......@@ -211,7 +226,7 @@ export default {
align: "left",
easy: true,
high: true,
code: "plan.order.urgencyLevel"
code: "plan.order.urgencyLevel",
},
{
......@@ -221,7 +236,7 @@ export default {
easy: true,
high: true,
hide: true,
code: "plan.order.taskType"
code: "plan.order.taskType",
},
{
......@@ -229,7 +244,7 @@ export default {
title: this.l("drawnNumber"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "stage",
......@@ -237,20 +252,20 @@ export default {
align: "left",
easy: true,
high: true,
code: "plan.order.stage"
code: "plan.order.stage",
},
{
key: "materialName",
title: this.l("materialName"),
align: "left",
easy: true,
high: true
high: true,
},
{
key: "quantity",
title: this.l("quantity"),
align: "right",
high: true
high: true,
},
{
key: "routingMethod",
......@@ -258,14 +273,14 @@ export default {
align: "left",
easy: true,
high: true,
code: "plan.order.routingMethod"
code: "plan.order.routingMethod",
},
{
key: "materialWeight",
title: this.l("materialWeight"),
align: "left",
high: true,
hide: true
hide: true,
},
{
......@@ -274,7 +289,7 @@ export default {
align: "left",
easy: true,
high: true,
hide: true
hide: true,
},
{
......@@ -283,28 +298,28 @@ export default {
align: "left",
high: true,
code: "mes_xingchi_plan.mes_order.is_preschedule",
hide: true
hide: true,
},
{
key: "spareQty",
title: this.l("spareQty"),
align: "left",
high: true,
hide: true
hide: true,
},
{
key: "demandStart",
title: this.l("demandStart"),
align: "left",
high: true,
hide: true
hide: true,
},
{
key: "demandFinish",
title: this.l("demandFinish"),
align: "left",
high: true,
hide: true
hide: true,
},
{
key: "partNamePro",
......@@ -312,7 +327,7 @@ export default {
align: "left",
easy: true,
high: true,
hide: true
hide: true,
},
{
title: "操作",
......@@ -329,18 +344,18 @@ export default {
title:
params.row.mainRoutingSetStatus == 0
? "工艺派发"
: "移入排产"
: "移入排产",
},
style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : ""
color: params.row.mainRoutingSetStatus == 0 ? "red" : "",
},
on: {
click: () =>
params.row.mainRoutingSetStatus == 0 ||
params.row.mainRoutingSetStatus == 1
? this.goMethod(params.row)
: null
}
: null,
},
},
params.row.mainRoutingSetStatus == 0
? "工艺派发"
......@@ -357,27 +372,27 @@ export default {
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3
? "配套派发"
: ""
: "",
},
style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : ""
color: params.row.mainRoutingSetStatus == 0 ? "red" : "",
},
on: {
click: () =>
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3
? this.supportDis(params.row)
: null
}
: null,
},
},
params.row.isSupportingFinish == 2 ||
params.row.isSupportingFinish == 3
? "配套派发"
: ""
)
),
]);
}
}
},
},
],
selectCount: 0,
selectList: [],
......@@ -396,7 +411,7 @@ export default {
showAps: false,
showAi: false,
showAll: false,
showRun: false
showRun: false,
};
},
mounted() {
......@@ -423,7 +438,7 @@ export default {
let statueArry = [];
let tempmesCodeList = [];
this.resultsStatusArr = [];
value.forEach(data => {
value.forEach((data) => {
var that = this;
statueArry.push(data.id);
this.resultsStatusArr.push(data.mainRoutingSetStatus);
......@@ -517,10 +532,10 @@ export default {
} else {
let params = {
ids: this.listBatchIds,
poolType: this.scheduleType
poolType: this.scheduleType,
};
Api.moveinbatch(params)
.then(r => {
.then((r) => {
if (r.success && r.result == true) {
this.$Message.success("移入排产成功");
this.$refs.grid.reload(this.easySearch);
......@@ -533,7 +548,7 @@ export default {
}
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("移入排产失败");
});
this.canselFooter();
......@@ -542,11 +557,11 @@ export default {
},
//跳转到aps排产池(有判断)
goAps() {
Api.moveintoaps().then(res => {
Api.moveintoaps().then((res) => {
if (res.success) {
if (res.result.res) {
this.$router.push({
name: "aps-aps"
name: "aps-aps",
// params: { customerId: id }
});
} else {
......@@ -557,11 +572,12 @@ export default {
},
//跳转到智能排产池(有判断)
goAi() {
Api.moveintoai().then(res => {
Api.moveintoai().then((res) => {
if (res.success) {
if (res.result.res) {//test
if (res.result.res) {
//test
this.$router.push({
name: "aps-ai"
name: "aps-ai",
// params: { customerId: id }
});
} else {
......@@ -572,17 +588,16 @@ export default {
},
goCemplate() {
this.$router.push({
name: "aps-complete"
name: "aps-complete",
});
},
goStream() {
this.$router.push({
name: "aps-stream"
name: "aps-stream",
});
},
add(){
this.addModal=true;
add() {
this.addModal = true;
},
addOk() {
this.$refs.grid.load();
......@@ -614,7 +629,7 @@ export default {
this.curId = id;
},
removeOk() {
Api.delete({ id: this.curId }).then(r => {
Api.delete({ id: this.curId }).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.deletelModal = false;
......@@ -656,7 +671,7 @@ export default {
},
//移入排产前选择排产模型
onchangeScheduleType(val) {
switch (val) {
switch (Number(val)) {
case 4:
this.scheduleTypeName = "智能排产";
break;
......@@ -691,9 +706,9 @@ export default {
loadInitCount() {
let currentUserId = this.$store.state.userInfo.userId;
let para = { id: currentUserId };
Api.listbyuser(para).then(datas => {
Api.listbyuser(para).then((datas) => {
if (datas.success && datas.result && datas.result.length > 0) {
datas.result.forEach(dateScheduleId => {
datas.result.forEach((dateScheduleId) => {
switch (dateScheduleId.apsScheduleId) {
case 1:
this.showAps = true;
......@@ -707,7 +722,6 @@ export default {
default:
this.showAi = true;
}
});
}
});
......@@ -717,18 +731,18 @@ export default {
this.$store.commit("setCountAll", 0);
this.$store.commit("setCountRun", 0);
Api.getpoolordercount()
.then(res => {
.then((res) => {
if (res.success && res.result.length > 1) {
res.result.forEach(data => {
res.result.forEach((data) => {
this.changeCountOut(data.poolType, data.count);
});
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("获取排产模型数量失败");
});
}
}
},
},
};
</script>
<style lang="less">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment