From 55ebe463fcebc61b48f94cac30dc98a49354bc06 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Wed, 5 Mar 2025 15:37:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E5=93=81=E5=A4=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/ecss/partHsCode.vue | 43 ++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/views/modules/ecss/partHsCode.vue b/src/views/modules/ecss/partHsCode.vue index bba3148..e50795a 100644 --- a/src/views/modules/ecss/partHsCode.vue +++ b/src/views/modules/ecss/partHsCode.vue @@ -59,8 +59,11 @@ @@ -99,6 +102,14 @@ :total="totalPage" layout="total, sizes, prev, pager, next, jumper"> + + + + + + + + @@ -140,12 +151,15 @@ }from "@/api/ecss/ecss.js" import {} from "@/api/sysLanguage.js" import {getAllBuList}from '@/api/factory/site.js' + import orderAttribute from "./orderProperties" export default { name: "null", components:{ + orderAttribute, }, data() { return { + activeName:'attribute', // 导出 exportData: [], exportName: '物料HsCode' + this.dayjs().format('YYYYMMDDHHmmss'), @@ -526,11 +540,18 @@ hsCode:'', hsCodeDesc:'', }, + currentRow:{ + site:'', + partNo:'', + buNo:'', + recordType:'', + + } } }, mounted() { this.$nextTick(() => { - this.height = window.innerHeight - 240; + this.height = (window.innerHeight - 240)/2; }) }, methods: { @@ -545,6 +566,10 @@ this.pageIndex = val this.searchTable() }, + tabClick (tab, event) { + // 刷新列表数据 + this.refreshCurrentTabTable() + }, searchTable(){ this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex @@ -555,11 +580,23 @@ this.pageIndex = data.page.currPage this.pageSize = data.page.pageSize this.totalPage = data.page.totalCount + if(this.dataList.length>0){ + this.$refs.mainTable.setCurrentRow(this.dataList[0]); + this.changeData(this.dataList[0]) + }else { + this.changeData(null) + } } else { this.dataList = []; } }); }, + refreshCurrentTabTable(){ + if(this.currentRow===''||this.currentRow===null){ + this.currentRow={site:'',partNo:'',buNo:'',recordType:''} + } + + }, async createExportData () { this.searchData.limit = -1 this.searchData.page = 1 @@ -600,6 +637,10 @@ this.hsCodeModelData=JSON.parse(JSON.stringify(row)) this.hsCodeModelFlag=true }, + changeData(row){ + this.currentRow = JSON.parse(JSON.stringify(row)); + this.refreshCurrentTabTable (); + }, saveHSCode(){ if(this.hsCodeModelData.hsCode===''||this.hsCodeModelData.hsCode==null){ this.$alert('请输入HSCODE!', '错误', {