| | |
| | | :summary-method="getSummaries" |
| | | :span-method="arraySpanMethod" |
| | | style="width: 100%" |
| | | :header-cell-style="{ background: '#f1f3f8', color: '#000009', 'font-size': '14px', 'font-family': 'PingFangSC' }" |
| | | @selection-change="handleSelectionChange" |
| | | :row-key="(row) => row.productId" |
| | | > |
| | |
| | | </el-table-column> |
| | | <el-table-column v-if="tableList.isReturn" type="index" label="#" width="50" align="center"></el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | | :prop="item.prop" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | :min-width="item.min" |
| | | show-overflow-tooltip |
| | | :sortable="item.sortable" |
| | | v-if="item.isShowColumn" |
| | | align="center" |
| | | > |
| | | > |
| | | <!-- 表头样式 --> |
| | | <template slot="header"> |
| | | <span v-if="item.isRequird" style="color: #f56c6c">*</span> |
| | |
| | | <span v-else style="text-align: right">{{ scope.row[item.prop] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="40" v-if="!detailEnter" align="center"> |
| | | <el-table-column label="操作" width="70" v-if="!detailEnter" align="center" fixed='right'> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" :disabled="!isOperate" @click="deleteClick(scope)">删除</el-button> |
| | | </template> |
| | |
| | | productIndex: 0, |
| | | isRecalculate: true, |
| | | iscolopen: false, |
| | | showcol: [] |
| | | showcol: [], |
| | | mergeNumber:1 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | "productTableList.showcol": { |
| | | handler(newVal) { |
| | | this.showcol = newVal |
| | | this.getMergeNumber() |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | getMergeNumber(){ |
| | | let pattern=new RegExp("[0-9]+"); |
| | | if(pattern.test(this.showSummary.mergeNumber)){ |
| | | this.mergeNumber=this.showSummary.mergeNumber |
| | | }else{ |
| | | for(let i in this.showcol){ |
| | | if(this.showcol[i]==this.showSummary.mergeNumber){ |
| | | this.mergeNumber=Number(i)+1; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | checkCol() { |
| | | this.iscolopen = !this.iscolopen |
| | | }, |
| | | selectCheckBoxList(val) { |
| | | this.getMergeNumber() |
| | | this.$emit("selTableCol", val) |
| | | }, |
| | | getTableInfo(){ |
| | |
| | | if (this.$refs.table) { |
| | | var current = this.$refs.table.querySelector(".el-table__footer-wrapper").querySelector(".el-table__footer") |
| | | var cell = current.rows[0].cells |
| | | for (let i = 0; i < this.showSummary.mergeNumber; i++) { |
| | | for (let i = 0; i < this.mergeNumber; i++) { |
| | | cell[i].style.display = "none" |
| | | } |
| | | cell[this.showSummary.mergeNumber].classList.remove("is-left") |
| | | cell[this.showSummary.mergeNumber].colSpan = this.showSummary.mergeNumber.toString() |
| | | cell[this.mergeNumber].classList.remove("is-left") |
| | | cell[this.mergeNumber].colSpan = this.mergeNumber.toString() |
| | | } |
| | | }) |
| | | } |
| | |
| | | const sums = [] |
| | | columns.forEach((column, index) => { |
| | | // // 更改行名称 |
| | | if (index === this.showSummary.mergeNumber) { |
| | | if (index === this.mergeNumber) { |
| | | sums[index] = "小计:" |
| | | return |
| | | } |
| | |
| | | .el-table th.el-table__cell > .cell { |
| | | padding: 0 5px; |
| | | } |
| | | .el-table__fixed-footer-wrapper tbody td.el-table__cell{ |
| | | background:#fff; |
| | | } |
| | | .el-input__inner { |
| | | // text-align: left; |
| | | text-align: center !important; |
| | |
| | | .styleBtn { |
| | | position: absolute; |
| | | width: 30px; |
| | | height: 36px; |
| | | height: 48px; |
| | | // line-height: 26px; |
| | | // background: #06c062; |
| | | top: 0; |
| | |
| | | z-index: 11; |
| | | .label { |
| | | position: absolute; |
| | | top: 6px; |
| | | top: 11px; |
| | | font-size: 20px; |
| | | // line-height: 5px; |
| | | cursor: pointer; |
| | |
| | | } |
| | | .checkbox-group { |
| | | width: 160px; |
| | | height: 300px; |
| | | height: 180px; |
| | | overflow: auto; |
| | | display: flex; |
| | | flex-direction: column; |