| | |
| | | <template> |
| | | <div class="page-view"> |
| | | <el-form ref="form" :model="tableList" :show-message="false" label-position="right" |
| | | > |
| | | <el-table :data="tableList.tableData" style="width: 100%" |
| | | <el-form ref="form" :model="tableList" :show-message="false" label-position="right"> |
| | | <el-table |
| | | :data="tableList.tableData" |
| | | style="width: 100%" |
| | | :show-summary="showSummary.show" |
| | | :summary-method="getSummaries" |
| | | :span-method="arraySpanMethod"> |
| | | <el-table-column type="index" v-if="tableList.tableColumn.length>0" label="编号" width="50" align="center"></el-table-column> |
| | | :span-method="arraySpanMethod" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | v-if="tableList.tableColumn.length > 0" |
| | | label="编号" |
| | | width="50" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | |
| | | v-model="scope.row[item.prop]" |
| | | :fetch-suggestions="querySearchAsync" |
| | | value-key="name" |
| | | style='width:calc(100% - 70px)' |
| | | style="width: calc(100% - 70px)" |
| | | size="mini" |
| | | @select=" |
| | | (val) => { |
| | |
| | | }, |
| | | sign:{ |
| | | type:String, |
| | | default:'' |
| | | default: "" |
| | | }, |
| | | productTableList: { |
| | | type: Object, |
| | |
| | | recalculateShow: { |
| | | type: [Boolean], |
| | | defalut: true |
| | | }, |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | methods: { |
| | | // 产品名称 |
| | | async getProductList() { |
| | | let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc; |
| | | let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc |
| | | await fn({ |
| | | page: 1, |
| | | pageSize: 100 |
| | |
| | | } |
| | | if (column.property === "total") { |
| | | this.total = sums[index] |
| | | this.$emit('getSummaries',this.total) |
| | | this.$emit("getSummaries", this.total) |
| | | } |
| | | }) |
| | | return sums |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | console.log(this.tableList.tableData,'=====chanp') |
| | | console.log(this.tableList.tableData, "=====chanp") |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | |
| | | }, |
| | | deleteClient(row,scope){ |
| | | if(this.tableList.tableData.length==1){ |
| | | this.$message.error('至少保留一条,不能刪除了!') |
| | | return true; |
| | | this.$message.error("至少保留一条,不能刪除了!") |
| | | return true |
| | | } |
| | | this.tableList.tableData.splice(scope.$index,1) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |