Эх сурвалжийг харах

采购订单维护导出、数量调整

002390 1 жил өмнө
parent
commit
ffa0f06b0a

+ 2 - 1
src/views/purchase/purchase-order/edit/index.vue

@@ -471,7 +471,8 @@ export default {
 
       if(key === 'qty'){
 
-        return this.handleIsRevise() ? row['originalQty'] : Infinity
+        return this.handleIsRevise() ? row['originalQty'] :
+          (this.params.source == '3' ? Infinity: row['originalQty'])
       
       }
 

+ 22 - 1
src/views/purchase/purchase-order/index.vue

@@ -2,6 +2,8 @@
 <script>
 import { TableColumns, SearchColumns, TabColumns, SelectColumns } from "./column";
 import orderApi from "@/api/business/purchase/purchase-order";
+import {saveAs} from "file-saver";
+import { blobValidate } from "@/utils/ruoyi";
 import {
   initPage,
   initParams,
@@ -99,7 +101,26 @@ export default {
 
     async handleDownload(){
       console.log(this.params,'条件');
-      this.download('/pu/order/export', this.params, `采购订单维护${new Date().getTime()}.xlsx`);
+      this.download('/pu/order/export', {...this.params}, `采购订单维护${new Date().getTime()}.xlsx`);
+      // try {
+      //   this.loading = true;
+
+      //   orderApi.orderExport({...this.params}).then(res=>{
+
+      //     const isBlob = blobValidate(res);
+      //     if (isBlob) {
+      //       const blob = new Blob([res]);
+      //       saveAs(blob, `采购订单维护${new Date().getTime()}.xlsx`);
+      //     }
+
+
+      //   })
+
+      // } catch (error) {
+        
+      // }finally{
+      //   this.loading = false;
+      // }
     },
     async jumpFlow(row){
       const {name} = this.$store.state.user;