Commit add30ba4 authored by renjintao's avatar renjintao

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

parents 29e43eaa c1291ef6
......@@ -150,6 +150,10 @@ export default {
type: Function,
default: null
},
initsearch: {
type: Function,
default: null
},
lazy: {
//懒加载设置,设置为真时候,默认不加载数据。
type: Boolean,
......@@ -291,6 +295,10 @@ 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 => {
if (this.format) {
this.list = this.format(r.result.items);
......
......@@ -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);
});
}
});
......
<template>
<div>
{{nodeInfo}}
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
......@@ -25,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">
......@@ -121,12 +120,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);
});
}
});
......
......@@ -107,7 +107,7 @@ export default {
},
handleSelect(root, data) {
// console.log(root);
// console.log(data);
let pid = null; //定义最顶级id
let upId = data.upId;
let roots = root;
......@@ -124,11 +124,13 @@ export default {
});
}
addId(roots, upId);
console.log(pid);
this.nodeInfo.categoryId = data.id;
this.nodeInfo.rootCategoryId = pid;
// this.$refs.dataTable.$refs.grid.reload(this.nodeInfo);
if (pid == null) {
this.nodeInfo.rootCategoryId = data.id;
} else {
this.nodeInfo.rootCategoryId = pid;
}
},
loadTree() {
let conditions = [];
......@@ -149,35 +151,7 @@ export default {
toggle() {
this.expand = !this.expand;
},
change(v, b) {
// console.log(v);
// console.log(b);
// }
// var parentList = [];
// buildParentList(v);
// findParent(b.id);
// function buildParentList(arr) {
// arr.forEach(g => {
// console.log(g);
// if (g.upId != undefined) {
// let pid = g["upId"];
// let oid = g["id"];
// parentList[oid] = pid;
// }
// if (g.children != undefined) buildParentList(g["children"]);
// });
// }
// function findParent(idx) {
// alert(idx);
// alert(parentList[idx]);
// if (parentList[idx] != undefined) {
// let pid = parentList[idx];
// console.log(pid);
// findParent(pid);
// } else {
// }
// }
},
change(v, b) {},
hide() {
this.showMenu = false;
}
......
<template>
<div class="master-data">
{{nodeInfo}}
<DataGrid :columns="columns" ref="grid" :action="action">
<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
......@@ -47,21 +47,25 @@ export default {
props: ["nodeInfo"],
data() {
return {
action: "",
action: Api.index,
modal: false,
title: "新增",
curId: 0,
detail: null,
sets: v => {
v.categoryId = this.nodeInfo.categoryId;
v.rootCategoryId = this.nodeInfo.rootCategoryId;
},
easySearch: {
keys: { op: "categoryId,rootCategoryId", value: null },
categoryId: {
op: "In",
value: this.nodeInfo.categoryId
},
rootCategoryId: {
op: "In",
value: this.nodeInfo.rootCategoryId
}
keys: { op: "Code,Name", value: null },
// categoryId: {
// op: "In",
// value: this.nodeInfo.categoryId
// },
// rootCategoryId: {
// op: "In",
// value: this.nodeInfo.rootCategoryId
// }
},
columns: [
// {
......@@ -71,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) => {
......@@ -89,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",
......@@ -132,12 +140,7 @@ export default {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {
Api.paged().then(r => {
if (r.success) {
}
});
},
created() {},
methods: {
search() {
this.$refs.grid.reload(this.easySearch);
......@@ -167,7 +170,7 @@ export default {
});
},
ok() {
// this.loadTree();
this.$refs.grid.reload(this.easySearch);
this.modal = false;
this.curId = 0;
},
......@@ -175,6 +178,13 @@ export default {
this.curId = 0;
this.modal = false;
}
},
watch: {
"nodeInfo.categoryId"(v) {
if (v) {
this.$refs.grid.reload(this.easySearch);
}
}
}
};
</script>
......
......@@ -46,5 +46,8 @@ export default {
getentryusers(params) {
return Api.get(`${PlanUrl}/orderexecutenew/entryusers`, params);
},
//工时分配--总工时待分配
getallhours(params) {
return Api.post(`${technologyUrl}workhours/allhours`, params);
},
}
\ No newline at end of file
......@@ -81,6 +81,7 @@ export default {
executeId: item.executeId,
headid: item.routingHeaderId,
routid: item.routingDetailId,//工序ID
quantity: item.quantity, //派工数量
dispatchStatus: item.status
}
});
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
<!-- <Icon type="ios-time" /> -->
<div class="gs_bo01">
<span class="shi">总工时</span>
<span class="number">250</span>
<span class="number">{{allHours}}</span>
</div>
</div>
<Divider type="vertical" class="line_slit"/>
......@@ -16,20 +16,20 @@
<img src="@/assets/imgicon/execute/time02.png" alt=""/>
<div class="gs_bo01">
<span class="shi">待分配</span>
<span class="number">200</span>
<span class="number">{{waitHours}}</span>
</div>
</div>
</div>
<div class="gs_card_box">
<Card class="gs_card" v-for="i of 8" :key="i">
<Card class="gs_card" v-for="(item,index) in cardMan" :key="index">
<p slot="title" class="gs_title">
张三
<span class="fr">02816335{{i}}</span>
{{item.userName}}
<span class="fr">{{item.cardNo}}</span>
</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> 工时
<span class="b_size">{{item.workHour}}</span> 工时
</p>
<!-- <p class="gs_p">
<span class="b_size">100</span>
......@@ -70,10 +70,20 @@ export default {
msg:'确认要删除吗?',
title:'删除确认',
addmodal: false,
allHours: 240,
waitHours: 200,
cardMan:[
// {
// userName:"张三",
// cardNo:123123,
// workHour:50,
// }
]
}
},
created() {
// this.treeHeight = window.innerHeight - 120;
this.laodHorse()
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......@@ -87,11 +97,32 @@ export default {
};
},
methods: {
laodHorse(){
let parme = {
dispatchId: this.$route.query.id,
routingDetailId: this.$route.query.routid,
count: this.$route.query.quantity
}
Api.getallhours(parme).then(res=>{
if(res.result){
this.allHours = res.result.allHours
this.waitHours = res.result.waitHours
this.$refs.addview.maxHour = this.waitHours
}else{
console.log("获取失败。")
}
})
},
addItem(){
this.addmodal = true
let id = this.$route.query.id
console.log(id)
// Api.getentryusers().then()
Api.getentryusers({Id:id}).then(res=>{
let result = res.result
result.map(u=>{
u.checked = false
})
this.$refs.addview.listMan = result
})
},
editItem(){
this.$Message.success("编辑工时...")
......@@ -108,7 +139,13 @@ export default {
cancel(){
this.addmodal = false
},
addInfo(){
addInfo(formdata){
console.log(formdata)
this.cardMan.push(formdata)
// this.cardMan.userName = formdata.userse||formdata.oldUserse
// this.cardMan.cardNo = formdata.cardNo
// this.cardMan.workHour = formdata.workHour
console.log(this.cardMan)
this.addmodal = false
}
},
......
......@@ -29,7 +29,7 @@
<template slot="card" slot-scope="{row}">
<div
class="body"
@click="toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.status)"
@click="toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.quantity,row.status)"
>
<Row class="title-i">
<Col :span="10" class="order-code">{{row.productName}}</Col>
......@@ -186,6 +186,7 @@ export default {
params.row.executeId,
params.row.routingHeaderId,
params.row.routingDetailId,
params.row.quantity,
params.row.status
)
}
......@@ -216,7 +217,7 @@ export default {
search() {
this.$refs.grid.reload(this.easySearch);
},
toExecute(id, orderId, executeId, headid, routingDetailId, status) {
toExecute(id, orderId, executeId, headid, routingDetailId,quantity, status) {
//跳转到对应操作页面 获取id:this.$route.query.id
this.$router.push({
path: "/produce/execute",
......@@ -226,6 +227,7 @@ export default {
executeId: executeId, //订单执行表id
headid: headid, //工艺规程id
routid: routingDetailId, //工序ID
quantity: quantity, //派工数量
dispatchStatus: status
}
});
......
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