From 35e5ffb5179166dadb0a1372f853188d46c3a139 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 11 Feb 2025 16:33:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E7=BB=99=E5=93=81=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../labelManage/supplyLabel/index.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue b/src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue index dd38328f1..adb432a8a 100644 --- a/src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue +++ b/src/views/wms/basicDataManage/labelManage/supplyLabel/index.vue @@ -17,7 +17,7 @@ ([]) // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn({hasPermi:'wms:supplyLabel:create'}), // 新增 defaultButtons.defaultImportBtn({hasPermi:'wms:supplyLabel:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:supplyLabel:export'}), // 导出 - defaultButtons.mainLisSelectiontPointBtn(null), // 批量标签打印 + defaultButtons.mainLisSelectiontPointBtn({ + disabled:computed(()=>chooseSelectionRows.value.length == 0) + }), // 批量标签打印 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -227,8 +230,13 @@ const openForm = async(type: string, row?: any) => { const data = await LocationApi.getLocationPage(param) let locationCode = data.list[0].code; console.log('row',row); - // row.locationCode = locationCode; basicFormRef.value.open(type, row) + if (type == 'create') { + nextTick(()=>{ + basicFormRef.value.formRef.formModel.locationCode=locationCode + }) + } + } // form表单提交 @@ -366,11 +374,13 @@ const handleSelectionPoint = async ()=>{ // }) } -const selectionRows = ref([]) const tableRef = ref() +const chooseSelectionRows = ref([]) const getSelectionRows = (currentPage,currentPageSelectionRows) => { console.log("getSelectionRows",currentPage,currentPageSelectionRows) + console.log(selectionRows.value) + chooseSelectionRows.value =currentPageSelectionRows const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage) if(currentRows){ currentRows.selectionRows = currentPageSelectionRows