Commit e5b654a7 authored by 康振飞's avatar 康振飞

设置工艺规程-productree--OK

parent 1b718964
......@@ -399,8 +399,8 @@ export default {
z-index: 99999;
left: 56%;
top: 57%;
min-width: 1084px;
// min-width: 777px;
// min-width: 1084px;
min-width: 777px;
min-height: 300px;
box-shadow: 0px 5px 17px 5px rgba(0, 0, 0, 0.28);
background: #f5f6fa;
......
......@@ -2,9 +2,9 @@
<Layout class="lay100">
<!-- <div> -->
<!-- 左侧树 -->
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<!-- <Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> -->
<!-- <div class="zh-tree" :style="{height:treeHeight+'px'}"> -->
<h3 class="zh-title">产品结构</h3>
<!-- <h3 class="zh-title">产品结构</h3>
<div class="zh-box">
<Input search placeholder="请输入查询条件" v-model="treeInputSearch" />
......@@ -15,7 +15,7 @@
@on-select-change="selectTreeNode"
></Tree>
</div>
</Sider>
</Sider> -->
<!-- </div> -->
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" />
......@@ -698,7 +698,7 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
this.initTree();
// this.initTree();
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
......@@ -738,13 +738,13 @@ export default {
this.showMenu = true;
},
productSearch(id, item, ids) {
console.log(id)
console.log(item)
console.log(ids)
// this.productId = data.join(",");
// this.tableTata(this.selectName);
// let where = { productId: { op: "In", value: ids } };
// this.$refs.grid.reload(where);
if (ids.length > 0) {
this.orderSearchForm.productId = ids.join(",");
} else {
this.orderSearchForm.productId = "-1";
this.orderSearchForm.productName = "";
}
this.easySearch(this.orderSearchForm);
},
// tab切换
tabChange(name) {
......@@ -791,12 +791,9 @@ export default {
deleted() {},
// 分页
pageChange(num) {
//console.log(num);
this.page = num;
this.orderSearchForm.SkipCount =
(num - 1) * this.orderSearchForm.MaxResultCount;
console.log(this.orderSearchForm.SkipCount);
this.orderSearchForm.SkipCount = (num - 1) * this.orderSearchForm.MaxResultCount;
// console.log(this.orderSearchForm.SkipCount);
this.loaddata(this.orderSearchForm);
},
pageSizeChange(limit) {
......@@ -806,23 +803,15 @@ console.log(this.orderSearchForm.SkipCount);
this.loaddata(this.orderSearchForm);
},
loaddata(params) {
var url = "";
// if(params==1||params==2){
// url =
// `${PlanUrl}/mesorder/getpagedmesordersforpdefm?ProcessUserType=` + params
// }else{
var url = "";
this.orderSearchForm.simpleSearch= typeof params == "string" ? params : params.simpleSearch, //快速搜索
this.orderSearchForm.ProcessUserType= this.tabstatus,
this.orderSearchForm.ProductingPreparation= this.ProductingPreparationPeople,
this.orderSearchForm.RoutingSetStatus= this.orderSearchForm.RoutingSetStatus
url =
`${PlanUrl}/mesorder/getpagedmesordersforpdefm?` +
QS.stringify(this.orderSearchForm);
// }
service.get(`${url}`).then(response => {
// console.log(response)
......@@ -873,34 +862,34 @@ console.log(this.orderSearchForm.SkipCount);
}
}
},
initTree() {
var sumData = [];
this.$http.order.getallselecttree().then(res => {
if (res.result) {
for (var i = 0; i < res.result.length; i++) {
sumData = sumData.concat(res.result[i]);
}
this.treeData = sumData;
this.data2 = JSON.parse(JSON.stringify(sumData));
} else {
this.$Message.error("加载产品树失败!");
}
});
},
selectTreeNode(value) {
console.log(value)
if (value.length > 0) {
this.ids = [];
this.getAllIds(value);
if (this.ids.length > 0) {
this.orderSearchForm.productId = this.ids.join(",");
} else {
this.orderSearchForm.productId = "-1";
this.orderSearchForm.productName = "";
}
this.easySearch(this.orderSearchForm);
}
},
// initTree() {
// var sumData = [];
// this.$http.order.getallselecttree().then(res => {
// if (res.result) {
// for (var i = 0; i < res.result.length; i++) {
// sumData = sumData.concat(res.result[i]);
// }
// this.treeData = sumData;
// this.data2 = JSON.parse(JSON.stringify(sumData));
// } else {
// this.$Message.error("加载产品树失败!");
// }
// });
// },
// selectTreeNode(value) {
// console.log(value)
// if (value.length > 0) {
// this.ids = [];
// this.getAllIds(value);
// if (this.ids.length > 0) {
// this.orderSearchForm.productId = this.ids.join(",");
// } else {
// this.orderSearchForm.productId = "-1";
// this.orderSearchForm.productName = "";
// }
// this.easySearch(this.orderSearchForm);
// }
// },
getAllIds(trees) {
trees.forEach((data, index) => {
var that = this;
......
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