Commit bda9e48b authored by 周远喜's avatar 周远喜

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents a6432029 7be98c2e
<template> <template>
<div class="ib"> <div class="ib">
<div class="ib" v-if="!isMore"> <div class="ib" v-if="!isMore">
<span v-if="type=='text'" :style="style">{{name}}</span> <span v-if="type=='text'" :style="style">{{name}}</span>
<Tag v-if="type=='tag'" :color="tagcolor">{{name}}</Tag> <Tag v-if="type=='tag'" :color="tagcolor">{{name}}</Tag>
...@@ -10,34 +9,32 @@ ...@@ -10,34 +9,32 @@
<div class="ib" v-else v-for="(li,i) in items" :key="i"> <div class="ib" v-else v-for="(li,i) in items" :key="i">
<span v-if="type=='text'" :style="li.style">{{li.name}}</span> <span v-if="type=='text'" :style="li.style">{{li.name}}</span>
<Tag v-if="type=='tag'" :color="li.tagcolor">{{li.name}}</Tag> <Tag v-if="type=='tag'" :color="li.tagcolor">{{li.name}}</Tag>
<Badge v-if="type=='dot'" :color="li.tagcolor" :text="li.name" /> <Badge v-if="type=='dot'" :color="li.tagcolor" :text="li.name" />&nbsp;
&nbsp; </div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: 'state', name: "state",
data() { data() {
return { return {
name: '', name: "",
isMore:false, isMore: false,
item: {}, item: {},
items: [], items: [],
data: [] data: []
} };
}, },
props: { props: {
default: { default: {
type: String, type: String,
default: '' default: ""
}, },
type: { type: {
type: String, type: String,
default: 'text', default: "text",
validator: function(value) { validator: function(value) {
return ['text', 'tag', 'dot','icon'].indexOf(value) != -1 return ["text", "tag", "dot", "icon"].indexOf(value) != -1;
} }
}, },
code: { code: {
...@@ -62,35 +59,39 @@ export default { ...@@ -62,35 +59,39 @@ export default {
} }
}, },
created() { created() {
this.data = this.$store.getters.dictionaryByKey(this.code) || [] this.data = this.$store.getters.dictionaryByKey(this.code) || [];
}, },
methods: { methods: {
setName(v) { setName(v) {
if ((v+"").indexOf(',')==-1) { if ((v + "").indexOf(",") == -1) {
var item var item;
this.data.map((u) => { this.data.map(u => {
if (u.code == v) { if (u.code == v) {
item = u item = u;
} }
}) });
if (item) { if (item) {
this.name = item.name this.name = item.name;
this.item = item this.item = item;
} else {
if (this.value == "undefined") {
this.name = ' '
} else { } else {
this.name = this.value this.name = this.value;
}
} }
} else { } else {
this.isMore=true; this.isMore = true;
var items=[]; var items = [];
var ul=(v+"").split(',') var ul = (v + "").split(",");
this.data.map((u) => { this.data.map(u => {
if (ul.indexOf(u.code)>-1) { if (ul.indexOf(u.code) > -1) {
u.tagcolor=u.color|'default' u.tagcolor = u.color | "default";
u.style={color: u.color|'inherit'} u.style = { color: u.color | "inherit" };
items.push(u) items.push(u);
} }
}) });
this.items=items; this.items = items;
} }
} }
}, },
...@@ -99,36 +100,36 @@ export default { ...@@ -99,36 +100,36 @@ export default {
if ( if (
this.color && this.color &&
this.item && this.item &&
this.item.color != '' && this.item.color != "" &&
this.item.color != null this.item.color != null
) { ) {
return this.item.color return this.item.color;
} }
return 'default' return "default";
}, },
style() { style() {
if (!this.color) { if (!this.color) {
return {} return {};
} }
return { return {
color: color:
this.item && this.item.color != '' && this.item.color != null this.item && this.item.color != "" && this.item.color != null
? this.item.color ? this.item.color
: 'inherit' : "inherit"
} };
} }
}, },
watch: { watch: {
value(v) { value(v) {
this.setName(v) this.setName(v);
// this.$forceUpdate() // this.$forceUpdate()
}, },
data(v){ data(v) {
if(v.length>0){ if (v.length > 0) {
this.setName(this.value) this.setName(this.value);
this.$forceUpdate() this.$forceUpdate();
} }
} }
} }
} };
</script> </script>
\ No newline at end of file
...@@ -1043,6 +1043,7 @@ export default { ...@@ -1043,6 +1043,7 @@ export default {
multi_machine: '多台分配', multi_machine: '多台分配',
notes: '备注', notes: '备注',
insert_flag: '插单', insert_flag: '插单',
important_flag:"插单",
outside_time: '外协时间', outside_time: '外协时间',
discrete_percent: '离散百分比%', discrete_percent: '离散百分比%',
taskseq_des: '', taskseq_des: '',
......
<template> <template>
<Layout class="product-layout"> <Layout class="product-layout">
<Header> <Header>
<span class="menu"> <a class="menu">
<a class="home"> <span class="home">
<Icon type="ios-keypad" /> <Icon type="ios-keypad" />
<div class="top_menu_box"> <div class="top_menu_box">
<table class="t_table_box">
<ul class="top_menu"> <tr>
<li v-for="(item,i) in filterSider"> <td class="t_title">
<ul class="row_ul"> <a class="a_goIndex" @click="goIndex">
<li class="title">{{item.title}}</li> <b class="title">首页</b>
</a>
</td>
</tr>
<tr v-for="(item,i) in filterSider">
<td class="t_title">
<b class="title"
>{{item.title}}</b>
</td>
<td>
<ul class="table_row_ul">
<li v-for="(li,j) in item.children"> <li v-for="(li,j) in item.children">
<a >{{li.title}}</a> <a @click="goPage(li,j)" :class="{'active': li.id === isActive}">{{li.title}}</a>
</li> </li>
</ul> </ul>
</li> </td>
</ul> </tr>
</div> </table>
</a> </div>
</span> </span>
</a>
<i-header-breadcrumb v-if="showBreadcrumb && !headerMenu && !isMobile" ref="breadcrumb" /> <i-header-breadcrumb v-if="showBreadcrumb && !headerMenu && !isMobile" ref="breadcrumb" />
<i-header-search v-if="showSearch && !headerMenu && !isMobile && !showBreadcrumb" /> <i-header-search v-if="showSearch && !headerMenu && !isMobile && !showBreadcrumb" />
<div class="header_right"> <div class="header_right">
...@@ -88,6 +100,7 @@ export default { ...@@ -88,6 +100,7 @@ export default {
}, },
data() { data() {
return { return {
isActive:0,
showDrawer: false, showDrawer: false,
ticking: false, ticking: false,
headerVisible: true, headerVisible: true,
...@@ -266,7 +279,14 @@ export default { ...@@ -266,7 +279,14 @@ export default {
this.keepAlivePush(pageName); this.keepAlivePush(pageName);
} }
}); });
} },
goPage(u) {
this.$router.push(u.path)
this.isActive = u.id
},
goIndex(){
this.$router.push("/")
},
}, },
mounted() { mounted() {
document.addEventListener("scroll", this.handleScroll, { passive: true }); document.addEventListener("scroll", this.handleScroll, { passive: true });
...@@ -279,10 +299,8 @@ export default { ...@@ -279,10 +299,8 @@ export default {
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
.i-layout-header-trigger:hover {
background: #343b4a!important;
}
.product-layout { .product-layout {
.ivu-layout-header { .ivu-layout-header {
height: 50px; height: 50px;
...@@ -292,10 +310,7 @@ export default { ...@@ -292,10 +310,7 @@ export default {
margin: 0 10px; margin: 0 10px;
display: block; display: block;
float: left; float: left;
// position: absolute; width: 100px;
// top: 10px;
// left: 10px;
width: 60px;
height: 60px; height: 60px;
.home { .home {
position: relative; position: relative;
...@@ -307,95 +322,99 @@ export default { ...@@ -307,95 +322,99 @@ export default {
color: white; color: white;
line-height: 30px; line-height: 30px;
text-align: center; text-align: center;
-webkit-transition: width 0.5s, height 0.5s, -webkit-transform 0.5s; /* Safari */
-webkit-transition: width 0.5s, height 0.5s, -webkit-transform 0.5s;/* Safari */
transition: width 0.5s, height 0.5s, transform 0.5s; transition: width 0.5s, height 0.5s, transform 0.5s;
i{ i {
-webkit-transition: font-size 0.5s, margin 0.5s, -webkit-transform 0.5s;/* Safari */ -webkit-transition: font-size 0.5s, margin 0.5s, -webkit-transform 0.5s; /* Safari */
transition: font-size 0.5s, margin 0.5s, transform 0.5s; transition: font-size 0.5s, margin 0.5s, transform 0.5s;
} }
} }
.top_menu_box{ .top_menu_box {
display: none; display: none;
border-radius: 5px; border-radius: 5px;
position: absolute; position: absolute;
z-index: 99999; z-index: 99999;
left: 70%; left: 56%;
top: 66%; top: 57%;
min-width: 1084px; min-width: 1084px;
min-height: 300px; min-height: 300px;
box-shadow: 0px 5px 17px 5px rgba(0,0,0,0.28);
background: #f5f6fa; background: #f5f6fa;
-webkit-transition: display 0.5s, -webkit-transform 0.5s;/* Safari */ .t_table_box{
transition: display 0.5s, transform 0.5s; border-collapse:collapse;
} border-radius: 5px;
.top_menu { tr:first-of-type {
border-radius: 4px; border-top-right-radius: 5px;
color: #2680eb; td:first-of-type {
list-style: none;
text-align: left;
li:first-of-type{
ul:first-of-type{
li:first-of-type{
border-top-left-radius: 5px; border-top-left-radius: 5px;
} }
} }
tr:last-of-type {
border-bottom-right-radius: 5px;
td:first-of-type {
border-bottom-left-radius: 5px;
} }
li { }
width: 100%; tr{
display: block; // line-height: 35px;
// float: left; td{
// height: 47px; padding: 9px 10px 0px;
line-height: 46px; .table_row_ul{
border-bottom: 1px solid #ccc;
ul {
width: 100%;
list-style: none; list-style: none;
li { border-bottom: 1px solid #E0E0E0;
display: inline-block; text-align: left;
li{
list-style: none; list-style: none;
margin-right: 10px;
width: 150px;
border: none;
a{
display: inline-block; display: inline-block;
padding: 0 10px; a {
height: 30px; float: left;
padding: 0px 10px;
line-height: 30px; line-height: 30px;
margin: 0px 6px;
border-radius: 4px;
} }
a:hover{ a:hover{
background: #2680EB; background: #2680eb;
color: white; color: white;
border-radius: 4px;
} }
a:visited{
background: #2680eb;
color: white;
} }
.title { a.active{
display: inline-block; background: #2680eb;
background: #515a6e;
width: 104px;
color: white; color: white;
text-align: center;
font-weight: bold;
} }
.title:hover{
color: #ddd;
} }
} }
} }
} }
.home:hover{ .t_title{
min-width: 120px;
background: #515a6e;
.a_goIndex{
color: #fff;
}
.title{
padding: 5px 10px;
}
}
}
}
}
.menu:hover .home {
margin-top: 10px; margin-top: 10px;
height: 60px; height: 60px;
width: 60px; width: 60px;
z-index: 88888; z-index: 88888;
} }
.home:hover .top_menu_box { .menu:hover .home .top_menu_box {
display: block; display: block;
} }
.home:hover i{ .menu:hover .home i {
font-size: 33px; font-size: 33px;
margin: 13px 0 0; margin: 13px 0 0;
} }
}
.ivu-breadcrumb { .ivu-breadcrumb {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
...@@ -411,6 +430,9 @@ export default { ...@@ -411,6 +430,9 @@ export default {
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
} }
.i-layout-header-trigger:hover {
background: #343b4a;
}
.ivu-tooltip { .ivu-tooltip {
color: white; color: white;
height: 50px; height: 50px;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
</template> </template>
<script> <script>
import MainLayout from "./basic-layout"; import MainLayout from "./basic-layout";
// import MainLayout from "./basic-layout/product";
// 配置 // 配置
import Setting from "@/setting"; import Setting from "@/setting";
// 方法 // 方法
......
...@@ -57,8 +57,8 @@ export default { ...@@ -57,8 +57,8 @@ export default {
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ title: " ", width: 130 }, { title: " ", width: 130 },
{ {
key: "insert_flag", key: "important_flag",//insert_flag?
title: this.l("insert_flag"), title: this.l("important_flag"),
align: "center", align: "center",
high: true, high: true,
width: 60, width: 60,
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
{ {
props: { props: {
content: content:
params.row.insert_flag == 1 ? "取消插单" : "进行插单", params.row.important_flag == 1 ? "取消插单" : "进行插单",
placement: "top" placement: "top"
}, },
class: "ico" class: "ico"
...@@ -77,11 +77,11 @@ export default { ...@@ -77,11 +77,11 @@ export default {
h("Icon", { h("Icon", {
attrs: { attrs: {
type: type:
params.row.insert_flag == 1 params.row.important_flag == 1
? "ios-flag" ? "ios-flag"
: "ios-flag-outline", : "ios-flag-outline",
size: 20, size: 20,
color: params.row.insert_flag == 1 ? "#2680EB" : "#aaa" color: params.row.important_flag == 1 ? "#2680EB" : "#aaa"
}, },
on: { on: {
click: () => this.changeFlag(params.row.id, params.index) click: () => this.changeFlag(params.row.id, params.index)
...@@ -142,6 +142,13 @@ export default { ...@@ -142,6 +142,13 @@ export default {
high: true, high: true,
width: 140, width: 140,
hide: true hide: true
},
{
key:"first_equip",
title:this.l("first_equip"),
align:"left",
easy:true,
high:true,
}, },
{ {
key: "setup_time", key: "setup_time",
...@@ -158,9 +165,8 @@ export default { ...@@ -158,9 +165,8 @@ export default {
{ {
key: "outside_time", key: "outside_time",
title: this.l("outside_time"), title: this.l("outside_time"),
align: "center", align: "right",
high: true, high: true,
width: 140
}, },
{ {
key: "transport_time", key: "transport_time",
...@@ -185,7 +191,7 @@ export default { ...@@ -185,7 +191,7 @@ export default {
{ {
key: "machine_rule", key: "machine_rule",
title: this.l("machine_rule"), title: this.l("machine_rule"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
width: 140 width: 140
...@@ -198,16 +204,16 @@ export default { ...@@ -198,16 +204,16 @@ export default {
hide: true hide: true
}, },
{ {
key: "first_equip", key: "equip_type",
title: this.l("first_equip"), title: this.l("equip_type"),
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
}, },
{ {
key: "equip_type", key: "first_equip",
title: this.l("equip_type"), title: this.l("first_equip"),
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
...@@ -237,30 +243,23 @@ export default { ...@@ -237,30 +243,23 @@ export default {
{ {
key: "isdiscrete", key: "isdiscrete",
title: this.l("isdiscrete"), title: this.l("isdiscrete"),
align: "left", align: "center",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "discrete_value", key: "discrete_value",
title: this.l("discrete_value"), title: this.l("discrete_value"),
align: "left", align: "right",
high: true high: true
}, },
{ {
key: "multi_machine", key: "multi_machine",
title: this.l("multi_machine"), title: this.l("multi_machine"),
align: "left", align: "center",
easy: true, easy: true,
high: true high: true
}, },
{
key:"first_equip",
title:this.l("first_equip"),
align:"left",
easy:true,
high:true,
},
{ {
key: "notes", key: "notes",
title: this.l("notes"), title: this.l("notes"),
...@@ -384,7 +383,7 @@ export default { ...@@ -384,7 +383,7 @@ export default {
//插单事件start---- //插单事件start----
changeFlag(id, index) { changeFlag(id, index) {
this.rowIndex = index; this.rowIndex = index;
if (this.data1[this.rowIndex].insert_flag == 1) { if (this.data1[this.rowIndex].important_flag == 1) {
this.insertTItle = "取消插单"; this.insertTItle = "取消插单";
} else { } else {
this.insertTItle = "插单"; this.insertTItle = "插单";
...@@ -393,13 +392,12 @@ export default { ...@@ -393,13 +392,12 @@ export default {
}, },
insertOk() { insertOk() {
//this.loadData(this.row) //this.loadData(this.row)
if (this.data1[this.rowIndex].insert_flag == 1) { if (this.data1[this.rowIndex].important_flag == 1) {
//根据插单数据状态进行插单或取消插单操作 //根据插单数据状态进行插单或取消插单操作
this.data1[this.rowIndex].insert_flag = 0; this.data1[this.rowIndex].important_flag = 0;
} else { } else {
this.data1[this.rowIndex].insert_flag = 1; this.data1[this.rowIndex].important_flag = 1;
} }
this.setParsModal = false; this.setParsModal = false;
this.detailModal = false; this.detailModal = false;
this.editModal = false; this.editModal = false;
......
...@@ -326,8 +326,11 @@ export default { ...@@ -326,8 +326,11 @@ export default {
this.deletedlModal = false; this.deletedlModal = false;
this.apsModal = false; this.apsModal = false;
}, },
onDragDrop(a, b) { onDragDrop(a, b) {//拖拽排序
this.list.splice(b, 1, ...this.list.splice(a, 1, this.list[b])); //this.list.splice(b, 1, ...this.list.splice(a, 1, this.list[b]));
let tempArray=this.list[a]
this.list.splice(a,1)
this.list.splice(b,0,tempArray)
}, },
openParms(id) { openParms(id) {
this.addModal = true; this.addModal = true;
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<Col span="24"> <Col span="12">
<FormItem :label="l('DistributeMainRouting')" prop="DistributeMainRouting"> <FormItem :label="l('DistributeMainRouting')" prop="DistributeMainRouting">
<UserSelect ref="userSelected" v-model="entity.DistributeMainRouting" /> <UserSelect ref="userSelected" v-model="entity.DistributeMainRouting" />
</FormItem> </FormItem>
</Col> </Col>
<Col span="24"> <Col span="12">
<FormItem label="完成时间" style="width:100%" prop="MainRoutingFinishDate"> <FormItem label="完成时间" style="width:100%" prop="MainRoutingFinishDate">
<DatePicker <DatePicker
v-model="entity.MainRoutingFinishDate" v-model="entity.MainRoutingFinishDate"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<Input <Input
search search
enter-button enter-button
placeholder="请输入关键字订单编号/任务类型/甲方客户/3D打印承制单位(基础数据)/厂内责任机关(基础数据)/厂内主主体责任部门(基础数据)/备注/任务接点要求/上传文件名称/上传文件名称/外部图号/模型号/模型版本/甲方任务号/手输/手输/手输/设备/工艺方法/外包络尺寸(mm)/产品序号:No1~No99///批次号/项目号/紧急程度/材料名称/(APS)产品名称增强" placeholder="请输入关键字订单编号/项目名称"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
@on-search="search" @on-search="search"
/> />
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { keys: {
op: "mesCode,taskType,stage,projectNumber,materialName", op: "mesCode,projectNumber",
value: null value: null
} }
}, },
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
{ {
key: "quantity", key: "quantity",
title: this.l("quantity"), title: this.l("quantity"),
align: "left", align: "right",
high: true high: true
}, },
{ {
...@@ -290,22 +290,6 @@ export default { ...@@ -290,22 +290,6 @@ export default {
? "移入排产" ? "移入排产"
: "" : ""
) )
// h(
// 'op',
// {
// attrs: { oprate: 'edit' },
// on: { click: () => this.edit(params.row.id) }
// },
// '编辑'
// ),
// h(
// 'op',
// {
// attrs: { oprate: 'remove' },
// on: { click: () => this.remove(params.row.id) }
// },
// '删除'
// )
]); ]);
} }
} }
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
</Col> </Col>
<Col span="8" v-if="condition.status.show"> <Col span="8" v-if="condition.status.show">
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
<Dictionary code="mes_xingchi_plan.mes_order.status" v-model="condition.status.value"></Dictionary> <Dictionary code="plan.order.status" v-model="condition.status.value"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8" v-if="condition.workHours.show"> <Col span="8" v-if="condition.workHours.show">
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<Col span="8" v-if="condition.isSupportingFinish.show"> <Col span="8" v-if="condition.isSupportingFinish.show">
<FormItem :label="l('isSupportingFinish')" prop="isSupportingFinish"> <FormItem :label="l('isSupportingFinish')" prop="isSupportingFinish">
<Dictionary <Dictionary
code="mes_xingchi_plan.mes_order.is_supporting_finish" code="aps.plan.supportingStatus"
v-model="condition.isSupportingFinish.value" v-model="condition.isSupportingFinish.value"
></Dictionary> ></Dictionary>
</FormItem> </FormItem>
...@@ -304,7 +304,7 @@ ...@@ -304,7 +304,7 @@
<Col span="8" v-if="condition.mainRoutingSetStatus.show"> <Col span="8" v-if="condition.mainRoutingSetStatus.show">
<FormItem :label="l('mainRoutingSetStatus')" prop="mainRoutingSetStatus"> <FormItem :label="l('mainRoutingSetStatus')" prop="mainRoutingSetStatus">
<Dictionary <Dictionary
code="mes_xingchi_plan.mes_order.main_routing_set_status" code="aps.plan.mainRoutingStatus"
v-model="condition.mainRoutingSetStatus.value" v-model="condition.mainRoutingSetStatus.value"
></Dictionary> ></Dictionary>
</FormItem> </FormItem>
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
</Col> </Col>
<Col span="8" v-if="condition.urgencyLevel.show"> <Col span="8" v-if="condition.urgencyLevel.show">
<FormItem :label="l('urgencyLevel')" prop="urgencyLevel"> <FormItem :label="l('urgencyLevel')" prop="urgencyLevel">
<Input v-model="condition.urgencyLevel.value"></Input> <Dictionary code="plan.order.urgencyLevel" v-model="condition.urgencyLevel.value"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8" v-if="condition.materialName.show"> <Col span="8" v-if="condition.materialName.show">
...@@ -508,7 +508,7 @@ export default { ...@@ -508,7 +508,7 @@ export default {
projectNumber: { op: 'Equal', value: null, show: true }, projectNumber: { op: 'Equal', value: null, show: true },
urgencyLevel: { op: 'Equal', value: null, show: true }, urgencyLevel: { op: 'Equal', value: null, show: true },
materialName: { op: 'Equal', value: null, show: true }, materialName: { op: 'Equal', value: null, show: true },
isPreschedule: { op: 'Equal', value: null, show: true }, isPreschedule: { op: 'Equal', value: null, show: false },
spareQty: { op: 'Equal', value: null, show: false }, spareQty: { op: 'Equal', value: null, show: false },
demandStart: { op: 'Range', value: null, show: false }, demandStart: { op: 'Range', value: null, show: false },
demandFinish: { op: 'Range', value: null, show: false }, demandFinish: { op: 'Range', value: null, show: false },
......
...@@ -406,8 +406,7 @@ export default { ...@@ -406,8 +406,7 @@ export default {
var url = var url =
`${designUrl}/routingheader/GetListSmall?approvalstatus=1&product_id=` + `${designUrl}/routingheader/GetListSmall?approvalstatus=1&product_id=` +
productid + productid +
'&routingType=' + '&routingType=0';
this.formValidate.routingType
service.get(`${url}`).then((response) => { service.get(`${url}`).then((response) => {
this.RoutingList = response.result this.RoutingList = response.result
}) })
......
<template> <template>
<div> <div>
<Table stripe ref="table" :columns="columnTop" :data="dataTop" border class="tableCommon"></Table> <Table
v-if="false"
stripe
ref="table"
:columns="columnTop"
:data="dataTop"
border
class="tableCommon"
></Table>
<Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="160" inline> <Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="160" inline>
<!-- <Row> <!-- <Row>
...@@ -34,335 +42,167 @@ ...@@ -34,335 +42,167 @@
:disabled="isview" :disabled="isview"
/> />
</FormItem> </FormItem>
<FormItem label="板数">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate.platesnum"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
</Row> </Row>
<Row> </Form>
<FormItem label="每板定额" style="width:400px"> <!-- <div>
<!-- <Select style="width:240px;" v-model="formValidate.quota_per_board" placeholder="请选择..."> <Button type="text" size="large" @click="saveCancelModel">取消</Button>
<Option <Button type="primary" size="large" @click="Seveld" class="mr20">确定</Button>
v-for="(item,index) in quotaperboardList" <Checkbox v-model="checked" label="送审">送审</Checkbox>
:value="item.value" </div>-->
:label="item.name" <Table stripe ref="table" border :columns="column1" :data="formValidate1" class="tableCommon">
:key="index" <template slot-scope="{ row,index }" slot="materialType">
></Option> <state
</Select>--> code="mes_xingchi_resource.material.materialReType"
type="text"
:value="row.materialType"
></state>
</template>
</Table>
<Modal
v-model="newModel"
title="新增物料项"
:mask-closable="false"
@on-ok="ok"
@on-cancel="cancel"
width="830px"
:footer-hide="isview"
>
<Form
ref="formprocessValidate"
:model="formprocessValidate"
<InputNumber :label-width="120"
placeholder="请输入..." inline
:min="0"
v-model="formValidate.quota_per_board"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
</Row>
<Divider orientation="left" style="color:#249e91">粉末信息</Divider>
<Row>
<FormItem label="粉末名称">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[0].name"
placeholder="请选择..."
> >
<Option <Row>
v-for="(item,index) in fmnameList" <Col :span="12">
:value="item.value" <FormItem :label="l('materialNumber')" prop="materialNumber">
:label="item.lable" <Input v-model="formprocessValidate.materialNumber"></Input>
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[0].name" :dic="fmnameList" ref="fmnameList"></materialDic> -->
</FormItem> </FormItem>
<FormItem label="粉末牌号"> </Col>
<Select <Col :span="12">
style="width:240px;" <FormItem :label="l('nameMaterial')" prop="nameMaterial">
:disabled="isview" <Input v-model="formprocessValidate.nameMaterial"></Input>
v-model="formValidate1[0].pate_number"
placeholder="请选择..."
>
<Option
v-for="(item,index) in fmpatenumberList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[0].pate_number" :dic="fmpatenumberList" ref="fmpatenumberList"></materialDic> -->
</FormItem> </FormItem>
</Row> </Col>
<Row> <Col :span="12">
<FormItem label="粉末规格"> <FormItem :label="l('quantity')" prop="quantity">
<Select <InputNumber v-model="formprocessValidate.quantity"></InputNumber>
style="width:240px;"
:disabled="isview"
v-model="formValidate1[0].spec"
placeholder="请选择..."
>
<Option
v-for="(item,index) in fmspceList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[0].spec" :dic="fmspceList" ref="fmspceList"></materialDic> -->
</FormItem> </FormItem>
<FormItem label="粉末类别"> </Col>
<!-- <Select style="width:240px;" v-model="formValidate1[0].categories" placeholder="请选择...">
<Option
v-for="(item,index) in fmcategoriesList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>-->
<Col :span="12">
<FormItem :label="l('materialType')" prop="materialType">
<Dictionary <Dictionary
code="mes_xingchi_resource.material.powderType" code="mes_xingchi_resource.material.materialReType"
style="width:240px" v-model="formprocessValidate.materialType"
v-model="formValidate1[0].categories"
:disabled="isview"
></Dictionary> ></Dictionary>
<!-- <materialDic v-model="formValidate1[0].categories" :dic="fmcategoriesList" ref="fmcategoriesList"></materialDic> -->
</FormItem>
</Row>
<Row>
<FormItem label="预估粉末总量" prop="fmquantity">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate1[0].quantity"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
<FormItem label="预估零件高度">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate1[0].estimated_part_height"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem> </FormItem>
</Row> </Col>
<Divider orientation="left" style="color:#249e91">基板信息</Divider> <Col :span="12">
<Row> <FormItem :label="l('brand')" prop="brand">
<FormItem label="基板名称"> <Input v-model="formprocessValidate.brand"></Input>
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[1].name"
placeholder="请选择..."
>
<Option
v-for="(item,index) in jbnameList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[1].name" :dic="jbnameList" ref="jbnameList"></materialDic> -->
</FormItem> </FormItem>
<FormItem label="基板牌号"> </Col>
<Select <Col :span="12">
style="width:240px;" <FormItem :label="l('specifications')" prop="specifications">
:disabled="isview" <Input v-model="formprocessValidate.specifications"></Input>
v-model="formValidate1[1].pate_number"
placeholder="请选择..."
>
<Option
v-for="(item,index) in jbPateNumberList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[1].pate_number" :dic="jbPateNumberList" ref="jbPateNumberList"></materialDic> -->
</FormItem>
</Row>
<Row>
<FormItem label="基板规格">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[1].spec"
placeholder="请选择..."
>
<Option
v-for="(item,index) in jbspecList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[1].spec" :dic="jbspecList" ref="jbspecList"></materialDic> -->
</FormItem>
<FormItem label="基板适用设备">
<Select
allow-create
@on-create="handleCreate1"
style="width:240px;"
v-model="formValidate1[1].use_equip"
placeholder="请选择..."
:disabled="isview"
>
<Option
v-for="(item,index) in EquipList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[1].use_equip" :dic="EquipList" ref="EquipList"></materialDic> -->
</FormItem> </FormItem>
</Row> </Col>
<Row> <Col :span="12">
<FormItem label="基板厚度下限"> <FormItem :label="l('xhgg')" prop="xhgg">
<InputNumber <Input v-model="formprocessValidate.xhgg"></Input>
placeholder="请输入..."
:min="0"
v-model="formValidate1[1].lower_basal_plate"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem> </FormItem>
<FormItem label="基板总量" prop="jbquantity"> </Col>
<InputNumber <Col :span="12">
placeholder="请输入..." <FormItem :label="l('texture')" prop="texture">
:min="0" <Input v-model="formprocessValidate.texture"></Input>
v-model="formValidate1[1].quantity"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem> </FormItem>
</Row> </Col>
<Divider orientation="left" style="color:#249e91">刮刀信息</Divider> <Col :span="12">
<Row> <FormItem :label="l('procurementStandards')" prop="procurementStandards">
<FormItem label="刮刀规格" prop="gdspec"> <Input v-model="formprocessValidate.procurementStandards"></Input>
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[2].spec"
placeholder="请选择..."
>
<Option
v-for="(item,index) in gdspecList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[2].spec" :dic="gdspecList" ref="gdspec"></materialDic> -->
</FormItem> </FormItem>
<FormItem label="刮刀数量" prop="gdquantity"> </Col>
<InputNumber <Col :span="12">
placeholder="请输入..." <FormItem :label="l('qualityGrade')" prop="qualityGrade">
:min="0" <Input v-model="formprocessValidate.qualityGrade"></Input>
v-model="formValidate1[2].quantity"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem> </FormItem>
</Col>
</Row> </Row>
</Form> </Form>
<!-- <div> </Modal>
<Button type="text" size="large" @click="saveCancelModel">取消</Button>
<Button type="primary" size="large" @click="Seveld" class="mr20">确定</Button>
<Checkbox v-model="checked" label="送审">送审</Checkbox>
</div>-->
</div> </div>
</template> </template>
<script> <script>
import service from '@/plugins/request' import service from "@/plugins/request";
import materialDic from '../components/materialDic' import materialDic from "../components/materialDic";
export default { export default {
name: 'orderMaterial', name: "orderMaterial",
components: { materialDic }, components: { materialDic },
data() { data() {
return { return {
order_comb_id: 0, order_comb_id: 0,
orderids: '', orderids: "",
productingPreparationPeople:'', productingPreparationPeople: "",
taskType: '', taskType: "",
Modeltitle: '料单', Modeltitle: "料单",
dataTop: [], dataTop: [],
isview: false, isview: false,
newModel:false,
columnTop: [ columnTop: [
{ {
title: '订单编号', title: "订单编号",
key: 'mesCode', key: "mesCode",
align: 'center' align: "center"
}, },
{ {
title: '产品名称', title: "产品名称",
key: 'productName', key: "productName",
align: 'center' align: "center"
}, },
{ {
title: '产品代号', title: "产品代号",
key: 'drawnNumber', key: "drawnNumber",
align: 'center' align: "center"
}, },
{ {
title: '数量', title: "数量",
key: 'quantity', key: "quantity",
align: 'center' align: "center"
}, },
{ {
title: '每板数量', title: "每板数量",
key: 'perboardnum', key: "perboardnum",
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
if (this.isview) { if (this.isview) {
return h('div', this.dataTop[params.index].perboardnum) return h("div", this.dataTop[params.index].perboardnum);
} else { } else {
return h('div', [ return h("div", [
h('InputNumber', { h("InputNumber", {
props: { props: {
value: this.dataTop[params.index].perboardnum, value: this.dataTop[params.index].perboardnum,
min: 1 min: 1
}, },
on: { on: {
'on-change': (event) => { "on-change": event => {
this.dataTop[params.index].perboardnum = event this.dataTop[params.index].perboardnum = event;
this.calcplatesnum() this.calcplatesnum();
} }
} }
}) })
]) ]);
} }
} }
} }
], ],
quotaperboardList: [], //每版定额
fileTemplateList: [], //文件模板
jbnameList: [], //基板名称
jbPateNumberList: [], //基板牌号
jbspecList: [], //基板规格
fmcategoriesList: [], //粉末种类
fmspceList: [], //粉末规格
fmpatenumberList: [], //粉末牌号
fmnameList: [], //粉末名称,
gdspecList: [], //刮刀规格,
EquipList: [],
ruleValidate: { ruleValidate: {
code: [{ required: true, message: '文件编号不能为空', trigger: 'blur' }] code: [{ required: true, message: "文件编号不能为空", trigger: "blur" }]
// name: [ // name: [
// { required: true, message: '文件名称不能为空', trigger: 'blur' } // { required: true, message: '文件名称不能为空', trigger: 'blur' }
...@@ -403,248 +243,273 @@ export default { ...@@ -403,248 +243,273 @@ export default {
formValidate: { formValidate: {
id: 0, id: 0,
code: '', code: "",
name: '', name: "",
platesnum: 0, platesnum: 0,
quota_per_board: 0, quota_per_board: 0,
file_template: '', file_template: "",
remarks: '', remarks: "",
extend: '', extend: "",
order_comb_id: 0, order_comb_id: 0,
orderids: '', orderids: "",
productingPreparationPeople:'', routingHeaderId: 0,
ordercodes: '', productingPreparationPeople: "",
ordercodes: "",
approvalStatus: 0 approvalStatus: 0
}, },
formValidate1: [ formValidate1: [],
{ formprocessValidate: {
id: 0, routingHeaderId: 0,
materialbillId: 0, routingDetailId: 0,
material_type: 1, routingStepId: 0,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0, quantity: 0,
quantity_unit: '', materialId: 0,
estimated_part_height: 0, materialType: "",
height_unit: '', materialNumber: "",
lower_basal_plate: 0, nameMaterial: "",
plate_unit: '', state: 0,
use_equip: '', extend: "",
remarks: '', remark: "",
extend: '', brand: "",
actual_quantity: 0 specifications: "",
xhgg: "",
texture: "",
procurementStandards: "",
qualityGrade: "",
id: 0
}, },
column1: [
{ title: "序号", type: "index", width: "70", align: "center" },
{ {
id: 0, key: "materialNumber",
materialbillId: 0, title: this.l("materialNumber"),
material_type: 2, align: "left",
name: '', easy: true,
pate_number: '', high: true
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
}, },
{ {
id: 0, key: "nameMaterial",
materialbillId: 0, title: this.l("nameMaterial"),
material_type: 3, align: "left",
name: '', easy: true,
pate_number: '', high: true
spec: 'sssss', },
categories: '', {
quantity: 0, key: "quantity",
quantity_unit: '', title: this.l("quantity"),
estimated_part_height: 0, align: "left",
height_unit: '', high: true
lower_basal_plate: 0, },
plate_unit: '',
use_equip: '', {
remarks: '', key: "materialType",
extend: '', title: this.l("materialType"),
actual_quantity: 0 align: "left",
easy: true,
high: true
},
{
key: "brand",
title: this.l("brand"),
align: "left",
easy: true,
high: true
},
{
key: "specifications",
title: this.l("specifications"),
align: "left",
easy: true,
high: true
},
{
key: "xhgg",
title: this.l("xhgg"),
align: "left",
easy: true,
high: true
},
{
key: "texture",
title: this.l("texture"),
align: "left",
easy: true,
high: true
},
{
key: "procurementStandards",
title: this.l("procurementStandards"),
align: "left"
},
{
key: "qualityGrade",
title: this.l("qualityGrade"),
align: "left",
easy: true,
high: true
},
{
title: "操作",
key: "id",
align: "center",
render: (h, params) => {
let id = params.row.id;
if (!this.isview) {
return h(
"div",
{
class: "icon_box"
},
[
h("span", {
class: "edit_icon",
attrs: { title: "编辑" },
on: {
click: () => {
this.editFun(params);
}
}
}),
h("span", {
class: "del_icon",
attrs: { title: "删除" },
on: {
click: () => {
this.deleteFun(params);
}
}
})
]
);
} else {
return h(
"div",
{
class: "icon_box"
},
[
h("op", {
class: "view ",
attrs: { icon: "ios-eye", title: "查看", type: "icon" },
on: {
click: () => {
this.editFun(params);
}
} }
})
] ]
);
}
} }
}
]
};
}, },
mounted() { mounted() {},
;(this.quotaperboardList = [ created: function() {},
{ name: '10', value: 10 },
{ name: '20', value: 20 },
{ name: '30', value: 30 }
]), //每版定额
(this.fileTemplateList = [
{ name: '文件模板1', value: '文件模板1' },
{ name: '文件模板2', value: '文件模板2' }
]) //文件模板
},
created: function() {
this.getmaterialplacodedic()
this.GetMaterialScraperDic()
this.GetMaterialPowderDic()
},
methods: { methods: {
handleCreate1(val) { handleCreate1(val) {
this.EquipList.push({ this.EquipList.push({
value: val, value: val,
label: val label: val
}) });
}, },
l(key) {
key = "RoutingSupporting" + "." + key;
return this.$t(key)
}
,
loaddata() { loaddata() {
if (this.formValidate.id != 0) { if (this.formValidate.id != 0) {
var url = var url =
`${designUrl}/ordermaterial/getbyid?id=` + this.formValidate.id `${designUrl}/ordersupport/getbyid?id=` + this.formValidate.id;
service.get(`${url}`).then((response) => { service.get(`${url}`).then(response => {
this.formValidate = response.result.orderMaterial this.formValidate = response.result.orderMaterial;
if (this.formValidate.approvalStatus == 1||this.formValidate.approvalStatus == 2||this.formValidate.approvalStatus == 3) { if (
this.isview = true this.formValidate.approvalStatus == 1 ||
}else{ this.formValidate.approvalStatus == 2 ||
this.formValidate.approvalStatus == 3
this.isview = false ) {
this.isview = true;
} else {
this.isview = false;
} }
this.formValidate1 = response.result.orderMaterialList this.formValidate1 = response.result.orderMaterialList;
}) });
} else { } else {
this.cleardata() this.cleardata();
var url = `${designUrl}/ordermaterial/getordermateriacode`
service.get(`${url}`).then((response) => { var url =
this.formValidate.code = response.result `${designUrl}/ordersupport/getbyheaderid?headerID=` +
}) this.formValidate.routingHeaderId;
this.isview = false service.get(`${url}`).then(response => {
this.calcplatesnum(); this.formValidate = response.result.orderMaterial;
var url = `${designUrl}/ordersupport/getordermateriacode`;
service.get(`${url}`).then(response => {
this.formValidate.code = response.result;
});
this.isview = false;
this.formValidate1 = response.result.orderMaterialList;
});
// this.calcplatesnum();
} }
}, },
calcplatesnum() { calcplatesnum() {
//计算板数 //计算板数
let boardnum = 1 let boardnum = 1;
if (this.dataTop != null && this.dataTop.length > 0) { if (this.dataTop != null && this.dataTop.length > 0) {
for (let i = 0; i < this.dataTop.length; i++) { for (let i = 0; i < this.dataTop.length; i++) {
let remainder = this.dataTop[i].quantity % this.dataTop[i].perboardnum //余数 let remainder =
let count = this.dataTop[i].quantity / this.dataTop[i].perboardnum //得数 this.dataTop[i].quantity % this.dataTop[i].perboardnum; //余数
let boardnum1 = remainder > 0 ? parseInt(count) + 1 : parseInt(count) let count = this.dataTop[i].quantity / this.dataTop[i].perboardnum; //得数
let boardnum1 = remainder > 0 ? parseInt(count) + 1 : parseInt(count);
if (boardnum1 > boardnum) { if (boardnum1 > boardnum) {
boardnum = boardnum1 boardnum = boardnum1;
}
} }
} }
this.formValidate.platesnum=boardnum;
},
getmaterialplacodedic() {
//基板
let url = `${designUrl}/ordermateriallist/getmaterialplacodedic`,
that = this
service.get(`${url}`).then((res) => {
let selectdata = res.result
selectdata.forEach((item) => {
if (item.dictype == 1) {
this.jbnameList = item.dics
}
if (item.dictype == 2) {
this.jbspecList = item.dics
}
if (item.dictype == 3) {
this.jbPateNumberList = item.dics
}
if (item.dictype == 4) {
this.EquipList = item.dics
} }
}) this.formValidate.platesnum = boardnum;
})
}, },
GetMaterialPowderDic() {
//粉末
let url = `${designUrl}/ordermateriallist/getmaterialpowderdic`,
that = this
service.get(`${url}`).then((res) => {
let selectdata = res.result
selectdata.forEach((item) => {
if (item.dictype == 1) {
this.fmnameList = item.dics
}
if (item.dictype == 3) {
this.fmpatenumberList = item.dics
}
if (item.dictype == 2) {
this.fmspceList = item.dics
}
// if (item.dictype == 4) {
// this.fmcategoriesList = item.dics
// }
})
})
},
GetMaterialScraperDic() {
//刮刀
let url = `${designUrl}/ordermateriallist/getmaterialscraperdic`,
that = this
service.get(`${url}`).then((res) => {
let selectdata = res.result
selectdata.forEach((item) => {
if (item.dictype == 1) {
this.gdspecList = item.dics
}
})
})
},
SaveLd() { SaveLd() {
let isvalidate = false let isvalidate = false;
this.$refs['formValidate'].validate((valid) => { this.$refs["formValidate"].validate(valid => {
if (valid) { if (valid) {
isvalidate = valid isvalidate = valid;
} else { } else {
} }
}) });
if (!isvalidate) { if (!isvalidate) {
return return;
} }
var url = `${designUrl}/ordermaterial/createorupdate` var url = `${designUrl}/ordersupport/createorupdate`;
this.formValidate.order_comb_id = this.order_comb_id this.formValidate.order_comb_id = this.order_comb_id;
this.formValidate.orderids = this.orderids this.formValidate.orderids = this.orderids;
this.formValidate.productingPreparationPeople=this.productingPreparationPeople; this.formValidate.productingPreparationPeople = this.productingPreparationPeople;
var pernums = new Array() var pernums = new Array();
for (let i = 0; i < this.dataTop.length; i++) { for (let i = 0; i < this.dataTop.length; i++) {
let obj = this.dataTop[i] let obj = this.dataTop[i];
pernums.push(obj.perboardnum) pernums.push(obj.perboardnum);
} }
this.formValidate.perboardnums = pernums.toString(',') this.formValidate.perboardnums = pernums.toString(",");
var mesCodes = new Array() var mesCodes = new Array();
for (let i = 0; i < this.dataTop.length; i++) { for (let i = 0; i < this.dataTop.length; i++) {
let obj = this.dataTop[i] let obj = this.dataTop[i];
mesCodes.push(obj.mesCode) mesCodes.push(obj.mesCode);
} }
this.formValidate.ordercodes = mesCodes.toString(',') this.formValidate.ordercodes = mesCodes.toString(",");
service service
.post( .post(
...@@ -653,104 +518,120 @@ this.formValidate.productingPreparationPeople=this.productingPreparationPeople; ...@@ -653,104 +518,120 @@ this.formValidate.productingPreparationPeople=this.productingPreparationPeople;
orderMaterialList: this.formValidate1 orderMaterialList: this.formValidate1
} }
) )
.then((response) => { .then(response => {
let itemId = response.result.orderMaterial.id let itemId = response.result.orderMaterial.id;
// let idIteme = this.$parent.$parent.dataListRetrunNew.idList // let idIteme = this.$parent.$parent.dataListRetrunNew.idList
// if(idIteme == []){ // if(idIteme == []){
// idIteme.push(itemId) // idIteme.push(itemId)
// }else{ // }else{
// } // }
this.$parent.$parent.dataListRetrunNew.idList.push(itemId) this.$parent.$parent.dataListRetrunNew.idList.push(itemId);
if (response.success) {
this.$Message.success("保存成功");
this.cleardata();
this.$parent.$parent.loaddata(this.$parent.$parent.orderSearchForm);
this.$parent.$parent.modalliao = false;
}
})
.catch(error => {
this.$Message.success("保存失败");
});
},
ok() {
let isvalidate = false;
this.$refs["formprocessValidate"].validate(valid => {
if (valid) {
isvalidate = valid;
} else {
}
});
if (!isvalidate) {
setTimeout(() => {
this.newModel = false;
this.$nextTick(() => {
this.newModel = true;
});
}, 5);
return;
}
var url = `${designUrl}/ordermateriallist/createorupdate`;
service
.post(`${url}`, this.formprocessValidate)
.then(response => {
if (response.success) { if (response.success) {
this.$Message.success('保存成功') this.$Message.success("保存成功");
this.cleardata() this.newModel = false;
this.$parent.$parent.loaddata(this.$parent.$parent.orderSearchForm) this.cleardata();
this.$parent.$parent.modalliao = false
this.loaddata();
} }
}) })
.catch((error) => { .catch(error => {
this.$Message.success('保存失败') this.$Message.error("保存失败");
});
},
editFun(params) {
this.formprocessValidate.id = params.row.id;
this.formprocessValidate.quantity = params.row.quantity;
this.formprocessValidate.materialId = params.row.materialId;
this.formprocessValidate.materialType = params.row.materialType;
this.formprocessValidate.materialNumber = params.row.materialNumber;
this.formprocessValidate.nameMaterial = params.row.nameMaterial;
this.formprocessValidate.brand = params.row.brand;
this.formprocessValidate.specifications = params.row.specifications;
this.formprocessValidate.xhgg = params.row.xhgg;
this.formprocessValidate.texture = params.row.texture;
this.formprocessValidate.procurementStandards =
params.row.procurementStandards;
this.formprocessValidate.qualityGrade = params.row.qualityGrade;
this.newModel = true;
},
deleteFun(params) {
this.$Modal.confirm({
title: "提示",
content: "确定要删除当前行?",
onOk: () => {
var url = `${designUrl}/ordermateriallist/delete?id=` + params.row.id;
service
.delete(`${url}`)
.then(response => {
if (response.success) {
this.$Message.success("删除成功");
this.loaddata();
} else {
this.$Message.error("删除失败");
}
}) })
.catch(error => {
this.$Message.error("删除失败");
});
},
onCancel: () => {}
});
}, },
saveCancelModel() { saveCancelModel() {
this.modalliao = false this.modalliao = false;
}, },
cancel() { cancel() {
this.cleardata() this.cleardata();
}, },
cleardata() { cleardata() {
let obj = { this.formValidate.id = 0;
id: 0, this.formValidate.code = "";
code: '', this.formValidate.name = "";
name: '', this.formValidate.platesnum = 0;
platesnum: 0, this.formValidate.quota_per_board = 0;
quota_per_board: 0, this.formValidate.file_template = "";
file_template: ''
} this.formValidate1 = null;
this.formValidate = obj
let obj1 = {
id: 0,
materialbillId: 0,
material_type: 1,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
}
this.formValidate1[0] = obj1
let obj2 = {
id: 0,
materialbillId: 0,
material_type: 2,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
}
this.formValidate1[1] = obj2
let obj3 = {
id: 0,
materialbillId: 0,
material_type: 3,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
}
this.formValidate1[2] = obj3
} }
} }
} };
</script> </script>
\ No newline at end of file
...@@ -526,7 +526,7 @@ export default { ...@@ -526,7 +526,7 @@ export default {
{ {
title: '主工艺', title: '工艺规程',
key: 'mainRoutingID', key: 'mainRoutingID',
width: 120, width: 120,
render: (h, params) => { render: (h, params) => {
...@@ -610,7 +610,7 @@ export default { ...@@ -610,7 +610,7 @@ export default {
key: 'materialbillID', key: 'materialbillID',
width: 120, width: 120,
render: (h, params) => { render: (h, params) => {
if (this.tabstatus == '1') { if (params.row.mainRoutingID == 0) {
h('div', '') h('div', '')
} else { } else {
let id = params.row.id let id = params.row.id
...@@ -1660,6 +1660,8 @@ export default { ...@@ -1660,6 +1660,8 @@ export default {
ld.orderids = orderids.toString(',') ld.orderids = orderids.toString(',')
ld.formValidate.routingHeaderId = params.row.mainRoutingID
ld.formValidate.id = params.row.materialbillID ld.formValidate.id = params.row.materialbillID
ld.loaddata() ld.loaddata()
......
...@@ -540,8 +540,7 @@ export default { ...@@ -540,8 +540,7 @@ export default {
var url = var url =
`${designUrl}/routingheader/GetListSmall?approvalstatus=1&product_id=` + `${designUrl}/routingheader/GetListSmall?approvalstatus=1&product_id=` +
productid + productid +
"&routingType=" + "&routingType=0";
this.formValidate.routingType;
service.get(`${url}`).then(response => { service.get(`${url}`).then(response => {
this.RoutingList = response.result; this.RoutingList = response.result;
}); });
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem :label="l('creator')"> <FormItem :label="l('creator')">
<User :value="entity.creator"></User> <User :value="creatorUserId"></User>
<label slot="append" v-if="false">{{entity.creatorUserId}}</label>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
...@@ -189,8 +188,8 @@ export default { ...@@ -189,8 +188,8 @@ export default {
objList.storeId = data.storeId objList.storeId = data.storeId
objList.storeTitle = data.storeTitle objList.storeTitle = data.storeTitle
objList.materialType = 2 objList.materialType = 2
objList.creator = this.entity.creator objList.creator = this.creator
objList.creatorUserId = this.entity.creatorUserId objList.creatorUserId = this.creatorUserId
this.listUp.push(objList) this.listUp.push(objList)
} }
}) })
...@@ -201,8 +200,8 @@ export default { ...@@ -201,8 +200,8 @@ export default {
storeTitle: this.conditions.storeTitle.value, storeTitle: this.conditions.storeTitle.value,
remark: this.entity.remark, remark: this.entity.remark,
materialType: 2, materialType: 2,
creator: this.entity.creator, creator: this.creator,
creatorUserId: this.entity.creatorUserId creatorUserId: this.creatorUserId
}, },
item: this.listUp item: this.listUp
} }
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem :label="l('creator')"> <FormItem :label="l('creator')">
<User :value="entity.creator"></User> <User :value="creatorUserId"></User>
<label slot="append" v-if="false">{{entity.creatorUserId}}</label>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
...@@ -181,8 +180,8 @@ export default { ...@@ -181,8 +180,8 @@ export default {
objList.storeId = data.storeId objList.storeId = data.storeId
objList.storeTitle = data.storeTitle objList.storeTitle = data.storeTitle
objList.materialType = 1 objList.materialType = 1
objList.creator = this.entity.creator objList.creator = this.creator
objList.creatorUserId = this.entity.creatorUserId objList.creatorUserId = this.creatorUserId
this.listUp.push(objList) this.listUp.push(objList)
} }
}) })
...@@ -193,8 +192,8 @@ export default { ...@@ -193,8 +192,8 @@ export default {
storeTitle: this.conditions.storeTitle.value, storeTitle: this.conditions.storeTitle.value,
remark: this.entity.remark, remark: this.entity.remark,
materialType: 1, materialType: 1,
creator: this.entity.creator, creator: this.creator,
creatorUserId: this.entity.creatorUserId creatorUserId: this.creatorUserId
}, },
item: this.listUp item: this.listUp
} }
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem :label="l('creator')"> <FormItem :label="l('creator')">
<User :value="entity.creator"></User> <User :value="creatorUserId"></User>
<label slot="append" v-if="false">{{entity.creatorUserId}}</label>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
...@@ -182,8 +181,8 @@ export default { ...@@ -182,8 +181,8 @@ export default {
objList.storeId = data.storeId objList.storeId = data.storeId
objList.storeTitle = data.storeTitle objList.storeTitle = data.storeTitle
objList.materialType = 3 objList.materialType = 3
objList.creator = this.entity.creator objList.creator = this.creator
objList.creatorUserId = this.entity.creatorUserId objList.creatorUserId = this.creatorUserId
this.listUp.push(objList) this.listUp.push(objList)
} }
}) })
...@@ -194,8 +193,8 @@ export default { ...@@ -194,8 +193,8 @@ export default {
storeTitle: this.conditions.storeTitle.value, storeTitle: this.conditions.storeTitle.value,
remark: this.entity.remark, remark: this.entity.remark,
materialType: 3, materialType: 3,
creator: this.entity.creator, creator: this.creator,
creatorUserId: this.entity.creatorUserId creatorUserId: this.creatorUserId
}, },
item: this.listUp item: this.listUp
} }
......
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