Browse Source

first commit

liuhairui 9 months ago
parent
commit
12a2c09bf6
1 changed files with 76 additions and 48 deletions
  1. 76 48
      src/view/inventory/ruku.vue

+ 76 - 48
src/view/inventory/ruku.vue

@@ -10,7 +10,6 @@
 			  <el-button type="primary" icon="reading" @click="details_onSubmit" style="height: 50px;font-size: 20px;">入库记录</el-button>
 		</el-row>
       <layout>
-		  
         <layout-content >
           <div class="gva-table-box">
            <el-table ref="multipleTable" style="width: 100%;height: 64vh" tooltip-effect="dark"
@@ -265,7 +264,7 @@ export default {
 // 全量引入格式化工具 请按需保留
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {ref, reactive} from 'vue'
-import {getSpotList,getSpotTab,InputOrderSearch,outReport,orderBomList,FabricDetail,gitReceiptNumber,FabricDetaillist,FabricDetaildel} from '@/api/mes/job'
+import {getSpotList,getSpotTab,getInputDetail,InputOrderSearch,outReport,orderBomList,FabricDetail,gitReceiptNumber,FabricDetaillist,FabricDetaildel} from '@/api/mes/job'
 import { ElMessage, ElMessageBox,ElUpload, ElButton } from 'element-plus';
 import { useUserStore } from '@/pinia/modules/user'
 // import { get } from 'scriptjs';
@@ -306,6 +305,7 @@ const restableData = reactive([])//表格
 const _orderid = ref('')//订单子编号
 const _kh = ref('')//生产款号
 
+//input框回车
 const handleInput = async ()=>{
 	restableData.splice(0, restableData.length);//清空表格
 	//订单信息数据查询【接口】
@@ -363,9 +363,11 @@ const tableRowClick = async (row)=>{
 	add_searchInfo.value = row.订单编号
 	_orderid.value = row.订单编号
 	_kh.value = row.生产款号
+	ddhformData.glbh = row['关联编号']
 	ddhformData.ddh = row['订单编号']
 	ddhformData.kh = row['客户编号']
 	ddhformData.sckh = row['生产款号']
+	ddhformData.wlmc = row['物料名称']
 	ddhformData.ks = row['款式']
 }
 
@@ -380,18 +382,32 @@ const add_lyonSubmit = async ()=>{
 		ddhformData.ks = orderSearchdata.data[0]['款式']
 	}
 	try {
-    const orderBomListdata = await orderBomList({order:add_lysearchInfo.value});
-	resbomtableData.value = orderBomListdata.data;
-    const formattedData = orderBomListdata.data.map(item=>{
-      item.物料名称 = item.物料名称;
-      item.计划用料 = item.计划用料;
+	const Detailres = await getInputDetail({
+		关联编号:ddhformData.glbh,
+		订单编号:ddhformData.ddh,
+		物料编码:ddhformData.wlmc
+		});
+		console.log(Detailres)
+	resbomtableData.value = Detailres.data;
+    const formattedData = Detailres.data.map(item=>{
+      item.批次号 = item.批次号;
+      item.关联号 = item.关联号;
+	  item.物料编号 = item.物料编号;
+	  item.物料名称 = item.物料名称;
+	  item.入仓总量 = item.入仓总量;
+	  item.库存数量 = item.库存数量;
+	  item.领用数量 = item.领用数量;
+	  item.单位 = item.单位;
+	  item.实际门幅 = item.实际门幅;
+	  item.BOM_工单编号 = item.BOM_工单编号;
+	  item.BOM_颜色 = item.BOM_颜色;
+	  item.BOM_计划门幅 = item.BOM_计划门幅;
+	  item.BOM_定额门幅 = item.BOM_定额门幅;
+	  item.计划用料 = item.计划用料;
 	  item.定额用料 = item.定额用料;
-	  item.裁床实际用料 = item.裁床实际用料;
-	  item.裁床领用面料 = item.裁床领用面料;
-	  item.裁床退回仓库面料 = item.裁床退回仓库面料;
-	  item.备注 = item.备注;
-	  item.UNIQID = item.UNIQID;
-	  item.领用 = '';
+	  item.关联订单 = item.关联订单;
+	  // item.UNIQID = item.UNIQID;
+	  // item.领用 = '';
       return item
     });
 	add_lysearchInfo.value = ''
@@ -404,32 +420,32 @@ const res_bomdialogFormVisible = ref(false)
 const resbomtableData = ref([]);
 const FabriccollartableData = ref([]);
 const ddhformData = reactive({
+  glbh: '',
   ddh: '',
   kh:'',
   sckh:'',
   ks:'',
+  wlmc:'',
 });
 const resbom_tableColumns = ref(
     [
-		// { label: '订单编号', prop: '订单编号', width: '90' },
-		// { label: '客户', prop: '客户编号', width: '70' },
-		// { label: '生产款号', prop: '生产款号', width: '100' },
-		// { label: '款式', prop: '款式', width: '100' },
-		{ label: '物料名称', prop: '物料名称', width: '160' },
-		{ label: '计划用料', prop: '计划用料', width: '105' },
-		{ label: '定额用料', prop: '定额用料', width: '110' },
-		{ label: '计划门幅', prop: '计划门幅', width: '100' },
-		{ label: '定额门幅', prop: '定额门幅', width: '100' },
+		{ label: '批次号', prop: '批次号', width: '90' },
+		{ label: '关联号', prop: '关联号', width: '70' },
+		{ label: '物料编号', prop: '物料编号', width: '100' },
+		{ label: '物料名称', prop: '物料名称', width: '100' },
+		{ label: '入仓总量', prop: '入仓总量', width: '160' },
+		{ label: '库存数量', prop: '库存数量', width: '105' },
+		{ label: '领用数量', prop: '领用数量', width: '110' },
+		{ label: '单位', prop: '单位', width: '100' },
 		{ label: '实际门幅', prop: '实际门幅', width: '100' },
-		{ label: '裁床实际用料', prop: '裁床实际用料', width: '115' },
-		{ label: '裁床领用面料', prop: '裁床领用面料', width: '115' },
-		{ label: '裁床退回仓库面料', prop: '裁床退回仓库面料', width: '150' },
-		{ label: '入库总量', prop: '入库总量', width: '90' },
-		{ label: '面料结余', prop: '面料结余', width: '90' },
-		{ label: '入库数量', prop: '领用', width: '110' },
-		// { label: '备注', prop: '备注', width: '120' },
-		{ label: '投料单位', prop: '投料单位', width: '90' },
-		// { label: 'UNIQID', prop: 'UNIQID', width: '80' },
+		{ label: '实际门幅', prop: '实际门幅', width: '100' },
+		{ label: 'BOM_工单编号', prop: 'BOM_工单编号', width: '115' },
+		{ label: 'BOM_颜色', prop: 'BOM_颜色', width: '115' },
+		{ label: 'BOM_计划门幅', prop: 'BOM_计划门幅', width: '150' },
+		{ label: 'BOM_定额门幅', prop: 'BOM_定额门幅', width: '110' },
+		{ label: '计划用料', prop: '计划用料', width: '90' },
+		{ label: '定额用料', prop: '定额用料', width: '110' },
+		{ label: '关联订单', prop: '关联订单', width: '90' },
     ]
 )
 
@@ -464,7 +480,6 @@ const Reporting_onSubmit = async ()=>{
 		res_bomdialogFormVisible.value = true
 		FabriccollartableData.value = []; 
 		const gitReceiptNumberdata = await gitReceiptNumber({number:'RK'});
-		console.log(gitReceiptNumberdata)
 		danhao.value = gitReceiptNumberdata.data.number
 		chukuren.value = userStore.userInfo.nickName
 		riqi.value = currentDates
@@ -475,22 +490,35 @@ const Reporting_onSubmit = async ()=>{
 }
 //bom数据获取
 const _TestCoefficient = async ()=>{
-  try {
-    const orderBomListdata = await orderBomList({order:_orderid.value});
-	console.log(orderBomListdata)
-	resbomtableData.value = orderBomListdata.data;
-    const formattedData = orderBomListdata.data.map(item=>{
-      item.物料名称 = item.物料名称;
-      item.计划用料 = item.计划用料;
-	  item.定额用料 = item.定额用料;
-	  item.裁床实际用料 = item.裁床实际用料;
-	  item.裁床领用面料 = item.裁床领用面料;
-	  item.裁床退回仓库面料 = item.裁床退回仓库面料;
-	  item.备注 = item.备注;
-	  item.UNIQID = item.UNIQID;
-	  item.领用 = '';
-      return item
-    });
+ try {
+ const Detailres = await getInputDetail({
+ 	关联编号:ddhformData.glbh,
+ 	订单编号:ddhformData.ddh,
+ 	物料编码:ddhformData.wlmc
+ 	});
+ 	console.log(Detailres)
+ resbomtableData.value = Detailres.data;
+ const formattedData = Detailres.data.map(item=>{
+   item.批次号 = item.批次号;
+   item.关联号 = item.关联号;
+   item.物料编号 = item.物料编号;
+   item.物料名称 = item.物料名称;
+   item.入仓总量 = item.入仓总量;
+   item.库存数量 = item.库存数量;
+   item.领用数量 = item.领用数量;
+   item.单位 = item.单位;
+   item.实际门幅 = item.实际门幅;
+   item.BOM_工单编号 = item.BOM_工单编号;
+   item.BOM_颜色 = item.BOM_颜色;
+   item.BOM_计划门幅 = item.BOM_计划门幅;
+   item.BOM_定额门幅 = item.BOM_定额门幅;
+   item.计划用料 = item.计划用料;
+   item.定额用料 = item.定额用料;
+   item.关联订单 = item.关联订单;
+   // item.UNIQID = item.UNIQID;
+   // item.领用 = '';
+   return item
+ });
   } catch (error) {
     console.error(error);
   }