From fc89d746424577392fcec92cc8b8fea34006ce1c Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期四, 14 九月 2023 13:49:14 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.22:9001/r/mom-before
---
src/components/view/technology.vue | 7
src/components/view/mbom.vue | 1
src/components/view/sale.vue | 17
src/components/view/standard-table/material.vue | 5
src/components/view/standard.vue | 432 ++++++++++-------
src/components/view/laboratoryManagement.vue | 42 +
src/components/view/self-inspection.vue | 10
src/components/view/equipmentmaintain.vue | 7
src/components/view/record-content.vue | 221 ++++----
src/components/view/standard-table/target.vue | 585 +++++++++++++++++++++++++
src/components/view/Technicalindex.vue | 17
src/App.vue | 18
src/components/view/standard-table/technology.vue | 4
13 files changed, 1,048 insertions(+), 318 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index a631944..9459930 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -105,6 +105,24 @@
border-radius: 6px;
}
+ /* el-tree-table鎶樺彔锛堝睍寮�銆佹敹缂╋級鍥炬爣瀹氫綅 */
+ .el-table [class*="el-table__row--level-1"] .el-table__expand-icon {
+ font-size: 18px;
+ font-weight: bold;
+ position: absolute;
+ right: -40px;
+ top: 16px;
+ z-index: 999;
+ }
+ .el-table [class*="el-table__row--level-2"] .el-table__expand-icon {
+ font-size: 18px;
+ font-weight: bold;
+ position: absolute;
+ right: -230px;
+ top: 16px;
+ z-index: 999;
+ }
+
table {
border-collapse: collapse;
}
diff --git a/src/components/view/Technicalindex.vue b/src/components/view/Technicalindex.vue
index a5016bb..9d33124 100644
--- a/src/components/view/Technicalindex.vue
+++ b/src/components/view/Technicalindex.vue
@@ -94,7 +94,10 @@
<!-- 涓讳綋鍙� -->
<div class="right">
<el-table :data="tableData" style="width: 100%;overflow-y: auto;min-height: 100%"
- max-height="100%" row-key="name" border @selection-change="handleSelectionChange"
+ max-height="100%" row-key="name" border
+ @select="selectTr"
+ ref="multipleTable"
+ @selection-change="handleSelectionChange"
default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column type="selection" width="55">
</el-table-column>
@@ -459,6 +462,7 @@
let cc = this.selects.map(el => {
return el.id
})
+ cc.splice(0,1)
this.delete = cc.join(',')
console.log(this.delete);
this.delAllTechskill()
@@ -599,12 +603,15 @@
modify() {
this.modifyevent = true
},
- // deleteRow(index, rows) {
- // console.log();
- // rows.splice(index, 1);
- // },
+
handleSelectionChange(val) {
this.selects = val;
+ this.deleteList = [];
+ val.forEach((v) => {
+ if (v.id !== undefined) {
+ this.deleteList.push(v.id);
+ }
+ });
},
//缂栬緫
diff --git a/src/components/view/equipmentmaintain.vue b/src/components/view/equipmentmaintain.vue
index 528295c..cf2d491 100644
--- a/src/components/view/equipmentmaintain.vue
+++ b/src/components/view/equipmentmaintain.vue
@@ -601,6 +601,11 @@
let cc = this.selects.map(el => {
return el.id
})
+ // cc.forEach((el,idx) =>{
+ // delete idx[0]
+ // })
+ cc.splice(0,1)
+ console.log(cc);
this.delete = cc.join(',')
console.log(this.delete);
this.delAllQue()
@@ -617,6 +622,7 @@
// },
handleSelectionChange(val) {
+ this.selects = val
this.deleteList = [];
val.forEach((v) => {
if (v.id !== undefined) {
@@ -639,6 +645,7 @@
this.isAllSelect = row.isChecked;
this.toggleSelect(row, row.isChecked, "tr");
});
+
},
//閫掑綊瀛愮骇
toggleSelect(data, flag, type) {
diff --git a/src/components/view/laboratoryManagement.vue b/src/components/view/laboratoryManagement.vue
index f00b04d..8874507 100644
--- a/src/components/view/laboratoryManagement.vue
+++ b/src/components/view/laboratoryManagement.vue
@@ -51,8 +51,11 @@
<el-row>
<el-col :span="12">
<el-form-item label="璁惧缁�" prop="name">
- <el-select
+ <!-- <el-select
v-model="ruleForm.equr"
+ allow-create
+ filterable
+ @blur="selectInput"
placeholder="璇烽�夋嫨璁惧缁�"
>
<el-option
@@ -62,7 +65,13 @@
:value="list"
>
</el-option>
- </el-select>
+ </el-select> -->
+ <el-autocomplete
+ class="inline-input"
+ v-model="ruleForm.equr"
+ :fetch-suggestions="querySearch"
+ placeholder="璇疯緭鍏ュ唴瀹�"
+ ></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -414,7 +423,7 @@
// BOM鏍戞暟鎹粨鏋�
towTree: [],
equipment: '1',
- equaip:'',
+ equaip:[],
ruleForm: {
// 鏂板浠櫒琛ㄥ崟
code: "",
@@ -484,7 +493,21 @@
console.log(this.checkTreeNode);
this.selectDevice()
},
-
+ selectInput(){
+
+ },
+ querySearch(queryString, cb) {
+ console.log(this.equaip);
+ var restaurants = this.equaip;
+ var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
+ // 璋冪敤 callback 杩斿洖寤鸿鍒楄〃鐨勬暟鎹�
+ cb(results);
+ },
+ createFilter(queryString) {
+ return (restaurant) => {
+ return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+ };
+ },
staueValueChange() {
this.selectDevice()
// this.tableData = [];
@@ -557,8 +580,14 @@
type:this.equip
}
}).then(res =>{
- this.equaip = res.data
- console.log(this.equip);
+ res.data.forEach(item=>{
+ let obj={
+ id: item,
+ value: item
+ }
+ this.equaip.push(obj)
+ console.log("璁惧缁�",this.equip);
+ })
})
},
RadioChange(val){
@@ -588,6 +617,7 @@
let one=this.towTree[0]
console.log(one);
let name =one.father
+ this.checkTreeNode.father = name
console.log(name);
this.selectDeviceStart(name)
});
diff --git a/src/components/view/mbom.vue b/src/components/view/mbom.vue
index 9acb7cb..b7a850d 100644
--- a/src/components/view/mbom.vue
+++ b/src/components/view/mbom.vue
@@ -273,6 +273,7 @@
console.log(one);
let name=one.children[0].id
console.log(name);
+ this.checkTreeNode.id = name
this.selectAllMbomStart(name)
this.selectDataList();
}, {
diff --git a/src/components/view/record-content.vue b/src/components/view/record-content.vue
index 921e8f3..84d06bb 100644
--- a/src/components/view/record-content.vue
+++ b/src/components/view/record-content.vue
@@ -1,113 +1,3 @@
-<style scoped>
- .title .el-button {
- height: 32px;
- border: 1px solid rgba(190, 190, 190, 0.44);
- box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
- padding: 0 12px;
- }
-
- .title {
- margin-bottom: 10px;
- padding: 0 20px;
- }
-
- .title * {
- font-size: 16px;
- }
-
- .choose {
- padding: 21px 24px;
- display: flex;
- align-items: center;
- background-color: #fff;
- border-bottom: 3px solid rgb(245, 247, 251);
- }
-
- .choose * {
- font-size: 14px;
- }
-
- .choose .el-button {
- height: 32px;
- border: 1px solid rgba(190, 190, 190, 0.44);
- box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
- padding: 0 12px;
- }
-
- .thing {
- width: 100%;
- height: calc(100% - 120px);
- background-color: #fff;
- display: flex;
- }
-
- .thing .left {
- width: 295px;
- height: calc(100% - 20px);
- border-right: 3px solid rgb(245, 247, 251);
- padding: 16px;
- overflow-y: auto;
- }
-
- .thing .left .custom-tree-node span {
- font-size: 14px;
- }
-
- .thing .left .custom-tree-node {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 14px;
- padding-right: 8px;
- }
-
- .node_i {
- color: orange;
- }
-
- .el-icon-delete {
- display: none;
- color: #004EA2;
- }
-
- .custom-tree-node:hover .el-icon-delete {
- display: inline;
- }
-
- .thing .right {
- width: calc(100% - 305px);
- height: calc(100% - 25px);
- overflow: hidden;
- padding: 10px;
- }
-
- .table_do {
- color: #004ea0;
- cursor: pointer;
- }
-</style>
-<style>
- .record_content .title .el-button * {
- font-size: 14px;
- }
-
- .record_content .title .el-button--default {
- color: #004EA2;
- }
-
- .record_content .thing .left .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
- background: rgba(58, 124, 253, 0.2);
- color: #004EA2;
- }
-
- .record_content .el-tree-node__content {
- height: 30px;
- border-radius: 2px;
- }
-</style>
-
-
<template>
<div class="record_content">
<div class="title">
@@ -656,3 +546,114 @@
}
}
</script>
+
+<style scoped>
+ .title .el-button {
+ height: 32px;
+ border: 1px solid rgba(190, 190, 190, 0.44);
+ box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
+ padding: 0 12px;
+ }
+
+ .title {
+ margin-bottom: 10px;
+ padding: 0 20px;
+ }
+
+ .title * {
+ font-size: 16px;
+ }
+
+ .choose {
+ padding: 21px 24px;
+ display: flex;
+ align-items: center;
+ background-color: #fff;
+ border-bottom: 3px solid rgb(245, 247, 251);
+ }
+
+ .choose * {
+ font-size: 14px;
+ }
+
+ .choose .el-button {
+ height: 32px;
+ border: 1px solid rgba(190, 190, 190, 0.44);
+ box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
+ padding: 0 12px;
+ }
+
+ .thing {
+ width: 100%;
+ height: calc(100% - 120px);
+ background-color: #fff;
+ display: flex;
+ }
+
+ .thing .left {
+ width: 295px;
+ height: calc(100% - 20px);
+ border-right: 3px solid rgb(245, 247, 251);
+ padding: 16px;
+ overflow-y: auto;
+ }
+
+ .thing .left .custom-tree-node span {
+ font-size: 14px;
+ }
+
+ .thing .left .custom-tree-node {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ font-size: 14px;
+ padding-right: 8px;
+ }
+
+ .node_i {
+ color: orange;
+ }
+
+ .el-icon-delete {
+ display: none;
+ color: #004EA2;
+ }
+
+ .custom-tree-node:hover .el-icon-delete {
+ display: inline;
+ }
+
+ .thing .right {
+ width: calc(100% - 305px);
+ height: calc(100% - 25px);
+ overflow: hidden;
+ padding: 10px;
+ }
+
+ .table_do {
+ color: #004ea0;
+ cursor: pointer;
+ }
+</style>
+<style>
+ .record_content .title .el-button * {
+ font-size: 14px;
+ }
+
+ .record_content .title .el-button--default {
+ color: #004EA2;
+ }
+
+ .record_content .thing .left .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
+ background: rgba(58, 124, 253, 0.2);
+ color: #004EA2;
+ }
+
+ .record_content .el-tree-node__content {
+ height: 30px;
+ border-radius: 2px;
+ }
+</style>
+
+
diff --git a/src/components/view/sale.vue b/src/components/view/sale.vue
index 44ea8a0..d3e59a2 100644
--- a/src/components/view/sale.vue
+++ b/src/components/view/sale.vue
@@ -282,7 +282,8 @@
</el-dialog>
</div>
<div class="select-model">
- <el-dialog :title="`閿�鍞�${upDia==true?'淇敼':'鏂板'}`" :visible.sync="addDia" width="850px">
+ <el-dialog :title="`閿�鍞�${upDia==true?'淇敼':'鏂板'}`" :visible.sync="addDia" width="850px"
+ @close="closeDialog">
<div class="body">
<div class="head">鍩烘湰淇℃伅</div>
<div class="content">
@@ -429,6 +430,20 @@
this.selectRawInspectsList()
},
methods: {
+ closeDialog(){
+ this.addData = {
+ orderNumber: null,
+ code: null,
+ name: null,
+ proname: null,
+ adress: null,
+ username: null,
+ delTime: null,
+ orderName: null,
+ phone: null,
+ saleMaterialList: []
+ }
+ },
handleSelectionChange(val) {
this.selects = ''
val.forEach((a, ai)=>{
diff --git a/src/components/view/self-inspection.vue b/src/components/view/self-inspection.vue
index 55b8cbc..b8213a2 100644
--- a/src/components/view/self-inspection.vue
+++ b/src/components/view/self-inspection.vue
@@ -448,8 +448,15 @@
},
//鏂板
add() {
- this.dialogVisible = false
+ if (this.form.standard[0] !== "<" && this.form.standard[0] !== "<=" && this.form.standard[0] !== ">"){
+ this.$message({
+ message: '杈撳叆鐨勭涓�涓瓧绗﹀繀椤绘槸 '<' 鎴� '<='锛�',
+ type: 'warning'
+ });
+ return;
+ }
this.addSelfcheck()
+ this.dialogVisible = false
},
addSelfcheck() {
this.$axios.post(this.$api.url.addSelfcheck,{
@@ -513,6 +520,7 @@
})[0]
console.log(one);
let id =one.children[0].id
+ this.checkTreeNode.id = id
console.log(id);
this.selectAllSelfStart(id)
this.selectDataList();
diff --git a/src/components/view/standard-table/material.vue b/src/components/view/standard-table/material.vue
index 4dc288b..b317e40 100644
--- a/src/components/view/standard-table/material.vue
+++ b/src/components/view/standard-table/material.vue
@@ -19,7 +19,8 @@
</el-table-column>
<el-table-column prop="tname" sortable label="宸ヨ壓鍚嶇О">
<template slot-scope="scope">
- <el-tag type="success" v-if="scope.row.tname != null">02</el-tag>
+ <el-tag type="success" v-if="scope.row.tname != null"
+ style="margin-left:20px;">02</el-tag>
<span style="color: #000000">
{{ scope.row.tname }}
</span>
@@ -42,7 +43,7 @@
<el-table-column prop="num" label="鏁伴噺">
<template slot-scope="scope">
<el-input v-model="scope.row.num"
- v-if="scope.row.mname != null"
+ v-if="scope.row.mname != null" size="small"
@blur="updateVal(scope.row)"></el-input>
</template>
</el-table-column>
diff --git a/src/components/view/standard-table/target.vue b/src/components/view/standard-table/target.vue
index 9524ae4..c4d3139 100644
--- a/src/components/view/standard-table/target.vue
+++ b/src/components/view/standard-table/target.vue
@@ -1,8 +1,8 @@
<template>
<div class="standard">
<div>
- <el-table ref="multipleTable" :data="tableData" row-key="rowId" border max-height="675"
- @select-all="selectAll" @select="selectTr"
+ <el-table ref="multipleTable" :data="aa" row-key="rowId" border max-height="675"
+ @select-all="selectAll" @select="selectTr"
@selection-change="handleSelectionChange" default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column type="selection" width="55"></el-table-column>
@@ -15,7 +15,8 @@
</el-table-column>
<el-table-column prop="tname" label="宸ヨ壓鍚嶇О">
<template slot-scope="scope">
- <el-tag type="success" v-if="scope.row.tname != null">02</el-tag>
+ <el-tag type="success" v-if="scope.row.tname != null"
+ style="line-height:24px;text-align:center;width:36px;height:24px;margin-left:20px;border-radius:12px">02</el-tag>
<span>{{scope.row.tname}}</span>
</template>
</el-table-column>
@@ -36,14 +37,14 @@
<el-table-column prop="internal" label="鍐呮帶鍊�">
<template slot-scope="scope">
<el-input v-model="scope.row.internal"
- v-if="scope.row.pname != null"
+ v-if="scope.row.pname != null" size="small"
@blur="updateVal(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column prop="required" label="鏍囧噯鍊�">
<template slot-scope="scope">
<el-input v-model="scope.row.required"
- v-if="scope.row.pname != null"
+ v-if="scope.row.pname != null" size="small"
@blur="updateVal(scope.row)"></el-input>
</template>
</el-table-column>
@@ -59,12 +60,580 @@
selects: [],
deleteList:[],
isAllSelect:false,
+ aa: [
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "unit": "oo",
+ "pname": "闃垮彂",
+ "pid": 933,
+ "rowId": 0.15062765172836556,
+ "indents": 1
+ },
+ {
+ "unit": "km",
+ "pname": "鐢�2",
+ "pid": 934,
+ "rowId": 0.12313308041936621,
+ "indents": 1
+ },
+ {
+ "unit": "ll",
+ "pname": "鐢�3",
+ "pid": 935,
+ "rowId": 0.3959020806139848,
+ "indents": 1
+ },
+ {
+ "unit": "璁╂垜鍘�",
+ "pname": "杩樻槸鐨勪汉浼氬彈鍒�",
+ "pid": 941,
+ "rowId": 0.4501313017235842,
+ "indents": 1
+ },
+ {
+ "unit": "鍙戜簩鎵嬫埧",
+ "pname": "绂忓▋",
+ "pid": 942,
+ "rowId": 0.2570941856592921,
+ "indents": 1
+ },
+ {
+ "unit": "闃垮棷鍡�",
+ "pname": "1闃�",
+ "pid": 943,
+ "rowId": 0.3849246876222272,
+ "indents": 1
+ },
+ {
+ "unit": "sef",
+ "pname": "gsd",
+ "pid": 952,
+ "rowId": 0.3358017758829086,
+ "indents": 1
+ }
+ ],
+ "pfather": "鐢垫皵鎬ц兘",
+ "rowId": 0.11597152206451145,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "鍚�",
+ "pname": "鏈�1",
+ "pid": 936,
+ "rowId": 0.09276663783212125,
+ "indents": 1
+ },
+ {
+ "unit": "澶�",
+ "pname": "鏈�2",
+ "pid": 937,
+ "rowId": 0.30524372216363194,
+ "indents": 1
+ }
+ ],
+ "pfather": "鏈烘",
+ "rowId": 0.7172228698155356,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "t",
+ "pname": "鑰�1",
+ "pid": 938,
+ "rowId": 0.19975939946800714,
+ "indents": 1
+ },
+ {
+ "unit": "ml",
+ "pname": "鑰�2",
+ "pid": 939,
+ "rowId": 0.8998139964427834,
+ "indents": 1
+ },
+ {
+ "unit": "鍙�",
+ "pname": "鑰�3",
+ "pid": 940,
+ "rowId": 0.5675579627028025,
+ "indents": 1
+ }
+ ],
+ "pfather": "鑰愮數鍘�",
+ "rowId": 0.21440785353613157,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "鎸変笂娆$殑闈炲父",
+ "pname": "澶ф墜澶ц剼",
+ "pid": 944,
+ "rowId": 0.7181582304087455,
+ "indents": 1
+ }
+ ],
+ "pfather": "浣犲ソ",
+ "rowId": 0.7769908541698349,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "鐖卞浗VSv",
+ "pname": "闃胯惃",
+ "pid": 945,
+ "rowId": 0.17378991618309336,
+ "indents": 1
+ }
+ ],
+ "pfather": "澶у濂�",
+ "rowId": 0.8772679053462382,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "ww",
+ "pname": "ww",
+ "pid": 946,
+ "rowId": 0.05009672998084547,
+ "indents": 1
+ }
+ ],
+ "pfather": "cao",
+ "rowId": 0.9565056824143869,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "杈剧摝",
+ "pname": "鎴戠殑",
+ "pid": 947,
+ "rowId": 0.34581383239188046,
+ "indents": 1
+ },
+ {
+ "unit": "鎴戠殑",
+ "pname": "闈掕洐澶у叏",
+ "pid": 948,
+ "rowId": 0.5292322880840665,
+ "indents": 1
+ },
+ {
+ "unit": "鎴戠殑閽�",
+ "pname": "鍙栧緱瀹屽叏鐨�",
+ "pid": 949,
+ "rowId": 0.9125913254753026,
+ "indents": 1
+ },
+ {
+ "unit": "璇烽棶",
+ "pname": "褰撳墠",
+ "pid": 950,
+ "rowId": 0.7560056072797159,
+ "indents": 1
+ },
+ {
+ "unit": "sdv",
+ "pname": "澹ぇ澶�",
+ "pid": 951,
+ "rowId": 0.5833122419533638,
+ "indents": 1
+ }
+ ],
+ "pfather": "浣犻敃",
+ "rowId": 0.9766279468505832,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "闃胯揪",
+ "pname": "鎵撳晩路",
+ "pid": 953,
+ "rowId": 0.9092338815452841,
+ "indents": 1
+ }
+ ],
+ "pfather": "闃胯开鐜�",
+ "rowId": 0.8799322497096753,
+ "indents": 1
+ }
+ ],
+ "tname": "瑁佺紗",
+ "rowId": 0.4071356283291181,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "unit": "kv",
+ "pname": "闀�1",
+ "pid": 954,
+ "rowId": 0.035463253161200026,
+ "indents": 1
+ },
+ {
+ "unit": "vv",
+ "pname": "闀�2",
+ "pid": 955,
+ "rowId": 0.23952996321663345,
+ "indents": 1
+ },
+ {
+ "unit": "mm",
+ "pname": "闀�3",
+ "pid": 956,
+ "rowId": 0.0009274727073673716,
+ "indents": 1
+ }
+ ],
+ "pfather": "闀垮害",
+ "rowId": 0.7634749065969555,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "鍚�",
+ "pname": "闈�",
+ "pid": 957,
+ "rowId": 0.18887461651501813,
+ "indents": 1
+ }
+ ],
+ "pfather": "闈㈢Н",
+ "rowId": 0.1800874562308441,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "c",
+ "pname": "婀�",
+ "pid": 958,
+ "rowId": 0.79648815170558,
+ "indents": 1
+ }
+ ],
+ "pfather": "婀垮害",
+ "rowId": 0.10207617486870801,
+ "indents": 1
+ }
+ ],
+ "tname": "鍓ョ紗",
+ "rowId": 0.6177353372974288,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "unit": "mm",
+ "pname": "鐢�1",
+ "pid": 959,
+ "rowId": 0.14165010419857826,
+ "indents": 1
+ },
+ {
+ "unit": "km",
+ "pname": "鐢�2",
+ "pid": 960,
+ "rowId": 0.5001292363854433,
+ "indents": 1
+ },
+ {
+ "unit": "ll",
+ "pname": "鐢�3",
+ "pid": 961,
+ "rowId": 0.8459604367887481,
+ "indents": 1
+ }
+ ],
+ "pfather": "鐢垫皵鎬ц兘",
+ "rowId": 0.7238366441537252,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "鍚�",
+ "pname": "鏈�1",
+ "pid": 962,
+ "rowId": 0.5558158468437493,
+ "indents": 1
+ },
+ {
+ "unit": "澶�",
+ "pname": "鏈�2",
+ "pid": 963,
+ "rowId": 0.750487727539507,
+ "indents": 1
+ }
+ ],
+ "pfather": "鏈烘",
+ "rowId": 0.08099595277723015,
+ "indents": 1
+ }
+ ],
+ "tname": "鍓嚎",
+ "rowId": 0.6857832066163772,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "unit": "t",
+ "pname": "鑰�1",
+ "pid": 964,
+ "rowId": 0.025681390736394416,
+ "indents": 1
+ },
+ {
+ "unit": "ml",
+ "pname": "鑰�2",
+ "pid": 965,
+ "rowId": 0.36284806597904873,
+ "indents": 1
+ },
+ {
+ "unit": "鍙�",
+ "pname": "鑰�3",
+ "pid": 966,
+ "rowId": 0.32910729115405535,
+ "indents": 1
+ }
+ ],
+ "pfather": "鑰愮數鍘�",
+ "rowId": 0.41438839964145635,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "kv",
+ "pname": "闀�1",
+ "pid": 967,
+ "rowId": 0.3918751838800807,
+ "indents": 1
+ },
+ {
+ "unit": "mm",
+ "pname": "闂棶",
+ "pid": 968,
+ "rowId": 0.5686737935255044,
+ "indents": 1
+ }
+ ],
+ "pfather": "闀垮害",
+ "rowId": 0.4897629570966928,
+ "indents": 1
+ }
+ ],
+ "tname": "绌跨嚎",
+ "rowId": 0.4459890408806282,
+ "indents": 1
+ }
+ ],
+ "tfather": "涓嬫枡",
+ "rowId": 0.8390882975115925,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "unit": "vv",
+ "pname": "闀�2",
+ "pid": 969,
+ "rowId": 0.16863376578504718,
+ "indents": 1
+ },
+ {
+ "unit": "mm",
+ "pname": "闀�3",
+ "pid": 970,
+ "rowId": 0.2900238044012753,
+ "indents": 1
+ }
+ ],
+ "pfather": "闀垮害",
+ "rowId": 0.37669687690143516,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "鍚�",
+ "pname": "闈�",
+ "pid": 971,
+ "rowId": 0.36760765245674576,
+ "indents": 1
+ }
+ ],
+ "pfather": "闈㈢Н",
+ "rowId": 0.41655397960844853,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "c",
+ "pname": "婀�",
+ "pid": 972,
+ "rowId": 0.8013524859108032,
+ "indents": 1
+ }
+ ],
+ "pfather": "婀垮害",
+ "rowId": 0.30068963405418225,
+ "indents": 1
+ }
+ ],
+ "tname": "鏀拺鍧楃幆姘�",
+ "rowId": 0.7725045227516729,
+ "indents": 1
+ }
+ ],
+ "tfather": "鏀拺鍧楃幆姘�",
+ "rowId": 0.7921741302395957,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "unit": "t",
+ "pname": "鑰�1",
+ "pid": 978,
+ "rowId": 0.7281043795556847,
+ "indents": 1
+ },
+ {
+ "unit": "ml",
+ "pname": "鑰�2",
+ "pid": 979,
+ "rowId": 0.015058429562420983,
+ "indents": 1
+ },
+ {
+ "unit": "鍙�",
+ "pname": "鑰�3",
+ "pid": 980,
+ "rowId": 0.5169165422760948,
+ "indents": 1
+ }
+ ],
+ "pfather": "鑰愮數鍘�",
+ "rowId": 0.9785158882428673,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "kv",
+ "pname": "闀�1",
+ "pid": 981,
+ "rowId": 0.9534130099287508,
+ "indents": 1
+ }
+ ],
+ "pfather": "闀垮害",
+ "rowId": 0.4408411939308432,
+ "indents": 1
+ }
+ ],
+ "tname": "澹充綋鍠风爞",
+ "rowId": 0.47569680349711807,
+ "indents": 1
+ }
+ ],
+ "tfather": "鍠风爞",
+ "rowId": 0.7110660336124821,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "unit": "vv",
+ "pname": "闀�2",
+ "pid": 982,
+ "rowId": 0.6503541323269595,
+ "indents": 1
+ },
+ {
+ "unit": "mm",
+ "pname": "闀�3",
+ "pid": 983,
+ "rowId": 0.32814600334581456,
+ "indents": 1
+ }
+ ],
+ "pfather": "闀垮害",
+ "rowId": 0.7584791572708673,
+ "indents": 1
+ },
+ {
+ "children": [
+ {
+ "unit": "鍚�",
+ "pname": "闈�",
+ "pid": 984,
+ "rowId": 0.37940516060114016,
+ "indents": 1
+ }
+ ],
+ "pfather": "闈㈢Н",
+ "rowId": 0.12296115468577762,
+ "indents": 1
+ }
+ ],
+ "tname": "鐢电紗鎵撶(",
+ "rowId": 0.5185983654517894,
+ "indents": 1
+ }
+ ],
+ "tfather": "鐒婃帴",
+ "rowId": 0.08397884001890477,
+ "indents": 1
+ }
+]
}
},
- props:['tableData','tableType'],
- created() {},
- mounted() {},
+ // props:['tableData','tableType'],
+ created() {
+ },
+ mounted() {
+
+ },
methods: {
+ bb(){
+ console.log(this.aa);
+ },
// 琛ㄦ牸鏍戝叏閮ㄩ�変腑閰嶇疆
// 鍏ㄩ��/鍙栨秷閫夋搷浣�
selectAll(val) {
diff --git a/src/components/view/standard-table/technology.vue b/src/components/view/standard-table/technology.vue
index 978a988..f042c3a 100644
--- a/src/components/view/standard-table/technology.vue
+++ b/src/components/view/standard-table/technology.vue
@@ -18,7 +18,7 @@
</span>
</template>
</el-table-column>
- <el-table-column sortable label="宸ヨ壓鍚嶇О">
+ <el-table-column sortable label="宸ヨ壓鍚嶇О" width="200px">
<template slot-scope="scope">
<el-tag type="success" v-if="!scope.row.children">02</el-tag>
<span style="color: black">{{ scope.row.name }}</span>
@@ -35,7 +35,7 @@
<el-table-column prop="pq" label="鐢熶骇瀹氶(涓�/澶�)">
<template slot-scope="scope">
<el-input v-model="scope.row.pq"
- v-if="scope.row.dg != null"
+ v-if="scope.row.dg != null" size="small"
@blur="updatePq(scope.row)"
></el-input>
</template>
diff --git a/src/components/view/standard.vue b/src/components/view/standard.vue
index 2a3269a..6a115b4 100644
--- a/src/components/view/standard.vue
+++ b/src/components/view/standard.vue
@@ -13,15 +13,15 @@
</div>
<div class="thing">
<div class="left">
- <el-row>
+ <el-row :gutter="5">
<el-col :span="21">
<el-input v-model="search" suffix-icon="el-icon-search" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" size="small" clearable></el-input>
</el-col>
<el-col :span="2">
- <el-button size="mini" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button>
+ <el-button size="small" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button>
</el-col>
</el-row>
- <el-tree style="width: ;" :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }"
+ <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }"
node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current>
<div class="custom-tree-node" slot-scope="{ node, data }">
<span><i :class="`node_i ${data.code != '[5]' ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>
@@ -58,108 +58,135 @@
<div class="contentTable" v-if="this.typeselect == 0">
<technology @childData="getChildData" :tableType="tableType" :tableData="tableData"></technology>
</div>
- <div v-if="this.typeselect == 1">
+ <div class="contentTable" v-if="this.typeselect == 1">
<target @childData="getChildData" :tableType="tableType" :tableData="tableData"></target>
</div>
- <div v-if="this.typeselect == 2">
+ <div class="contentTable" v-if="this.typeselect == 2">
<material @childData="getChildData" :tableType="tableType" :tableData="tableData"></material>
</div>
- <div v-if="this.typeselect == 3">
+ <div class="contentTable" v-if="this.typeselect == 3">
<product @childData="getChildData" :tableType="tableType" :tableData="tableData"></product>
</div>
</div>
</div>
-
<div class="bom-add-model">
- <el-dialog title="BOM鏂板" :visible.sync="bomAddModelVisible" width="45%">
- <!-- 宸ヨ壓璺嚎 -->
- <div v-if="typeselect == 0">
+ <!-- 宸ヨ壓璺嚎 -->
+ <el-dialog title="BOM鏂板" :visible.sync="technologyVisible" width="45%">
<el-form :model="technologyForm" :inline="true" label-position="right"
ref="technologyForm" :rules="technologyRules" label-width="90px">
- <el-form-item label="宸ュ簭:" prop="tefather">
- <el-select id="tefather" size="small"
- filterable allow-create default-first-option
- v-model="technologyForm.tefather" placeholder="璇疯緭鍏ユ垨閫夋嫨宸ュ簭">
- <el-option :value="item.father" :label="item.father" v-for="(item,index) in fatherList" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="宸ヨ壓鍚嶇О:" prop="tename">
- <el-input id="tename" size="small" placeholder="璇疯緭鍏ュ伐鑹哄悕绉�"
- clearable v-model="technologyForm.tename"></el-input>
- </el-form-item>
- <el-form-item label="璁惧缁�:" prop="deviceGroup">
- <el-select id="deviceGroup" placeholder="璇烽�夋嫨璁惧缁�" size="small"
- v-model="technologyForm.deviceGroup">
- <el-option :value="item.father"
- v-for="(item,index) in deviceList" :key="index" :label="item.father"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鐢熶骇瀹氶:" prop="productionQuota">
- <el-input id="productionQuota" size="small" clearable v-model.number="technologyForm.productionQuota" placeholder="璇疯緭鍏ョ敓浜у畾棰�" />
- </el-form-item>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="宸ュ簭:" prop="tefather">
+ <el-select size="small"
+ filterable allow-create default-first-option
+ v-model="technologyForm.tefather" placeholder="璇疯緭鍏ユ垨閫夋嫨宸ュ簭">
+ <el-option :value="item.father" :label="item.father" v-for="(item,index) in fatherList" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="宸ヨ壓鍚嶇О:" prop="tename">
+ <el-input size="small" placeholder="璇疯緭鍏ュ伐鑹哄悕绉�"
+ clearable v-model="technologyForm.tename"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="璁惧缁�:" prop="deviceGroup">
+ <el-select placeholder="璇烽�夋嫨璁惧缁�" size="small"
+ v-model="technologyForm.deviceGroup">
+ <el-option :value="item.father"
+ v-for="(item,index) in deviceList" :key="index" :label="item.father"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鐢熶骇瀹氶:" prop="productionQuota">
+ <el-input size="small" clearable v-model.number="technologyForm.productionQuota" placeholder="璇疯緭鍏ョ敓浜у畾棰�" />
+ </el-form-item>
+ </el-col>
+ </el-row>
</el-form>
- <div style="width:100%;text-align: right;">
- <span slot="footer" class="dialog-footer" >
- <el-button type="primary" @click="confirmAdd('technologyForm')">纭� 瀹�</el-button>
- <el-button @click="bomAddModelVisible = false">鍙� 娑�</el-button>
- </span>
- </div>
- </div>
+ <span slot="footer" class="dialog-footer" >
+ <el-button type="primary" @click="confirmAdd('technologyForm')">纭� 瀹�</el-button>
+ <el-button @click="technologyVisible = false">鍙� 娑�</el-button>
+ </span>
+ </el-dialog>
<!-- 鎶�鏈寚鏍� -->
- <div v-if="typeselect == 1">
+ <el-dialog title="BOM鏂板" :visible.sync="targetVisible" width="45%">
<el-form :model="targetForm" :inline="true" label-position="right"
:rules="targetRules" ref="targetForm" label-width="90px">
- <el-form-item label="宸ュ簭:" prop="pfather">
- <el-select v-model="targetForm.pfather"
- @change="changeFather"
- style="width:200px;" placeholder="璇烽�夋嫨宸ュ簭">
- <el-option :value="item.name" :label="item.name" v-for="(item,index) in targetFormList" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="宸ヨ壓鍚嶇О:" prop="technologyId">
- <el-select v-model="targetForm.technologyId"
- @change="changeTechnologyId"
- style="width:200px;" placeholder="璇烽�夋嫨宸ヨ壓鍚嶇О">
- <el-option :value="item.id" :label="item.name" v-for="(item,index) in technologyIdList" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="椤圭洰:" prop="father">
- <el-select v-model="targetForm.father"
- filterable allow-create default-first-option
- style="width:200px;" placeholder="璇疯緭鍏ユ垨閫夋嫨椤圭洰">
- <el-option :value="item.father" :label="item.father" v-for="(item,index) in projectList" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鎸囨爣鍚嶇О:" prop="name">
- <el-input style="width:200px;" v-model="targetForm.name" placeholder="璇疯緭鍏ユ寚鏍囧悕绉�"/>
- </el-form-item>
- <el-form-item label="鍗曚綅:" prop="unit">
- <el-input style="width:200px;" v-model="targetForm.unit" placeholder="璇疯緭鍏ュ崟浣�"/>
- </el-form-item>
- <el-form-item label="鍐呮帶鍊�:" prop="internal">
- <el-input style="width:200px;" v-model="targetForm.internal" placeholder="璇疯緭鍏ュ唴鎺у��"/>
- </el-form-item>
- <el-form-item label="鏍囧噯鍊�:" prop="required">
- <el-input style="width:200px;" v-model="targetForm.required" placeholder="璇疯緭鍏ユ爣鍑嗗��"/>
- </el-form-item>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="宸ュ簭:" prop="pfather">
+ <el-select v-model="targetForm.pfather"
+ @change="changeFather" size="small" placeholder="璇烽�夋嫨宸ュ簭">
+ <el-option :value="item.name" :label="item.name" v-for="(item,index) in targetFormList" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="宸ヨ壓鍚嶇О:" prop="technologyId">
+ <el-select v-model="targetForm.technologyId"
+ @change="changeTechnologyId" size="small" placeholder="璇烽�夋嫨宸ヨ壓鍚嶇О">
+ <el-option :value="item.id" :label="item.name" v-for="(item,index) in technologyIdList" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="椤圭洰:" prop="father">
+ <el-select v-model="targetForm.father"
+ filterable allow-create default-first-option
+ size="small" placeholder="璇疯緭鍏ユ垨閫夋嫨椤圭洰">
+ <el-option :value="item.father" :label="item.father" v-for="(item,index) in projectList" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鎸囨爣鍚嶇О:" prop="name">
+ <el-input size="small" v-model="targetForm.name" placeholder="璇疯緭鍏ユ寚鏍囧悕绉�"/>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="鍗曚綅:" prop="unit">
+ <el-input size="small" v-model="targetForm.unit" placeholder="璇疯緭鍏ュ崟浣�"/>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍐呮帶鍊�:" prop="internal">
+ <el-input size="small" v-model="targetForm.internal" placeholder="璇疯緭鍏ュ唴鎺у��"/>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="鏍囧噯鍊�:" prop="required">
+ <el-input size="small" v-model="targetForm.required" placeholder="璇疯緭鍏ユ爣鍑嗗��"/>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12"></el-col>
+ </el-row>
</el-form>
- <div style="width:100%;text-align: right;">
- <span slot="footer" class="dialog-footer" >
- <el-button type="primary" @click="confirmAdd('targetForm')">纭� 瀹�</el-button>
- <el-button @click="bomAddModelVisible = false">鍙� 娑�</el-button>
- </span>
- </div>
- </div>
+ <span slot="footer" class="dialog-footer" >
+ <el-button type="primary" @click="confirmAdd('targetForm')">纭� 瀹�</el-button>
+ <el-button @click="targetVisible = false">鍙� 娑�</el-button>
+ </span>
+ </el-dialog>
<!-- 鐗╂枡娓呭崟 -->
- <div v-if="typeselect == 2">
+ <el-dialog title="BOM鏂板" :visible.sync="materialVisible" width="45%">
<el-form :model="materialForm" label-position="right"
:rules="materialRules" ref="materialForm" label-width="90px">
<el-row :gutter="100">
<el-col :span="12">
<el-form-item label="宸ュ簭:" prop="mfather">
<el-select placeholder="璇烽�夋嫨宸ュ簭" @change="changeMName"
- style="width:100%;" v-model="materialForm.mfather">
+ style="width:100%;" v-model="materialForm.mfather" size="small">
<el-option v-for="(item,index) in materialFormList" :key="index"
:label="item.name" :value="item.name" ></el-option>
</el-select>
@@ -168,7 +195,7 @@
<el-col :span="12">
<el-form-item label="宸ヨ壓鍚嶇О:" prop="mtechnologyId">
<el-select placeholder="璇烽�夋嫨宸ヨ壓鍚嶇О" style="width:100%;"
- v-model="materialForm.mtechnologyId">
+ v-model="materialForm.mtechnologyId" size="small">
<el-option v-for="(item,index) in mIdList" :key="index"
:value="item.id" :label="item.name"></el-option>
</el-select>
@@ -180,13 +207,12 @@
<el-form-item label="鏉愭枡淇℃伅" style="font-weight: bold;"></el-form-item>
</el-col>
<el-col :span="12" style="text-align: right;">
- <el-button size="mini" @click="addRowByMaterial">娣诲姞琛�</el-button>
+ <el-button size="small" @click="addRowByMaterial">娣诲姞琛�</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-table :data="materialForm.tableList" border max-height="470"
- style="width:100%;text-align: left;margin: 0;padding: 0;"
:cell-style="{height:'20px',textAlign:'left'}"
:header-cell-style="{height:'20px'}">
<el-table-column label="渚涘簲鍟嗗悕绉�">
@@ -229,69 +255,78 @@
</el-col>
</el-row>
</el-form>
- <div style="width:100%;margin-top: 20px;margin-left:75%">
- <span slot="footer" class="dialog-footer" >
- <el-button type="primary" @click="confirmAdd('materialForm')">纭� 瀹�</el-button>
- <el-button @click="bomAddModelVisible = false">鍙� 娑�</el-button>
- </span>
- </div>
- </div>
+ <span slot="footer" class="dialog-footer" >
+ <el-button type="primary" @click="confirmAdd('materialForm')">纭� 瀹�</el-button>
+ <el-button @click="materialVisible = false">鍙� 娑�</el-button>
+ </span>
+ </el-dialog>
<!-- 鐢熶骇宸ヨ壓 -->
- <div v-if="typeselect == 3">
+ <el-dialog title="BOM鏂板" :visible.sync="productVisible" width="45%">
<el-form :model="productForm" :inline="true" label-position="right"
:rules="productRules" ref="productForm" label-width="90px">
- <el-form-item label="宸ュ簭:" prop="profather">
- <el-select v-model="productForm.profather"
- style="width:200px;" @change="changeProduct"
- placeholder="璇烽�夋嫨宸ュ簭">
- <el-option v-for="(item,index) in productFormList" :key="index"
- :value="item.name" :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="宸ヨ壓鍚嶇О:" prop="protechnologyId">
- <el-select placeholder="璇烽�夋嫨宸ヨ壓鍚嶇О"
- style="width:200px;" @change="getProductDeviceList"
- v-model="productForm.protechnologyId">
- <el-option v-for="(item,index) in proIdList" :key="index"
- :value="item.id" :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="璁惧:" prop="device">
- <el-select placeholder="璇烽�夋嫨璁惧"
- style="width:200px;"
- v-model="productForm.device">
- <el-option v-for="(item,index) in productDeviceList" :key="index"
- :value="item.device" :label="item.device"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="椤圭洰:" prop="productFather">
- <el-select placeholder="璇烽�夋嫨椤圭洰"
- style="width:200px;" @change="changeProductFather"
- v-model="productForm.productFather">
- <el-option v-for="(item,index) in productProjectList" :key="index"
- :value="item.name" :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鎸囨爣:" prop="product">
- <el-select placeholder="璇烽�夋嫨鎸囨爣"
- style="width:200px;" @change="changeProProduct"
- v-model="productForm.product">
- <el-option v-for="(item,index) in proProductList" :key="index"
- :value="item.name" :label="item.name"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鍗曚綅:" prop="unit">
- <el-input style="width:200px;" disabled v-model="productForm.unit"/>
- </el-form-item>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="宸ュ簭:" prop="profather">
+ <el-select v-model="productForm.profather"
+ @change="changeProduct" placeholder="璇烽�夋嫨宸ュ簭" size="small">
+ <el-option v-for="(item,index) in productFormList" :key="index"
+ :value="item.name" :label="item.name"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="宸ヨ壓鍚嶇О:" prop="protechnologyId">
+ <el-select placeholder="璇烽�夋嫨宸ヨ壓鍚嶇О" @change="getProductDeviceList"
+ v-model="productForm.protechnologyId" size="small">
+ <el-option v-for="(item,index) in proIdList" :key="index"
+ :value="item.id" :label="item.name"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="璁惧:" prop="device">
+ <el-select placeholder="璇烽�夋嫨璁惧" size="small"
+ v-model="productForm.device">
+ <el-option v-for="(item,index) in productDeviceList" :key="index"
+ :value="item.device" :label="item.device"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="椤圭洰:" prop="productFather">
+ <el-select placeholder="璇烽�夋嫨椤圭洰" size="small" @change="changeProductFather"
+ v-model="productForm.productFather">
+ <el-option v-for="(item,index) in productProjectList" :key="index"
+ :value="item.name" :label="item.name"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="鎸囨爣:" prop="product">
+ <el-select placeholder="璇烽�夋嫨鎸囨爣" size="small" @change="changeProProduct"
+ v-model="productForm.product">
+ <el-option v-for="(item,index) in proProductList" :key="index"
+ :value="item.name" :label="item.name"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍗曚綅:" prop="unit">
+ <el-input style="width:100%" size="small" disabled v-model="productForm.unit"/>
+ </el-form-item>
+ </el-col>
+ </el-row>
</el-form>
- <div style="width:100%;text-align: right;">
- <span slot="footer" class="dialog-footer" >
- <el-button type="primary" @click="confirmAdd('productForm')">纭� 瀹�</el-button>
- <el-button @click="bomAddModelVisible = false">鍙� 娑�</el-button>
- </span>
- </div>
- </div>
+ <span slot="footer" class="dialog-footer" >
+ <el-button type="primary" @click="confirmAdd('productForm')">纭� 瀹�</el-button>
+ <el-button @click="productVisible = false">鍙� 娑�</el-button>
+ </span>
</el-dialog>
+
<!-- 宸︿晶鐐瑰嚮+鎸夐挳 -->
<el-dialog title="BOM鏂板" :visible.sync="bomLeftAdd" width="29%">
<el-form ref="leftAdd" :model="leftAdd">
@@ -357,7 +392,6 @@
//瀛愮粍浠朵紶鐨刬d鍒楄〃
childIds:[],
//宸ュ簭鍒楄〃
- technologyIdList:[],
fatherList:[],
deviceList:[],
technologyForm:{
@@ -374,6 +408,7 @@
},
//鎶�鏈寚鏍�
targetFormList:[],
+ technologyIdList:[],
projectList:[],
targetForm:{
pfather:'',
@@ -437,7 +472,10 @@
searchName: "",// 鏌ヨ鏉′欢-鍚嶇О
checkTreeNode: {},// 鐐瑰嚮閫変腑鏍戣妭鐐�
tableData: [],
- bomAddModelVisible: false,// 鎺у埗bom鏂板妯℃�佹鏄惁鏄剧ず
+ technologyVisible: false,// 鎺у埗宸ヨ壓璺嚎鏂板妯℃�佹鏄惁鏄剧ず
+ targetVisible: false,// 鎺у埗鎶�鏈寚鏍囨柊澧炴ā鎬佹鏄惁鏄剧ず
+ materialVisible: false,// 鎺у埗鐗╂枡娓呭崟鏂板妯℃�佹鏄惁鏄剧ず
+ productVisible: false,// 鎺у埗鐢熶骇宸ヨ壓鏂板妯℃�佹鏄惁鏄剧ず
bomLeftAdd: false,
bomRightUp: false,
bomRightDl: false,
@@ -687,16 +725,27 @@
}).catch(error=>{
this.$message.error(error.message);
})
- this.bomAddModelVisible = false;
+ this.technologyVisible = false;
+ this.targetVisible = false;
+ this.materialVisible = false;
+ this.productVisible = false;
},
clearBomAddModel(){
if(this.typeselect == 0){
+ this.deviceList=[];
this.$refs["technologyForm"].resetFields();
}else if(this.typeselect == 1){
+ this.technologyIdList = [];
+ this.projectList = [];
this.$refs["targetForm"].resetFields();
}else if(this.typeselect == 2){
+ this.mIdList = [];
this.$refs["materialForm"].resetFields();
}else{
+ this.productDeviceList=[];
+ this.proIdList=[];
+ this.productProjectList=[];
+ this.proProductList=[];
this.$refs["productForm"].resetFields();
}
},
@@ -826,12 +875,20 @@
})
},
showBomAddModel(){
- this.getFatherList();
- this.getDeviceList();
- this.getTargetFormList();
- this.getMaterialFormList();
- this.getProductFormList();
- this.bomAddModelVisible = true
+ if(this.typeselect == 0){
+ this.getFatherList();
+ this.getDeviceList();
+ this.technologyVisible = true
+ }else if(this.typeselect == 1){
+ this.getTargetFormList();
+ this.targetVisible = true
+ }else if(this.typeselect == 2){
+ this.getMaterialFormList();
+ this.materialVisible = true
+ }else{
+ this.getProductFormList();
+ this.productVisible = true
+ }
},
startLeftAdd(){
@@ -906,9 +963,7 @@
},
handleNodeClick(val) {//鏍戠殑鍊�
if(val.code==='[5]'&&val.children===undefined){
- console.log(val);
this.returntree = val
- this.typeselect=0
this.selectVersion()
}
},
@@ -927,7 +982,9 @@
return this.verdata[0]
})
this.character=v
- this.version2="v"+v
+ if(this.character != undefined){
+ this.version2="v"+v
+ }
this.selectAll()
},
//鍙充晶鏁版嵁
@@ -942,12 +999,14 @@
let arr = res.data;
this.formatData(arr)
this.tableData = arr;
+ console.log("arr--",arr);
})
},
formatData(data){
let arr = data;
for(var i=0;i<arr.length;i++){
arr[i].rowId = Math.random();
+ arr[i].indents = 1;
if(arr[i].children != undefined){
this.formatData(arr[i].children);
}
@@ -1005,10 +1064,10 @@
},
filterNode(value, data) {
if (!value) return true;
- return data.label.indexOf(value) !== -1;
+ return data.name.indexOf(value) !== -1;
},
remove(node, data) {
- this.$confirm("鏄惁鍒犻櫎", "璀﹀憡", {
+ this.$confirm("鏄惁鍒犻櫎", "鎻愮ず", {
type: "warning"
}).then(res => {
const parent = node.parent;
@@ -1060,6 +1119,9 @@
}
},
watch:{
+ search(val) {
+ this.$refs.tree.filter(val);
+ },
leftAdd: {
handler(newVal, oldVal) {
if(this.isLeftAdd){
@@ -1100,37 +1162,42 @@
}
},
deep: true // 娣卞害鐩戝惉瀵硅薄鍐呴儴灞炴�х殑鍙樺寲锛屽彲閫夌殑
- },
- bomLeftAdd:{
- handler(newval,oldVal){
- if(newval){
- let treeOptions = JSON.parse(JSON.stringify(this.list));
- this.replaceProp(treeOptions)
- this.formTypeOptions=treeOptions
- this.restaurants=this.loadFatherType()
+ },
+ bomLeftAdd:{
+ handler(newval,oldVal){
+ if(newval){
+ let treeOptions = JSON.parse(JSON.stringify(this.list));
+ this.replaceProp(treeOptions)
+ this.formTypeOptions=treeOptions
+ this.restaurants=this.loadFatherType()
+ }
+ }
+ },
+ technologyVisible(newVal){
+ if(!newVal){
+ this.clearBomAddModel();
+ }
+ },
+ targetVisible(newVal){
+ if(!newVal){
+ this.clearBomAddModel();
+ }
+ },
+ materialVisible(newVal){
+ if(!newVal){
+ this.clearBomAddModel();
+ }
+ },
+ productVisible(newVal){
+ if(!newVal){
+ this.clearBomAddModel();
}
}
- },
- bomAddModelVisible(newVal){
- if(!newVal){
- this.clearBomAddModel();
- }
- }
}
}
</script>
-
<style scoped>
-
-.standard .bom-add-model{
- width: 100%;
-}
-
-.standard .bom-add-model form{
- width: 90%;
- margin-left: 5%;
-}
.standard .title .el-button {
height: 32px;
@@ -1139,6 +1206,11 @@
padding: 0 12px;
}
+.standard .right .contentTable{
+ width:98%;
+ margin-left:1%;
+}
+
.standard .title {
margin-bottom: 10px;
padding: 0 20px;
diff --git a/src/components/view/technology.vue b/src/components/view/technology.vue
index 51225fc..93e60ed 100644
--- a/src/components/view/technology.vue
+++ b/src/components/view/technology.vue
@@ -361,6 +361,7 @@
v-model="form.father"
allow-create
filterable
+ @create=""
placeholder="璇烽�夋嫨"
style="width: 480px"
>
@@ -518,9 +519,9 @@
elementId: "",
deviceGroup: "",
},
- search: {
- type: "",
- },
+ // search: {
+ // type: "",
+ // },
delete: [],
treetrunk: [],
process: [],
--
Gitblit v1.9.3