Commit 929a2081 authored by 仇晓婷's avatar 仇晓婷

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

parents fa5f87e7 e65a55d5
...@@ -146,6 +146,10 @@ export default { ...@@ -146,6 +146,10 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
format: {
type: Function,
default: null
},
lazy: { lazy: {
//懒加载设置,设置为真时候,默认不加载数据。 //懒加载设置,设置为真时候,默认不加载数据。
type: Boolean, type: Boolean,
...@@ -223,7 +227,8 @@ export default { ...@@ -223,7 +227,8 @@ export default {
return ["table", "card", "list"].indexOf(value) !== -1; return ["table", "card", "list"].indexOf(value) !== -1;
} }
}, },
span: {//栅格数 span: {
//栅格数
type: Number, type: Number,
default: 24 default: 24
}, },
...@@ -231,9 +236,10 @@ export default { ...@@ -231,9 +236,10 @@ export default {
rowKey: { rowKey: {
type: [String, Number] type: [String, Number]
}, },
gutter:{//间距 gutter: {
type:Number, //间距
default:40 type: Number,
default: 40
} }
}, },
created() { created() {
...@@ -260,7 +266,7 @@ export default { ...@@ -260,7 +266,7 @@ export default {
this.easySearch(); this.easySearch();
} }
if (this.height === 0) { if (this.height === 0) {
this.$nextTick(()=>{ this.$nextTick(() => {
this.tableHeight = this.$refs.main.offsetHeight; this.tableHeight = this.$refs.main.offsetHeight;
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
...@@ -268,7 +274,7 @@ export default { ...@@ -268,7 +274,7 @@ export default {
this.tableHeight = this.$refs.main.offsetHeight; this.tableHeight = this.$refs.main.offsetHeight;
})(); })();
}; };
}) });
} else { } else {
this.tableHeight = this.height; this.tableHeight = this.height;
} }
...@@ -286,7 +292,11 @@ export default { ...@@ -286,7 +292,11 @@ export default {
} }
if (this.action) { if (this.action) {
this.$api.post(this.action, this.search).then(r => { this.$api.post(this.action, this.search).then(r => {
if (this.format) {
this.list = this.format(r.result.items);
} else {
this.list = r.result.items; this.list = r.result.items;
}
this.search.total = r.result.totalCount || r.result.count; this.search.total = r.result.totalCount || r.result.count;
}); });
} }
...@@ -380,7 +390,11 @@ export default { ...@@ -380,7 +390,11 @@ export default {
this.$emit("on-drag-drop", a, b); this.$emit("on-drag-drop", a, b);
}, },
easySearch() { easySearch() {
if (this.conditions &&this.conditions.keys&& this.conditions.keys.default) { if (
this.conditions &&
this.conditions.keys &&
this.conditions.keys.default
) {
//判断没有传入条件的用默认的查询 //判断没有传入条件的用默认的查询
this.conditions.keys.value = this.keys; this.conditions.keys.value = this.keys;
} }
...@@ -486,11 +500,13 @@ export default { ...@@ -486,11 +500,13 @@ export default {
if (u.type == "user") { if (u.type == "user") {
u.render = (h, params) => { u.render = (h, params) => {
let values = u.key; let values = u.key;
if (params.row[values]) {
return h("User", { return h("User", {
props: { props: {
value: params.row[values] value: params.row[values]
} }
}); });
}
}; };
} }
if (u.type == "date" || u.type == "dateTime") { if (u.type == "date" || u.type == "dateTime") {
......
...@@ -1489,5 +1489,30 @@ export default { ...@@ -1489,5 +1489,30 @@ export default {
description:'描述', description:'描述',
levelNum:'编码分类层数', levelNum:'编码分类层数',
codeLength:'编码分类位数', codeLength:'编码分类位数',
},
//转续列表
order_execute_handon:{
dispatchId:'工单id',
currentUserId:'当前操作人',
handonUserId:'转序人',
status:'状态',
currentDetailId:'工序id',
nextDetailId:'下道工序id',
remark:'备注',
finishTime:'工单完成时间',
productIdStr:'交接判定产品id字符串',
actualHandonUser:'实际交接人',
handonCardNo:'交接人刷卡号',
currentDetailName:'工序名称',
nextDetailName:'下道工序名称',
productName:'产品名称',
drawnNumber:'图号',
batchNumber:'批次号',
handonTime:'接收时间',
handonNo:'交接单号',
handonCount:'交接数量',
qualifiedCount:'合格数量',
currentUserName:'交接人名称',
handonUserName:'接收人名称',
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<Filed :span="24" :name="l('title')">{{entity.title}}</Filed> <Filed :span="24" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="24" :name="l('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="24" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="24" :name="l('creator')">{{entity.creator}}</Filed> <Filed :span="24" :name="l('creator')">{{entity.creator}}</Filed>
<Filed :span="12" :name="l('filePaths')"> <Filed :span="24" :name="l('filePaths')">
<files <files
ref="refFile" ref="refFile"
:parms="parms" :parms="parms"
...@@ -46,8 +46,6 @@ export default { ...@@ -46,8 +46,6 @@ export default {
}, },
methods: { methods: {
clickData(data,liUrl) { clickData(data,liUrl) {
console.log(liUrl)
console.log(data)
window.open(data, "_blank"); window.open(data, "_blank");
}, },
load(v) { load(v) {
......
...@@ -33,6 +33,18 @@ export default { ...@@ -33,6 +33,18 @@ export default {
confirmproductsandoperator(params) { confirmproductsandoperator(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/confirmproductsandoperator`, params); return Api.post(`${PlanUrl}/orderexecutehandon/confirmproductsandoperator`, params);
}, },
//转续列表
indexHandon: `${PlanUrl}/orderexecutehandon/handonpaged`,
handonpaged(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/handonpaged`, params);
},
//刷卡交接
handon(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/handon`, params);
},
//工时分配--下一步人员
getentryusers(params) {
return Api.get(`${PlanUrl}/orderexecutenew/entryusers`, params);
},
} }
\ No newline at end of file
...@@ -297,7 +297,8 @@ ...@@ -297,7 +297,8 @@
float: left; float: left;
margin: 20px 72px; margin: 20px 72px;
width: 300px; width: 300px;
height: 240px; // height: 240px;
height: 180px;
border-color: #2680EB; border-color: #2680EB;
.ivu-card-head{ .ivu-card-head{
background: #d3e6fb; background: #d3e6fb;
...@@ -310,10 +311,13 @@ ...@@ -310,10 +311,13 @@
.gs_p{ .gs_p{
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
font-size: 20px;
text-align: center;
} }
.gs_time{ .gs_time{
text-align: center; text-align: center;
color: #2680EB; color: #2680EB;
line-height: 46px;
.b_size{ .b_size{
font-size: 32px; font-size: 32px;
} }
...@@ -322,9 +326,9 @@ ...@@ -322,9 +326,9 @@
background: #d3e6fb; background: #d3e6fb;
margin: 0 -16px; margin: 0 -16px;
height: 59px; height: 59px;
border-bottom-left-radius: 4px; // border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px; // border-bottom-right-radius: 4px;
border-top: 1px solid #2680eb; // border-top: 1px solid #2680eb;
a{ a{
display: inline-block; display: inline-block;
height: 59px; height: 59px;
...@@ -336,7 +340,7 @@ ...@@ -336,7 +340,7 @@
.gs_del{ .gs_del{
background: #2680EB; background: #2680EB;
color: #fff; color: #fff;
border-bottom-right-radius: 4px; // border-bottom-right-radius: 4px;
} }
} }
} }
...@@ -348,7 +352,8 @@ ...@@ -348,7 +352,8 @@
border: 1px dashed #2680EB; border: 1px dashed #2680EB;
color: #2680EB; color: #2680EB;
text-align: center; text-align: center;
line-height: 275px; // line-height: 275px;
line-height: 220px;
border-radius: 4px; border-radius: 4px;
i{ i{
font-size: 80px; font-size: 80px;
...@@ -369,13 +374,14 @@ ...@@ -369,13 +374,14 @@
height: 56px; height: 56px;
border-radius: 28px 4px 4px 28px; border-radius: 28px 4px 4px 28px;
border: 1px solid #2d8cf0; border: 1px solid #2d8cf0;
margin: 15px 23px; margin: 15px 14px;
i { i {
font-size: 56px; font-size: 56px;
float: left; float: left;
color: #2680EB; color: #2680EB;
} }
.gd_user { .gd_user {
line-height: 22px;
padding: 6px; padding: 6px;
color: #707070; color: #707070;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="add_user"> <div class="add_user">
<Form ref="form" :model="entity" :rules="rules" :label-width="100"> <Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row> <Row>
<Col span="8"> <!-- <Col span="8">
<FormItem label="所属车间"> <FormItem label="所属车间">
<Select v-model="entity.che" style="width:200px"> <Select v-model="entity.che" style="width:200px">
<Option v-for="item in cityList" :value="item.value" :key="item.value"> <Option v-for="item in cityList" :value="item.value" :key="item.value">
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
<FormItem label=""> <FormItem label="">
<Input search enter-button placeholder="请输入编号" /> <Input search enter-button placeholder="请输入编号" />
</FormItem> </FormItem>
</Col> </Col> -->
<Col span="24" class="mb20"> <Col span="24" class="mb20">
<FormItem label="既定人员" >
<div class="gd_userB"> <div class="gd_userB">
<a class="user_item" @click="checkItem(index)" v-for="(item,index) in listMan" :key="index"> <a class="user_item" @click="checkItem(index)" v-for="(item,index) in listMan" :key="index">
<div :class="{user_bg:item.checked}" > <div :class="{user_bg:item.checked}" >
...@@ -36,12 +37,23 @@ ...@@ -36,12 +37,23 @@
</div> </div>
</a> </a>
</div> </div>
</FormItem>
</Col>
<Col span="24">
<FormItem label="添加人员" style="width:90%" >
<UserSelect
ref="userSelected"
v-model="entity.userse"
:multiple="true"
/>
<!-- :roleTitle="roleTitle" -->
</FormItem>
</Col> </Col>
<Col span="24"> <Col span="24">
<FormItem label="分配工时"> <FormItem label="分配工时" prop="setTime">
<InputNumber :max="30" :min="0" v-model="value1"></InputNumber>&nbsp;&nbsp;&nbsp;&nbsp; <!-- <InputNumber :max="30" :min="0" v-model="value1"></InputNumber>&nbsp;&nbsp;&nbsp;&nbsp; -->
<InputNumber :max="23" :min="0" v-model="value1"></InputNumber>&nbsp;&nbsp;&nbsp;&nbsp; <InputNumber :max="100" :min="1" v-model="value1"></InputNumber>&nbsp;&nbsp;&nbsp;&nbsp;
<InputNumber :max="59" :min="1" v-model="value1"></InputNumber> 分钟 &nbsp;&nbsp;&nbsp;&nbsp; <!-- <InputNumber :max="59" :min="1" v-model="value1"></InputNumber> 分钟 &nbsp;&nbsp;&nbsp;&nbsp; -->
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -58,9 +70,7 @@ ...@@ -58,9 +70,7 @@
export default { export default {
data(){ data(){
return{ return{
admor:1,
value1:1, value1:1,
u_bgFlag:false,
entity: { entity: {
}, },
rules: { rules: {
...@@ -68,6 +78,7 @@ export default { ...@@ -68,6 +78,7 @@ export default {
{ required: true, message: "必填", type: "number", trigger: "change" } { required: true, message: "必填", type: "number", trigger: "change" }
] ]
}, },
// roleTitle: "操作工",
cityList:[ cityList:[
{ {
value: '车间A1', value: '车间A1',
...@@ -102,6 +113,36 @@ export default { ...@@ -102,6 +113,36 @@ export default {
userName:'张珊珊3', userName:'张珊珊3',
userCode:'08965483', userCode:'08965483',
id: 3 id: 3
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
} }
], ],
} }
...@@ -116,6 +157,23 @@ export default { ...@@ -116,6 +157,23 @@ export default {
checkItem(i){ checkItem(i){
this.listMan[i].checked = !this.listMan[i].checked; this.listMan[i].checked = !this.listMan[i].checked;
}, },
testChange () { // 该方法在input内容改变是就会触发进行检测
this.numberChange(this.myNumber ) // 调用函数
},
// 封装控制小数点位数的函数
numberChange (VauleNumber) { // VauleNumber你想要控制位数的数字
let newNumber= null
if (VauleNumber >= 0) {
let reg = /.*\..*/
if (reg.test(VauleNumber)) {
newNumber= parseFloat(VauleNumber.toFixed(1))
} else {
newNumber= VauleNumber
}
}
return newNumber
}
}, },
} }
</script> </script>
\ No newline at end of file
...@@ -21,16 +21,22 @@ ...@@ -21,16 +21,22 @@
</div> </div>
</div> </div>
<div class="gs_card_box"> <div class="gs_card_box">
<Card class="gs_card" v-for="i of 1" :key="i"> <Card class="gs_card" v-for="i of 8" :key="i">
<p slot="title" class="gs_title"> <p slot="title" class="gs_title">
张三 张三
<span class="fr">02816335{{i}}</span> <span class="fr">02816335{{i}}</span>
</p> </p>
<p class="gs_p">所属车间:车间A{{i}}</p> <!-- <p class="gs_p">所属车间:车间A{{i}}</p>
<p class="gs_p">所属班组:班组B{{i}}</p> <p class="gs_p">所属班组:班组B{{i}}</p> -->
<p class="gs_time"> <p class="gs_time">
<span class="b_size">100</span> 工时 <span class="b_size">100</span> 工时
</p> </p>
<!-- <p class="gs_p">
<span class="b_size">100</span>
</p>
<p class="gs_p">
<span class="b_size">100</span>
</p> -->
<p class="gs_footer"> <p class="gs_footer">
<!-- <a class="gs_edit" @click="editItem"> <!-- <a class="gs_edit" @click="editItem">
<Icon type="md-create" /> <Icon type="md-create" />
...@@ -54,6 +60,7 @@ ...@@ -54,6 +60,7 @@
</template> </template>
<script> <script>
import addview from "./add"; import addview from "./add";
import Api from "../api";
export default { export default {
name:'starOrder', name:'starOrder',
components: {addview,}, components: {addview,},
...@@ -82,6 +89,9 @@ export default { ...@@ -82,6 +89,9 @@ export default {
methods: { methods: {
addItem(){ addItem(){
this.addmodal = true this.addmodal = true
let id = this.$route.query.id
console.log(id)
// Api.getentryusers().then()
}, },
editItem(){ editItem(){
this.$Message.success("编辑工时...") this.$Message.success("编辑工时...")
......
<style lang="less"> <style lang="less">
@import "../execute/execute.less"; @import "../execute/execute.less";
</style> </style>
<!--:action="action"-->
<template> <template>
<div> <div>
<DataGrid <DataGrid
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
:batch="true" :batch="true"
:border="false" :border="false"
:high="false" :high="false"
:format="formatFun"
> >
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -20,7 +22,7 @@ ...@@ -20,7 +22,7 @@
<Input <Input
search search
enter-button enter-button
placeholder="请输入关键字订单编号/项目名称" placeholder="请输入关键字产品名称"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
@on-search="search" @on-search="search"
v-width="300" v-width="300"
...@@ -33,13 +35,24 @@ ...@@ -33,13 +35,24 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="transModal" title="确认转续" width="900"> <Modal v-model="transModal" title="确认转续" width="900">
<div class="zhuanx mt30"> <div class="zhuanx mt30 mb20">
<p class="line_p"> <p class="line_p">
<Input prefix="ios-contact-outline" placeholder="请输入人员编号" style="width: auto" /> <Input
</p> prefix="ios-contact"
<p class="line_p"> v-model="handonCardNo"
<Input prefix="ios-lock-outline" placeholder="请输入人员密码" style="width: auto" /> placeholder="请输入接收人员编号"
style="width: auto"
/>
</p> </p>
<!--<p class="line_p">
<Input
prefix="ios-lock-outline"
type="password"
v-model="userPwd"
placeholder="请输入人员密码"
style="width: auto"
/>
</p>-->
</div> </div>
<div slot="footer"> <div slot="footer">
<Button @click="transModal = false">取消</Button> <Button @click="transModal = false">取消</Button>
...@@ -49,16 +62,16 @@ ...@@ -49,16 +62,16 @@
</div> </div>
</template> </template>
<script> <script>
import Api from "../api"; import Api from "../execute/api";
export default { export default {
name: "reOrder", name: "reOrder",
data() { data() {
return { return {
action: Api.index, action: Api.indexHandon,
starmodal: false, starmodal: false,
easySearch: { easySearch: {
keys: { keys: {
op: "mesCode,productName", op: "productName",
value: null, value: null,
default: true default: true
} }
...@@ -74,35 +87,18 @@ export default { ...@@ -74,35 +87,18 @@ export default {
align: "center" align: "center"
}, },
{ {
key: "quantity", key: "handonNo",
title: this.l("quantity"), title: this.l("handonNo"),
align: "right",
high: true,
width: 80
},
{
key: "taskRequire",
title: this.l("taskRequire"),
align: "left", align: "left",
easy: true, high: true
high: true,
hide: true
}, },
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
align: "center", align: "center",
width: 120,
high: true, high: true,
code: "plan.order.status", code: "mes.order_execute_handon.status"
width: 100
},
{
key: "productCode",
title: this.l("productCode"),
align: "left",
easy: true,
high: true,
hide: true
}, },
{ {
key: "productName", key: "productName",
...@@ -115,30 +111,90 @@ export default { ...@@ -115,30 +111,90 @@ export default {
key: "drawnNumber", key: "drawnNumber",
title: this.l("drawnNumber"), title: this.l("drawnNumber"),
align: "left", align: "left",
easy: true,
high: true high: true
}, },
{ {
key: "batchNumber", key: "batchNumber",
title: this.l("batchNumber"), title: this.l("batchNumber"),
align: "left", align: "left",
high: true
},
{
key: "handonCount",
title: this.l("handonCount"),
align: "right",
high: true
},
{
key: "qualifiedCount",
title: this.l("qualifiedCount"),
align: "right",
high: true,
hide: true
},
{
key: "finishTime",
title: this.l("finishTime"),
align: "center",
width: 150,
high: true
},
{
key: "currentDetailName",
title: this.l("currentDetailName"),
align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "projectNumber", key: "nextDetailName",
title: this.l("projectNumber"), title: this.l("nextDetailName"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "urgencyLevel", key: "handonUserId",
title: this.l("urgencyLevel"), title: this.l("handonUserId"),
align: "center", align: "left",
high: true,
type: "user"
},
{
key: "handonCardNo",
title: this.l("handonCardNo"),
align: "left",
high: true, high: true,
code: "plan.order.urgencyLevel", hide: true
width: 100 },
{
key: "currentUserName",
title: this.l("currentUserName"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "handonUserName",
title: this.l("handonUserName"),
align: "left",
easy: true,
high: true
},
{
key: "actualHandonUser",
title: this.l("actualHandonUser"),
align: "left",
high: true,
type: "user"
},
{
key: "handonTime",
title: this.l("handonTime"),
high: true,
align: "center",
width: 150
}, },
{ {
title: "操作", title: "操作",
...@@ -151,15 +207,17 @@ export default { ...@@ -151,15 +207,17 @@ export default {
"op", "op",
{ {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.openTrans(params.row) }, on: { click: () => this.openTrans(params.row.id) },
style: params.row.status == 1 ? "display:none" : "" style: params.row.status == 1 ? "" : "display:none"
}, },
"确认转续" "确认转续"
) )
]); ]);
} }
} }
] ],
handonCardNo: "",
userPwd: ""
}; };
}, },
created() { created() {
...@@ -181,26 +239,59 @@ export default { ...@@ -181,26 +239,59 @@ export default {
this.easySearch.keys.value = this.easySearch.keys.value.trim(); this.easySearch.keys.value = this.easySearch.keys.value.trim();
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
openTrans() { openTrans(val) {
if (val && val > 0) {
this.$refs.grid.selectAll(false);
this.arrayIds = [];
this.arrayIds.push(val);
}
this.transModal = true; this.transModal = true;
}, },
transOk() { transOk() {
alert("确定转续"); if (!this.handonCardNo || this.handonCardNo.trim == "") {
this.$Message.error("请输入用户编号!");
return;
}
let params = {
ids: this.arrayIds,
handonCardNo: this.handonCardNo
};
Api.handon(params)
.then(res => {
if (res.success && res.result) {
this.$Message.success("转续成功!");
this.transModal = false;
this.search();
} else {
this.$Message.error("转续失败!");
}
})
.catch(err => {
this.$Message.error("连接失败!");
});
}, },
onSelect(a, b) { onSelect(a, b) {
//alert(JSON.stringify(a));
//批量选择 //批量选择
let selectRows = a; let selectRows = a;
this.arrayIds = []; this.arrayIds = [];
this.rowDataArry = a; this.arrayIds = selectRows.map(e => e.id);
selectRows.forEach(e => {
this.arrayIds.push(e.id);
});
}, },
l(key) { l(key) {
let vkey = "mes_plan" + "." + key; let vkey = "order_execute_handon" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
},
//格式化原始数据
formatFun(data) {
data.map(e => {
if (e.status != 1) {
e._disabled = true;
} else {
e._disabled = false;
} }
});
return data;
} }
},
computed: {}
}; };
</script> </script>
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