Commit e7c7f72e authored by renjintao's avatar renjintao

aps/plan

parent da3cbe73
<template> <template>
<div class="h100"> <div class="h100">
<DataGrid <DataGrid :columns="columns" ref="grid" :action="action" @on-selection-change="selectInfo" :batch="false">
:columns="columns"
ref="grid"
:action="action"
@on-selection-change="selectInfo"
:batch="false"
>
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
<Input <Input search enter-button placeholder="请输入关键字订单编号/项目名称" v-model="easySearch.keys.value" v-width="300" @on-search="search" />
search
enter-button
placeholder="请输入关键字订单编号/项目名称"
v-model="easySearch.keys.value"
v-width="300"
@on-search="search"
/>
</FormItem> </FormItem>
</Form> </Form>
</template> </template>
<template slot="searchBack"> <template slot="searchBack">
<Badge <Badge :count="this.$store.state.countAps" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAps">
:count="this.$store.state.countAps"
overflow-count="99"
style="margin-right:15px;"
type="info"
v-if="showAps"
>
<a href="javascript:;" @click="goAps">APS排产&nbsp;&nbsp;&nbsp;</a> <a href="javascript:;" @click="goAps">APS排产&nbsp;&nbsp;&nbsp;</a>
</Badge> </Badge>
<Badge <Badge :count="this.$store.state.countAi" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAi">
:count="this.$store.state.countAi"
overflow-count="99"
style="margin-right:15px;"
type="info"
v-if="showAi"
>
<a href="javascript:;" @click="goAi">智能排产&nbsp;&nbsp;&nbsp;</a> <a href="javascript:;" @click="goAi">智能排产&nbsp;&nbsp;&nbsp;</a>
</Badge> </Badge>
<Badge <Badge :count="this.$store.state.countAll" overflow-count="99" style="margin-right:15px;" type="info" v-if="showAll">
:count="this.$store.state.countAll"
overflow-count="99"
style="margin-right:15px;"
type="info"
v-if="showAll"
>
<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">
...@@ -126,19 +95,11 @@ ...@@ -126,19 +95,11 @@
<orderSupport ref="orderSupport"></orderSupport> <orderSupport ref="orderSupport"></orderSupport>
</Modal> </Modal>
<Modal v-model="modalAccessory" :title="title" fullscreen footer-hide> <Modal v-model="modalAccessory" :title="title" fullscreen footer-hide>
<component <component :is="details" :eid="orderId" :mesCode="mesCode" :productName="productName" :drawnNumber="drawnNumber" :count="count" @on-close="cancel" @on-ok="addOk" />
:is="details"
:eid="orderId"
:mesCode="mesCode"
:productName="productName"
:drawnNumber="drawnNumber"
:count="count"
@on-close="cancel"
@on-ok="addOk"
/>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Add from "./add"; import Add from "./add";
...@@ -174,8 +135,7 @@ export default { ...@@ -174,8 +135,7 @@ export default {
scheduleModal: false, scheduleModal: false,
orderSupportModal: false, orderSupportModal: false,
curId: 0, curId: 0,
statuList: statuList: this.$store.getters.dictionaryByKey("aps.plan.supportingStatus") || [],
this.$store.getters.dictionaryByKey("aps.plan.supportingStatus") || [],
name: "", name: "",
items: null, items: null,
title: "", title: "",
...@@ -188,8 +148,7 @@ export default { ...@@ -188,8 +148,7 @@ export default {
drawnNumber: "", drawnNumber: "",
count: 0, count: 0,
modalAccessory: false, modalAccessory: false,
columns: [ columns: [{
{
key: "selection", key: "selection",
title: "#", title: "#",
type: "selection", type: "selection",
...@@ -231,8 +190,7 @@ export default { ...@@ -231,8 +190,7 @@ export default {
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h( return h(
"op", "op", {
{
attrs: { attrs: {
oprate: "detail", oprate: "detail",
}, },
...@@ -376,16 +334,15 @@ export default { ...@@ -376,16 +334,15 @@ export default {
width: 140, width: 140,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", {
class: "action"
}, [
h( h(
"op", "op", {
{
attrs: { attrs: {
oprate: "detail", oprate: "detail",
title: title: params.row.mainRoutingSetStatus == 0 ?
params.row.mainRoutingSetStatus == 0 "工艺派发" : "移入排产",
? "工艺派发"
: "移入排产",
}, },
style: { style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : "", color: params.row.mainRoutingSetStatus == 0 ? "red" : "",
...@@ -393,27 +350,23 @@ export default { ...@@ -393,27 +350,23 @@ export default {
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 ?
? "工艺派发" "工艺派发" :
: params.row.mainRoutingSetStatus == 1 params.row.mainRoutingSetStatus == 1 ?
? "移入排产" "移入排产" :
: "" ""
), ),
h( h(
"op", "op", {
{
attrs: { attrs: {
oprate: "detail", oprate: "detail",
title: title: 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" : "",
...@@ -421,15 +374,14 @@ export default { ...@@ -421,15 +374,14 @@ export default {
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 ?
? "配套派发" "配套派发" :
: "" ""
), ),
]); ]);
}, },
...@@ -458,7 +410,10 @@ export default { ...@@ -458,7 +410,10 @@ export default {
mounted() { mounted() {
this.loadInitCount(); this.loadInitCount();
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
...@@ -670,7 +625,9 @@ export default { ...@@ -670,7 +625,9 @@ 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;
...@@ -747,7 +704,9 @@ export default { ...@@ -747,7 +704,9 @@ export default {
//进入页面加载排产count----- //进入页面加载排产count-----
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) => {
...@@ -774,14 +733,14 @@ export default { ...@@ -774,14 +733,14 @@ export default {
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 && 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("获取排产池排产数量失败");
}); });
}, },
//配套申请 //配套申请
...@@ -835,16 +794,20 @@ export default { ...@@ -835,16 +794,20 @@ export default {
}, },
}; };
</script> </script>
<style lang="less"> <style lang="less">
.footerSpan { .footerSpan {
width: 120px; width: 120px;
} }
.demo-badge-alone { .demo-badge-alone {
background: #5cb85c !important; background: #5cb85c !important;
} }
.radioList { .radioList {
margin: 10px 30px; margin: 10px 30px;
} }
.radioList label { .radioList label {
margin-top: 5px; margin-top: 5px;
} }
......
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