From 22bc38441821f4528ad471f5c11b833c662879e7 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Thu, 14 Nov 2024 10:20:11 +0800 Subject: [PATCH] =?UTF-8?q?11/14=20=E7=95=8C=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../companyDrug/basicCompanyDrugProducts.vue | 17 +++++++++++- .../basicCompanyProductsImport.vue | 26 ++++++++++++++----- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/views/supplier/companyDrug/basicCompanyDrugProducts.vue b/src/views/supplier/companyDrug/basicCompanyDrugProducts.vue index 9106296..b75a7ca 100644 --- a/src/views/supplier/companyDrug/basicCompanyDrugProducts.vue +++ b/src/views/supplier/companyDrug/basicCompanyDrugProducts.vue @@ -477,6 +477,7 @@ @@ -605,6 +606,8 @@ export default { uploadFileUrl: null, checked: false, list: [], + allProduct:[], + nameCodes:[], detailList: [], sysList: [], filterList: [], @@ -1212,7 +1215,19 @@ export default { }); }, selectProduct() { - this.selectProductVisible = true; + this.filterQuery.limit = 10000 + this.filterQuery.customerId = store.getters.customerId; + filterCompanyProductRelevance(this.filterQuery) + .then((response) => { + this.allProduct = response.data.list ; + if (this.allProduct.length > 0){ + this.nameCodes = this.allProduct.map(item => item.nameCode) + } + this.selectProductVisible = true; + }) + + // this.nameCodes = this.allList.map(item => item.nameCode) + }, closeAddDialog(val) { if (val) { diff --git a/src/views/supplier/companyDrug/basicCompanyProductsImport.vue b/src/views/supplier/companyDrug/basicCompanyProductsImport.vue index bea51d6..3515955 100644 --- a/src/views/supplier/companyDrug/basicCompanyProductsImport.vue +++ b/src/views/supplier/companyDrug/basicCompanyProductsImport.vue @@ -75,7 +75,7 @@ :header-cell-class-name="cellClass" @current-change="handleSelectionChange"> @@ -398,8 +398,6 @@ > - - @@ -791,6 +789,10 @@ export default { type: Function, required: true, }, + nameCodes: { + type: Array, + required: true, + } }, data() { return { @@ -810,6 +812,7 @@ export default { productsType: 2, bzgg:"", prepnSpec:"", + filterNameCodes:[] }, @@ -981,8 +984,8 @@ export default { getSmUdiInfos(this.filterQuery) .then((response) => { this.loading = false; - this.list = response.data.list || []; - this.total = response.data.total || 0; + this.list = response.data.list || []; + this.total = response.data.total || 0; }) .catch(() => { this.loading = false; @@ -990,7 +993,6 @@ export default { this.total = 0; }); }, - getDetailList(detailQuery) { this.loading = true; filterByUuid(detailQuery) @@ -1118,7 +1120,12 @@ export default { }); }, handleSelectionChange(selection) { - this.radioCheck = selection.nameCode; + if (this.nameCodes.includes(selection.nameCode)){ + return + }else{ + this.radioCheck = selection.nameCode; + } + this.curSelectDi = selection; if (selection.length > 1) { this.$refs.diList.clearSelection(); @@ -1150,6 +1157,11 @@ export default { // } }, + isDisabled(nameCode){ + if (this.nameCodes.length > 0){ + return this.nameCodes.includes(nameCode); + } + }, handleErpChange(val) { this.currentRow = val; },