Commit ed0ece29 authored by 仇晓婷's avatar 仇晓婷

工艺设置,未设置

parent b945fd4f
......@@ -71,7 +71,7 @@ export default {
Record,
Search,
Suspend,
Speed
Speed,
},
data() {
return {
......@@ -85,7 +85,7 @@ export default {
action: Api.index,
easySearch: {
keys: { op: "mesCode", value: null },
productingpreparationpeople: { op: "Equal", value: null }
productingpreparationpeople: { op: "Equal", value: null },
},
suspendModal: false,
recordModal: false,
......@@ -98,7 +98,7 @@ export default {
title: "序号",
type: "index",
width: 70,
align: "center"
align: "center",
},
{
key: "status",
......@@ -107,7 +107,7 @@ export default {
align: "center",
easy: true,
high: true,
width: 100
width: 100,
},
{
key: "mesCode",
......@@ -122,11 +122,11 @@ export default {
{
props: {
content: "开工预警:" + params.row.startWarning + "条",
trigger: "hover"
trigger: "hover",
},
style: {
cursor: "pointer"
}
cursor: "pointer",
},
},
[
h(
......@@ -135,25 +135,25 @@ export default {
props: {
type: "warning",
// count: 2,
count: params.row.startWarning
count: params.row.startWarning,
},
style: {
marginTop: "12px",
marginLeft: "5px"
}
marginLeft: "5px",
},
},
[
h("Icon", {
props: {
type: "md-alert"
type: "md-alert",
},
style: {
fontSize: "16px",
color: "#f1cb08"
}
})
color: "#f1cb08",
},
}),
]
)
),
]
),
h(
......@@ -161,8 +161,8 @@ export default {
{
props: {
content: "完工预警:" + params.row.finishWarning + "条",
trigger: "hover"
}
trigger: "hover",
},
},
[
h(
......@@ -171,38 +171,38 @@ export default {
props: {
type: "info",
// count: 2,
count: params.row.finishWarning
count: params.row.finishWarning,
},
style: {
marginTop: "12px",
marginLeft: "5px"
}
marginLeft: "5px",
},
},
[
h("Icon", {
props: {
type: "md-alert"
type: "md-alert",
},
style: {
fontSize: "16px",
color: "#31F8E6",
marginLeft: "5px"
}
})
]
)
marginLeft: "5px",
},
}),
]
)
),
]
),
],
]);
}
},
},
{
key: "productName",
title: this.l("productName"),
align: "left",
easy: true,
high: true
high: true,
},
{
......@@ -217,7 +217,7 @@ export default {
this.sliceStr(params.row.demandStartDate + " ", 0, 10),
params.row.demandStartDate
);
}
},
},
{
key: "demandFinishDate",
......@@ -231,7 +231,7 @@ export default {
this.sliceStr(params.row.demandFinishDate + " ", 0, 10),
params.row.demandFinishDate
);
}
},
},
{
key: "actualStartDate",
......@@ -247,7 +247,7 @@ export default {
? ""
: params.row.actualStartDate
);
}
},
},
{
key: "actualFinishDate",
......@@ -263,7 +263,7 @@ export default {
? ""
: params.row.actualFinishDate
);
}
},
},
{
key: "routingType",
......@@ -272,7 +272,7 @@ export default {
code: "mes_xingchi_plan.order_material.routingType",
easy: true,
high: true,
width: 100
width: 100,
},
{
title: this.l("jindu"),
......@@ -285,8 +285,8 @@ export default {
"ButtonGroup",
{
props: {
shape: "circle"
}
shape: "circle",
},
},
[
h(
......@@ -294,13 +294,13 @@ export default {
{
style: {
background: "#e4e6ed ",
borderColor: "#e4e6ed "
borderColor: "#e4e6ed ",
},
on: {
click: () => {
this.speed(params.row);
}
}
},
},
},
params.row.unstartCount //未开工数
),
......@@ -309,13 +309,13 @@ export default {
{
style: {
background: "#ffc000",
borderColor: "#ffc000"
borderColor: "#ffc000",
},
on: {
click: () => {
this.speed(params.row);
}
}
},
},
},
params.row.startCount //开工数
),
......@@ -325,14 +325,14 @@ export default {
{
style: {
background: "#ff7a8b",
borderColor: "#ff7a8b"
borderColor: "#ff7a8b",
},
on: {
click: () => {
this.speed(params.row);
}
}
},
},
},
params.row.stopCount //暂停数
),
......@@ -341,27 +341,27 @@ export default {
{
style: {
background: "#27c149",
borderColor: "#27c149"
borderColor: "#27c149",
// color: '#fff'
},
on: {
click: () => {
this.speed(params.row);
}
}
},
},
},
params.row.finishCount //完成数
)
),
]
)
),
]);
}
},
},
{
key: "remark",
title: this.l("remark"),
align: "center",
hide: true
hide: true,
},
{
title: "暂停记录",
......@@ -374,12 +374,12 @@ export default {
"op",
{
attrs: { oprate: "record", class: "edit" },
on: { click: () => this.record(params.row.id) }
on: { click: () => this.record(params.row.id) },
},
"暂停记录"
)
),
]);
}
},
},
{
title: "操作",
......@@ -400,73 +400,73 @@ export default {
type: "error",
size: "small",
icon: "md-play",
ghost: true
ghost: true,
},
style: {
fontSize: "18px",
width: "50px",
height: "25px",
paddingTop: "0"
paddingTop: "0",
},
on: {
click: () => {
this.start(params.row);
}
}
},
},
},
""
),
h(
params.row.status == 6
? "Button"
: "", //订单状态执行中,暂停
params.row.status == 6 ? "Button" : "", //订单状态执行中,暂停
{
props: {
type: "success",
size: "small",
icon: "ios-pause",
ghost: true,
tooltip: "暂停"
tooltip: "暂停",
},
style: {
fontSize: "18px",
width: "50px",
height: "25px",
paddingTop: "0"
paddingTop: "0",
},
on: {
click: () => {
this.suspend(params.row);
}
}
},
},
},
""
),
h(
params.row.status == 5 && params.row.splitCardStatus == 0 ? "op" : "", //订单状态执行中,暂停
params.row.status == 5 && params.row.splitCardStatus == 0
? "op"
: "", //订单状态执行中,暂停
{
attrs: {
icon: "md-sync",
type: "icon",
title: "回收订单",
oprate: "edit",
msg: "确认要恢复工序吗?"
msg: "确认要恢复工序吗?",
},
on: {
click: () => {
this.recycle(params.row);
},
},
}
}
}
)
),
]);
}
}
},
},
],
loading: false,
recovery: {
orderId: null,
demandFinishDate: "" //计划完成时间
demandFinishDate: "", //计划完成时间
},
mesCode: "",
rulesRecycle: {
......@@ -475,10 +475,10 @@ export default {
required: true,
message: "请选择计划完成时间",
trigger: "change",
type: "date"
}
]
}
type: "date",
},
],
},
};
},
mounted() {},
......@@ -509,15 +509,15 @@ export default {
this.orderId = row.id;
Api.info({
routingHeaderId: row.routingHeaderId,
dispatchExecuteId: row.dispatchExecuteId
dispatchExecuteId: row.dispatchExecuteId,
})
.then(r => {
.then((r) => {
if (r.success) {
this.result = r.result;
this.loading = false;
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("连接错误");
});
}
......@@ -536,8 +536,8 @@ export default {
Api.start({
id: row.id,
status: 6,
laster: this.laster
}).then(r => {
laster: this.laster,
}).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("启动成功");
......@@ -548,7 +548,7 @@ export default {
},
onCancel: () => {
this.$Message.info("已取消");
}
},
});
},
clsoeSpeedModal() {
......@@ -562,7 +562,7 @@ export default {
},
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;
......@@ -576,7 +576,7 @@ export default {
this.mesCode = row.mesCode;
this.recovery = {
orderId: row.id,
demandFinishDate: row.demandFinishDate
demandFinishDate: row.demandFinishDate,
};
},
changeFinishiDate() {
......@@ -584,14 +584,14 @@ export default {
this.recovery.demandFinishDate = "";
this.recovery.demandFinishDate = this.getFormatDateEnd(temTime);
Api.orderrecovery(this.recovery)
.then(res => {
.then((res) => {
if (res.success) {
this.$Message.success("回收成功");
this.$refs.grid.reload(this.easySearch);
this.recycleModal = false;
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("数据连接错误");
});
},
......@@ -599,7 +599,7 @@ export default {
this.mesCode = "";
this.recovery = {
orderId: null,
demandFinishDate: "" //计划完成时间
demandFinishDate: "", //计划完成时间
};
this.recycleModal = false;
},
......@@ -631,8 +631,8 @@ export default {
l(key) {
let vkey = "mes_order_watch" + "." + key;
return this.$t(vkey) || key;
}
}
},
},
};
</script>
<style lang="less">
......
import Api from '@/plugins/request'
export default {
index: `${PlanUrl}/mesorders/getpagedmesordersforpdefm`,
paged(params) {
return Api.post(`${PlanUrl}/mesorders/getpagedmesordersforpdefm`, params);
},
index1: `${technologyUrl}routingheader/paged`,
paged1(params) {
return Api.post(`${technologyUrl}routingheader/paged`, params);
},
// get(params) {
// return Api.get(`${technologyUrl}routingheader/get`, params);
// },
// create(params) {
// return Api.post(`${technologyUrl}routingheader/create`, params);
// },
// update(params) {
// return Api.put(`${technologyUrl}routingheader/update`, params);
// },
// getCloneHeader(params){
// return Api.post(`${technologyUrl}routingheader/cloneheader`,params);
// },
// getCodeNumber(params){
// return Api.post(`${systemUrl}/cache/generate_serialcode`,params);
// },
// delete(id) {
// return Api.delete(`${technologyUrl}routingheader/delete`, {
// params: {
// id: id
// }
// });
// },
// deletes(params) {
// return Api.post(`${technologyUrl}routingheader/batchdelete`, params);
// }
}
......@@ -13,8 +13,11 @@
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="productingpreparationpeople" style="width:200px">
<departmentSelect v-model="easySearch.productingpreparationpeople.value" :type="3"></departmentSelect>
</FormItem>
<FormItem prop="keys">
<Input placeholder="请输入订单编号/产品名称" v-model="easySearch.keys.value" />
<Input placeholder="请输入订单编号/产品名称" v-model="easySearch.keys.value" clearable/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......@@ -32,9 +35,20 @@
</DataGrid>
</Content>
</Layout>
<Modal
v-model="modal"
:title="title"
width="1200"
footer-hide
fullscreen
:mask-closable="false"
>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from "./api";
import ProductTree from "@/components/page/productTree.vue"; //左侧树列表
import Search from "./search";
export default {
......@@ -44,54 +58,82 @@ export default {
},
data() {
return {
action: "",
action: Api.index,
showMenu: true,
showMenu: true,
title: "",
curId: 0,
detail: null,
modal: false,
easySearch: {
keys: { op: "mmcode,name", value: null },
levelId: { op: "In", value: "" },
upId: { op: "In", value: 0 },
keys: { op: "mescode,productName", value: null },
productingpreparationpeople: { op: "Equal", value: null },
},
columns: [
{ type: "selection", width: 70, align: "center" },
// { type: "selection", width: 70, align: "center" },
{
title: "序号",
key: "id",
type: "index",
width: 80,
align: "center",
},
{
title: "订单编号",
key: "mesCode",
align: "center",
},
{
title: "任务类型",
key: "taskTypeName",
key: "taskType",
align: "center",
code: "plan.order.taskType",
},
{
title: "产品名称",
key: "productName",
align: "center",
},
{ title: "图号", key: "drawnNumber" },
{ title: "项目号", key: "projectNumber" },
{ title: "批次号", key: "batchNumber" },
{ title: "数量", key: "quantity", align: "center" },
{
title: "工艺规程",
key: "mainRoutingID",
key: "mainRoutingStatus",
render: (h, params) => {
return h(
"div",
[
h("state", {
props: {
code: "process.RoutingStatus",
type: "text",
value:
params.row.mainRoutingStatus != 4
? params.row.mainRoutingStatus
: "",
},
}),
h(
"a",
{
on: {
click: () => {
this.record(params.row);
},
},
},
params.row.mainRoutingStatus == 4 ? "未设置" : ""
),
],
{}
);
},
},
{
title: "料单",
key: "materialbillID",
key: "materialbillStatus",
code: "process.RoutingStatus",
},
],
......@@ -101,6 +143,12 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
record(row) {
this.curId = 0;
this.title = "设置";
this.detail = () => import("./set");
this.modal = true;
},
onHide() {
this.showMenu = false;
},
......@@ -108,13 +156,8 @@ export default {
this.showMenu = true;
},
productSearch(id, item, ids) {
if (ids.length > 0) {
this.orderSearchForm.productId = ids.join(",");
} else {
this.orderSearchForm.productId = "-1";
this.orderSearchForm.productName = "";
}
this.easySearch(this.orderSearchForm);
let where = { productId: { op: "In", value: ids } };
this.$refs.grid.reload(where);
},
search() {
this.$refs.grid.reload(this.easySearch);
......@@ -122,6 +165,15 @@ export default {
search2() {
this.$refs.grid.modalSearch = true;
},
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
cancel() {
this.curId = 0;
this.modal = false;
},
},
};
</script>
......
<template>
<div class="product-mix">
<Layout>
<Sider hide-trigger v-if="showMenu" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider>
<div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" />
</a>
</div>
<Content :class="!showMenu?'con_bord':''">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:set="false"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入工艺名称/工艺编号"
v-width="200"
v-model="easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
</DataGrid>
</Content>
</Layout>
</div>
</template>
<script>
import Api from "./api";
import ProductTree from "@/components/page/productTree.vue"; //左侧树列表
export default {
components: {
ProductTree,
},
data() {
return {
action: Api.index1,
showMenu: true,
showMenu: true,
title: "",
easySearch: {
keys: { op: "unicode,name,code", value: null },
},
columns: [
{ type: "selection", width: 70, align: "center" },
{
key: "code",
title: this.l("code"),
align: "left",
width: 200,
easy: true,
high: true,
},
{
key: "name",
title: this.l("name"),
align: "left",
easy: true,
high: true,
tooltip: true,
},
{
key: "phase",
title: this.l("phase"),
align: "center",
high: true,
width: 100,
code: "Process.Routing.phase",
},
{
key: "versionid",
title: this.l("version"),
align: "center",
high: true,
width: 100,
code: "Process.Routing.version",
},
{
title: this.l("approvalStatus"),
key: "approvalStatus",
align: "center",
width: "120",
code: "process.RoutingStatus",
},
{
key: "routingType",
title: this.l("routingType"),
align: "center",
width: 100,
high: true,
code: "Process.Routing.routingType",
},
{
key: "drawingNo",
title: this.l("drawingNo"),
align: "left",
high: true,
},
{
key: "productName",
title: this.l("productName"),
align: "left",
high: true,
tooltip: true,
},
{
key: "departmentName",
title: this.l("departmentName"),
width: 100,
align: "left",
high: true,
tooltip: true,
},
{
key: "isEffect",
title: this.l("isEffect"),
align: "center",
width: 80,
high: true,
code: "Process.Status",
},
{
key: "creationTime",
title: this.$t("creationTime"),
align: "left",
hide: true,
},
{
key: "creatorUserId",
title: this.$t("creatorUserId"),
align: "left",
hide: true,
type: "user",
},
{
key: "lastModificationTime",
title: this.$t("lastModificationTime"),
align: "left",
hide: true,
},
{
key: "lastModifierUserId",
title: this.$t("lastModifierUserId"),
align: "left",
hide: true,
type: "user",
},
],
};
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
record(row) {
alert(1);
},
onHide() {
this.showMenu = false;
},
showMenuFn() {
this.showMenu = true;
},
productSearch(id, item, ids) {
let where = { productId: { op: "In", value: ids } };
this.$refs.grid.reload(where);
},
search() {
this.$refs.grid.reload(this.easySearch);
},
l(key) {
let vkey = "routingHeader" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
.product-mix {
font-family: Microsoft YaHei;
padding-top: 3px;
.ivu-layout-sider {
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 91vh;
overflow: auto;
}
.ivu-layout-content {
// margin-left: 5px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
overflow: auto;
padding: 10px;
height: 91vh;
}
}
</style>
\ No newline at end of file
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