Commit e7c7f72e authored by renjintao's avatar renjintao

aps/plan

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