Commit 707b74cb authored by kangzhenfei's avatar kangzhenfei

dnc&mnc

parent 28524808
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="140">
<Row>
<Col :span="12">
<FormItem label="物料编码:" prop="">
<Input placeholder="请输入物料编码" v-model="entity.projectNo" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="零件图号:" prop="">
<Input placeholder="请输入零件图号" v-model="entity.lingNo" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="零件名称:" prop="">
<Input placeholder="请输入零件名称" v-model="entity.lingName" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="工艺规程/工序号:" prop="">
<Input placeholder="请输入工艺规程/工序号" v-model="entity.produCode" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="工序名称:" prop="">
<Input placeholder="请输入工序名称" v-model="entity.produName" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="程序名称:" prop="">
<Input placeholder="请输入程序名称" v-model="entity.projecName" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="程序文件名称:" prop="">
<Input placeholder="请输入程序文件名称" v-model="entity.fileName" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="版本号:" prop="">
<Input placeholder="请输入版本号" v-model="entity.tvb" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="创建人:" prop="">
<Input placeholder="请输入创建人" v-model="entity.creatUser" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="状态:" prop="">
{{entity.statue}}
<!-- <Input v-model="entity.statue" /> -->
</FormItem>
</Col>
<Col :span="12">
<FormItem label="备注:" prop="">
<Input placeholder="请输入备注信息" v-model="entity.notse" />
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
export default {
name: "Edit",
data() {
return {
disabled: false,
entity: {},
orderCatList: [],
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
},
single: false
};
},
props: {
row: {
type: Object,
default: () => {
return null;
}
}
},
methods: {
load(v) {
this.entity = v;
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "mes_op_task_execute" + "." + key;
return this.$t(key);
}
},
watch: {
// row(v) {
// if (v != {}) {
//alert(JSON.stringify(v))
// this.entity = v;
// }
// }
}
};
</script>
...@@ -8,51 +8,46 @@ ...@@ -8,51 +8,46 @@
<div class="dispatch_part"> <div class="dispatch_part">
<p class="dispatch_part_top"> <p class="dispatch_part_top">
<b class="mr10">设备列表</b> <b class="mr10">设备列表</b>
{{listTask.length}} {{listSheBei.length}}
<!-- {{ids}} -->
</p> </p>
<div class="dispatch_part_body" v-if="listShow == '订单'" :style="{height:byheight}"> <div class="dispatch_part_body" :style="{height:byheight}">
<h4 class="tc" v-if="this.listTask.length==0">暂无数据</h4> <h4 class="tc" v-if="this.listSheBei.length==0">暂无数据</h4>
<div v-for="(item,index) in listOrder" :key="index" :name="item.mesCode"> <div
v-for="(item,index) in listSheBei"
:key="index"
:name="item.dncCode"
class="row_box"
>
<h3 class="h3_bg"> <h3 class="h3_bg">
订单号:{{item[0].mesCode}} <Checkbox v-model="item.checked">设备编号:{{item.dncCode}}</Checkbox>
<Tag class="h3_tag">{{item.length}}</Tag> <a class="h3_tag">{{item.dncName}}</a>
</h3> </h3>
<p slot="content">
<Row :gutter="15" class="card_body01">
<Col span="8" class="dispatch_card" v-for="(li,index) in item" :key="li.id">
<Card>
<p slot="title" class="card_top">
<Checkbox v-model="li.checked" :disabled="li.status!=-1">
<Icon type="ios-pricetags" />
工序{{li.process_seq}}{{li.process_name}}
</Checkbox>
</p>
<div class="h60">
<p class="g_title">{{li.productName}}--{{li.equipCode}}</p>
<p> <p>
产品数量:{{li.quantity}} <Row class="card_body01">
<op <Col span="8" class="dispatch_card">资源主操:{{item.dncUser}}</Col>
title="拆分" <Col span="8" class="dispatch_card">位置:{{item.dncArea}}</Col>
type="icon" <Col span="8" class="dispatch_card">状态:{{item.dncStatue}}</Col>
icon="md-cut" </Row>
v-if="li.quantity > 1 && li.pid == 0 && li.status==-1"
@click="setChai(li,index)"
></op>
<op
title="删除"
type="icon"
icon="md-close-circle"
v-else-if="li.dispatchStatus!=2 && li.pid != 0"
@click="removeDetail(li,index)"
></op>
</p> </p>
<p>{{li.beginTime}}--{{li.endTime}}</p> <p class="show_btn">
<p>人员 :{{li.userNames}}</p> <a @click="showRow(item.id,item.btnShow)">
</div> <Tooltip content="所属程序列表">
</Card> <Icon v-if="btnModal" type="ios-arrow-down" />
<Icon v-else type="ios-arrow-up" />
</Tooltip>
</a>
</p>
<div class="h60" v-if="!btnModal">
<Row class="card_body02" v-for="(li,index) in item.row" :key="index">
<Col span="8" class="dispatch_li">
<Checkbox v-model="li.checked">程序名:{{li.mdcNmae}}</Checkbox>
</Col> </Col>
<Col span="8" class="dispatch_li">大小:{{li.size}}</Col>
<Col span="8" class="dispatch_li">下载时间:{{li.downTime}}</Col>
</Row> </Row>
</p> <!-- {{liOrderIds}} -->
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -61,46 +56,31 @@ ...@@ -61,46 +56,31 @@
<div class="dispatch_part"> <div class="dispatch_part">
<p class="dispatch_part_top"> <p class="dispatch_part_top">
<b class="mr10">程序列表</b> <b class="mr10">程序列表</b>
<span >{{listSheBei.length}}</span> <span>{{listChengxu.length}}</span>
<!-- {{chengXuIds}} -->
</p> </p>
<div class="dispatch_part_body" :style="{height:byheight}"> <div class="dispatch_part_body" :style="{height:byheight}">
<h4 class="tc" v-if="listSheBei.length==0">暂无数据</h4> <h4 class="tc" v-if="listChengxu.length==0">暂无数据</h4>
<div class="shebei"> <!-- <div class="shebei"> -->
<Row :gutter="15"> <Row :gutter="15" class="card_body01">
<span style="display:none">{{shebeiId}}</span> <Col span="8" class="dispatch_card" v-for="(item,index) in listChengxu" :key="index">
<Col <Card>
span="12"
class="dispatch_card"
v-for="(item,index) in listSheBei"
:key="index"
>
<Card class="card">
<p slot="title" class="card_top"> <p slot="title" class="card_top">
<label @click="setShebeiId(item.id)" class="label"> <Checkbox v-model="item.checked">程序名称:{{item.mesCode}}</Checkbox>
<Icon <!-- :disabled="item.status!=-1" -->
type="ios-disc"
size="18"
:color="item.id==shebeiId?'#2d8cf0':'#fff'"
/>
<input
name="shebei"
:value="item.equip_id"
type="radio"
style="display:none"
/>
设备编号:{{item.equip_id}}
</label>
</p> </p>
<div class="h60"> <div class="h60">
<p class="g_title">{{item.equip_name}}</p> <p class="g_title">{{item.productName}}</p>
<p>资源主操:{{item.operatorUsers}}</p> <p>
<p>位置:{{item.locationx}}</p> <Icon type="ios-pricetags" />
<p>状态:{{item.equip_status}}</p> 工序{{item.process_seq}}{{item.process_name}}
</p>
<p>{{item.beginTime}}--{{item.endTime}}</p>
</div> </div>
</Card> </Card>
</Col> </Col>
</Row> </Row>
</div> <!-- </div> -->
</div> </div>
</div> </div>
</Col> </Col>
...@@ -113,14 +93,16 @@ ...@@ -113,14 +93,16 @@
:mask-closable="false" :mask-closable="false"
ok-text="拆分" ok-text="拆分"
@on-ok="okChai()" @on-ok="okChai()"
> 拆分数量: >
拆分数量:
<Tag>{{chaiNum}}</Tag> <Tag>{{chaiNum}}</Tag>
<Slider v-model="chaiNum" :max="maxnum" show-stops :min="1"></Slider> <Slider v-model="chaiNum" :max="maxnum" show-stops :min="1"></Slider>
</Modal> </Modal>
<!-- 底部 --> <!-- 底部 -->
<FooterToolbar style="height:65px" v-show="showOperate&&footerToolbar"> <FooterToolbar style="height:65px" v-show="showOperate&&footerToolbar">
<Button class="span ml20" type="primary" @click="openDrawer">下载</Button> <!-- <span>已选程序:{{chengXuIds.length}}</span> -->
<!-- <Button class="span ml20" type="primary" @click="openDrawer">文本对比</Button> --> <Button class="span ml20" type="primary" v-if="xiaZai" @click="downFile">下载</Button>
<Button class="span ml20" type="primary" v-if="beyong" @click="fileBeyong">文本对比</Button>
<Button @click="footerToolbar=false">取消</Button> <Button @click="footerToolbar=false">取消</Button>
</FooterToolbar> </FooterToolbar>
<Drawer title="排产设置盘" v-model="facilityModal" width="820" class="drawer_box"> <Drawer title="排产设置盘" v-model="facilityModal" width="820" class="drawer_box">
...@@ -146,7 +128,8 @@ ...@@ -146,7 +128,8 @@
v-model="entity.userIds" v-model="entity.userIds"
:multiple="true" :multiple="true"
style="width: 500px" style="width: 500px"
/><!-- :type="3" --> />
<!-- :type="3" -->
</FormItem> </FormItem>
</Col> </Col>
<Col span="24" class="drawer_midell"> <Col span="24" class="drawer_midell">
...@@ -186,10 +169,10 @@ export default { ...@@ -186,10 +169,10 @@ export default {
byheight: "450px", byheight: "450px",
button1: "全部", button1: "全部",
button2: "设备", button2: "设备",
listShow: "订单",
shebei: "", shebei: "",
curTask:null, curTask: null,
dateRange: {//禁选工时时间区间 dateRange: {
//禁选工时时间区间
disabledDate(date) { disabledDate(date) {
return date && date.valueOf() < Date.now() - 86400000; return date && date.valueOf() < Date.now() - 86400000;
} }
...@@ -200,9 +183,116 @@ export default { ...@@ -200,9 +183,116 @@ export default {
footerMore: true, //CheckItem!=null&&CheckItem!='' footerMore: true, //CheckItem!=null&&CheckItem!=''
footerModel: false, //底部按钮 footerModel: false, //底部按钮
facilityModal: false, //设备抽屉 facilityModal: false, //设备抽屉
listSheBei: [], //设备列表 xiaZai:false,
beyong:false,
listMan: [], //人员列表 listMan: [], //人员列表
listTask: [], //工单列表数据 listSheBei: [//设备列表数据
{
dncCode: "19212_0665001",
dncName: "数控机床01",
dncUser: "王拉拉",
dncArea: "区域01",
dncStatue: "空闲",
checked: false,
btnShow: false,
id: 1,
row: [
{
mdcNmae: "00123_281",
id:101,
size: "128Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},
{
mdcNmae: "00123_282",
id:102,
size: "128Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},
{
mdcNmae: "00123_283",
id:103,
size: "128Mb",
downTime: "2020-05-26 10:30:26",
checked: false
}
]
},{
dncCode: "19212_0665002",
dncName: "数控机床02",
dncUser: "张帆",
dncArea: "区域02",
dncStatue: "空闲",
checked: false,
btnShow: false,
id: 2,
row: [
{
mdcNmae: "00123_281",
id:201,
size: "128Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},
{
mdcNmae: "00123_282",
id:202,
size: "128Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},
{
mdcNmae: "00123_283",
id:203,
size: "128Mb",
downTime: "2020-05-26 10:30:26",
checked: false
}
]
}
],
listChengxu: [//程序列表
{
mesCode: "1288-268",
id: 1,
checked: false,
productName: "数控机床",
process_seq: "1",
process_name: "领料",
beginTime: "2020/05/26 ",
endTime: "2020/05/26 "
},{
mesCode: "1288-269",
id: 2,
checked: false,
productName: "摸具机床",
process_seq: "2",
process_name: "打磨",
beginTime: "2020/05/26 ",
endTime: "2020/05/26 "
},{
mesCode: "1288-269",
id: 3,
checked: false,
productName: "摸具机床",
process_seq: "2",
process_name: "打磨",
beginTime: "2020/05/26 ",
endTime: "2020/05/26 "
},{
mesCode: "1288-269",
id: 4,
checked: false,
productName: "摸具机床",
process_seq: "2",
process_name: "打磨",
beginTime: "2020/05/26 ",
endTime: "2020/05/26 "
}
],
btnModal: true,//箭头
listTitle: [], //订单号列表 listTitle: [], //订单号列表
newList: [], //选中数据 newList: [], //选中数据
chaiModal: false, //拆分弹框 chaiModal: false, //拆分弹框
...@@ -258,7 +348,7 @@ export default { ...@@ -258,7 +348,7 @@ export default {
}; };
}, },
created() { created() {
this.getUserInfoFn(); // this.getUserInfoFn();
this.byheight = window.innerHeight - 178 + "px"; this.byheight = window.innerHeight - 178 + "px";
}, },
mounted() { mounted() {
...@@ -295,6 +385,16 @@ export default { ...@@ -295,6 +385,16 @@ export default {
this.shebeiId = id; this.shebeiId = id;
this.footerToolbar = true; this.footerToolbar = true;
}, },
// 切换箭头
showRow(id,btn){
// console.log(id)
// let ss=!btnModal
// this.listSheBei.map(u=>{
// })
// console.log(btnModal = ss)
this.btnModal = !this.btnModal
},
// 获取查询人员 // 获取查询人员
getselectuser(id) { getselectuser(id) {
let parme = { departmentId: id, type: "2" }; let parme = { departmentId: id, type: "2" };
...@@ -312,7 +412,7 @@ export default { ...@@ -312,7 +412,7 @@ export default {
res.result.map(u => { res.result.map(u => {
u.checked = false; u.checked = false;
}); });
this.listSheBei = res.result; this.listChengxu = res.result;
}); });
}, },
// 获取用户工单 JSON.stringify(parme) // 获取用户工单 JSON.stringify(parme)
...@@ -324,7 +424,9 @@ export default { ...@@ -324,7 +424,9 @@ export default {
res.result.map(u => { res.result.map(u => {
if (u.pid) { if (u.pid) {
pid = u.pid; pid = u.pid;
} else { pid = 0;} } else {
pid = 0;
}
let detailnew = { let detailnew = {
beginTime: u.beginTime, //开始时间 beginTime: u.beginTime, //开始时间
dispatchStatus: u.dispatchStatus, // dispatchStatus: u.dispatchStatus, //
...@@ -349,7 +451,7 @@ export default { ...@@ -349,7 +451,7 @@ export default {
}; };
savedUl.push(detailnew); savedUl.push(detailnew);
}); });
this.listTask = savedUl; // this.listSheBei = savedUl;
}); });
}, },
// 时间改变方法 // 时间改变方法
...@@ -369,10 +471,16 @@ export default { ...@@ -369,10 +471,16 @@ export default {
changeStatus(a) { changeStatus(a) {
this.getUserInfoFn(); this.getUserInfoFn();
}, },
downFile(){
this.$Message.success("下载文件")
},
fileBeyong(){
this.$Message.success("对比文件")
},
// 打开抽屉 // 打开抽屉
openDrawer() { openDrawer() {
let chekids = this.ids; let chekids = this.ids;
let formData = this.listTask; let formData = this.listSheBei;
let timebegin = formData[0].beginTime; let timebegin = formData[0].beginTime;
let timend = formData[0].endTime; let timend = formData[0].endTime;
this.newList = []; this.newList = [];
...@@ -389,7 +497,7 @@ export default { ...@@ -389,7 +497,7 @@ export default {
this.facilityModal = true; this.facilityModal = true;
} else { } else {
this.pentity.taskTime = [timebegin, timend]; this.pentity.taskTime = [timebegin, timend];
}// console.log("选中的数据", this.newList); } // console.log("选中的数据", this.newList);
}, },
// 设备派工 // 设备派工
sendSheBei() { sendSheBei() {
...@@ -447,7 +555,7 @@ export default { ...@@ -447,7 +555,7 @@ export default {
}, },
// 拆分方法 // 拆分方法
setChai(item, index) { setChai(item, index) {
this.curTask=item; this.curTask = item;
this.chaiModal = true; this.chaiModal = true;
this.chaiNum = 1; this.chaiNum = 1;
this.maxnum = item.quantity - 1; this.maxnum = item.quantity - 1;
...@@ -495,31 +603,53 @@ export default { ...@@ -495,31 +603,53 @@ export default {
computed: { computed: {
ids() { ids() {
let ids = []; let ids = [];
this.listTask.map(u => { this.listSheBei.map(u => {
if (u.checked) { ids.push(u.id);} if (u.checked) {
ids.push(u.id);
}
}); });
if (ids.length > 0) {this.footerToolbar = true;} if (ids.length > 0) {
this.footerToolbar = true;
this.xiaZai = true;
}
return ids; return ids;
}, },
listOrder() { chengXuIds() {
let orders = this.$u.group(this.listTask, u => { let chengXuIds = [];
return u.mesCode; this.listChengxu.map(u => {
});// console.warn("listOrder", orders);
return orders;
},
peploeId() {
let peploeId = [];
this.listMan.map(u => {
if (u.checked) { if (u.checked) {
peploeId.push(u.id); chengXuIds.push(u.id);
} }
}); });
if (chengXuIds.length > 0) {
this.footerToolbar = true; this.footerToolbar = true;
return peploeId; }
return chengXuIds;
},
listOrder() {
let orders = this.$u.group(this.listSheBei, u => {
return u.mesCode;
}); // console.warn("listOrder", orders);
return orders;
},
liOrderIds() {
let liOrderIds = [];
let rowList ;
this.listSheBei.map(u => { rowList = u.row });
// rowList.map(item=>{ rowData.push(item) })
// rowList.map(tm=>{
// if(tm.checked){
// liOrderIds.push(tm.id)
// }
// })
// this.footerToolbar = true;
return rowList;
}, },
showOperate() { showOperate() {
return ( return (
this.ids.length > 0 && (this.shebeiId > 0 || this.peploeId.length > 0) this.ids.length > 0 && (this.chengXuIds.length > 0 )
// || this.liOrderIds.length > 0
); );
} }
}, },
......
...@@ -31,11 +31,39 @@ ...@@ -31,11 +31,39 @@
.dispatch_part_body{ .dispatch_part_body{
padding: 10px; padding: 10px;
overflow-y: auto; overflow-y: auto;
.row_box {
border: 1px solid #ccc;
border-radius:4px;
margin: 10px 0;
.h3_bg{ .h3_bg{
background: #a5adbf; padding: 5px 0 5px 10px;
padding: 0 0 0 10px; border-bottom: 1px solid #ccc;
.h3_tag{ .h3_tag{
margin-left: 15px!important; margin-left: 40px;
color: #2680EB;
}
}
.card_body01{
padding: 0 10px 0;
}
.h60{
.card_body02{
padding: 0 10px 0;
margin: 4px 0;
.dispatch_li{
line-height: 24px;
}
}
}
.show_btn{
font-size: 16px;
a{
text-align: center;
width: 40px;
display: block;
height: 24px;
margin: 0 auto;
}
} }
} }
.dispatch_card{ .dispatch_card{
...@@ -47,43 +75,13 @@ ...@@ -47,43 +75,13 @@
} }
} }
.ivu-card-head{ .ivu-card-head{
background: #2d8cf0!important; background: #2d8cf0;
} }
} }
.g_title{ .g_title{
color: #2d8cf0; color: #2d8cf0;
} }
} }
.dispatch_card02{
margin: 10px 0;
// padding-left: 0!important;
// padding-right: 0!important;
.man_body{
max-width: 185px;
.checkUser{
border-radius: 24px;
width: 100%;
height: 50px;
line-height: 47px;
span{
height: 50px;
}
.svg_name{
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
white-space:nowrap;
display: block;
float: right;
width: 82%;
}
.svg{
width: 70px;
}
}
}
}
} }
} }
.drawer_midell{ .drawer_midell{
...@@ -105,8 +103,6 @@ ...@@ -105,8 +103,6 @@
font-weight: 600; font-weight: 600;
} }
.drawer_midell{ .drawer_midell{
// height: 120px;
// margin: 20px 0;
.drawer_center{ .drawer_center{
text-align: center; text-align: center;
padding: 10px; padding: 10px;
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="140">
<Row>
<Col :span="12">
<FormItem label="物料编码:" prop="">
<Input placeholder="请输入物料编码" v-model="entity.projectNo" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="零件图号:" prop="">
<Input placeholder="请输入零件图号" v-model="entity.lingNo" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="零件名称:" prop="">
<Input placeholder="请输入零件名称" v-model="entity.lingName" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="工艺规程/工序号:" prop="">
<Input placeholder="请输入工艺规程/工序号" v-model="entity.produCode" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="工序名称:" prop="">
<Input placeholder="请输入工序名称" v-model="entity.produName" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="程序名称:" prop="">
<Input placeholder="请输入程序名称" v-model="entity.projecName" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="程序文件名称:" prop="">
<Input placeholder="请输入程序文件名称" v-model="entity.fileName" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="版本号:" prop="">
<Input placeholder="请输入版本号" v-model="entity.tvb" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="创建人:" prop="">
<Input placeholder="请输入创建人" v-model="entity.creatUser" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="状态:" prop="">
{{entity.statue}}
<!-- <Input v-model="entity.statue" /> -->
</FormItem>
</Col>
<Col :span="12">
<FormItem label="备注:" prop="">
<Input placeholder="请输入备注信息" v-model="entity.notse" />
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
export default {
name: "Edit",
data() {
return {
disabled: false,
entity: {},
orderCatList: [],
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
},
single: false
};
},
props: {
row: {
type: Object,
default: () => {
return null;
}
}
},
methods: {
load(v) {
this.entity = v;
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
let parmsUp = {
run_time: this.entity.run_time,
first_equip: this.entity.eQUIPID,
id: this.entity.id
};
// Api.updatesetuptimeandfirstequip(parmsUp)
// .then(res => {
// if (res.success) {
// if (!this.single) {
// this.$Message.success("保存成功");
// this.$emit("on-option-ok");
// } else {
// let parms = {
// id: this.entity.routing_detail_id, //工序ID
// name: this.entity.task_name, //工序名
// task_seq: this.entity.task_seq, //工序号
// resource_id: this.entity.eQUIPID, //设备id
// runtime: this.entity.run_time, //单件工时
// department_id: 0 //班组ID
// };
// Api.apsupdate(parms)
// .then(r => {
// this.disabled = false;
// if (r.success) {
// this.$Message.success("保存成功");
// this.$emit("on-option-ok");
// } else {
// this.$Message.error("保存失败");
// }
// })
// .catch(err => {
// this.disabled = false;
// this.$Message.error("保存失败");
// console.warn(err);
// });
// }
// } else {
// this.$Message.error("保存失败");
// }
// })
// .catch(err => {
// this.disabled = false;
// this.$Message.error("保存失败");
// console.warn(err);
// });
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "mes_op_task_execute" + "." + key;
return this.$t(key);
}
},
watch: {
row(v) {
if (v != {}) {
alert(JSON.stringify(v))
this.entity = v;
}
}
}
};
</script>
<template> <template>
<div class="dnc_box"> <div class="dnc_box">
<!-- 数据传输:action="action" 接口数据 --> <!-- 数据传输:action="action" 接口数据 -->
<DataGrid :columns="columns" ref="grid" :data="data" :high="false"> <DataGrid :columns="columns" ref="grid" :data="data" :high="false" :height="tableHeight">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
...@@ -13,20 +13,28 @@ ...@@ -13,20 +13,28 @@
</Form> </Form>
</template> </template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" >新增</Button> <Button type="primary" @click="addRow">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
<!-- <Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" /> --> <Edit :row="rowData" @on-close="cancel" @on-option-ok="editOk" />
</Modal>
<Modal v-model="addModal" title="新增" footer-hide width="800">
<addView @on-close="cancel" @on-option-ok="addOk" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Edit from "./edit";
import addView from "./add";
export default { export default {
components: {}, components: {Edit,addView},
data() { data() {
return { return {
editModal: false, editModal: false,
addModal:false,
tableHeight:800,
rowData:{},
easySearch: { easySearch: {
keys: { op: 'projectNo', value: null } keys: { op: 'projectNo', value: null }
}, },
...@@ -61,7 +69,7 @@ export default { ...@@ -61,7 +69,7 @@ export default {
}, },
{ {
key: "tvb", key: "tvb",
title: "版本" title: "版本"
}, },
{ {
key: "creatUser", key: "creatUser",
...@@ -110,8 +118,7 @@ export default { ...@@ -110,8 +118,7 @@ export default {
creatUser: "刘建", creatUser: "刘建",
statue: "受控", statue: "受控",
notse: "适用于MDF设备" notse: "适用于MDF设备"
}, },{
{
projectNo: "12366588", projectNo: "12366588",
id:2, id:2,
lingNo: "dd4.rt5.991", lingNo: "dd4.rt5.991",
...@@ -124,8 +131,7 @@ export default { ...@@ -124,8 +131,7 @@ export default {
creatUser: "刘建", creatUser: "刘建",
statue: "受控", statue: "受控",
notse: "适用于MDF设备" notse: "适用于MDF设备"
}, },{
{
projectNo: "2536898", projectNo: "2536898",
id:3, id:3,
lingNo: "dd4.rt5.991", lingNo: "dd4.rt5.991",
...@@ -138,8 +144,46 @@ export default { ...@@ -138,8 +144,46 @@ export default {
creatUser: "刘建", creatUser: "刘建",
statue: "受控", statue: "受控",
notse: "适用于MDF设备" notse: "适用于MDF设备"
}, },{
{ projectNo: "35653248",
id:4,
lingNo: "dd4.rt5.991",
lingName: "轴承",
produCode: "JJGYI-001/1",
produName: "车",
projecName: "精车文件",
fileName: "dd4rt5991.1.A.txt",
tvb: "A",
creatUser: "刘建",
statue: "受控",
notse: "适用于MDF设备"
},{
projectNo: "35653248",
id:4,
lingNo: "dd4.rt5.991",
lingName: "轴承",
produCode: "JJGYI-001/1",
produName: "车",
projecName: "精车文件",
fileName: "dd4rt5991.1.A.txt",
tvb: "A",
creatUser: "刘建",
statue: "受控",
notse: "适用于MDF设备"
},{
projectNo: "35653248",
id:4,
lingNo: "dd4.rt5.991",
lingName: "轴承",
produCode: "JJGYI-001/1",
produName: "车",
projecName: "精车文件",
fileName: "dd4rt5991.1.A.txt",
tvb: "A",
creatUser: "刘建",
statue: "受控",
notse: "适用于MDF设备"
},{
projectNo: "35653248", projectNo: "35653248",
id:4, id:4,
lingNo: "dd4.rt5.991", lingNo: "dd4.rt5.991",
...@@ -156,17 +200,35 @@ export default { ...@@ -156,17 +200,35 @@ export default {
] ]
}; };
}, },
created() {}, created(){
this.tableHeight = window.innerHeight - 230
},
mounted() { mounted() {
// this.loadDuration(); window.onresize = () => {///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.tableHeight = window.screenHeight - 230
})()
}
}, },
methods: { methods: {
search() { search() {
this.$Message.success("搜索查询") this.$Message.success("搜索查询")
// this.$refs.grid.reload(this.easySearch) // this.$refs.grid.reload(this.easySearch)
}, },
addRow(){
this.addModal = true
},
edit(rowData){ edit(rowData){
console.log(rowData) console.log(rowData)
this.rowData = rowData;
this.editModal = true
},
editOk(){},
addOk(){},
cancel(){
this.editModal = false
this.addModal = false
}, },
}, },
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