|
|
@@ -215,16 +215,17 @@
|
|
|
:cell-class-name="planUsageCellClass"
|
|
|
highlight-current-row="true"
|
|
|
@row-dblclick="mlupdateCompanyFunc"
|
|
|
+ :summary-method="mlgetSummaries"
|
|
|
style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="mltableData" row-key="ID" @selection-change="handleSelectionChange">
|
|
|
<!-- <el-table-column type="selection" width="30" />-->
|
|
|
- <el-table-column align="left" label="面料" prop="面料" width="240"/>
|
|
|
- <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="210"/>
|
|
|
- <el-table-column align="left" label="领用数量" prop="领用数量" width="100" />
|
|
|
- <el-table-column align="left" label="库存数量" prop="库存数量" width="120"/>
|
|
|
- <el-table-column align="left" label="建档时间" prop="建档时间" width="160"/>
|
|
|
- <el-table-column align="left" label="更新时间" prop="更新时间" width="160"/>
|
|
|
+ <el-table-column align="left" label="订单编号" prop="订单编号" width="110"/>
|
|
|
+ <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="150"/>
|
|
|
+ <el-table-column align="left" label="物料名称" prop="物料名称" width="170" />
|
|
|
+ <el-table-column align="left" label="库存总量" prop="库存总量" width="120"/>
|
|
|
+ <el-table-column align="left" label="面料结余" prop="面料结余" width="160"/>
|
|
|
+ <el-table-column align="left" label="投料单位" prop="投料单位" width="100"/>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -1096,7 +1097,7 @@ import * as XLSX from 'xlsx';
|
|
|
import jsPDF from 'jspdf';
|
|
|
import {Datalist,WorkOrderList,WorkOrderAdd,PrintListData,
|
|
|
printDetailAdd,PrintDetailDel,orderDataDel,getWorkOrder,
|
|
|
-getSuborder,PrintDataEdit,WorkOrderEdit,gdAnnexAdd,upload,OrderAttachments,getPonumber,FabricEdit,orderBomList,FabricDetail} from '@/api/mes/job'
|
|
|
+getSuborder,PrintDataEdit,WorkOrderEdit,gdAnnexAdd,upload,OrderAttachments,getPonumber,FabricEdit,orderBomList,FabricDetail,fabricList} from '@/api/mes/job'
|
|
|
import PrintPage from './components/print.vue'
|
|
|
import luckyexcelPage from './components/luckyexcel.vue'
|
|
|
import AddGongYi from './components/addGongYi.vue'
|
|
|
@@ -2365,6 +2366,9 @@ const tableRowClick = async (row) => {
|
|
|
const orderBomListdata = await orderBomList({order:_Gd_gdbh.value});
|
|
|
bomtableData.value = orderBomListdata.data
|
|
|
bomtableData.splice(0,orderBomListdata.data.length,...orderBomListdata.data);//bom表格数据
|
|
|
+
|
|
|
+ const fabricListdata = await fabricList({order:_Gd_gdbh.value});
|
|
|
+ mltableData.splice(0,fabricListdata.data.length,...fabricListdata.data);//bom表格数据
|
|
|
//颜色资料
|
|
|
if(PrintListDatas.data.列表.length === 0 ){
|
|
|
ystableData.length = 0
|
|
|
@@ -2591,6 +2595,34 @@ const fj_delclick = async () => {
|
|
|
return sums;
|
|
|
};
|
|
|
|
|
|
+// 面料合计
|
|
|
+// const mlgetSummaries = (param) => {
|
|
|
+// const { columns, data } = param;
|
|
|
+// const sums = {};
|
|
|
+// //选择你希望合计的列
|
|
|
+// const summableLabels = ["库存总量"];
|
|
|
+// columns.forEach((column, index) => {
|
|
|
+// if (index === 0) {
|
|
|
+// sums[index] = '总数量合计';
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// if (summableLabels.includes(column.label)) {
|
|
|
+// const values = data.map(item => Number(item[column.property]));
|
|
|
+// if (!values.every(value => isNaN(value))) {
|
|
|
+// sums[index] = values.reduce((prev, curr) => {
|
|
|
+// const value = Number(curr);
|
|
|
+// if (!isNaN(value)) {
|
|
|
+// return prev + value;
|
|
|
+// }
|
|
|
+// return prev;
|
|
|
+// }, 0);
|
|
|
+// } else {
|
|
|
+// sums[index] = 'N/A';
|
|
|
+// }
|
|
|
+// }
|
|
|
+// });
|
|
|
+// return sums;
|
|
|
+// };
|
|
|
|
|
|
|
|
|
|