浏览代码

销售报价单/采购询价单-按id导出

jingbb 4 月之前
父节点
当前提交
ea27bb4079

+ 10 - 1
src/views/purchase/purchaseInquiryForm/purchaseInquiryFormList.vue

@@ -116,7 +116,7 @@
      <!--插槽:table标题-->
       <template #tableTitle>
           <a-button type="primary"  @click="handleAdd" preIcon="ant-design:plus-outlined" v-auth="'purCode:pur_inquiry_form:add'"> 新增(add)</a-button>
-          <a-button  type="primary"   preIcon="ant-design:export-outlined" @click="onExportXls" v-auth="'purCode:pur_inquiry_form:exportXls'"> 导出(export)</a-button>
+          <a-button  type="primary"   preIcon="ant-design:export-outlined" @click="onExportXlsNow" v-auth="'purCode:pur_inquiry_form:exportXls'"> 导出(export)</a-button>
           <a-button  type="primary"  @click="submit" > 提交(submit)</a-button>
           <a-button  type="primary"  @click="cancelSubmit" > 取消提交(cancelSubmit)</a-button>
           <a-dropdown v-if="selectedRowKeys.length > 0">
@@ -392,6 +392,15 @@
     }
     return queryParamClone;
   }
+  async function onExportXlsNow(){
+    if(selectedRowKeys.value.length!==1){
+      message.warning('请选择一条数据')
+    }else{
+      queryParam.id=selectedRowKeys.value[0]
+      await onExportXls();
+      queryParam.id=''
+    }
+  }
 </script>
 <style lang="less" scoped>
   .jeecg-basic-table-form-container {

+ 4 - 1
src/views/saleCode/quotation/components/quotationFormForm.vue

@@ -470,7 +470,10 @@
       }
       //增行-船明细
       function addShip(data){
-        data.map(item=>item.shipowner = item.relateCustomer)
+        data.map(item=>{
+          item.shipowner = item.relateCustomer
+          item.shipId = item.id
+        })
         var arr = data.concat(saleQuotationFormShipTable.dataSource)
         saleQuotationFormShipTable.dataSource=arr             
       }

+ 10 - 1
src/views/saleCode/quotation/quotation.vue

@@ -118,7 +118,7 @@
      <!--插槽:table标题-->
       <template #tableTitle>
           <a-button type="primary" v-auth="'saleCode:sale_quotation:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
-          <a-button  type="primary" v-auth="'saleCode:sale_quotation:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出(export)</a-button>
+          <a-button  type="primary" v-auth="'saleCode:sale_quotation:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXlsNow"> 导出(export)</a-button>
           <a-button  type="primary"  @click="submit"> 提交(submit)</a-button>
           <a-button  type="primary"  @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
           <a-dropdown v-if="selectedRowKeys.length > 0">
@@ -340,6 +340,15 @@
       cancelBatchSubmit({ids: ids},handleSuccess);
     }
   }
+  async function onExportXlsNow(){
+    if(selectedRowKeys.value.length!==1){
+      message.warning('请选择一条数据')
+    }else{
+      queryParam.id=selectedRowKeys.value[0]
+      await onExportXls();
+      queryParam.id=''
+    }
+  }