Commit c1291ef6 authored by kangzhenfei's avatar kangzhenfei

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

parents 5d94412d d4efdb51
......@@ -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,14 @@ export default {
type: Boolean,
default: true
},
format: {
type: Function,
default: null
},
initsearch: {
type: Function,
default: null
},
lazy: {
//懒加载设置,设置为真时候,默认不加载数据。
type: Boolean,
......@@ -223,17 +231,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 +270,7 @@ export default {
this.easySearch();
}
if (this.height === 0) {
this.$nextTick(()=>{
this.$nextTick(() => {
this.tableHeight = this.$refs.main.offsetHeight;
window.onresize = () => {
///浏览器窗口大小变化
......@@ -268,7 +278,7 @@ export default {
this.tableHeight = this.$refs.main.offsetHeight;
})();
};
})
});
} else {
this.tableHeight = this.height;
}
......@@ -285,8 +295,16 @@ export default {
this.tableHeight = window.innerHeight - this.firstY - 60;
}
if (this.action) {
//条件初始化处理。
if(this.initsearch){
this.initsearch(this.search)
}
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 +398,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 +508,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 +570,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:'接收人名称',
}
}
......@@ -201,7 +201,7 @@ export default {
this.checkList.splice(index, 1);
}
},
setRow(row,index) {
setRow(row, index) {
this.$set(this.checkList, index, row);
},
addNew() {
......@@ -229,12 +229,12 @@ export default {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
this.$Message.error(r.error.message);
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
this.$Message.error(r.error.message);
});
}
});
......
......@@ -69,8 +69,9 @@
<template
slot-scope="{ row, index }"
slot="action"
v-if="row.fieldType==2||row.fieldType==3"
v-if="row.fieldType==2||row.fieldType==3||!row.notEditDelete"
>
<!-- notEditDelete=true,删除不显示 -->
<a @click="remove(index,row)" style="color:#FF7A8B">删除</a>
</template>
</Table>
......@@ -197,7 +198,7 @@ export default {
this.checkList.splice(index, 1);
}
},
setRow(row,index) {
setRow(row, index) {
this.$set(this.checkList, index, row);
},
addNew() {
......@@ -227,12 +228,12 @@ export default {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
this.$Message.error(r.error.message);
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
this.$Message.error(r.error.message);
});
}
});
......
......@@ -74,12 +74,12 @@ export default {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
this.$Message.error(r.error.message);
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
this.$Message.error(r.error.message);
});
}
});
......
......@@ -83,12 +83,12 @@ export default {
this.$Message.success("保存成功");
this.$emit("on-ok",this.entity);
} else {
this.$Message.error("保存失败");
this.$Message.error(r.error.message);
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
this.$Message.error(r.error.message);
});
}
});
......
......@@ -24,8 +24,8 @@
</FormItem>
</Col>
<Col :span="12">
<FormItem label="版本" prop="banben">
<Input v-model="entity.banben" placeholder="请输入"></Input>
<FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input>
</FormItem>
</Col>
<Col :span="24">
......@@ -46,14 +46,15 @@
<script>
import Api from "./api";
export default {
props: ["nodeInfo"],
data() {
return {
arr: [],
entity: {
code: 0,
categoryId: 0, //左侧树点击的id
categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {},
rootCategoryId: 0 //左侧树点击的数据的最顶层id
rootCategoryId: this.nodeInfo.rootCategoryId //左侧树点击的数据的最顶层id
},
disabled: false,
......@@ -113,19 +114,19 @@ export default {
if (v) {
// let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr);
// Api.create({ categoryDto: categoryDto, pro: pro })
// .then(r => {
// if (r.success) {
// this.$Message.success("保存成功");
// this.$emit("on-ok");
// } else {
// this.$Message.error("保存失败");
// }
// })
// .catch(err => {
// this.disabled = false;
// this.$Message.error("保存失败");
// });
Api.create(this.entity)
.then(r => {
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error(r.error.message);
}
})
.catch(err => {
this.disabled = false;
this.$Message.error(r.error.message);
});
}
});
},
......
import Api from '@/plugins/request'
export default {
listTable(params){
return Api.post(`${systemUrl}/custompropertydefinition/list`,params);
index:`${systemUrl}/material/paged`,
paged(params){
return Api.post(`${systemUrl}/material/paged`,params);
},
list(params){
return Api.post(`${systemUrl}/category/list`,params);
......
......@@ -34,19 +34,9 @@
</a>
</div>
<Content :class="!showMenu?'con_bord':''">
<MasterData ref="dataTable" @on-edit="edit" />
<MasterData ref="dataTable" :nodeInfo="nodeInfo" />
</Content>
</Layout>
<!-- <Modal v-model="modal" :title="title" width="1000" footer-hide :mask-closable="false">
<component
:is="detail"
:eid="curId"
:nodeInfo="nodeInfo"
@on-close="cancel"
@on-ok="ok"
ref="chlidren"
/>
</Modal>-->
</div>
</template>
<script>
......@@ -63,7 +53,10 @@ export default {
keys: "",
expand: false,
list: [],
nodeInfo: {},
nodeInfo: {
categoryId: 0,
rootCategoryId: 0
},
modal: false,
title: "新增",
curId: 0,
......@@ -105,14 +98,40 @@ export default {
{
on: {
click: () => {
this.handleSelect(data); //手动选择树节点
this.handleSelect(root, data); //手动选择树节点
}
}
},
data.title
);
},
handleSelect(data) {},
handleSelect(root, data) {
// console.log(root);
let pid = null; //定义最顶级id
let upId = data.upId;
let roots = root;
function addId(roots, upId) {
roots.map(u => {
if (u.node.id == upId) {
if (u.node.upId == 0) {
pid = u.node.id;
} else {
upId = u.node.upId;
addId(roots, upId);
}
}
});
}
addId(roots, upId);
this.nodeInfo.categoryId = data.id;
if (pid == null) {
this.nodeInfo.rootCategoryId = data.id;
} else {
this.nodeInfo.rootCategoryId = pid;
}
},
loadTree() {
let conditions = [];
Api.list({ conditions: conditions }).then(r => {
......@@ -132,24 +151,7 @@ export default {
toggle() {
this.expand = !this.expand;
},
change(v, b) {
console.log(v);
console.log(b);
let ids = [];
ids.push(b.value);
if (b.children) {
addId(b.children);
function addId(data) {
data.map(u => {
ids.push(u.value);
if (u.children) {
addId(u.children);
}
});
}
}
// this.$emit("on-select", b.value, b, ids);
},
change(v, b) {},
hide() {
this.showMenu = false;
}
......
<template>
<div class="master-data">
<DataGrid :columns="columns" ref="grid" :action="action">
{{nodeInfo}}
<DataGrid :columns="columns" ref="grid" :action="action" :initsearch="sets" :high="false">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入工艺名称/工艺编号"
placeholder="请输入编码/名称/状态"
v-width="200"
v-model="easySearch.keys.value"
clearable
......@@ -43,16 +44,28 @@ export default {
components: {
// Search
},
props: ["nodeInfo"],
data() {
return {
action: "",
action: Api.index,
modal: false,
title: "新增",
curId: 0,
detail: null,
nodeInfo: {},
sets: v => {
v.categoryId = this.nodeInfo.categoryId;
v.rootCategoryId = this.nodeInfo.rootCategoryId;
},
easySearch: {
keys: { op: "unicode,name,code", value: null }
keys: { op: "Code,Name", value: null },
// categoryId: {
// op: "In",
// value: this.nodeInfo.categoryId
// },
// rootCategoryId: {
// op: "In",
// value: this.nodeInfo.rootCategoryId
// }
},
columns: [
// {
......@@ -62,17 +75,17 @@ export default {
// width: 60
// },
{
key: "code",
key: "Code",
title: "编码",
align: "left"
},
{
key: "name",
key: "Name",
title: "名称",
align: "left"
},
{
key: "status",
key: "Status",
title: "状态",
align: "left",
render: (h, params) => {
......@@ -80,17 +93,21 @@ export default {
props: {
code: "materail.category.status",
type: "text",
value: params.row.status + ""
value: params.row.Status + ""
}
});
}
},
{
key: "description",
key: "Version",
title: "版本",
align: "left"
},
{
key: "Description",
title: "描述",
align: "left"
},
{
title: "操作",
key: "action",
......@@ -123,10 +140,7 @@ export default {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {
// this.dataColumns = this.dataTable;
// console.log(this.dataColumns)
},
created() {},
methods: {
search() {
this.$refs.grid.reload(this.easySearch);
......@@ -156,7 +170,7 @@ export default {
});
},
ok() {
// this.loadTree();
this.$refs.grid.reload(this.easySearch);
this.modal = false;
this.curId = 0;
},
......@@ -164,6 +178,13 @@ export default {
this.curId = 0;
this.modal = false;
}
},
watch: {
"nodeInfo.categoryId"(v) {
if (v) {
this.$refs.grid.reload(this.easySearch);
}
}
}
};
</script>
......
......@@ -33,6 +33,15 @@ 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);
......
<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,28 @@
</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"
size="large"
/>
</p>
<!--<p class="line_p">
<Poptip trigger="focus">
<Input
v-model="handonCardNo"
prefix="ios-contact"
placeholder="请输入接收人员编号"
style="width: 300px"
/>
<div slot="content">{{ formatNumber }}</div>
</Poptip>
</p>-->
</div>
<div slot="footer">
<Button @click="transModal = false">取消</Button>
......@@ -49,16 +66,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 +91,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 +115,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,
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,
code: "plan.order.urgencyLevel",
width: 100
type: "user"
},
{
key: "handonTime",
title: this.l("handonTime"),
high: true,
align: "center",
width: 150
},
{
title: "操作",
......@@ -151,15 +211,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,25 +243,63 @@ 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: {
formatNumber() {
if (this.handonCardNo == "") return "请输入接收人员编号";
return this.handonCardNo;
}
}
};
......
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