Commit cc7fb14a authored by renjintao's avatar renjintao

result ai aps

parent c5be353d
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
<Option v-for="item in rulesAiList" :value="item.value" :key="item.value">{{ item.label }}</Option> <Option v-for="item in rulesAiList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select> --> </Select> -->
<DatePicker type="date" placeholder="设置基准日期" style="width: 150px;" v-model="entity.setTime" @on-change="getTime"></DatePicker> <DatePicker type="date" placeholder="设置基准日期" style="width: 150px;" v-model="entity.setTime" @on-change="getTime"></DatePicker>
<Button type="primary" @click="openApsModal">APS排产</Button> <Button type="primary" @click="openApsModal">智能排产</Button>
</template> </template>
<template slot="batch"> <template slot="batch">
<Button type="primary" class="mr10 ml10" @click="removeOk">移出排产</Button> <Button type="primary" class="mr10 ml10" @click="removeOk">移出排产</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="apsModal" title="确定APS排产" @on-ok="apsOk" @on-cancel="cancel"> <Modal v-model="apsModal" title="确定进行智能排产" @on-ok="apsOk" @on-cancel="cancel">
<p>确定进行APS排产?</p> <p>确定进行智能排产?</p>
</Modal> </Modal>
<Modal v-model="resultModal" title="数据检查" width="1500" @on-ok="cancel" @on-cancel="cancel"> <Modal v-model="resultModal" title="数据检查" width="1500" @on-ok="cancel" @on-cancel="cancel">
...@@ -514,7 +514,7 @@ export default { ...@@ -514,7 +514,7 @@ export default {
this.$Message.success("排产计算成功"); this.$Message.success("排产计算成功");
this.circleModal = false; this.circleModal = false;
this.$router.push({ this.$router.push({
path: "/aps/results/indexData" path: "/aps/results"
// params: { customerId: id } // params: { customerId: id }
}); });
} else { } else {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:class="isactive == index ? 'addclass' : '' " :class="isactive == index ? 'addclass' : '' "
> >
<Checkbox v-model="li.checked" class="i-checkbox" @on-change="changeCheck(li,index)"></Checkbox> <Checkbox v-model="li.checked" class="i-checkbox" @on-change="changeCheck(li,index)"></Checkbox>
<div class="title-t" @click="listData(li.schedule_Id,index)">排产方案:{{li.schedule_Id}}</div> <div class="title-t" @click="listData(li,index)">排产方案:{{li.schedule_Id}}</div>
<div class="fa">排产时间:{{li.plan_Date}}</div> <div class="fa">排产时间:{{li.plan_Date}}</div>
<div class="fa"> <div class="fa">
<span>{{li.iNSERTFLAG}} /</span> <span>{{li.iNSERTFLAG}} /</span>
...@@ -34,10 +34,10 @@ ...@@ -34,10 +34,10 @@
<h4 :text="title">{{title}}</h4> <h4 :text="title">{{title}}</h4>
</Col> </Col>
<Col span="10"> <Col span="10">
<a href="#" @click="comeBlck" class="black">APS排产</a> <a href="#" @click="comeBlck" class="black">{{apsTitle}}</a>
</Col> </Col>
<Col span="10" style="text-align: right;"> <Col span="10" style="text-align: right;" >
<a href="#" @click="datasShow" v-if="false">数据包</a> <a href="#" @click="datasShow" v-if="apsTitle=='智能排产'">数据包</a>
<a href="#" @click="gantChart" v-if="gant">甘特图</a> <a href="#" @click="gantChart" v-if="gant">甘特图</a>
</Col> </Col>
</Row> </Row>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</div> </div>
<Modal v-model="modal1Gant" fullscreen :title="modalTitle" footer-hide> <Modal v-model="modal1Gant" fullscreen :title="modalTitle" footer-hide>
<!-- <Gantt :id="id" /> --> <!-- <Gantt :id="id" /> -->
<gantt :is="gantt" :id="id" /> <gantt :is="gantt" :id="id" :time="time" @close="closemodal" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -80,13 +80,29 @@ export default { ...@@ -80,13 +80,29 @@ export default {
gant: false, gant: false,
gantt: null, gantt: null,
curPage: null, curPage: null,
modalTitle:'甘特图' modalTitle:'甘特图',
time:'',
apsTitle:'',
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
created() { created() {
let apsCount=this.$store.state.countAps
let aiCount=this.$store.state.countAi
if(apsCount>0&&aiCount==0)
{
this.apsTitle="APS排产"
}
else if(apsCount==0&&aiCount>0)
{
this.apsTitle="智能排产"
}
else
{
this.apsTitle=""
}
this.orderlist(); this.orderlist();
}, },
methods: { methods: {
...@@ -105,12 +121,13 @@ export default { ...@@ -105,12 +121,13 @@ export default {
this.$Message.error("请求失败"); this.$Message.error("请求失败");
}); });
}, },
listData(id, index) { listData(row, index) {
this.blacks = true; this.blacks = true;
this.gant = true; this.gant = true;
this.detail = () => import("./result"); this.detail = () => import("./result");
this.isactive = index; this.isactive = index;
this.id = id; this.id = row.schedule_Id;
this.time=row.plan_Date;
this.title = "排产方案结果"; this.title = "排产方案结果";
}, },
clear() { clear() {
...@@ -146,7 +163,14 @@ export default { ...@@ -146,7 +163,14 @@ export default {
}, },
// 返回 // 返回
comeBlck() { comeBlck() {
this.$router.push({ path: "/aps/aps" }); if(this.apsTitle=="APS排产")
{
this.$router.push({ path: "/aps/aps" });
}
else
{
this.$router.push({ path: "/aps/ai" });
}
}, },
parameter() { parameter() {
Api.processschemedispatch({ Api.processschemedispatch({
...@@ -168,7 +192,7 @@ export default { ...@@ -168,7 +192,7 @@ export default {
}, },
datasShow() { datasShow() {
this.modal1Gant = true; this.modal1Gant = true;
this.modalTitle='数据包'; this.modalTitle='生成数据包';
this.gantt = () => import("./datasShow"); this.gantt = () => import("./datasShow");
}, },
changeCheck(item, i) { changeCheck(item, i) {
...@@ -184,6 +208,10 @@ export default { ...@@ -184,6 +208,10 @@ export default {
}, },
cancel() { cancel() {
this.showFooter = false; this.showFooter = false;
},
closemodal(){
this.modal1Gant=false
this.time=''
} }
}, },
computed: { computed: {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:class="isactive == index ? 'addclass' : '' " :class="isactive == index ? 'addclass' : '' "
> >
<Checkbox v-model="li.checked" class="i-checkbox" @on-change="changeCheck(li,index)"></Checkbox> <Checkbox v-model="li.checked" class="i-checkbox" @on-change="changeCheck(li,index)"></Checkbox>
<div class="title-t" @click="listData(li,index)">排产方案:{{li.schedule_Id}}</div> <div class="title-t" @click="listData(li.schedule_Id,index)">排产方案:{{li.schedule_Id}}</div>
<div class="fa">排产时间:{{li.plan_Date}}</div> <div class="fa">排产时间:{{li.plan_Date}}</div>
<div class="fa"> <div class="fa">
<span>{{li.iNSERTFLAG}} /</span> <span>{{li.iNSERTFLAG}} /</span>
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
<h4 :text="title">{{title}}</h4> <h4 :text="title">{{title}}</h4>
</Col> </Col>
<Col span="10"> <Col span="10">
<a href="#" @click="comeBlck" class="black">智能排产</a> <a href="#" @click="comeBlck" class="black">APS排产</a>
</Col> </Col>
<Col span="10" style="text-align: right;" v-if="gant"> <Col span="10" style="text-align: right;">
<a href="#" @click="datasShow" >数据包</a> <a href="#" @click="datasShow" v-if="false">数据包</a>
<a href="#" @click="gantChart" >甘特图</a> <a href="#" @click="gantChart" v-if="gant">甘特图</a>
</Col> </Col>
</Row> </Row>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</div> </div>
<Modal v-model="modal1Gant" fullscreen :title="modalTitle" footer-hide> <Modal v-model="modal1Gant" fullscreen :title="modalTitle" footer-hide>
<!-- <Gantt :id="id" /> --> <!-- <Gantt :id="id" /> -->
<gantt :is="gantt" :id="id" :time="time" @close="closemodal" /> <gantt :is="gantt" :id="id" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -80,8 +80,7 @@ export default { ...@@ -80,8 +80,7 @@ export default {
gant: false, gant: false,
gantt: null, gantt: null,
curPage: null, curPage: null,
modalTitle:'甘特图', modalTitle:'甘特图'
time:'',
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -106,13 +105,12 @@ export default { ...@@ -106,13 +105,12 @@ export default {
this.$Message.error("请求失败"); this.$Message.error("请求失败");
}); });
}, },
listData(row, index) { listData(id, index) {
this.blacks = true; this.blacks = true;
this.gant = true; this.gant = true;
this.detail = () => import("./result"); this.detail = () => import("./result");
this.isactive = index; this.isactive = index;
this.id = row.schedule_Id; this.id = id;
this.time=row.plan_Date;
this.title = "排产方案结果"; this.title = "排产方案结果";
}, },
clear() { clear() {
...@@ -148,7 +146,7 @@ export default { ...@@ -148,7 +146,7 @@ export default {
}, },
// 返回 // 返回
comeBlck() { comeBlck() {
this.$router.push({ path: "/aps/ai" }); this.$router.push({ path: "/aps/aps" });
}, },
parameter() { parameter() {
Api.processschemedispatch({ Api.processschemedispatch({
...@@ -170,7 +168,7 @@ export default { ...@@ -170,7 +168,7 @@ export default {
}, },
datasShow() { datasShow() {
this.modal1Gant = true; this.modal1Gant = true;
this.modalTitle='生成数据包'; this.modalTitle='数据包';
this.gantt = () => import("./datasShow"); this.gantt = () => import("./datasShow");
}, },
changeCheck(item, i) { changeCheck(item, i) {
...@@ -186,10 +184,6 @@ export default { ...@@ -186,10 +184,6 @@ export default {
}, },
cancel() { cancel() {
this.showFooter = false; this.showFooter = false;
},
closemodal(){
this.modal1Gant=false
this.time=''
} }
}, },
computed: { computed: {
......
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