zck há 9 meses atrás
pai
commit
4784c9f246
1 ficheiros alterados com 24 adições e 1 exclusões
  1. 24 1
      src/view/inventory/fabricsummary.vue

+ 24 - 1
src/view/inventory/fabricsummary.vue

@@ -23,7 +23,7 @@
                       :row-style="{ height: '40px' }"  :header-cell-style="{ padding: '0px' }"
                       :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                       :data="restableData"  border row-key="ID" size="small"  
-					  :cell-class-name="tableDataCellClass"
+					            :cell-class-name="tableDataCellClass" id="Fabricinventory"
                       highlight-current-row="true"  @row-dblclick="updateCompanyFunc"
                       @row-click="tableRowClick" :show-overflow-tooltip="true"
                       @selection-change="handleSelectionChange">
@@ -33,9 +33,17 @@
                 <el-table-column  align="left" label="生产款号" prop="生产款号" width="170"/>
                 <el-table-column  align="left" label="款式" 	 prop="款式" 	width="170"/>
                 <el-table-column  align="left" label="物料名称" prop="物料名称" width="160"/>
+                <el-table-column  align="left" label="计划用料" prop="计划用料" width="100"/>
+                <el-table-column  align="left" label="定额用料" prop="定额用料" width="100"/>
+                <el-table-column  align="left" label="门封" prop="门封" width="100"/>                <el-table-column  align="left" label="裁床领用面料" prop="裁床领用面料" width="130"/>
+                <el-table-column  align="left" label="裁床实际用料" prop="裁床实际用料" width="130"/>
+                <el-table-column  align="left" label="裁床退回仓库面料" prop="裁床退回仓库面料" width="130"/>
                 <el-table-column  align="left" label="库存总量" prop="入库总量" width="100"/>
                 <el-table-column  align="left" label="面料结余" prop="面料结余" width="100"/>
                 <el-table-column  align="left" label="投料单位" prop="投料单位" width="100"/>
+                <el-table-column  align="left" label="备注" prop="备注" width="100"/>
+                <el-table-column  align="left" label="日期" prop="日期" width="100"/>
+
                 </el-table>
                 <div class="gva-pagination">
               <el-pagination
@@ -80,6 +88,8 @@ import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {ref, reactive} from 'vue'
 import {getSpotList,getSpotTab,orderSearch,outReport,orderBomList,FabricDetail,fabricList,fabricListmonth} from '@/api/mes/job'
 import {ElMessage} from "element-plus";
+import * as XLSX from 'xlsx';
+import FileSaver from 'file-saver';
 // import { get } from 'scriptjs';
 defineOptions({name: 'Company'})
 import { useUserStore } from '@/pinia/modules/user'
@@ -143,6 +153,19 @@ const handleSearch = async ()=>{
   total.value = fabricListdata.data.total;
 };
 
+const exportToExcel = ()=>{
+  const el = document.getElementById('Fabricinventory');
+  // 文件名
+  const filename = '面料库存汇总.xlsx';
+  const wb = XLSX.utils.table_to_book(el, { raw: true });
+  const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
+  try {
+    FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
+  } catch (e) {
+    console.log(e);
+  }
+  return wbout;
+}
 
 //自动聚焦光标input
 const getMachineMacdata = async () => {