Parcourir la source

采购供应商报价选定-增加未报价供应商提示

jingbb il y a 2 mois
Parent
commit
a5ff26d36f

+ 10 - 2
src/views/purchase/selectionQuotationForm/components/SelectQuotationFormForm.vue

@@ -92,7 +92,7 @@
           asyncRemove
           >
           <template #selectionSupplier="props">
-            <a-select v-model:value="props.row.selectionSupplier" style="width: 100%;" @change="selectSupplier(props.row,props.rowIndex)" allowClear>
+            <a-select v-model:value="props.row.selectionSupplier" style="width: 100%;" @change="selectSupplier(props.row,props.rowIndex,props)" allowClear>
               <a-select-option v-for="item in supplierList" :key="item.value" >{{ item.label }}</a-select-option>
             </a-select>
           </template>
@@ -421,9 +421,11 @@
       function onSearchProject(){
         SelectProjectModalRef.value.getTable()
       }
-      function selectSupplier(prop,rowIndex){
+      function selectSupplier(prop,rowIndex,props){
+        var arrNumber = []
         SupplierQuotationDetailsTable.dataSource.map(item=>{
           if(item.productCode==prop.productCode&&item.quotationSuppiler==prop.selectionSupplier){
+            arrNumber.push(item.quotationSuppiler)
             var arr = [...SelectQuotationFormProductTable.dataSource]
             arr.map((event,index)=>{
               if(rowIndex==index){
@@ -441,6 +443,12 @@
             SelectQuotationFormProductTable.dataSource = [...arr]
           }
         })
+        if(arrNumber.length==0){
+          message.warn('此供应商没有报价')
+          var arr1 = [...SelectQuotationFormProductTable.dataSource]
+          arr1[rowIndex].selectionSupplier=props.value
+          SelectQuotationFormProductTable.dataSource = [...arr1]
+        }
       }
       return {
         SelectQuotationFormShipTableRef,