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

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

parents fa5f87e7 e65a55d5
......@@ -126,7 +126,7 @@ export default {
pageSizeOpts: [20, 50, 100],
tableHeight: 0,
firstY: 0,
config: false,
config: false,
list: [],
columnsCur: [],
configLoad: false,
......@@ -146,6 +146,10 @@ export default {
type: Boolean,
default: true
},
format: {
type: Function,
default: null
},
lazy: {
//懒加载设置,设置为真时候,默认不加载数据。
type: Boolean,
......@@ -223,17 +227,19 @@ export default {
return ["table", "card", "list"].indexOf(value) !== -1;
}
},
span: {//栅格数
span: {
//栅格数
type: Number,
default: 24
},
//table控件children子数据控制功能
//table控件children子数据控制功能
rowKey: {
type: [String, Number]
},
gutter:{//间距
type:Number,
default:40
gutter: {
//间距
type: Number,
default: 40
}
},
created() {
......@@ -260,7 +266,7 @@ export default {
this.easySearch();
}
if (this.height === 0) {
this.$nextTick(()=>{
this.$nextTick(() => {
this.tableHeight = this.$refs.main.offsetHeight;
window.onresize = () => {
///浏览器窗口大小变化
......@@ -268,7 +274,7 @@ export default {
this.tableHeight = this.$refs.main.offsetHeight;
})();
};
})
});
} else {
this.tableHeight = this.height;
}
......@@ -286,7 +292,11 @@ export default {
}
if (this.action) {
this.$api.post(this.action, this.search).then(r => {
this.list = r.result.items;
if (this.format) {
this.list = this.format(r.result.items);
} else {
this.list = r.result.items;
}
this.search.total = r.result.totalCount || r.result.count;
});
}
......@@ -380,7 +390,11 @@ export default {
this.$emit("on-drag-drop", a, b);
},
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;
}
......@@ -486,11 +500,13 @@ export default {
if (u.type == "user") {
u.render = (h, params) => {
let values = u.key;
return h("User", {
props: {
value: params.row[values]
}
});
if (params.row[values]) {
return h("User", {
props: {
value: params.row[values]
}
});
}
};
}
if (u.type == "date" || u.type == "dateTime") {
......@@ -546,7 +562,7 @@ export default {
tr td .ivu-table-cell {
padding: 0 5px;
}
overflow-x: hidden;
overflow-x: hidden;
}
.table-tools {
display: flex;
......
......@@ -1489,5 +1489,30 @@ export default {
description:'描述',
levelNum:'编码分类层数',
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 @@
<Filed :span="24" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="24" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="24" :name="l('creator')">{{entity.creator}}</Filed>
<Filed :span="12" :name="l('filePaths')">
<Filed :span="24" :name="l('filePaths')">
<files
ref="refFile"
:parms="parms"
......@@ -46,8 +46,6 @@ export default {
},
methods: {
clickData(data,liUrl) {
console.log(liUrl)
console.log(data)
window.open(data, "_blank");
},
load(v) {
......
......@@ -33,6 +33,18 @@ export default {
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 @@
float: left;
margin: 20px 72px;
width: 300px;
height: 240px;
// height: 240px;
height: 180px;
border-color: #2680EB;
.ivu-card-head{
background: #d3e6fb;
......@@ -310,10 +311,13 @@
.gs_p{
height: 32px;
line-height: 32px;
font-size: 20px;
text-align: center;
}
.gs_time{
text-align: center;
color: #2680EB;
line-height: 46px;
.b_size{
font-size: 32px;
}
......@@ -322,9 +326,9 @@
background: #d3e6fb;
margin: 0 -16px;
height: 59px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top: 1px solid #2680eb;
// border-bottom-left-radius: 4px;
// border-bottom-right-radius: 4px;
// border-top: 1px solid #2680eb;
a{
display: inline-block;
height: 59px;
......@@ -336,7 +340,7 @@
.gs_del{
background: #2680EB;
color: #fff;
border-bottom-right-radius: 4px;
// border-bottom-right-radius: 4px;
}
}
}
......@@ -348,7 +352,8 @@
border: 1px dashed #2680EB;
color: #2680EB;
text-align: center;
line-height: 275px;
// line-height: 275px;
line-height: 220px;
border-radius: 4px;
i{
font-size: 80px;
......@@ -369,13 +374,14 @@
height: 56px;
border-radius: 28px 4px 4px 28px;
border: 1px solid #2d8cf0;
margin: 15px 23px;
margin: 15px 14px;
i {
font-size: 56px;
float: left;
color: #2680EB;
}
.gd_user {
line-height: 22px;
padding: 6px;
color: #707070;
}
......
......@@ -3,7 +3,7 @@
<div class="add_user">
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row>
<Col span="8">
<!-- <Col span="8">
<FormItem label="所属车间">
<Select v-model="entity.che" style="width:200px">
<Option v-for="item in cityList" :value="item.value" :key="item.value">
......@@ -23,25 +23,37 @@
<FormItem label="">
<Input search enter-button placeholder="请输入编号" />
</FormItem>
</Col>
</Col> -->
<Col span="24" class="mb20">
<div class="gd_userB">
<a class="user_item" @click="checkItem(index)" v-for="(item,index) in listMan" :key="index">
<div :class="{user_bg:item.checked}" >
<Icon type="md-contact" />
<div class="gd_user">
<span class="user_name">{{item.userName}}</span>
<span class="user_number">{{item.userCode}}</span>
<FormItem label="既定人员" >
<div class="gd_userB">
<a class="user_item" @click="checkItem(index)" v-for="(item,index) in listMan" :key="index">
<div :class="{user_bg:item.checked}" >
<Icon type="md-contact" />
<div class="gd_user">
<span class="user_name">{{item.userName}}</span>
<span class="user_number">{{item.userCode}}</span>
</div>
</div>
</div>
</a>
</div>
</a>
</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 span="24">
<FormItem label="分配工时">
<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="59" :min="1" v-model="value1"></InputNumber> 分钟 &nbsp;&nbsp;&nbsp;&nbsp;
<FormItem label="分配工时" prop="setTime">
<!-- <InputNumber :max="30" :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; -->
</FormItem>
</Col>
</Row>
......@@ -58,9 +70,7 @@
export default {
data(){
return{
admor:1,
value1:1,
u_bgFlag:false,
entity: {
},
rules: {
......@@ -68,6 +78,7 @@ export default {
{ required: true, message: "必填", type: "number", trigger: "change" }
]
},
// roleTitle: "操作工",
cityList:[
{
value: '车间A1',
......@@ -102,6 +113,36 @@ export default {
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
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
}
],
}
......@@ -116,6 +157,23 @@ export default {
checkItem(i){
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>
\ No newline at end of file
......@@ -21,16 +21,22 @@
</div>
</div>
<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">
张三
<span class="fr">02816335{{i}}</span>
</p>
<p class="gs_p">所属车间:车间A{{i}}</p>
<p class="gs_p">所属班组:班组B{{i}}</p>
<!-- <p class="gs_p">所属车间:车间A{{i}}</p>
<p class="gs_p">所属班组:班组B{{i}}</p> -->
<p class="gs_time">
<span class="b_size">100</span> 工时
</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">
<!-- <a class="gs_edit" @click="editItem">
<Icon type="md-create" />
......@@ -54,6 +60,7 @@
</template>
<script>
import addview from "./add";
import Api from "../api";
export default {
name:'starOrder',
components: {addview,},
......@@ -82,6 +89,9 @@ export default {
methods: {
addItem(){
this.addmodal = true
let id = this.$route.query.id
console.log(id)
// Api.getentryusers().then()
},
editItem(){
this.$Message.success("编辑工时...")
......
<style lang="less">
@import "../execute/execute.less";
</style>
@import "../execute/execute.less";
</style>
<!--:action="action"-->
<template>
<div>
<DataGrid
......@@ -13,6 +14,7 @@
:batch="true"
:border="false"
:high="false"
:format="formatFun"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
......@@ -20,7 +22,7 @@
<Input
search
enter-button
placeholder="请输入关键字订单编号/项目名称"
placeholder="请输入关键字产品名称"
v-model="easySearch.keys.value"
@on-search="search"
v-width="300"
......@@ -33,13 +35,24 @@
</template>
</DataGrid>
<Modal v-model="transModal" title="确认转续" width="900">
<div class="zhuanx mt30">
<div class="zhuanx mt30 mb20">
<p class="line_p">
<Input prefix="ios-contact-outline" placeholder="请输入人员编号" style="width: auto" />
</p>
<p class="line_p">
<Input prefix="ios-lock-outline" placeholder="请输入人员密码" style="width: auto" />
<Input
prefix="ios-contact"
v-model="handonCardNo"
placeholder="请输入接收人员编号"
style="width: auto"
/>
</p>
<!--<p class="line_p">
<Input
prefix="ios-lock-outline"
type="password"
v-model="userPwd"
placeholder="请输入人员密码"
style="width: auto"
/>
</p>-->
</div>
<div slot="footer">
<Button @click="transModal = false">取消</Button>
......@@ -49,16 +62,16 @@
</div>
</template>
<script>
import Api from "../api";
import Api from "../execute/api";
export default {
name: "reOrder",
data() {
return {
action: Api.index,
action: Api.indexHandon,
starmodal: false,
easySearch: {
keys: {
op: "mesCode,productName",
op: "productName",
value: null,
default: true
}
......@@ -74,35 +87,18 @@ export default {
align: "center"
},
{
key: "quantity",
title: this.l("quantity"),
align: "right",
high: true,
width: 80
},
{
key: "taskRequire",
title: this.l("taskRequire"),
key: "handonNo",
title: this.l("handonNo"),
align: "left",
easy: true,
high: true,
hide: true
high: true
},
{
key: "status",
title: this.l("status"),
align: "center",
width: 120,
high: true,
code: "plan.order.status",
width: 100
},
{
key: "productCode",
title: this.l("productCode"),
align: "left",
easy: true,
high: true,
hide: true
code: "mes.order_execute_handon.status"
},
{
key: "productName",
......@@ -115,30 +111,90 @@ export default {
key: "drawnNumber",
title: this.l("drawnNumber"),
align: "left",
easy: true,
high: true
},
{
key: "batchNumber",
title: this.l("batchNumber"),
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,
high: true
},
{
key: "projectNumber",
title: this.l("projectNumber"),
key: "nextDetailName",
title: this.l("nextDetailName"),
align: "left",
easy: true,
high: true
},
{
key: "urgencyLevel",
title: this.l("urgencyLevel"),
align: "center",
key: "handonUserId",
title: this.l("handonUserId"),
align: "left",
high: true,
code: "plan.order.urgencyLevel",
width: 100
type: "user"
},
{
key: "handonCardNo",
title: this.l("handonCardNo"),
align: "left",
high: true,
hide: true
},
{
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: "操作",
......@@ -151,15 +207,17 @@ export default {
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.openTrans(params.row) },
style: params.row.status == 1 ? "display:none" : ""
on: { click: () => this.openTrans(params.row.id) },
style: params.row.status == 1 ? "" : "display:none"
},
"确认转续"
)
]);
}
}
]
],
handonCardNo: "",
userPwd: ""
};
},
created() {
......@@ -181,26 +239,59 @@ export default {
this.easySearch.keys.value = this.easySearch.keys.value.trim();
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;
},
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) {
//alert(JSON.stringify(a));
//批量选择
let selectRows = a;
this.arrayIds = [];
this.rowDataArry = a;
selectRows.forEach(e => {
this.arrayIds.push(e.id);
});
this.arrayIds = selectRows.map(e => e.id);
},
l(key) {
let vkey = "mes_plan" + "." + key;
let vkey = "order_execute_handon" + "." + 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>
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