Преглед изворни кода

采购报价选定-测试问题修改

jingbb пре 4 месеци
родитељ
комит
9634a72345

+ 8 - 0
src/views/purchase/selectionQuotationForm/SelectionQuotationForm.data.ts

@@ -250,6 +250,14 @@ export const SelectQuotationFormProductColumns: JVxeColumn[] = [
       defaultValue:'',  
       width:"200px",
     },
+    {
+      title: '单价(price)',
+      key: 'taxPrice',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      defaultValue:'',  
+      width:"200px",
+    },
     {
       title: '金额(amount)',
       key: 'taxAmount',

+ 15 - 23
src/views/purchase/selectionQuotationForm/components/SelectQuotationFormForm.vue

@@ -223,6 +223,7 @@ import { log } from 'console';
         maker: '',
         selectionNotes:'',
         attachs:'',
+        sourceId:''
       });
 
       //表单验证
@@ -340,24 +341,6 @@ import { log } from 'console';
            await getShipDetail(data[0].id)
            await getSupplierQuotationDetail(data[0].id)
            await getSupplierSummaryAmount(data[0].id)
-           var arr = [...SelectQuotationFormProductTable.dataSource]
-           arr.map(item=>{
-              try {
-                SupplierQuotationDetailsTable.dataSource.map(event=>{
-                  if(item.productCode==event.productCode){
-                    item=Object.assign(item,event)
-                    item.selectionSupplier = event.quotationSuppiler
-                    item.deliveryTime=event.childDeliveryTime
-                    throw 'break'
-                  }
-                })
-              }catch (e) {
-                  if (e === 'break') {
-                    return; // 捕获到退出标志,返回结束当前循环
-                  }
-              }
-           })
-           SelectQuotationFormProductTable.dataSource = arr
         }else{
           formData.inquiryProject = ''
           formData.projectName = ''
@@ -373,6 +356,11 @@ import { log } from 'console';
               formData.model = res.model
               formData.maker = res.maker
               SelectQuotationFormShipTable.dataSource = res.purInquiryFormShipList
+              res.purInquiryFormProductList.map(item=>{
+                item.sourceCode= item.headCode
+                item.sourceId= item.id
+              })
+              formData.sourceId = res.purInquiryFormProductList[0].headCodes
               SelectQuotationFormProductTable.dataSource = res.purInquiryFormProductList
             }else if(res==''){
               message.warning('当前项目还没有报价')
@@ -416,11 +404,15 @@ import { log } from 'console';
             var arr = [...SelectQuotationFormProductTable.dataSource]
             arr.map((event,index)=>{
               if(prop.rowIndex==index){
-                arr[index]={...item}
-                arr[index].selectionSupplier=item.quotationSuppiler
-                arr[index].deliveryTime=item.childDeliveryTime
-              }
-              
+                if(prop.rowIndex==index){
+                  item.sourceCode=event.sourceCode
+                  item.sourceId=event.sourceId
+                  item.sourceId2=item.id
+                  arr[index]={...item}
+                  arr[index].selectionSupplier=item.quotationSuppiler
+                  arr[index].deliveryTime=item.childDeliveryTime
+                }
+              }              
             })
             SelectQuotationFormProductTable.dataSource = [...arr]
           }