From eb23acbbf44dda50cab638e2bdd5e67d39434355 Mon Sep 17 00:00:00 2001 From: guoyuji <guoyujie@ng.com> Date: 星期二, 27 二月 2024 16:59:43 +0800 Subject: [PATCH] 创建页面删除功能 --- north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue index 9ba0119..47d0e62 100644 --- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue +++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue @@ -56,6 +56,7 @@ }) let filterData = ref({}) let rowIndex = ref(null) +let rowClickIndex = ref(null) const gridOptions = reactive({ border: "full",//琛ㄦ牸鍔犺竟妗� @@ -74,7 +75,8 @@ body: { options: [ [ - { code: 'addRow', name: '娣诲姞', prefixIcon: 'vxe-icon-square-plus', visible: true, disabled: false } + { code: 'addRow', name: '娣诲姞', prefixIcon: 'vxe-icon-square-plus', visible: true, disabled: false }, + { code: 'deleteRow', name: '鍒犻櫎', prefixIcon: 'vxe-icon-delete', visible: true, disabled: true } ] ] } @@ -287,7 +289,13 @@ return } $grid.insert({}) - //console.log($grid.getRecordset().insertRecords) + break + } + case 'deleteRow':{ + + $grid.remove(rowClickIndex.value) + rowClickIndex.value = null + gridOptions.menuConfig.body.options[0][1].disabled=true break } } @@ -297,8 +305,11 @@ const { row } = params productVisible.value = true rowIndex=row - //console.log(row) - //alert("鎴戞墦寮�浜嗕骇鍝佺晫闈�") + }, + cellClick({ row }){ + rowClickIndex.value = row + //鍙抽敭鑿滃崟鍒犻櫎鍚敤 + gridOptions.menuConfig.body.options[0][1].disabled=false } } //鑾峰彇瀛愰〉闈骇鍝佹柟娉� -- Gitblit v1.8.0