Commit 11f4c882 authored by renjintao's avatar renjintao

选择模型

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