Browse Source

采购报价选定-增加子表“供应商汇总金额”

jingbb 5 months ago
parent
commit
6fd487fd76

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

@@ -432,4 +432,48 @@ export const SelectQuotationFormProductColumns: JVxeColumn[] = [
       placeholder: '请输入${title}',
       defaultValue:'',
     },
+  ]
+  export const SupplierSummaryAmountColumns: JVxeColumn[] = [
+    {
+      title: '报价单号(bill code)',
+      key: 'billCode',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '单据日期(bill date)',
+      key: 'billDate',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '报价项目(quotation project)',
+      key: 'projectName',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '报价供应商(quotation supplier)',
+      key: 'suppilerName',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '报价截止日期(quotation deadline)',
+      key: 'quotationDeadline',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '合计金额(total amount)',
+      key: 'taxAmount',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
   ]

+ 36 - 1
src/views/purchase/selectionQuotationForm/components/SelectQuotationFormForm.vue

@@ -117,6 +117,22 @@
           >
           </j-vxe-table>
       </a-tab-pane>
+      <a-tab-pane tab="采购报价单选定 - 供应商汇总金额(supplier summary amount)" key="SupplierSummaryAmount" :forceRender="true">
+        <j-vxe-table
+          :keep-source="true"
+          resizable
+          ref="SupplierSummaryAmountTableRef"
+          :loading="SupplierSummaryAmountTable.loading"
+          :columns="SupplierSummaryAmountTable.columns"
+          :dataSource="SupplierSummaryAmountTable.dataSource"
+          :height="340"
+          :disabled="disabled"
+          :rowNumber="true"
+          :rowSelection="true"
+          asyncRemove
+          >
+          </j-vxe-table>
+      </a-tab-pane>
     </a-tabs>
     <BaseShipArchiveAccessoriesList ref="BaseShipArchiveAccessoriesListRef"></BaseShipArchiveAccessoriesList>
     <SelectProjectModal ref="SelectProjectModalRef" @selectProject="addProject"></SelectProjectModal>
@@ -129,7 +145,7 @@
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
   import { SelectQuotationFormShippTable, SelectQuotationFormProductListByMainId, queryDataById, saveOrUpdate } from '../SelectionQuotationForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
-  import {SelectQuotationFormShipTableCloumn, SelectQuotationFormProductColumns,SupplierQuotationColumns} from '../SelectionQuotationForm.data';
+  import {SelectQuotationFormShipTableCloumn, SelectQuotationFormProductColumns,SupplierQuotationColumns,SupplierSummaryAmountColumns} from '../SelectionQuotationForm.data';
   import BaseShipArchiveAccessoriesList from './BaseShipArchiveAccessoriesModal.vue';
   import SelectProjectModal from './SelectProjectModal.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
@@ -171,6 +187,7 @@
       });
       const SelectQuotationFormProductTableRef = ref();
       const SupplierQuotationDetailsTableRef = ref();
+      const SupplierSummaryAmountTableRef = ref();
       const SelectQuotationFormProductTable = reactive<Record<string, any>>({
         loading: false,
         columns: SelectQuotationFormProductColumns,
@@ -181,6 +198,11 @@
         columns: SupplierQuotationColumns,
         dataSource: []
       });
+      const SupplierSummaryAmountTable = reactive<Record<string, any>>({
+        loading: false,
+        columns: SupplierSummaryAmountColumns,
+        dataSource: []
+      });
       var BaseShipArchiveAccessoriesListRef = ref();
       var supplierList = ref([]);
       const activeKey = ref('SelectQuotationFormShip');
@@ -227,6 +249,7 @@
         SelectQuotationFormShipTable.dataSource = [];
         SelectQuotationFormProductTable.dataSource = [];
         SupplierQuotationDetailsTable.dataSource = []
+        SupplierSummaryAmountTable.dataSource = []
         activeKey.value = 'SelectQuotationFormShip'
       }
 
@@ -239,6 +262,7 @@
         const SelectQuotationFormProductDataList = await SelectQuotationFormProductListByMainId(row['id']);
         SelectQuotationFormProductTable.dataSource = [...SelectQuotationFormProductDataList];
         getSupplierQuotationDetail(formData.inquiryProject)
+        getSupplierSummaryAmount(formData.inquiryProject)
       }
 
       async function queryMainData(id) {
@@ -313,6 +337,7 @@
            formData.projectName = data[0].name
            getShipDetail(data[0].id)
            getSupplierQuotationDetail(data[0].id)
+           getSupplierSummaryAmount(data[0].id)
         }else{
           formData.inquiryProject = ''
           formData.projectName = ''
@@ -353,6 +378,14 @@
             }
           })
       }
+      function getSupplierSummaryAmount(id){
+          let params = {quotationProject:id}
+          defHttp.get({url:'/purCode/purPurchaseQuotation/supplierQuotationTotal',params}, { isTransformResponse: false }).then(res=>{
+            if(res){
+              SupplierSummaryAmountTable.dataSource=res.result.records
+            }
+          })
+      }
             
       function viewAccessory(prop){
         BaseShipArchiveAccessoriesListRef.value.getTable(prop.row)
@@ -387,6 +420,8 @@
         addProject,
         SupplierQuotationDetailsTableRef,
         SupplierQuotationDetailsTable,
+        SupplierSummaryAmountTableRef,
+        SupplierSummaryAmountTable,
         supplierList,
       }
     }