Browse Source

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-web

jbb 2 years ago
parent
commit
9e7f24e5ca

File diff suppressed because it is too large
+ 22241 - 2
package-lock.json


+ 1 - 0
package.json

@@ -36,6 +36,7 @@
     "vue-area-linkage": "^5.1.0",
     "vue-cropper": "^0.5.4",
     "vue-i18n": "^8.7.0",
+    "vue-json-excel": "^0.3.0",
     "vue-loader": "^15.7.0",
     "vue-ls": "^3.2.0",
     "vue-photo-preview": "^1.1.3",

+ 1 - 1
src/views/reportForms/fabric-loss-table.vue

@@ -713,7 +713,7 @@ export default {
               this.$refs.otherYarnsInModal.queryParam = {};
               this.$refs.otherYarnsInModal.otherYarnsInModVis = true
             } else {
-              this.$refs.purchaseAmountModal.purchaseAmountData = record.fabricPoOrderInList;
+              this.$refs.purchaseAmountModal.purchaseAmountData = record.fabricPoOrderInList;              
               this.$refs.purchaseAmountModal.allDataList = record.fabricPoOrderInList;
               this.$refs.purchaseAmountModal.queryParam = {};
               this.$refs.purchaseAmountModal.purchaseAmountModVis = true

+ 40 - 8
src/views/reportForms/fabric-loss-table/materialsOutQuantityModal.vue

@@ -39,11 +39,19 @@
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" icon="download" @click="exportExcel" style="margin-left: 8px">导出</a-button>
+                <JsonExcel
+                  :fetch="getExportDataList"
+                  :fields="exportFields"
+                  :header="exportTitle"
+                  name="材料出库数量.xls"
+                  style="display:none"
+                >
+                  <!-- 上面可以自定义自己的样式,还可以引用其他组件button -->
+                  <a-button type="primary" icon="download" ref="realExportExcel">导出</a-button>
+                  
+                </JsonExcel>
                 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-                <a @click="handleToggleSearch" style="margin-left: 8px">
-                  {{ toggleSearchStatus ? '收起' : '展开' }}
-                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-                </a>
               </span>
             </a-col>
           </a-row>
@@ -67,9 +75,7 @@
         <a-row style="marginTop:20px;">
           <a-col :md="24" :sm="12">
             <span style="float: right;" class="table-operator">
-              <a-button type="primary" icon="download" @click="handleExportXls('材料出库数量')">导出</a-button>
-              <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
-              <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
+              <a-button type="primary" @click="backFabricLossTable" icon="rollback">关闭</a-button>
             </span>
           </a-col>
         </a-row>
@@ -81,12 +87,15 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import JsonExcel from 'vue-json-excel'
 export default {
   name: 'MaterialsOutQuantityModal', // 材料出库数量 弹框
   mixins: [JeecgListMixin],
-  components: { JEllipsis },
+  components: { JEllipsis,JsonExcel },
   data() {
     return {
+      exportTitle:"材料出库数量",
+      
       // 表头
       materialsOutQuantityColumns: [
         {
@@ -199,6 +208,20 @@ export default {
       item.imoney= parseFloat(imoney.toFixed(2));
       return [item];
 
+    },
+    // 获取导出json定义
+    exportFields(){
+      var ret = {};
+      this.materialsOutQuantityColumns.forEach((record,index)=>{
+        if (record.title != "序号"){
+          if (record.title != "入库单号")
+            ret[record.title] = record.dataIndex;
+          else
+            ret[record.title] = record.dataIndex+"_ex";
+        }
+
+      });
+      return ret;
     }
   },
   // 接收父组件 方法
@@ -251,6 +274,15 @@ export default {
         ></a-table>
       )
     },
+    // 导出excel
+    exportExcel(){
+      this.$refs.realExportExcel.$el.click();
+    },
+    // 生成导出数据
+    getExportDataList(){
+      this.materialsOutQuantityData.forEach((record,index)=>record["ccode_ex"]="&nbsp;"+record["ccode"]);
+      return this.materialsOutQuantityData;
+    }
   }
 }
 </script>

+ 37 - 8
src/views/reportForms/fabric-loss-table/otherYarnsInModal.vue

@@ -27,11 +27,20 @@
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" icon="download" @click="exportExcel" style="margin-left: 8px">导出</a-button>
+                <JsonExcel
+                  :fetch="getExportDataList"
+                  :fields="exportFields"
+                  :header="exportTitle"
+                  name="其他入库的纱.xls"
+                  style="display:none"
+                >
+                  <!-- 上面可以自定义自己的样式,还可以引用其他组件button -->
+                  <a-button type="primary" icon="download" ref="realExportExcel">导出</a-button>
+                  
+                </JsonExcel>
                 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-                <a @click="handleToggleSearch" style="margin-left: 8px">
-                  {{ toggleSearchStatus ? '收起' : '展开' }}
-                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-                </a>
+                
               </span>
             </a-col>
           </a-row>
@@ -54,9 +63,7 @@
         <a-row style="marginTop:20px;">
           <a-col :md="24" :sm="12">
             <span style="float: right;" class="table-operator">
-              <a-button type="primary" icon="download" @click="handleExportXls('其他入库的纱')">导出</a-button>
-              <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
-              <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
+              <a-button type="primary" @click="backFabricLossTable" icon="rollback">关闭</a-button>
             </span>
           </a-col>
         </a-row>
@@ -68,12 +75,15 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import JsonExcel from 'vue-json-excel'
 export default {
   name: 'OtherYarnsInModal', // 其他入库的纱 弹框
   mixins: [JeecgListMixin],
-  components: { JEllipsis },
+  components: { JEllipsis,JsonExcel },
   data() {
     return {
+      exportTitle:"其他入库的纱",
+      
       // 表头
       otherYarnsInColumns: [
         {
@@ -155,6 +165,17 @@ export default {
       item.iquantity= parseFloat(iquantity.toFixed(4));
       return [item];
 
+    },
+    // 获取导出json定义
+    exportFields(){
+      var ret = {};
+      this.otherYarnsInColumns.forEach((record,index)=>{
+        if (record.title != "序号"){
+          ret[record.title] = record.dataIndex;
+        }
+
+      });
+      return ret;
     }
   },
   methods: {
@@ -195,6 +216,14 @@ export default {
         ></a-table>
       )
     },
+    // 导出excel
+    exportExcel(){
+      this.$refs.realExportExcel.$el.click();
+    },
+    // 生成导出数据
+    getExportDataList(){
+      return this.otherYarnsInData;
+    }
   }
 }
 </script>

+ 45 - 8
src/views/reportForms/fabric-loss-table/purchaseAmountModal.vue

@@ -21,11 +21,20 @@
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" icon="download" @click="exportExcel" style="margin-left: 8px">导出</a-button>
+                <JsonExcel
+                  :fetch="getExportDataList"
+                  :fields="exportFields"
+                  :header="exportTitle"
+                  name="采购数量.xls"
+                  style="display:none"
+                >
+                  <!-- 上面可以自定义自己的样式,还可以引用其他组件button -->
+                  <a-button type="primary" icon="download" ref="realExportExcel">导出</a-button>
+                  
+                </JsonExcel>
                 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-                <a @click="handleToggleSearch" style="margin-left: 8px">
-                  {{ toggleSearchStatus ? '收起' : '展开' }}
-                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-                </a>
+                
               </span>
             </a-col>
           </a-row>
@@ -48,9 +57,9 @@
         <a-row style="marginTop:20px;">
           <a-col :md="24" :sm="12">
             <span style="float: right;" class="table-operator">
-              <a-button type="primary" icon="download" @click="handleExportXls('采购数量')">导出</a-button>
-              <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
-              <a-button type="primary" @click="backFabricLossTable" icon="rollback">取消</a-button>
+              
+              <a-button type="primary" @click="backFabricLossTable" icon="rollback">关闭</a-button>
+              
             </span>
           </a-col>
         </a-row>
@@ -62,12 +71,16 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import JsonExcel from 'vue-json-excel'
 export default {
   name: 'PurchaseAmountModal', // 采购数量 弹框
   mixins: [JeecgListMixin],
-  components: { JEllipsis },
+  components: { JEllipsis ,JsonExcel},
   data() {
     return {
+      exportTitle:"采购数量",
+      
+
       // 表头
       purchaseAmountColumns: [
         {
@@ -188,6 +201,20 @@ export default {
       item.iquantityNSettle = parseFloat(iquantityNSettle.toFixed(4));
       return [item];
 
+    },
+    // 获取导出json定义
+    exportFields(){
+      var ret = {};
+      this.purchaseAmountColumns.forEach((record,index)=>{
+        if (record.title != "序号"){
+          if (record.title != "入库单号")
+            ret[record.title] = record.dataIndex;
+          else
+            ret[record.title] = record.dataIndex+"_ex";
+        }
+
+      });
+      return ret;
     }
   },
   created() {},
@@ -206,6 +233,7 @@ export default {
     // 弹框查询按钮
     searchQuery() {
       this.purchaseAmountData = this.allDataList.filter(e=> this.queryParam.ccode == null || e.ccode.toLowerCase().indexOf(this.queryParam.ccode.toLowerCase())>-1);
+      
     },
     // 重置
     searchReset() {
@@ -229,6 +257,15 @@ export default {
         ></a-table>
       )
     },
+    // 导出excel
+    exportExcel(){
+      this.$refs.realExportExcel.$el.click();
+    },
+    // 生成导出数据
+    getExportDataList(){
+      this.purchaseAmountData.forEach((item,index)=>{item["ccode_ex"]="&nbsp;"+item["ccode"]});
+      return this.purchaseAmountData;
+    }
   }
 }
 </script>

+ 36 - 8
src/views/reportForms/fabric-loss-table/surplusYarnModal.vue

@@ -27,11 +27,20 @@
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" icon="download" @click="exportExcel" style="margin-left: 8px">导出</a-button>
+                <JsonExcel
+                  :fetch="getExportDataList"
+                  :fields="exportFields"
+                  :header="exportTitle"
+                  name="来源余纱.xls"
+                  style="display:none"
+                >
+                  <!-- 上面可以自定义自己的样式,还可以引用其他组件button -->
+                  <a-button type="primary" icon="download" ref="realExportExcel">导出</a-button>
+                  
+                </JsonExcel>
                 <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-                <a @click="handleToggleSearch" style="margin-left: 8px">
-                  {{ toggleSearchStatus ? '收起' : '展开' }}
-                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-                </a>
+                
               </span>
             </a-col>
           </a-row>
@@ -54,9 +63,7 @@
         <a-row style="marginTop:20px;">
           <a-col :md="24" :sm="12">
             <span style="float: right;" class="table-operator">
-              <a-button type="primary" icon="download" @click="handleExportXls('采购数量')">导出</a-button>
-              <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
-              <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
+              <a-button type="primary" @click="backFabricLossTable" icon="rollback">关闭</a-button>
             </span>
           </a-col>
         </a-row>
@@ -68,12 +75,14 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import JsonExcel from 'vue-json-excel'
 export default {
   name: 'SurplusYarnModal', // 余纱 弹框
   mixins: [JeecgListMixin],
-  components: { JEllipsis },
+  components: { JEllipsis, JsonExcel },
   data() {
     return {
+      exportTitle:"来源余纱",
       // 表头
       surplusYarnColumns: [
         {
@@ -158,6 +167,17 @@ export default {
       item.iquantity= parseFloat(iquantity.toFixed(4));
       return [item];
 
+    },
+    // 获取导出json定义
+    exportFields(){
+      var ret = {};
+      this.surplusYarnColumns.forEach((record,index)=>{
+        if (record.title != "序号"){
+          ret[record.title] = record.dataIndex;
+        }
+
+      });
+      return ret;
     }
   },
   created() {},
@@ -199,6 +219,14 @@ export default {
         ></a-table>
       )
     },
+    // 导出excel
+    exportExcel(){
+      this.$refs.realExportExcel.$el.click();
+    },
+    // 生成导出数据
+    getExportDataList(){
+      return this.surplusYarnData;
+    }
   }
 }
 </script>

File diff suppressed because it is too large
+ 339 - 339
yarn.lock


Some files were not shown because too many files changed in this diff