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

工单执行数据填报

parent b1a715e9
......@@ -14,8 +14,8 @@
<script>
export default {
model: {
prop: 'value',
event: 'on-change'
prop: "value",
event: "on-change"
},
data() {
return {
......@@ -24,15 +24,17 @@ export default {
orderId: null,
isCodeIds: [],
codeIds: []
}
};
},
created() {
this.getCodes();
},
created() {},
props: {
eid: Number,
value: [String, Number, Array],
placeholder: {
type: String,
default: '请选择产品编号'
default: "请选择产品编号"
},
multiple: {
type: Boolean,
......@@ -41,71 +43,73 @@ export default {
},
methods: {
change(event) {
this.$emit('on-change', event)
this.$emit("on-change", event);
this.codeIds = [];
for (let index = 0; index < event.length; index++) {
this.data.forEach((e) => {
if (event[index] == e.prefix + e.code) {
this.codeIds.push(e.id)
this.data.forEach(e => {
if (event[index] == e.code) {
this.codeIds.push(e.id);
}
})
});
}
},
getCodes(e) {
let url = `${PlanUrl}/orderproductcode/getbyorderid`
let url = `${PlanUrl}/orderproductcode/getbyorderid`;
if (this.eid) {
this.$api.get(url, { id: this.eid }).then((r) => {
this.$api.get(url, { id: this.eid }).then(r => {
if (r.success) {
this.data = r.result
this.orderId = r.result[0].orderId
this.data = r.result;
this.orderId = r.result[0].orderId;
}
})
});
}
},
//获取所有的选中项
getSelectItems() {
var items = []
this.value.forEach((v) => {
var item = this.dic.filter((u) => u.value == v)
var items = [];
this.value.forEach(v => {
var item = this.dic.filter(u => u.value == v);
if (item && item[0]) {
items.push(item[0])
items.push(item[0]);
}
})
return items
});
return items;
},
//获取所有选中项的名称
getSelectNames() {
var names = []
this.getSelectItems().forEach((v) => {
names.push(v.label)
})
return names
var names = [];
this.getSelectItems().forEach(v => {
names.push(v.label);
});
return names;
}
},
computed: {
dic() {
let result = []
this.data.forEach((u) => {
let result = [];
this.data.forEach(u => {
result.push({
value: u.prefix + u.code,
label: u.prefix + u.code
})
})
return result
value: u.code,
label: u.code
// value: u.prefix + u.code,
// label: u.prefix + u.code
});
});
return result;
}
},
watch: {
value: {
handler(v, o) {
this.name = v
this.name = v;
},
deep: true
},
eid(e) {
if (e) {
this.getCodes(e)
this.getCodes(e);
}
}
}
}
};
</script>
\ No newline at end of file
<template>
<div class="addd">
<ul>
<!-- <li><a @click="gnFunto(0,'进度汇报')" :class="{active:gnFlag == 0}"><Icon type="ios-clipboard" /> 进度汇报</a></li>
<div class="addd">
<ul>
<!-- <li><a @click="gnFunto(0,'进度汇报')" :class="{active:gnFlag == 0}"><Icon type="ios-clipboard" /> 进度汇报</a></li>
<li><a @click="gnFunto(1,'物料领用')" :class="{active:gnFlag == 1}"><Icon type="ios-cube" /> 物料领用</a></li>
<li><a @click="gnFunto(2,'产品装配')" :class="{active:gnFlag == 2}"><Icon type="md-build" /> 产品装配</a></li>
<li><a @click="gnFunto(3,'工时分配')" :class="{active:gnFlag == 3}"><Icon type="ios-time" /> 工时分配</a></li>
......@@ -11,43 +11,75 @@
<li><a @click="gnFunto(6,'工艺案例')" :class="{active:gnFlag == 6}"><Icon type="ios-paper" /> 工艺案例</a></li>
<li><a @click="gnFunto(7,'质量判定')" :class="{active:gnFlag == 7}"><Icon type="ios-medal" /> 质量判定</a></li>
<li><a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}"><Icon type="ios-create" /> 数据填报</a></li>
<li><a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}"><Icon type="logo-codepen" /> 测试数据</a></li> -->
<li><a @click="gnFunto(0,'进度汇报')" :class="{active:gnFlag == 0}">
<img src="@/assets/imgicon/execute/ex01.png" alt=""/> 进度汇报</a></li>
<li><a @click="gnFunto(1,'物料领用')" :class="{active:gnFlag == 1}">
<img src="@/assets/imgicon/execute/ex02.png" alt=""/> 物料领用</a></li>
<li><a @click="gnFunto(2,'产品装配')" :class="{active:gnFlag == 2}">
<img src="@/assets/imgicon/execute/ex03.png" alt=""/> 产品装配</a></li>
<li><a @click="gnFunto(3,'工时分配')" :class="{active:gnFlag == 3}">
<img src="@/assets/imgicon/execute/ex04.png" alt=""/> 工时分配</a></li>
<li><a @click="gnFunto(4,'生产准备')" :class="{active:gnFlag == 4}">
<img src="@/assets/imgicon/execute/ex05.png" alt=""/> 生产准备</a></li>
<li><a @click="gnFunto(5,'工艺查看')" :class="{active:gnFlag == 5}">
<img src="@/assets/imgicon/execute/ex06.png" alt=""/> 工艺查看</a></li>
<li><a @click="gnFunto(6,'工艺案例')" :class="{active:gnFlag == 6}">
<img src="@/assets/imgicon/execute/ex07.png" alt=""/> 工艺案例</a></li>
<li><a @click="gnFunto(7,'质量判定')" :class="{active:gnFlag == 7}">
<img src="@/assets/imgicon/execute/ex08.png" alt=""/> 质量判定</a></li>
<li><a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}">
<img src="@/assets/imgicon/execute/ex09.png" alt=""/> 数据填报</a></li>
<li><a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}">
<img src="@/assets/imgicon/execute/ex10.png" alt=""/> 测试数据</a></li>
</ul>
</div>
<li><a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}"><Icon type="logo-codepen" /> 测试数据</a></li>-->
<li>
<a @click="gnFunto(0,'进度汇报')" :class="{active:gnFlag == 0}">
<img src="@/assets/imgicon/execute/ex01.png" alt /> 进度汇报
</a>
</li>
<li>
<a @click="gnFunto(1,'物料领用')" :class="{active:gnFlag == 1}">
<img src="@/assets/imgicon/execute/ex02.png" alt /> 物料领用
</a>
</li>
<li>
<a @click="gnFunto(2,'产品装配')" :class="{active:gnFlag == 2}">
<img src="@/assets/imgicon/execute/ex03.png" alt /> 产品装配
</a>
</li>
<li>
<a @click="gnFunto(3,'工时分配')" :class="{active:gnFlag == 3}">
<img src="@/assets/imgicon/execute/ex04.png" alt /> 工时分配
</a>
</li>
<li>
<a @click="gnFunto(4,'生产准备')" :class="{active:gnFlag == 4}">
<img src="@/assets/imgicon/execute/ex05.png" alt /> 生产准备
</a>
</li>
<li>
<a @click="gnFunto(5,'工艺查看')" :class="{active:gnFlag == 5}">
<img src="@/assets/imgicon/execute/ex06.png" alt /> 工艺查看
</a>
</li>
<li>
<a @click="gnFunto(6,'工艺案例')" :class="{active:gnFlag == 6}">
<img src="@/assets/imgicon/execute/ex07.png" alt /> 工艺案例
</a>
</li>
<li>
<a @click="gnFunto(7,'质量判定')" :class="{active:gnFlag == 7}">
<img src="@/assets/imgicon/execute/ex08.png" alt /> 质量判定
</a>
</li>
<li>
<a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}">
<img src="@/assets/imgicon/execute/ex09.png" alt /> 数据填报
</a>
</li>
<li>
<a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}">
<img src="@/assets/imgicon/execute/ex10.png" alt /> 测试数据
</a>
</li>
</ul>
</div>
</template>
<script>
export default {
name:'functional',
data(){
return{
gnFlag:0,
}
},
methods: {
gnFunto(number,type){
this.gnFlag = number;
this.$emit('changeTitle',number,type);
}
},
}
name: "functional",
props: ["orderId"],
data() {
return {
gnFlag: 0
};
},
methods: {
gnFunto(number, type) {
alert("a"+this.orderId)
this.gnFlag = number;
this.$emit("changeTitle", number, type, this.orderId);
}
}
};
</script>
\ No newline at end of file
<template>
<div class="">
<div class="star" v-if="!starmodal">
<a class="start" @click="starFun" >
<Icon type="md-play" />
数据填报</a>
</div>
<div class="star flex fc-b" v-else-if="starmodal">
<Button class="button" size='large' type="primary"><Icon type="ios-pause" /> 暂停</Button>
<Button class="button" size='large' type="primary"><Icon type="logo-angular" /> 交检</Button>
<Button class="button" size='large' type="primary"><Icon type="ios-checkmark-circle-outline" /> 完工</Button>
<Button class="button" size='large' type="primary"><Icon type="md-swap" /> 转序交接</Button>
</div>
<div class="footer_box">
<div class="ul_box fl">
<ul>
<li>名称:名称1</li>
<li>图号:UIGT-763245</li>
<li>状态:未开工</li>
<li>订单编号:097543346</li>
<li>订单属性1:</li>
<li>订单属性2:</li>
<li>订单属性3:</li>
<li>计划数量:10</li>
<li>节点日期:2020-02-25</li>
</ul>
</div>
<div class="ul_box fl">
<ul>
<li>工序名称:名称1</li>
<li>工序序号:UIGT-763245</li>
<li>派工数量:66</li>
<li>资源名称:23366</li>
<li>资源编号:986732038</li>
<li>人员信息:</li>
<li>开始时间:</li>
<li>结束时间:</li>
<li>单件工时:10</li>
<li>准备工时:2020-02-25</li>
</ul>
</div>
<div class="img_box fl">
图片区
</div>
</div>
<div class="data-filling">
<div class="data-title">
<span class="ml20">产品号</span>
<ProductNumberSelect
v-model="productSerialNumber"
:eid="orderId"
ref="codes"
class="select-produt-name"
/>
<Button type="primary" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button>
<Button type="primary" :disabled="ishavhj" @click="QcCardChecker(2)" class="title_btn ml10">互检</Button>
<Button type="primary" @click="SendCheck()" class="title_btn ml10">送检</Button>
</div>
<div class="table-i">
<Table border :columns="columns12" :data="data6">
<template slot-scope="{ row,index }" slot="selffillin">
<Input
v-model="row.name"
placeholder="请输入..."
@on-blur="selfchecklistinput(index,$event)"
></Input>
</template>
<template slot-scope="{ row,index }" slot="mutualfillin">
<Button type="primary" size="small" style="margin-right: 5px" @click="show(index)">View</Button>
<Button type="error" size="small" @click="remove(index)">Delete</Button>
</template>
<template slot-scope="{ row }" slot="seizurefillin">
<div>{{ row.name }}</div>
</template>
</Table>
</div>
</div>
</template>
<script>
export default {
name:'starOrder',
data(){
return{
starmodal: false,
name: "starOrder",
props: ["orderId"],
data() {
return {
product_ID: "",
disabled: false,
ishavhj: false,
ishavzj: true,
productSerialNumber: "",
columns12: [
{ title: "序号", type: "index", width: "70", align: "center" },
{
title: "Name",
slot: "name"
},
{
title: "Age",
key: "age"
},
{
title: "Address",
key: "address"
},
{
title: "操作员",
key: "fillintype",
renderHeader: (h, params) => {
return h("div", [
h(
"Checkbox",
{
props: {
value: this.isselfCheckAll
},
on: {
"on-change": () => {
this.handleselfCheckAll(); //点击修改下面Checkbox的状态
}
}
},
"操作员"
)
]);
},
slot: "selffillin"
},
{
title: "互检员",
key: "mutual",
renderHeader: (h, params) => {
return h("div", [
h(
"Checkbox",
{
props: {
value: this.ismutualCheckAll
},
on: {
"on-change": () => {
this.handlemutualCheckAll(); //点击修改下面Checkbox的状态
}
}
},
"互检员"
)
]);
},
slot: "mutualfillin"
},
{
title: "检验员",
key: "seizure",
renderHeader: (h, params) => {
return h("div", [
h(
"Checkbox",
{
props: {
value: this.isseizureCheckAll
},
on: {
"on-change": () => {
this.handleseizureCheckAll(); //点击修改下面Checkbox的状态
}
}
},
"检验员"
)
]);
},
slot: "seizurefillin"
}
},
created() {
// this.treeHeight = window.innerHeight - 120;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 120;
})();
};
},
methods: {
starFun(){
this.$Message.success("开工...")
],
data6: [
{
name: "John Brown",
age: 18,
address: "New York No. 1 Lake Park"
},
{
name: "Jim Green",
age: 24,
address: "London No. 1 Lake Park"
},
{
name: "Joe Black",
age: 30,
address: "Sydney No. 1 Lake Park"
},
{
name: "Jon Snow",
age: 26,
address: "Ottawa No. 2 Lake Park"
}
]
};
},
created() {
alert("b" + this.orderId);
// this.productSerialNumber = this.orderId;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {},
methods: {
show(index) {
this.$Modal.info({
title: "User Info",
content: `Name:${this.data6[index].name}<br>Age:${this.data6[index].age}<br>Address:${this.data6[index].address}`
});
},
}
remove(index) {
this.data6.splice(index, 1);
},
// change(e) {
// this.entity.productQuantity = e.length + ''
// },
QcCardChecker() {},
SendCheck() {},
selfchecklistinput() {}
}
};
</script>
<style lang="less">
.data-filling {
padding: 10px;
width: 100%;
.data-title {
margin-bottom: 10px;
.ml20 {
padding: 8px;
float: left;
}
.select-produt-name {
width: 200px;
float: left;
}
}
.table-i {
margin: 0 20px;
}
}
</style>
......@@ -2,6 +2,7 @@
.execute_box{
position: relative;
margin: 0px -10px;
height:88vh;
.top_title{
height: 50px;
line-height: 49px;
......
......@@ -2,137 +2,181 @@
@import "./execute.less";
</style>
<template>
<div class="execute_box">
<div class="top_title">
<span class="fl">{{orderTitle}}</span>
<div>工单编号: 12001011</div>
</div>
<component :is="detail" :gdid="gdId"/>
<a class="gd_list" @click="orderlistMode = true">工单列表</a>
<a class="gn_area" @click="functionalMode = true">功能区</a>
<!-- 工单列表 -->
<Drawer placement="left" class="gd_box" :closable="false"
:inner="true" :transfer="false" v-model="orderlistMode">
<div slot="header">
<div class="header">
<a class="gd_tt" @click="goToOrder"><Icon type="ios-undo-outline" />工单列表</a>
<Select v-model="odermodel" class="select_star fr" style="width:100px" @on-change="searchOrder">
<Option v-for="item in oderList" :value="item.value" :key="item.index">{{ item.label }}
<!-- <state
<div class="execute_box">
<div class="top_title">
<span class="fl">{{orderTitle}}</span>
<div>工单编号: 12001011</div>
</div>
<component :is="detail" :gdid="gdId" :orderId="orderId"/>
<a class="gd_list" @click="orderlistMode = true">工单列表</a>
<a class="gn_area" @click="functionalMode = true">功能区</a>
<!-- 工单列表 -->
<Drawer
placement="left"
class="gd_box"
:closable="false"
:inner="true"
:transfer="false"
v-model="orderlistMode"
>
<div slot="header">
<div class="header">
<a class="gd_tt" @click="goToOrder">
<Icon type="ios-undo-outline" />工单列表
</a>
<Select
v-model="odermodel"
class="select_star fr"
style="width:100px"
@on-change="searchOrder"
>
<Option v-for="item in oderList" :value="item.value" :key="item.index">
{{ item.label }}
<!-- <state
code="taskList.status"
ref="state" class="fr"
:value="item.value"
type="text"
></state> -->
</Option>
</Select>
<!-- <a class="openAll"><Icon type="ios-list" size="18" /> 展开全部列表</a> -->
</div>
<div class="select_t">
<!-- <Select v-model="odermodel" style="width:100px" @on-change="searchOrder">
></state>-->
</Option>
</Select>
<!-- <a class="openAll"><Icon type="ios-list" size="18" /> 展开全部列表</a> -->
</div>
<div class="select_t">
<!-- <Select v-model="odermodel" style="width:100px" @on-change="searchOrder">
<Option v-for="item in oderList" :value="item.value" :key="item.index">{{ item.label }}</Option>
</Select> -->
<!-- <span class="gd_length">{{listLength}}</span> -->
<Button class="">时间正序排列</Button>
</div>
</div>
<orderlist ref="orderlist"/>
</Drawer>
<!-- title="功能区" -->
<Drawer class="gn_box" :closable="false" :inner="true" :transfer="false" v-model="functionalMode">
<functional @changeTitle='changeTitle' ref="functional" />
</Drawer>
</div>
</Select>-->
<!-- <span class="gd_length">{{listLength}}</span> -->
<Button class>时间正序排列</Button>
</div>
</div>
<orderlist ref="orderlist" />
</Drawer>
<!-- title="功能区" -->
<Drawer
class="gn_box"
:closable="false"
:inner="true"
:transfer="false"
v-model="functionalMode"
>
<functional @changeTitle="changeTitle" ref="functional" />
</Drawer>
</div>
</template>
<script>
import functional from "./components/functional";
import orderlist from "./components/orderlist";
export default {
components: { functional, orderlist,},
data(){
return{
orderTitle:'进度汇报',
orderindex:0,
gdId:0,
listLength:0,//工单数量
starmodal: true,
orderlistMode:false,
functionalMode:false,
detail: null,
odermodel: -9,
oderList:[
{
value: -9,
label: '全部'
},{
value: 12,
label: '未开工'
},{
value: 14,
label: '执行中'
},{
value: 0,
label: '已完成'
},{
value: 5,
label: '暂停中'
},{
value: 7,
label: '已终止'
},{
value: -1,
label: '待派工'
},
// value: '交检中',
// label: '交检中'
// },{
// value: '交接中',
// label: '交接中'
// },{
],
condition:[]
}
},
created() {
this.detail = () => import("./starOrder/index");
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
},
comments:{ },
methods: {
starFun(){
this.$Message.success("开工...")
components: { functional, orderlist },
data() {
return {
orderTitle: "进度汇报",
orderindex: 0,
gdId: 0,
listLength: 0, //工单数量
starmodal: true,
orderlistMode: false,
functionalMode: false,
detail: null,
odermodel: -9,
orderId: null,
oderList: [
{
value: -9,
label: "全部"
},
{
value: 12,
label: "未开工"
},
// getListLength(len){ this.listLength = len },
// 返回工单列表
goToOrder(){
this.$router.push("/produce/orderlist");
{
value: 14,
label: "执行中"
},
searchOrder(value){
this.$refs.orderlist.loadTree(value);
{
value: 0,
label: "已完成"
},
changeTitle(number,type){
this.orderTitle = type
this.orderindex = number
if(number==0){ this.detail = () => import("./starOrder/index");}//进度汇报
if(number==1){ this.detail = () => import("./MaterialCollec/index");}//物料领用
if(number==2){ this.detail = () => import("./productSet/index");}//产品装配
if(number==3){ this.detail = () => import("./taskTime/index");}//工时分配
if(number==4){ this.detail = () => import("./preparation/index");}//生产准备
if(number==5){ this.detail = () => import("./ProcessCheck/index");}//工艺查看
if(number==6){ this.detail = () => import("./ProcessCase/index");}//工艺案例
if(number==7){ this.detail = () => import("./judgment/index");}//质量判定
if(number==8){ this.detail = () => import("./datafilling/index");}//数据填报
if(number==9){ this.detail = () => import("./testdata/index");}//测试数据
{
value: 5,
label: "暂停中"
},
{
value: 7,
label: "已终止"
},
{
value: -1,
label: "待派工"
}
// value: '交检中',
// label: '交检中'
// },{
// value: '交接中',
// label: '交接中'
// },{
],
condition: []
};
},
created() {
this.orderId = this.$route.query.orderId;
this.detail = () => import("./starOrder/index");
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {},
comments: {},
methods: {
starFun() {
this.$Message.success("开工...");
},
watch:{
// getListLength(len){ this.listLength = len },
// 返回工单列表
goToOrder() {
this.$router.push("/produce/orderlist");
},
}
searchOrder(value) {
this.$refs.orderlist.loadTree(value);
},
changeTitle(number, type) {
this.orderTitle = type;
this.orderindex = number;
if (number == 0) {
this.detail = () => import("./starOrder/index");
} //进度汇报
if (number == 1) {
this.detail = () => import("./MaterialCollec/index");
} //物料领用
if (number == 2) {
this.detail = () => import("./productSet/index");
} //产品装配
if (number == 3) {
this.detail = () => import("./taskTime/index");
} //工时分配
if (number == 4) {
this.detail = () => import("./preparation/index");
} //生产准备
if (number == 5) {
this.detail = () => import("./ProcessCheck/index");
} //工艺查看
if (number == 6) {
this.detail = () => import("./ProcessCase/index");
} //工艺案例
if (number == 7) {
this.detail = () => import("./judgment/index");
} //质量判定
if (number == 8) {
this.detail = () => import("./datafilling/index");
} //数据填报
if (number == 9) {
this.detail = () => import("./testdata/index");
} //测试数据
}
},
watch: {}
};
</script>
......@@ -29,7 +29,7 @@
<Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button>
</template>
<template slot="card" slot-scope="{row}">
<div class="body" @click="toExecute(row.id)">
<div class="body" @click="toExecute(row.id,row.orderId)">
<Row class="title-i">
<Col :span="10" class="order-code">{{row.productName}}</Col>
<Col :span="10" class="order-code">{{row.mesCode}}</Col>
......@@ -184,11 +184,11 @@ export default {
}
}
],
set:false,
set: false,
typeInfo: "card",
iconInfo: "md-apps",
titleInfo: "卡片模式",
nowTime: new Date().getTime()//页面当前打开时间
nowTime: new Date().getTime() //页面当前打开时间
};
},
created() {},
......@@ -202,9 +202,12 @@ export default {
search() {
this.$refs.grid.reload(this.easySearch);
},
toExecute(id) {
toExecute(id, orderId) {
//跳转到对应操作页面 获取id:this.$route.query.id
this.$router.push({ path:"/produce/execute",query: { id:id}});
this.$router.push({
path: "/produce/execute",
query: { id: id, orderId: orderId }
});
},
tdStyle(val) {
//动态根据状态值加载状态值对应的颜色
......@@ -222,12 +225,12 @@ export default {
changeShwo() {
//显示模式切换
if (this.typeInfo == "card") {
this.set=true;
this.set = true;
this.typeInfo = "table";
this.iconInfo = "md-list";
this.titleInfo = "列表模式";
} else {
this.set=false;
this.set = false;
this.typeInfo = "card";
this.iconInfo = "md-apps";
this.titleInfo = "卡片模式";
......@@ -263,7 +266,7 @@ export default {
} else {
res = false;
}
return res
return res;
},
getUrl(url) {
//返回img需要显示的src值
......
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