From 27dd70096d181051200ec5febf11c99d1940f835 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 13 九月 2023 16:52:18 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.22:9001/r/mom-before
---
src/components/view/standard.vue | 92 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 78 insertions(+), 14 deletions(-)
diff --git a/src/components/view/standard.vue b/src/components/view/standard.vue
index 2018424..2a3269a 100644
--- a/src/components/view/standard.vue
+++ b/src/components/view/standard.vue
@@ -5,9 +5,9 @@
<el-col :span="12" style="line-height: 32px;">鏍囧噯BOM</el-col>
<el-col :span="12" style="text-align: right;">
<el-button type="primary" icon="el-icon-plus" style="background: #004EA2;"
- @click="bomAddModelVisible = true">鏂板</el-button>
- <el-button icon="el-icon-plus">鏂板鐗堟湰</el-button>
- <el-button @click="bomRightDl=true" icon="el-icon-delete">鍒犻櫎</el-button>
+ @click="showBomAddModel">鏂板</el-button>
+ <el-button icon="el-icon-plus" @click="addVersionBtn">鏂板鐗堟湰</el-button>
+ <el-button @click="deleteDataBtn" icon="el-icon-delete">鍒犻櫎</el-button>
</el-col>
</el-row>
</div>
@@ -56,16 +56,17 @@
</div>
<div class="contentTable" v-if="this.typeselect == 0">
- <technology :tableType="tableType" :tableData="tableData"></technology>
+ <technology @childData="getChildData" :tableType="tableType" :tableData="tableData"></technology>
</div>
<div v-if="this.typeselect == 1">
- <target :tableType="tableType" :tableData="tableData"></target>
+ <target @childData="getChildData" :tableType="tableType" :tableData="tableData"></target>
</div>
<div v-if="this.typeselect == 2">
- <bom :tableType="tableType" :tableData="tableData"></bom>
+ <material @childData="getChildData" :tableType="tableType" :tableData="tableData"></material>
</div>
- <div v-if="this.typeselect == 3">鐢熶骇宸ヨ壓</div>
-
+ <div v-if="this.typeselect == 3">
+ <product @childData="getChildData" :tableType="tableType" :tableData="tableData"></product>
+ </div>
</div>
</div>
@@ -332,10 +333,11 @@
<script>
import technology from "./standard-table/technology.vue"
import material from "./standard-table/material.vue"
-// import bom from "./standard-table/bom.vue"
+import target from "./standard-table/target.vue"
+import product from "./standard-table/product.vue"
import bomClickAdd from '@/components/view/standard-box/bomClickAdd'
export default {
- components: { technology,material,bomClickAdd },
+ components: { technology,material,target,product,bomClickAdd },
data() {
var checkPq = (rule,value,callback)=>{
@@ -352,6 +354,8 @@
callback();
};
return {
+ //瀛愮粍浠朵紶鐨刬d鍒楄〃
+ childIds:[],
//宸ュ簭鍒楄〃
technologyIdList:[],
fatherList:[],
@@ -429,7 +433,7 @@
// BOM鏍戞暟鎹粨鏋�
list: [],
search: null,
- tableType: 1, // 琛ㄦ牸绫诲瀷 1锛氭妧鏈寚鏍囷紝0锛氬伐鑹鸿矾绾�
+ tableType: 0, // 琛ㄦ牸绫诲瀷 1锛氭妧鏈寚鏍囷紝0锛氬伐鑹鸿矾绾�
searchName: "",// 鏌ヨ鏉′欢-鍚嶇О
checkTreeNode: {},// 鐐瑰嚮閫変腑鏍戣妭鐐�
tableData: [],
@@ -439,9 +443,7 @@
bomRightDl: false,
formTypeOptions: null,
typeselect: 0,
- returntree: {
- id:28,
- },
+ returntree: {id:28},
version: {},
leftAdd:{
type: [],
@@ -574,6 +576,68 @@
leftAddBom(){
},
+ //鑾峰彇瀛愮粍浠舵暟鎹�
+ getChildData(data){
+ this.childIds = data;
+ },
+ //鍒犻櫎鎸夐挳
+ deleteDataBtn(){
+ let ids;
+ let url;
+ ids = this.childIds.filter(item=>{
+ return item != undefined;
+ });
+ if(ids.length < 1){
+ this.$message.error("璇峰厛閫夋嫨鏁版嵁锛�");
+ return;
+ }
+ switch(this.typeselect){
+ case 0:
+ url = this.$api.url.delAllByTechnology;
+ break;
+ case 1:
+ url = this.$api.url.delAllByTarget;
+ break;
+ case 2:
+ url = this.$api.url.delAllByMBom;
+ break;
+ case 3:
+ url = this.$api.url.delAllByProduct;
+ break;
+ }
+ this.$confirm('纭鍒犻櫎宸查�変腑鐨勬暟鎹悧', '鍒犻櫎', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ this.$axios.post(url,{
+ ids : ids.join(",")
+ }).then(res=>{
+ this.selectAll();
+ this.$message.success(res.message);
+ }).catch(error=>{
+ this.$message.error(error.message);
+ })
+ }).catch(() => {});
+ },
+ //鏂板鐗堟湰
+ addVersionBtn(){
+ this.$confirm('纭鏂板鐗堟湰鍚�', '鏂板鐗堟湰', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'info'
+ }).then(() => {
+ this.$axios.post(this.$api.url.addVersion,{
+ specificationsId : this.returntree.id,
+ version : this.version2.substring(1,2),
+ }).then(res=>{
+ this.selectVersion();
+ this.$message.success(res.message);
+ }).catch(error=>{
+ this.$message.error(error.message);
+ })
+ }).catch(() => {});
+ },
//鍙充晶bom,纭鏂板
confirmAdd(formName){
this.$refs[formName].validate(valid=>{
--
Gitblit v1.9.3