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

设置工艺规程-productree--OK

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