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