Commit 69978507 authored by 佟礼's avatar 佟礼

检验填报合并

parents f686f2cd 3e4fb10a
<template>
<div>
<span v-if="type=='date'">
<span>
<Tooltip :content="value">
{{value.substr(0,10)}}
{{date}}
</Tooltip>
</span>
<span v-else>{{value.substr(0,19)}}</span>
</div>
</template>
<script>
export default {
name: 'dtSpan',
data() {
return {
date:""
}
},
props: {
......@@ -25,10 +24,22 @@ export default {
default: '2001-01-01 00:00:00'
},
},
created() {},
created() {
this.init()
},
methods: {
init(){
if(this.value&&this.value.length>=19){
this.date=this.value.substr(0,this.type=='date'?10:19)
}
return this.date;
}
},
computed: {},
watch: {}
watch: {
value(){
this.init()
}
}
}
</script>
\ No newline at end of file
<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>
This diff is collapsed.
......@@ -31,11 +31,39 @@
.dispatch_part_body{
padding: 10px;
overflow-y: auto;
.h3_bg{
background: #a5adbf;
padding: 0 0 0 10px;
.h3_tag{
margin-left: 15px!important;
.row_box {
border: 1px solid #ccc;
border-radius:4px;
margin: 10px 0;
.h3_bg{
padding: 5px 0 5px 10px;
border-bottom: 1px solid #ccc;
.h3_tag{
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{
......@@ -47,43 +75,13 @@
}
}
.ivu-card-head{
background: #2d8cf0!important;
background: #2d8cf0;
}
}
.g_title{
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{
......@@ -105,8 +103,6 @@
font-weight: 600;
}
.drawer_midell{
// height: 120px;
// margin: 20px 0;
.drawer_center{
text-align: center;
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>
<div class="dnc_box">
<!-- 数据传输: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">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......@@ -13,20 +13,28 @@
</Form>
</template>
<template slot="buttons">
<Button type="primary" >新增</Button>
<Button type="primary" @click="addRow">新增</Button>
</template>
</DataGrid>
<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>
</div>
</template>
<script>
import Edit from "./edit";
import addView from "./add";
export default {
components: {},
components: {Edit,addView},
data() {
return {
editModal: false,
addModal:false,
tableHeight:800,
rowData:{},
easySearch: {
keys: { op: 'projectNo', value: null }
},
......@@ -61,7 +69,7 @@ export default {
},
{
key: "tvb",
title: "版本"
title: "版本"
},
{
key: "creatUser",
......@@ -110,8 +118,7 @@ export default {
creatUser: "刘建",
statue: "受控",
notse: "适用于MDF设备"
},
{
},{
projectNo: "12366588",
id:2,
lingNo: "dd4.rt5.991",
......@@ -124,8 +131,7 @@ export default {
creatUser: "刘建",
statue: "受控",
notse: "适用于MDF设备"
},
{
},{
projectNo: "2536898",
id:3,
lingNo: "dd4.rt5.991",
......@@ -138,8 +144,46 @@ export default {
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",
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",
......@@ -156,17 +200,35 @@ export default {
]
};
},
created() {},
created(){
this.tableHeight = window.innerHeight - 230
},
mounted() {
// this.loadDuration();
window.onresize = () => {///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.tableHeight = window.screenHeight - 230
})()
}
},
methods: {
search() {
this.$Message.success("搜索查询")
// this.$refs.grid.reload(this.easySearch)
},
addRow(){
this.addModal = true
},
edit(rowData){
console.log(rowData)
this.rowData = rowData;
this.editModal = true
},
editOk(){},
addOk(){},
cancel(){
this.editModal = false
this.addModal = false
},
},
computed: {},
......
<template>
<div>数据分析表
<Echart1 ></Echart1>
<div>
<a class="back_href" @click="goView">
<Icon type="ios-undo-outline" size="24" />返回设备监控
</a>
<!-- 数据分析表 -->
<Echart1 ></Echart1>
</div>
</template>
<script>
......@@ -73,6 +77,11 @@ export default {
};
},
methods: {},
methods: {
goView(){
//返回设备监控页面
this.$router.push("/dncmnc/mnc");
},
},
};
</script>
......@@ -44,14 +44,14 @@
placement="right-start"
>
<DropdownMenu slot="list" ref="ppp" style="min-width: 80px;">
<DropdownItem>
<a @click="add">添加</a>
<DropdownItem @click.native="add">
<a>添加</a>
</DropdownItem>
<DropdownItem name="edit">
<a @click="edit">修改</a>
<DropdownItem name="edit" @click.native="edit">
<a>修改</a>
</DropdownItem>
<DropdownItem name="del">
<a @click="remove">删除</a>
<DropdownItem name="del" @click.native="remove">
<a>删除</a>
</DropdownItem>
</DropdownMenu>
</Dropdown>
......
......@@ -58,7 +58,7 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName" :value="li.unitName" code="material.main.unitName" type="tag"></state>
<state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
</FormItem>
</Col>
<!-- <Col :span="24">
......
......@@ -2,23 +2,18 @@
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<!-- <Col :span="12">
<FormItem label="编码" prop="code">
<Input v-model="entity.code" placeholder="请输入" disabled></Input>
</FormItem>
</Col>
</Col>-->
<Col :span="12">
<FormItem label="名称" prop="name">
<Input v-model="entity.name" placeholder="请输入"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem
label="状态"
prop="status"
placeholder="请选择"
v-if="entity.status==3||entity.status==4"
>
<!-- <Col :span="12">
<FormItem label="状态" prop="status" placeholder="请选择">
<Dictionary
code="material.main.status"
v-model="entity.status"
......@@ -27,7 +22,7 @@
:key="entity.status"
></Dictionary>
</FormItem>
</Col>
</Col>-->
<Col :span="12">
<FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input>
......@@ -52,9 +47,9 @@
class="w100"
></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary>
<Input v-if="li.dataType==4" v-model="entity[li.filed]"></Input>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<DatePicker
v-if="li.dataType==5"
v-if="li.dataType==4"
v-model="entity[li.field]"
type="date"
:placeholder="'选择'+li.title"
......@@ -63,6 +58,7 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
</FormItem>
</Col>
<!-- <Col :span="24">
......
......@@ -228,7 +228,7 @@ export default {
search() {
this.$refs.grid.reload(this.easySearch);
},
initCols() {
initCols(delay) {
let conditions = [
{
conditionalType: "Equal",
......@@ -252,6 +252,7 @@ export default {
});
this.cols = this.$u.clone(this.columns);
let extra = items.map(u => {
// console.log(u);
var col = {
key: u.field,
title: u.title
......@@ -259,7 +260,10 @@ export default {
if (u.dataType == 3) {
col.code = u.note;
}
if (u.unitName) {
if (u.dataType == 4) {
col.type = 'date';
}
if (u.unitName&&(u.dataType==1||u.dataType==2)) {
var units = this.$store.getters.dictionaryByKey(
"material.main.unitName"
);
......@@ -267,7 +271,7 @@ export default {
let item = units.filter(p => {
return p.code == u.unitName;
});
console.log(units, item);
// console.log(units, item);
col.title += "(" + item[0].name + ")";
}
return col;
......@@ -275,6 +279,10 @@ export default {
this.cols = this.cols.concat(extra);
var action = this.cols.splice(this.columns.length - 1, 1);
this.cols.push(this.columns[this.columns.length - 1]);
if(delay){
delay();
}
// console.log(this.cols)
}
});
},
......@@ -341,12 +349,14 @@ export default {
handler(newName, oldName) {
console.log("ovo", newName, oldName);
if (newName.rootCategoryId) {
this.initCols();
this.initCols(()=>{
if (newName.categoryId) {
this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch);
}
});
}
if (newName.categoryId) {
this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch);
} else {
if (!newName.categoryId) {
this.easySearch.categoryId.value = "-1";
}
},
......
......@@ -18,7 +18,8 @@
<div v-else-if="li.dataType==8">{{entity[li.field]}}</div>
<div v-else-if="li.dataType==5" v-html="entity[li.field]"></div>
<span v-else>{{entity[li.field]}}</span>
<span v-if="li.unitName" v-text="li.unitName" class="ml10"></span>
<State v-if="li.unitName" :code="li.note" :value="entity[li.field]" />
<!-- <span v-if="li.unitName" v-text="li.unitName" class="ml10"></span> -->
</Filed>
</Row>
</div>
......@@ -257,8 +258,7 @@ export default {
if (this.entity.code) {
codeList.push(this.entity.code);
} else {
codeList.push(this.eid);
codeList.push(this.eid);
}
idList.push(this.eid);
} else {
......@@ -267,8 +267,7 @@ export default {
if (e.code) {
codeList.push(e.code);
} else {
codeList.push(e.id);
codeList.push(e.id);
}
});
}
......
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