From 7cb8953728193293a35af6ce140009c3908779ad Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 28 三月 2024 11:41:40 +0800
Subject: [PATCH] 可编辑表格的组件增加是否可配置表头的功能+增加如果配置了才可以配置表头,默认不可配的逻辑调整
---
src/components/makepager/TableCommonView.vue | 9 +++-
src/views/sales/salesDetails/AddSalesDetailsDialog.vue | 1
src/views/sales/salesDetails/shipmentsDialog.vue | 66 ++++++++++++++++++---------------
3 files changed, 44 insertions(+), 32 deletions(-)
diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index 4274752..71a800f 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -151,8 +151,8 @@
</el-table>
<div class="overSpread1" v-show="iscolopen" @click="onMaskClick"></div>
- <div class="styleBtn">
- <i @click="checkCol()" class="label">...</i>
+ <div class="styleBtn" >
+ <i @click="checkCol()" v-if='colOpenShow' class="label">...</i>
<el-checkbox-group v-model="showcol" v-show="iscolopen" class="checkbox-group" @change="selectCheckBoxList">
<el-checkbox v-for="item in tableList.allcol" :label="item" :key="item">{{ item }} </el-checkbox>
</el-checkbox-group>
@@ -168,6 +168,11 @@
type: Boolean,
default: false
},
+ // 鏄惁鍙互閰嶇疆鍒楄〃 琛ㄥご
+ colOpenShow: {
+ type: Boolean,
+ default: true,
+ },
tableList: {
type: Object,
default: () => {
diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
index 72ed3b9..864002c 100644
--- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
+++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -427,6 +427,7 @@
:detail-enter="isView ? true : false"
:selectBox="false"
:addTypeIdMultiple="true"
+ :colOpenShow="true"
:show-summary="showSummary"
pageName="quotation"
:isOperate="
diff --git a/src/views/sales/salesDetails/shipmentsDialog.vue b/src/views/sales/salesDetails/shipmentsDialog.vue
index 62ee623..9b47eff 100644
--- a/src/views/sales/salesDetails/shipmentsDialog.vue
+++ b/src/views/sales/salesDetails/shipmentsDialog.vue
@@ -62,11 +62,12 @@
</el-col> -->
</el-row>
</div>
- <div class="product-view">
+ <div class="product-view" v-if="isCommonShow">
<CommonFormTableView
ref="commonFormTableView"
:detail-enter="isView ? true : false"
:selectBox="false"
+ :colOpenShow="true"
:addTypeIdMultiple="true"
pageName="quotation"
:isBorder="true"
@@ -128,14 +129,14 @@
data() {
// 浜у搧淇℃伅
const productColumn = [
- { label: "浜у搧缂栧彿", prop: "number", isShowColumn:true, },
- { label: "浜у搧鍚嶇О", prop: "name",isShowColumn:true, min: 110 },
- { label: "璁㈠崟鏁伴噺", prop: "orderAmount",min:110, isShowColumn:true,},
- { label: "璁㈠崟瀹屾垚鏁伴噺", min:120,prop: "finishAmount",isShowColumn:true, },
- { label: "鍙敤搴撳瓨", prop: "availableAmount",isShowColumn:true, },
- { label: "鏈彂璐ф暟閲�", prop: "leftAmount", min:120,isShowColumn:true, },
- { label: "鏈鍙戣揣鏁伴噺", prop: "outputAmount", min:120,inputFloat: true,isRequird:true,isShowColumn:true,},
- { label: "鍓╀綑鍙戣揣鏁伴噺", prop: "availableAmount",min:120,isShowColumn:true,},
+ { label: "浜у搧缂栧彿", prop: "number",},
+ { label: "浜у搧鍚嶇О", prop: "name", min: 110 },
+ { label: "璁㈠崟鏁伴噺", prop: "orderAmount",min:110,},
+ { label: "璁㈠崟瀹屾垚鏁伴噺", min:120,prop: "finishAmount",},
+ { label: "鍙敤搴撳瓨", prop: "availableAmount",},
+ { label: "鏈彂璐ф暟閲�", prop: "leftAmount", min:120, },
+ { label: "鏈鍙戣揣鏁伴噺", prop: "outputAmount", min:120,inputFloat: true,isRequird:true,},
+ { label: "鍓╀綑鍙戣揣鏁伴噺", prop: "availableAmount",min:120,},
]
return {
dialogWidth: "60%",
@@ -222,6 +223,7 @@
shipmentsMsg:"",
dissatisfy:false, // 涓�娆″彂璐�-涓嶈冻
completely:false, // 澶氭鍙戣揣锛屽厖瓒�
+ isCommonShow:true,
}
},
mounted(){
@@ -468,19 +470,19 @@
this.getQuotation(this.editConfig.infomation.saleChanceId, "鍏ㄩ儴浜у搧")
}
this.tableColumn=[
- { label: "浜у搧缂栧彿", prop: "number", isShowColumn:true, },
- { label: "浜у搧鍚嶇О", prop: "name",isShowColumn:true, min: 110 },
- { label: "璁㈠崟鏁伴噺", prop: "orderAmount", isShowColumn:true,},
- { label: "璁㈠崟瀹屾垚鏁伴噺", min:120, prop: "finishAmount",isShowColumn:true, }
+ { label: "浜у搧缂栧彿", prop: "number", },
+ { label: "浜у搧鍚嶇О", prop: "name", min: 110 },
+ { label: "璁㈠崟鏁伴噺", prop: "orderAmount",},
+ { label: "璁㈠崟瀹屾垚鏁伴噺", min:120, prop: "finishAmount", }
]
this.productTableList = {
tableData: this.tableData,
isReturn: true,
// tableColumn: [
- // { label: "浜у搧缂栧彿", prop: "number", isShowColumn:true, },
- // { label: "浜у搧鍚嶇О", prop: "name",isShowColumn:true, min: 110 },
- // { label: "璁㈠崟鏁伴噺", prop: "orderAmount", isShowColumn:true,},
- // { label: "璁㈠崟瀹屾垚鏁伴噺", prop: "finishAmount",isShowColumn:true, }
+ // { label: "浜у搧缂栧彿", prop: "number",},
+ // { label: "浜у搧鍚嶇О", prop: "name",min: 110 },
+ // { label: "璁㈠崟鏁伴噺", prop: "orderAmount",},
+ // { label: "璁㈠崟瀹屾垚鏁伴噺", prop: "finishAmount",}
// ],
tableColumn: this.setColumnVisible(this.productTableList.showcol, this.tableColumn)
}
@@ -584,15 +586,19 @@
this.shipmentsList=[]
this.dissatisfy=false
this.completely=false
+ this.isCommonShow=false;
+ this.$nextTick(()=>{
+ this.isCommonShow=true;
+ })
if(value==1){
this.productTableList.showcol= ['浜у搧缂栧彿','浜у搧鍚嶇О', "璁㈠崟鏁伴噺", "璁㈠崟瀹屾垚鏁伴噺","鍙敤搴撳瓨"]
this.productTableList.allcol= ["璁㈠崟鏁伴噺", "璁㈠崟瀹屾垚鏁伴噺","鍙敤搴撳瓨"]
this.tableColumn=[
- { label: "浜у搧缂栧彿", prop: "number",isShowColumn:true, },
- { label: "浜у搧鍚嶇О", prop: "name",isShowColumn:true, min: 110 },
- { label: "璁㈠崟鏁伴噺", prop: "orderAmount",isShowColumn:true, },
- { label: "璁㈠崟瀹屾垚鏁伴噺", min:120, prop: "finishAmount",isShowColumn:true, },
- { label: "鍙敤搴撳瓨", prop: "availableAmount",isShowColumn:true, },
+ { label: "浜у搧缂栧彿", prop: "number", },
+ { label: "浜у搧鍚嶇О", prop: "name",min: 110 },
+ { label: "璁㈠崟鏁伴噺", prop: "orderAmount",},
+ { label: "璁㈠崟瀹屾垚鏁伴噺", min:120, prop: "finishAmount", },
+ { label: "鍙敤搴撳瓨", prop: "availableAmount",},
]
this.productTableList.tableColumn=this.setColumnVisible(this.productTableList.showcol, this.tableColumn)
this.dissatisfy=false
@@ -642,14 +648,14 @@
this.productTableList.showcol= ['浜у搧缂栧彿','浜у搧鍚嶇О', "璁㈠崟鏁伴噺", "璁㈠崟瀹屾垚鏁伴噺","鍙敤搴撳瓨","鏈彂璐ф暟閲�", "鏈鍙戣揣鏁伴噺","鍓╀綑鍙戣揣鏁伴噺",]
this.productTableList.allcol= [ "璁㈠崟鏁伴噺", "璁㈠崟瀹屾垚鏁伴噺","鍙敤搴撳瓨","鏈彂璐ф暟閲�", "鍓╀綑鍙戣揣鏁伴噺",]
this.tableColumn= [
- { label: "浜у搧缂栧彿", prop: "number",isShowColumn:true, },
- { label: "浜у搧鍚嶇О", prop: "name", min: 110 ,isShowColumn:true,},
- { label: "璁㈠崟鏁伴噺", prop: "orderAmount",isShowColumn:true, },
- { label: "璁㈠崟瀹屾垚鏁伴噺", min:120, prop: "finishAmount" ,isShowColumn:true,},
- { label: "鍙敤搴撳瓨", prop: "availableAmount",isShowColumn:true, },
- { label: "鏈彂璐ф暟閲�", prop: "leftAmount", min:120, isShowColumn:true, },
- { label: "鏈鍙戣揣鏁伴噺", prop: "outputAmount", min:120,inputFloat: true,isRequird:true,isShowColumn:true,},
- { label: "鍓╀綑鍙戣揣鏁伴噺", prop: "availableAmount", min:120,isShowColumn:true,},
+ { label: "浜у搧缂栧彿", prop: "number", },
+ { label: "浜у搧鍚嶇О", prop: "name", min: 110 ,},
+ { label: "璁㈠崟鏁伴噺", prop: "orderAmount", },
+ { label: "璁㈠崟瀹屾垚鏁伴噺", min:120, prop: "finishAmount" ,},
+ { label: "鍙敤搴撳瓨", prop: "availableAmount",},
+ { label: "鏈彂璐ф暟閲�", prop: "leftAmount", min:120, },
+ { label: "鏈鍙戣揣鏁伴噺", prop: "outputAmount", min:120,inputFloat: true,isRequird:true,},
+ { label: "鍓╀綑鍙戣揣鏁伴噺", prop: "availableAmount", min:120,},
]
this.productTableList.tableColumn=this.setColumnVisible(this.productTableList.showcol, this.tableColumn)
let portion=0
--
Gitblit v1.8.0