Browse Source

采购报价单选定-增加新增时对选定供应商的判断

jingbb 1 month ago
parent
commit
1133aeef80

+ 8 - 1
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,props)" allowClear  :disabled="disabled">
+            <a-select v-model:value="props.row.selectionSupplier" style="width: 100%;" @change="selectSupplier(props.row,props.rowIndex,props)"   :disabled="disabled">
               <a-select-option v-for="item in supplierList" :key="item.value" >{{ item.label }}</a-select-option>
             </a-select>
           </template>
@@ -326,6 +326,13 @@
       }
 
       async function submitForm() {
+        var xTable = SelectQuotationFormProductTableRef.value!.getXTable().data
+        for (let i = 0; i < xTable.length; i++) {
+          if (!xTable[i].selectionSupplier||xTable[i].selectionSupplier=='') {
+            message.warning('含有未报价产品,请先报价')
+            return 
+          }
+        }
         const mainData = await getFormData();
         const subData = await getSubFormAndTableData();
         const values = Object.assign({}, dbData, mainData, subData);