可编辑表格的组件增加是否可配置表头的功能+增加如果配置了才可以配置表头,默认不可配的逻辑调整
| | |
| | | </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> |
| | |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // 是否可以配置列表 表头 |
| | | colOpenShow: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | tableList: { |
| | | type: Object, |
| | | default: () => { |
| | |
| | | :detail-enter="isView ? true : false" |
| | | :selectBox="false" |
| | | :addTypeIdMultiple="true" |
| | | :colOpenShow="true" |
| | | :show-summary="showSummary" |
| | | pageName="quotation" |
| | | :isOperate=" |
| | |
| | | </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" |
| | |
| | | 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%", |
| | |
| | | shipmentsMsg:"", |
| | | dissatisfy:false, // 一次发货-不足 |
| | | completely:false, // 多次发货,充足 |
| | | isCommonShow:true, |
| | | } |
| | | }, |
| | | mounted(){ |
| | |
| | | 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) |
| | | } |
| | |
| | | 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 |
| | |
| | | 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 |