| | |
| | | this.buttons.forEach(x => {//nameæ¹ä¸ºè¦éèçæé®åå |
| | | if (x.name == 'ç¼ è¾') { |
| | | x.name = 'è° æ¨'; |
| | | x.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("åªè½éæ©ä¸æ¡æ°æ®") |
| | | let row = rows[0]; |
| | | this.edit(row) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | this.editFormFields.stockQuantity = 1; |
| | | // this.editFormFields.availableQuantity = 1; |
| | | this.editFormOptions.forEach((editForm) => { |
| | | editForm.forEach((x) => { |
| | | if (x.field == "stockQuantity") { |
| | | |
| | | if (x.field == "availableQuantity") { |
| | | |
| | | } else { |
| | | x.readonly = true |
| | | } |