zck 9 months ago
parent
commit
7ca3c3f19a

+ 26 - 1
src/api/mes/job.js

@@ -664,7 +664,7 @@ export const orderBomList = (params) => {
     params
     params
   })
   })
 }
 }
-// 订单BOM出库、退还详情显示
+// 入库、出库、退还单号列表
 export const FabricDetail = (params) => {
 export const FabricDetail = (params) => {
   return service({
   return service({
     url: '/mes_server/work_order/FabricDetail',
     url: '/mes_server/work_order/FabricDetail',
@@ -672,6 +672,14 @@ export const FabricDetail = (params) => {
     params
     params
   })
   })
 }
 }
+// 入库、出库、退还详情数据
+export const FabricDetaillist = (params) => {
+  return service({
+    url: '/mes_server/work_order/FabricDetaillist',
+    method: 'get',
+    params
+  })
+}
 //订单信息数据查询
 //订单信息数据查询
 export const orderSearch = (params) => {
 export const orderSearch = (params) => {
   return service({
   return service({
@@ -736,4 +744,21 @@ export const gitReceiptNumber = (params) => {
     method: 'get',
     method: 'get',
     params
     params
   })
   })
+}
+// 出库单号、入库单号获取
+export const Bomdel = (params) => {
+  return service({
+    url: '/mes_server/work_order/Bomdel',
+    method: 'get',
+    params
+  })
+}
+
+// 出库单号、入库单号获取
+export const FabricDetaildel = (data) => {
+  return service({
+    url: '/mes_server/work_order/FabricDetaildel',
+    method: 'post',
+    data
+  })
 }
 }

+ 135 - 27
src/view/inventory/ruku.vue

@@ -111,18 +111,15 @@
 	        </el-table>
 	        </el-table>
 	      </div>
 	      </div>
 		  <br>
 		  <br>
-		  <div style="display: flex; justify-content: space-around; align-items: center; margin-bottom: 10px;">
-		    <p style="font-size: 18px;">库人: 
-		  			<el-input v-model="chukuren" style="width: 200px;" disabled/>
+		  <div style="display: flex;  align-items: center;  margin-left: 300px;margin-bottom: 10px;">
+		    <p style="font-size: 18px;">库人: 
+		  			<el-input v-model="chukuren" style="width: 200px;;" disabled/>
 		  			</p>
 		  			</p>
-		    <p style="font-size: 18px;">领用人: 
-		      <el-input v-model="linguser" style="width: 200px;" />
-		    </p>
 		  </div>
 		  </div>
 	    </div>
 	    </div>
   </el-dialog>
   </el-dialog>
   
   
-  <!--详情记录 -->
+  <!--单号记录 -->
   <el-dialog v-model="pickingaddvisible" :before-close="()=> pickingaddvisible = false" style="width: 70%; margin: 5% auto; height: 79%;" :title="'出库、入库、退还记录'" destroy-on-close>
   <el-dialog v-model="pickingaddvisible" :before-close="()=> pickingaddvisible = false" style="width: 70%; margin: 5% auto; height: 79%;" :title="'出库、入库、退还记录'" destroy-on-close>
 	   <div class="dialog-footer" style="bottom: 10px; right: 10px; width: 100%;">
 	   <div class="dialog-footer" style="bottom: 10px; right: 10px; width: 100%;">
 		 <el-button  type="primary" @click="ckth_closeDialog" style="width: 80px;height: 40px;">关 闭</el-button>
 		 <el-button  type="primary" @click="ckth_closeDialog" style="width: 80px;height: 40px;">关 闭</el-button>
@@ -130,7 +127,7 @@
 	   <br>
 	   <br>
 		<div>
 		<div>
 			<el-tabs v-model="activeName" @tab-click="handleClick">
 			<el-tabs v-model="activeName" @tab-click="handleClick">
-              <el-tab-pane label="出库记录"  @click="showTable('出库记录')"  name="first">
+              <!-- <el-tab-pane label="出库记录"  @click="showTable('出库记录')"  name="first">
                 <el-table ref="multipleTable"
                 <el-table ref="multipleTable"
                           :row-style="{ height: '30px' }"
                           :row-style="{ height: '30px' }"
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -138,18 +135,18 @@
                           :show-overflow-tooltip="true"
                           :show-overflow-tooltip="true"
                           highlight-current-row="true"
                           highlight-current-row="true"
 						  @row-click="tableclick"
 						  @row-click="tableclick"
-                          @row-dblclick="ysupdateCompanyFunc"
+                          @row-dblclick="chukuupdateCompanyFunc"
                           style="width: 100%;height: 36vh" border
                           style="width: 100%;height: 36vh" border
                           :summary-method="getSummaries" tooltip-effect="dark" :data="cktableData" row-key="ID" >
                           :summary-method="getSummaries" tooltip-effect="dark" :data="cktableData" row-key="ID" >
                   <el-table-column align="left" sortable label="订单编号" prop="订单编号"  width="140"/>
                   <el-table-column align="left" sortable label="订单编号" prop="订单编号"  width="140"/>
 				  <el-table-column align="left" sortable label="款号" prop="款号"  width="180"/>
 				  <el-table-column align="left" sortable label="款号" prop="款号"  width="180"/>
 				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
 				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
                   <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
                   <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
-                  <el-table-column align="left" sortable label="上报机台" prop="上报机台"  width="160"/>
+                  <el-table-column align="left" sortable label="出库人员" prop="出库人员"  width="160"/>
                 </el-table>
                 </el-table>
-              </el-tab-pane>
+              </el-tab-pane> -->
 			  
 			  
-			  <el-tab-pane label="入库记录"  @click="showTable('入库记录')"  name="second">
+			  <el-tab-pane label="入库记录"  @click="showTable('入库记录')"  name="first">
 			    <el-table ref="multipleTable"
 			    <el-table ref="multipleTable"
 			              :row-style="{ height: '30px' }"
 			              :row-style="{ height: '30px' }"
 			              :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 			              :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -160,15 +157,17 @@
 			              @row-dblclick="rukuupdateCompanyFunc"
 			              @row-dblclick="rukuupdateCompanyFunc"
 			              style="width: 100%;height: 36vh" border
 			              style="width: 100%;height: 36vh" border
 			              :summary-method="getSummaries" tooltip-effect="dark" :data="rukutableData" row-key="ID" >
 			              :summary-method="getSummaries" tooltip-effect="dark" :data="rukutableData" row-key="ID" >
+				  <el-table-column align="left" sortable label="入库单号" prop="单号"  width="140"/>
 			      <el-table-column align="left" sortable label="订单编号" prop="订单编号"  width="140"/>
 			      <el-table-column align="left" sortable label="订单编号" prop="订单编号"  width="140"/>
 				  <el-table-column align="left" sortable label="客户编号" prop="款号"  width="180"/>
 				  <el-table-column align="left" sortable label="客户编号" prop="款号"  width="180"/>
 				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
 				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
+				  <!-- <el-table-column align="left" sortable label="入库人" prop="入仓人员"  width="160"/> -->
+			      <el-table-column align="left" sortable label="入库人员" prop="入库人员"  width="160"/>
 			      <el-table-column align="left" sortable label="入库时间" prop="入库时间"  width="160"/>
 			      <el-table-column align="left" sortable label="入库时间" prop="入库时间"  width="160"/>
-			      <el-table-column align="left" sortable label="上报机台" prop="上报机台"  width="160"/>
 			    </el-table>
 			    </el-table>
 			  </el-tab-pane>
 			  </el-tab-pane>
 
 
-              <el-tab-pane label="退还记录" @click="showTable('退还记录')" name="third">
+              <el-tab-pane label="退还记录" @click="showTable('退还记录')" name="second">
                 <el-table ref="multipleTable"
                 <el-table ref="multipleTable"
                           :row-style="{ height: '30px' }"
                           :row-style="{ height: '30px' }"
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -176,7 +175,7 @@
                           highlight-current-row="true"
                           highlight-current-row="true"
                           :show-overflow-tooltip="true"
                           :show-overflow-tooltip="true"
                           :cell-class-name="gysatusCellClass"
                           :cell-class-name="gysatusCellClass"
-                          @row-dblclick="gdgyupdateCompanyFunc"
+                          @row-dblclick="thupdateCompanyFunc"
                           @row-click="clickybupdate2"
                           @row-click="clickybupdate2"
                           :row-class-name="rowClassStyle2"
                           :row-class-name="rowClassStyle2"
                           style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="thtableData" row-key="ID">
                           style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="thtableData" row-key="ID">
@@ -184,12 +183,45 @@
 				  <el-table-column align="left" sortable label="款号" prop="款号"  width="180"/>
 				  <el-table-column align="left" sortable label="款号" prop="款号"  width="180"/>
 				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
 				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
                   <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
                   <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
-                  <el-table-column align="left" sortable label="上报机台" prop="上报机台"  width="160"/>
+                  <el-table-column align="left" sortable label="退还机台" prop="退还机台"  width="160"/>
                 </el-table>
                 </el-table>
               </el-tab-pane>
               </el-tab-pane>
 		   </el-tabs>
 		   </el-tabs>
 		</div>
 		</div>
   </el-dialog>
   </el-dialog>
+
+  <!--单号详情记录 -->
+  <el-dialog v-model="details_pickingaddvisible" :before-close="()=> details_pickingaddvisible = false" style="width: 70%; margin: 5% auto; height: 79%;" :title="单据详情"
+	destroy-on-close>
+	   <div class="dialog-footer" style="bottom: 10px; right: 10px; width: 100%;">
+		 <el-button  type="primary" @click="details_ckth_closeDialog" style="width: 80px;height: 40px;">关 闭</el-button>
+		 <el-button type="primary"  @click="deldetail_delclick" style="width: 80px;height: 40px;"	v-if="del_details=== true" :disabled="details_Selection === '' "  class="bt"   >删除</el-button>
+	   </div>
+	   <br>
+		<div>
+			
+                <el-table ref="multipleTable"
+                          :row-style="{ height: '30px' }"
+                          :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                          :header-cell-style="{ padding: '0px' }"
+                          :show-overflow-tooltip="true"
+                          highlight-current-row="true"
+						  @row-click="tableclick"
+                          @row-dblclick="ysupdateCompanyFunc"
+						  @selection-change="detailSelectionChange"
+                          style="width: 100%;height: 36vh" border
+                          :summary-method="getSummaries" tooltip-effect="dark" :data="ruku_detailstableData" row-key="ID" >
+				  <el-table-column   align="center" type="selection" width="40"/>
+				  <el-table-column align="left" sortable label="入库单号" prop="单号"  width="140"/>
+			      <el-table-column align="left" sortable label="订单编号" prop="订单编号"  width="140"/>
+				  <el-table-column align="left" sortable label="客户编号" prop="款号"  width="180"/>
+				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
+				  <!-- <el-table-column align="left" sortable label="入库人" prop="入仓人员"  width="160"/> -->
+			      <el-table-column align="left" sortable label="入库人员" prop="入库人员"  width="160"/>
+			      <el-table-column align="left" sortable label="入库时间" prop="入库时间"  width="160"/>
+                </el-table>
+		</div>
+  </el-dialog>
   
   
 </template>
 </template>
 <script>
 <script>
@@ -198,7 +230,7 @@ export default {
   data() {
   data() {
     return {
     return {
       currentTable: '', // 当前展示的表格
       currentTable: '', // 当前展示的表格
-      activeName: 'second',
+      activeName: 'first',
       _ddhval:'',
       _ddhval:'',
 	  add_gddialogFormVisible: true,
 	  add_gddialogFormVisible: true,
     };
     };
@@ -212,13 +244,11 @@ export default {
 // 全量引入格式化工具 请按需保留
 // 全量引入格式化工具 请按需保留
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {ref, reactive} from 'vue'
 import {ref, reactive} from 'vue'
-import {getSpotList,getSpotTab,orderSearch,outReport,orderBomList,FabricDetail,
-gitReceiptNumber
-} from '@/api/mes/job'
-import {ElMessage} from "element-plus";
+import {getSpotList,getSpotTab,orderSearch,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';
 // import { get } from 'scriptjs';
 defineOptions({name: 'Company'})
 defineOptions({name: 'Company'})
-import { useUserStore } from '@/pinia/modules/user'
 //获取用户登录信息
 //获取用户登录信息
 const userStore = useUserStore()
 const userStore = useUserStore()
 const _username = ref('')
 const _username = ref('')
@@ -248,7 +278,6 @@ getMachineMacdata();
 //全局调用参数
 //全局调用参数
 const danhao = ref('')
 const danhao = ref('')
 const riqi = ref('')
 const riqi = ref('')
-const linguser = ref('')
 const chukuren = ref('')
 const chukuren = ref('')
 const add_searchInfo = ref('')//搜索
 const add_searchInfo = ref('')//搜索
 const add_lysearchInfo = ref('')//搜索
 const add_lysearchInfo = ref('')//搜索
@@ -277,7 +306,7 @@ const add_onSubmit = async ()=>{
 		
 		
 		const gitReceiptNumberdata = await gitReceiptNumber({number:'RK'});
 		const gitReceiptNumberdata = await gitReceiptNumber({number:'RK'});
 		console.log(gitReceiptNumberdata)
 		console.log(gitReceiptNumberdata)
-		danhao.value = gitReceiptNumberdata.data
+		danhao.value = gitReceiptNumberdata.data.number
 		chukuren.value = userStore.userInfo.nickName
 		chukuren.value = userStore.userInfo.nickName
 		riqi.value = currentDates
 		riqi.value = currentDates
 		Reporting_onSubmit()
 		Reporting_onSubmit()
@@ -465,14 +494,13 @@ const res_bomenterDialog = async() => {
 	const formattedData = rawValueArray.map(item => {
 	const formattedData = rawValueArray.map(item => {
 	  return {
 	  return {
 	    order_id: ddhformData.ddh,
 	    order_id: ddhformData.ddh,
-	    款号: ddhformData.kh,
+	    款号: ddhformData.sckh,
 	    物料名称: item.物料名称 !== null ? item.物料名称 : "",
 	    物料名称: item.物料名称 !== null ? item.物料名称 : "",
 	    number: item.领用 !== null ? item.领用 : "",
 	    number: item.领用 !== null ? item.领用 : "",
 	    rq: currentDate,
 	    rq: currentDate,
 	    name: "入库",
 	    name: "入库",
-		sys_id: _username.value,
+		sys_id: userStore.userInfo.nickName,
 		receipt_number: danhao.value,
 		receipt_number: danhao.value,
-		recipient:linguser.value
 	  }
 	  }
 	});
 	});
 	console.log(formattedData);
 	console.log(formattedData);
@@ -567,8 +595,88 @@ const ckth_closeDialog = async ()=>{
 	//自动聚焦光标input
 	//自动聚焦光标input
 	getMachineMacdata();
 	getMachineMacdata();
 }
 }
+const dh = ref('')
+const type = ref('')
+const details_pickingaddvisible = ref(false)
+const ruku_detailstableData = reactive([])
+const chuku_detailstableData = reactive([])
+const th_detailstableData = reactive([])
+const rukuupdateCompanyFunc = async (row)=>{
+	dh.value = row.单号
+	type.value = 'rk'
+	details_pickingaddvisible.value = true
+	console.log(row)
+	ruku_detailstableData.splice(0,ruku_detailstableData.length);
+	const FabricDetaillistdata = await FabricDetaillist({order:row.单号,search:'入库'});
+	ruku_detailstableData.splice(0,FabricDetaillistdata.length,...FabricDetaillistdata.data['入库记录']);
+	console.log(FabricDetaillistdata)
+}
+// 	const chukuupdateCompanyFunc = async (row)=>{
+// 	dh.value = row.单号
+// 	type.value = 'ck'
+// 	details_pickingaddvisible.value = true
+// 	console.log(row)
+// 	const FabricDetaillistdata = await FabricDetaillist({order:row.单号,search:'出库'});
+// 	console.log(FabricDetaillistdata)
+// }
+const thupdateCompanyFunc = async (row)=>{
+	dh.value = row.单号
+	type.value = 'th'
+	details_pickingaddvisible.value = true
+	console.log(row)
+	const FabricDetaillistdata = await FabricDetaillist({order:row.单号,search:'退还'});
+	console.log(FabricDetaillistdata)
+}
+//详情页取消
+const details_ckth_closeDialog = async ()=>{
+	details_pickingaddvisible.value = false
+	//自动聚焦光标input
+	getMachineMacdata();
+}
 
 
+//表格复选框
+const del_details = ref(true)//删除BOM资料
+const details_Selection = ref('')//存储选中Uniqid
+const detailSelectionChange = (selection, type) => {
+  const ids = selection.map(item => {
+    return item.id
+  })
+  details_Selection.value = ids.join(',')
+  console.log("复选框",details_Selection.value)
+}
 
 
+// 删除详情按钮
+const deldetail_delclick = async () => {
+  try {
+    // 弹出确认框
+    await ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning',
+    });
+    // 用户点击“确定”后执行以下逻辑
+    const params = {
+		id: details_Selection._value,
+		Mod_id: userStore.userInfo.nickName,
+    };
+    console.log('删除参数:', params);
+    // 调用删除接口
+    const res1 = await FabricDetaildel(params);
+    if (res1.code === 0) {
+      ElMessage.success('删除成功');
+    } else {
+      ElMessage.error('删除失败');
+      return; // 如果删除失败,直接返回
+    }
+    // 重新获取BOM列表数据
+	ruku_detailstableData.splice(0,ruku_detailstableData.length);
+	const FabricDetaillistdata = await FabricDetaillist({order:dh.value,search:'入库'});
+	ruku_detailstableData.splice(0,FabricDetaillistdata.length,...FabricDetaillistdata.data['入库记录']);
+  } catch (error) {
+    // 用户点击“取消”或弹框关闭
+    console.log('用户取消删除操作');
+  }
+};
 // =========== 分页 ===========
 // =========== 分页 ===========
 // 分页相关的响应式变量
 // 分页相关的响应式变量
 const page = ref(1)
 const page = ref(1)

+ 140 - 17
src/view/performance/chukubaogong.vue

@@ -45,7 +45,7 @@
 		</el-input>
 		</el-input>
 		<el-button type="primary" @click="res_bomcloseDialog"  style="width: 100px;height: 50px;margin-left: 10px;">关 闭</el-button>
 		<el-button type="primary" @click="res_bomcloseDialog"  style="width: 100px;height: 50px;margin-left: 10px;">关 闭</el-button>
 		<el-button type="primary" @click="print_lingyong" style="width: 100px;height: 50px;">增加至领用页</el-button>
 		<el-button type="primary" @click="print_lingyong" style="width: 100px;height: 50px;">增加至领用页</el-button>
-		<!-- <el-button type="primary" @click="del_lingyong"  style="width: 100px;height: 50px;">删除面料领用</el-button> -->
+		<el-button type="primary" @click="del_lingyong"  style="width: 100px;height: 50px;">删除面料领用</el-button>
 	</div>
 	</div>
 	
 	
 	<el-divider style="margin: 10px 0px 20px;" ><span style="font-size: 18px;color:red;font-weight: bold;margin-left: 20px;">绿色部分填写领用数量</span></el-divider>
 	<el-divider style="margin: 10px 0px 20px;" ><span style="font-size: 18px;color:red;font-weight: bold;margin-left: 20px;">绿色部分填写领用数量</span></el-divider>
@@ -94,7 +94,7 @@
 	                  tooltip-effect="dark"  :data="FabriccollartableData" 
 	                  tooltip-effect="dark"  :data="FabriccollartableData" 
 	                  row-key="ID" :cell-class-name="scfjfpxsCellClass"
 	                  row-key="ID" :cell-class-name="scfjfpxsCellClass"
 	                  @selection-change="FabriccollarhandleSelectionChange">
 	                  @selection-change="FabriccollarhandleSelectionChange">
-			  <!-- <el-table-column type="selection" width="45" /> -->
+			  <el-table-column type="selection" width="45" />
 	          <template v-for="(item, idx) in Fabriccollar_tableColumns">
 	          <template v-for="(item, idx) in Fabriccollar_tableColumns">
 	            <el-table-column #default="{ row, column, $index }" align="left"  :label="item.label" :width="item.width">
 	            <el-table-column #default="{ row, column, $index }" align="left"  :label="item.label" :width="item.width">
 	              <div v-if="[''].includes(item.prop)">
 	              <div v-if="[''].includes(item.prop)">
@@ -135,18 +135,19 @@
                           :show-overflow-tooltip="true"
                           :show-overflow-tooltip="true"
                           highlight-current-row="true"
                           highlight-current-row="true"
 						  @row-click="tableclick"
 						  @row-click="tableclick"
-                          @row-dblclick="ysupdateCompanyFunc"
+                          @row-dblclick="chukuupdateCompanyFunc"
                           style="width: 100%;height: 36vh" border
                           style="width: 100%;height: 36vh" border
                           :summary-method="getSummaries" tooltip-effect="dark" :data="cktableData" row-key="ID" >
                           :summary-method="getSummaries" tooltip-effect="dark" :data="cktableData" row-key="ID" >
+				  <el-table-column align="left" sortable label="出库单号" prop="单号"  width="140"/>				  
                   <el-table-column align="left" sortable label="订单编号" prop="订单编号"  width="140"/>
                   <el-table-column align="left" sortable label="订单编号" prop="订单编号"  width="140"/>
 				  <el-table-column align="left" sortable label="款号" prop="款号"  width="180"/>
 				  <el-table-column align="left" sortable label="款号" prop="款号"  width="180"/>
 				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
 				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
+                  <el-table-column align="left" sortable label="出库人员" prop="出库人员"  width="160"/>
                   <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
                   <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
-                  <el-table-column align="left" sortable label="上报机台" prop="上报机台"  width="160"/>
                 </el-table>
                 </el-table>
               </el-tab-pane>
               </el-tab-pane>
 			  
 			  
-			  <el-tab-pane label="入库记录"  @click="showTable('入库记录')"  name="second">
+			  <!-- <el-tab-pane label="入库记录"  @click="showTable('入库记录')"  name="second">
 			    <el-table ref="multipleTable"
 			    <el-table ref="multipleTable"
 			              :row-style="{ height: '30px' }"
 			              :row-style="{ height: '30px' }"
 			              :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 			              :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -163,9 +164,9 @@
 			      <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
 			      <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
 			      <el-table-column align="left" sortable label="上报机台" prop="上报机台"  width="160"/>
 			      <el-table-column align="left" sortable label="上报机台" prop="上报机台"  width="160"/>
 			    </el-table>
 			    </el-table>
-			  </el-tab-pane>
+			  </el-tab-pane> -->
 
 
-              <el-tab-pane label="退还记录" @click="showTable('退还记录')" name="third">
+              <el-tab-pane label="退还记录" @click="showTable('退还记录')" name="second">
                 <el-table ref="multipleTable"
                 <el-table ref="multipleTable"
                           :row-style="{ height: '30px' }"
                           :row-style="{ height: '30px' }"
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -187,6 +188,40 @@
 		   </el-tabs>
 		   </el-tabs>
 		</div>
 		</div>
   </el-dialog>
   </el-dialog>
+
+  <!--单号详情记录 -->
+  <el-dialog v-model="details_pickingaddvisible" :before-close="()=> details_pickingaddvisible = false" style="width: 70%; margin: 5% auto; height: 79%;" :title="单据详情"
+	destroy-on-close>
+	   <div class="dialog-footer" style="bottom: 10px; right: 10px; width: 100%;">
+		 <el-button  type="primary" @click="details_ckth_closeDialog" style="width: 80px;height: 40px;">关 闭</el-button>
+		 <el-button type="primary"  @click="deldetail_delclick" style="width: 80px;height: 40px;"	v-if="del_details=== true" :disabled="details_Selection === '' "  class="bt"   >删除</el-button>
+	   </div>
+	   <br>
+		<div>
+			
+                <el-table ref="multipleTable"
+                          :row-style="{ height: '30px' }"
+                          :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                          :header-cell-style="{ padding: '0px' }"
+                          :show-overflow-tooltip="true"
+                          highlight-current-row="true"
+						  @row-click="tableclick"
+                          @row-dblclick="ysupdateCompanyFunc"
+						  @selection-change="detailSelectionChange"
+                          style="width: 100%;height: 36vh" border
+                          :summary-method="getSummaries" tooltip-effect="dark" :data="chuku_detailstableData" row-key="ID" >
+				  <el-table-column   align="center" type="selection" width="40"/>
+				  <el-table-column align="left" sortable label="出库单号" prop="单号"  width="140"/>
+			      <el-table-column align="left" sortable label="订单编号" prop="订单编号"  width="140"/>
+				  <el-table-column align="left" sortable label="物料名称" prop="物料名称"  width="140"/>
+				  <el-table-column align="left" sortable label="客户编号" prop="款号"  width="180"/>
+				  <el-table-column align="left" sortable label="数量" prop="数量"  width="105"/>
+				  <!-- <el-table-column align="left" sortable label="入库人" prop="入仓人员"  width="160"/> -->
+			      <el-table-column align="left" sortable label="出库人员" prop="出库人员"  width="160"/>
+			      <el-table-column align="left" sortable label="出库时间" prop="出库时间"  width="160"/>
+                </el-table>
+		</div>
+  </el-dialog>
   
   
 </template>
 </template>
 <script>
 <script>
@@ -209,13 +244,11 @@ export default {
 // 全量引入格式化工具 请按需保留
 // 全量引入格式化工具 请按需保留
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {ref, reactive} from 'vue'
 import {ref, reactive} from 'vue'
-import {getSpotList,getSpotTab,orderSearch,outReport,orderBomList,FabricDetail,
-gitReceiptNumber
-} from '@/api/mes/job'
-import {ElMessage} from "element-plus";
+import {getSpotList,getSpotTab,orderSearch,outReport,orderBomList,FabricDetail,gitReceiptNumber,FabricDetaillist,FabricDetaildel} from '@/api/mes/job'
+import { ElMessage, ElMessageBox,ElUpload, ElButton } from 'element-plus';
 // import { get } from 'scriptjs';
 // import { get } from 'scriptjs';
-defineOptions({name: 'Company'})
 import { useUserStore } from '@/pinia/modules/user'
 import { useUserStore } from '@/pinia/modules/user'
+defineOptions({name: 'Company'})
 //获取用户登录信息
 //获取用户登录信息
 const userStore = useUserStore()
 const userStore = useUserStore()
 const _username = ref('')
 const _username = ref('')
@@ -253,9 +286,9 @@ const restableData = reactive([])//表格
 const _orderid = ref('')//订单子编号
 const _orderid = ref('')//订单子编号
 const _kh = ref('')//生产款号
 const _kh = ref('')//生产款号
 
 
-const handleInput = async ()=>{
-	add_onSubmit()
-}
+// const handleInput = async ()=>{
+// 	add_onSubmit()
+// }
 
 
 //查询按钮
 //查询按钮
 const add_onSubmit = async ()=>{
 const add_onSubmit = async ()=>{
@@ -274,9 +307,11 @@ const add_onSubmit = async ()=>{
 		
 		
 		const gitReceiptNumberdata = await gitReceiptNumber({number:'CK'});
 		const gitReceiptNumberdata = await gitReceiptNumber({number:'CK'});
 		console.log(gitReceiptNumberdata)
 		console.log(gitReceiptNumberdata)
-		danhao.value = gitReceiptNumberdata.data
+		danhao.value = gitReceiptNumberdata.data.number
 		chukuren.value = userStore.userInfo.nickName
 		chukuren.value = userStore.userInfo.nickName
+		linguser.value = gitReceiptNumberdata.data.username
 		riqi.value = currentDates
 		riqi.value = currentDates
+
 		Reporting_onSubmit()
 		Reporting_onSubmit()
 	}else{
 	}else{
 		restableData.splice(0,orderSearchdata.length,...orderSearchdata.data);
 		restableData.splice(0,orderSearchdata.length,...orderSearchdata.data);
@@ -458,11 +493,15 @@ const res_bomenterDialog = async() => {
 		ElMessage({ type: 'warning',message: '请先添加领用信息'})
 		ElMessage({ type: 'warning',message: '请先添加领用信息'})
 		return
 		return
 	}
 	}
+	if(linguser.value.length === 0){
+		ElMessage({ type: 'warning',message: '请先添加领用信息'})
+		return
+	}
 	const rawValueArray = FabriccollartableData._rawValue;
 	const rawValueArray = FabriccollartableData._rawValue;
 	const formattedData = rawValueArray.map(item => {
 	const formattedData = rawValueArray.map(item => {
 	  return {
 	  return {
 	    order_id: ddhformData.ddh,
 	    order_id: ddhformData.ddh,
-	    款号: ddhformData.kh,
+	    款号: ddhformData.sckh,
 	    物料名称: item.物料名称 !== null ? item.物料名称 : "",
 	    物料名称: item.物料名称 !== null ? item.物料名称 : "",
 	    number: item.领用 !== null ? item.领用 : "",
 	    number: item.领用 !== null ? item.领用 : "",
 	    rq: currentDate,
 	    rq: currentDate,
@@ -547,6 +586,9 @@ const pickingaddvisible = ref(false)//弹窗
 const add_prinkformData = reactive({});
 const add_prinkformData = reactive({});
 //详情记录
 //详情记录
 const details_onSubmit = async ()=>{
 const details_onSubmit = async ()=>{
+	cktableData.splice(0,cktableData.length)
+	rukutableData.splice(0,rukutableData.length)
+	thtableData.splice(0,thtableData.length)
 	pickingaddvisible.value = true
 	pickingaddvisible.value = true
 	const FabricDetaillist = await FabricDetail({order:_orderid.value});
 	const FabricDetaillist = await FabricDetail({order:_orderid.value});
 	const ruku_FabricDetaillist = await FabricDetail({order:_orderid.value,search:'入库'});
 	const ruku_FabricDetaillist = await FabricDetail({order:_orderid.value,search:'入库'});
@@ -563,6 +605,87 @@ const ckth_closeDialog = async ()=>{
 	getMachineMacdata();
 	getMachineMacdata();
 }
 }
 
 
+const dh = ref('')
+const type = ref('')
+const details_pickingaddvisible = ref(false)
+const chuku_detailstableData = reactive([])
+const th_detailstableData = reactive([])
+const chukuupdateCompanyFunc = async (row)=>{
+	dh.value = row.单号
+	type.value = 'rk'
+	details_pickingaddvisible.value = true
+	console.log(row)
+	chuku_detailstableData.splice(0,chuku_detailstableData.length);
+	const FabricDetaillistdata = await FabricDetaillist({order:row.单号,search:''});
+	chuku_detailstableData.splice(0,FabricDetaillistdata.length,...FabricDetaillistdata.data['出库记录']);
+	console.log(FabricDetaillistdata)
+}
+// 	const chukuupdateCompanyFunc = async (row)=>{
+// 	dh.value = row.单号
+// 	type.value = 'ck'
+// 	details_pickingaddvisible.value = true
+// 	console.log(row)
+// 	const FabricDetaillistdata = await FabricDetaillist({order:row.单号,search:'出库'});
+// 	console.log(FabricDetaillistdata)
+// }
+const thupdateCompanyFunc = async (row)=>{
+	dh.value = row.单号
+	type.value = 'th'
+	details_pickingaddvisible.value = true
+	console.log(row)
+	const FabricDetaillistdata = await FabricDetaillist({order:row.单号,search:''});
+	console.log(FabricDetaillistdata)
+}
+//详情页取消
+const details_ckth_closeDialog = async ()=>{
+	details_pickingaddvisible.value = false
+	//自动聚焦光标input
+	getMachineMacdata();
+}
+
+//表格复选框
+const del_details = ref(true)//删除BOM资料
+const details_Selection = ref('')//存储选中Uniqid
+const detailSelectionChange = (selection, type) => {
+  const ids = selection.map(item => {
+    return item.id
+  })
+  details_Selection.value = ids.join(',')
+  console.log("复选框",details_Selection.value)
+}
+
+// 删除详情按钮
+const deldetail_delclick = async () => {
+  try {
+    // 弹出确认框
+    await ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning',
+    });
+    // 用户点击“确定”后执行以下逻辑
+    const params = {
+		id: details_Selection._value,
+		Mod_id: userStore.userInfo.nickName,
+    };
+    console.log('删除参数:', params);
+    // 调用删除接口
+    const res1 = await FabricDetaildel(params);
+    if (res1.code === 0) {
+      ElMessage.success('删除成功');
+    } else {
+      ElMessage.error('删除失败');
+      return; // 如果删除失败,直接返回
+    }
+    // 重新获取BOM列表数据
+	chuku_detailstableData.splice(0,chuku_detailstableData.length);
+	const FabricDetaillistdata = await FabricDetaillist({order:dh.value,search:''});
+	chuku_detailstableData.splice(0,FabricDetaillistdata.length,...FabricDetaillistdata.data['出库记录']);
+  } catch (error) {
+    // 用户点击“取消”或弹框关闭
+    console.log('用户取消删除操作');
+  }
+};
 
 
 // =========== 分页 ===========
 // =========== 分页 ===========
 // 分页相关的响应式变量
 // 分页相关的响应式变量

+ 126 - 52
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -16,6 +16,8 @@
 			  <el-button type="primary" icon="edit"   @click="BOMclick"   class="bt"   title="BOM面料">批量修改BOM资料</el-button>
 			  <el-button type="primary" icon="edit"   @click="BOMclick"   class="bt"   title="BOM面料">批量修改BOM资料</el-button>
               <el-button type="primary" icon="edit"   @click="del_ddzlClick" 	v-if="table_del=== true" :disabled="table_Selection === ''"  class="bt" title="删除订单资料"  >删除订单资料</el-button>
               <el-button type="primary" icon="edit"   @click="del_ddzlClick" 	v-if="table_del=== true" :disabled="table_Selection === ''"  class="bt" title="删除订单资料"  >删除订单资料</el-button>
               <el-button type="primary" icon="edit"   @click="delgd_delclick" 	v-if="delall=== true" :disabled="ysSelection === '' && gySelection === ''"  class="bt"   >删除颜色工艺资料</el-button>
               <el-button type="primary" icon="edit"   @click="delgd_delclick" 	v-if="delall=== true" :disabled="ysSelection === '' && gySelection === ''"  class="bt"   >删除颜色工艺资料</el-button>
+			  <el-button type="primary" icon="edit"   @click="delbom_delclick" 	v-if="del_bom=== true" :disabled="bom_Selection === '' "  class="bt"   >删除bom资料</el-button>
+			  
               <!-- <el-button type="primary" icon="edit"   @click="CSclick"   class="bt"   title="库存测试">库存测试</el-button> -->
               <!-- <el-button type="primary" icon="edit"   @click="CSclick"   class="bt"   title="库存测试">库存测试</el-button> -->
 			</el-form-item>
 			</el-form-item>
           </el-form>
           </el-form>
@@ -187,8 +189,9 @@
                           :cell-class-name="planUsageCellClass"
                           :cell-class-name="planUsageCellClass"
                           highlight-current-row="true"
                           highlight-current-row="true"
                           @row-dblclick="bombomupdateCompanyFunc"
                           @row-dblclick="bombomupdateCompanyFunc"
-                          style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="bomtableData" row-key="ID" @selection-change="handleSelectionChange">
-<!--                  <el-table-column type="selection" width="30" />-->
+						  @selection-change="bomSelectionChange"
+                          style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="bomtableData" row-key="ID">
+                 <el-table-column type="selection" width="30" />
                   <el-table-column align="left" label="订单编号" prop="订单编号"  width="105"/>
                   <el-table-column align="left" label="订单编号" prop="订单编号"  width="105"/>
                   <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="100" />
                   <el-table-column align="left" label="计划用料" prop="计划用料"  width="100" />
@@ -199,9 +202,10 @@
 				  <el-table-column align="left" label="裁床退回仓库面料" prop="裁床退回仓库面料"  width="140"/>
 				  <el-table-column align="left" label="裁床退回仓库面料" prop="裁床退回仓库面料"  width="140"/>
 				  <el-table-column align="left" label="入库总量" prop="入库总量"  width="90"/>
 				  <el-table-column align="left" label="入库总量" prop="入库总量"  width="90"/>
 				  <el-table-column align="left" label="面料结余" prop="面料结余"  width="90"/>
 				  <el-table-column align="left" label="面料结余" prop="面料结余"  width="90"/>
-				  <el-table-column align="left" label="投料单位" prop="投料单位"  width="85"/>
+				  <el-table-column align="left" label="单位" prop="投料单位"  width="60"/>
 				  <el-table-column align="left" label="备注" prop="备注"  width="180"/>
 				  <el-table-column align="left" label="备注" prop="备注"  width="180"/>
-				  <el-table-column align="left" label="日期" prop="日期"  width="160"/>
+				  <el-table-column align="left" label="更新用户" prop="ID"  width="160"/>
+				  <el-table-column align="left" label="更新日期" prop="日期"  width="160"/>
 				  <!-- <el-table-column align="left" label="UNIQID" prop="UNIQID"  width="80"/> -->
 				  <!-- <el-table-column align="left" label="UNIQID" prop="UNIQID"  width="80"/> -->
                 </el-table>
                 </el-table>
               </el-tab-pane>
               </el-tab-pane>
@@ -545,7 +549,7 @@
 				    <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
 				    <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
 				      <div v-if="['物料名称', '计划用料', '定额用料', '门封', '备注'].includes(item.prop)">
 				      <div v-if="['物料名称', '计划用料', '定额用料', '门封', '备注'].includes(item.prop)">
 				        <el-input v-model="row[item.prop]" :clearable="false"
 				        <el-input v-model="row[item.prop]" :clearable="false"
-				                  :id="`input${idx}${$index}`" @keyup="resbom_handleKeyDown($event, idx, $index, item.prop)"/>
+				                  :id="`input${idx}${$index}`" @keyup="resbom_handleKeyDown($event, idx, $index, item.prop)" @input="handleInput($event, row, item.prop)"/>
 				      </div>
 				      </div>
 				      <div v-else>{{ row[item.prop] }}</div>
 				      <div v-else>{{ row[item.prop] }}</div>
 				    </el-table-column>
 				    </el-table-column>
@@ -585,8 +589,12 @@
 				  <template v-for="(item, idx) in resbom_tableColumns">
 				  <template v-for="(item, idx) in resbom_tableColumns">
 				    <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
 				    <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
 				      <div v-if="['物料名称', '计划用料', '定额用料','门封', '备注'].includes(item.prop)">
 				      <div v-if="['物料名称', '计划用料', '定额用料','门封', '备注'].includes(item.prop)">
-				        <el-input v-model="row[item.prop]" :clearable="false"
-				                  :id="`input${idx}${$index}`" @keyup="resbom_handleKeyDown($event, idx, $index, item.prop)"/>
+							<el-input
+							v-model="row[item.prop]"
+							:clearable="false"
+							:id="`input${idx}${$index}`"
+							@input="handleInput($event, row, item.prop)"
+							/>
 				      </div>
 				      </div>
 				      <div v-else>{{ row[item.prop] }}</div>
 				      <div v-else>{{ row[item.prop] }}</div>
 				    </el-table-column>
 				    </el-table-column>
@@ -1097,7 +1105,7 @@ import * as XLSX from 'xlsx';
 import jsPDF from 'jspdf';
 import jsPDF from 'jspdf';
 import {Datalist,WorkOrderList,WorkOrderAdd,PrintListData,
 import {Datalist,WorkOrderList,WorkOrderAdd,PrintListData,
 printDetailAdd,PrintDetailDel,orderDataDel,getWorkOrder,
 printDetailAdd,PrintDetailDel,orderDataDel,getWorkOrder,
-getSuborder,PrintDataEdit,WorkOrderEdit,gdAnnexAdd,upload,OrderAttachments,getPonumber,FabricEdit,orderBomList,FabricDetail,fabricList} from '@/api/mes/job'
+getSuborder,PrintDataEdit,WorkOrderEdit,gdAnnexAdd,upload,OrderAttachments,getPonumber,FabricEdit,orderBomList,FabricDetail,fabricList,Bomdel} from '@/api/mes/job'
 import PrintPage from './components/print.vue'
 import PrintPage from './components/print.vue'
 import luckyexcelPage from './components/luckyexcel.vue'
 import luckyexcelPage from './components/luckyexcel.vue'
 import AddGongYi from './components/addGongYi.vue'  
 import AddGongYi from './components/addGongYi.vue'  
@@ -2102,6 +2110,30 @@ const BOMclick = () => {
 	}
 	}
 }
 }
 
 
+const handleInput = (value, row, prop) => {
+	if(prop != "物料名称"){
+		// 使用正则表达式过滤非数字和小数点的字符
+		let filteredValue = value.replace(/[^\d.]/g, '');
+
+		// 不允许以 . 开头
+		if (filteredValue.startsWith('.')) {
+		filteredValue = filteredValue.slice(1); // 去掉开头的 .
+		}
+
+		// 确保只有一个小数点
+		const parts = filteredValue.split('.');
+		if (parts.length > 2) {
+		// 如果超过一个小数点,只保留第一个
+		row[prop] = `${parts[0]}.${parts.slice(1).join('')}`;
+		} else {
+		// 否则直接赋值
+		row[prop] = filteredValue;
+		}
+		}
+
+};
+
+
 //bom数据获取
 //bom数据获取
 const _TestCoefficient = async ()=>{
 const _TestCoefficient = async ()=>{
   try {
   try {
@@ -2188,27 +2220,27 @@ const add_bomenterDialog = async() => {
 
 
 
 
 //修改
 //修改
-const res_bomenterDialog = async () => {
-	const rawValueArray = resbomtableData._rawValue;
-	const formattedData = rawValueArray
-	.filter(item => item.物料名称 !== null && item.物料名称 !== "")  // 过滤掉物料名称为空的行
-	.map(item => {
-	  return {
-		UNIQID: item.UNIQID !== undefined ? item.UNIQID : "",
-		BOM_物料名称: item.物料名称 !== null ? item.物料名称 : "",
-		BOM_计划用量: item.计划用料 !== null ? item.计划用料 : "",
-		BOM_标准用量: item.定额用料 !== null ? item.定额用料 : "",
-		BOM_实际用量: item.裁床实际用料 !== null ? item.裁床实际用料 : "",
-		Bom_领用数量: item.裁床领用面料 !== null ? item.裁床领用面料 : "",
-		BOM_退还数量: item.裁床退回仓库面料 !== null ? item.裁床退回仓库面料 : "",
+const res_bomenterDialog = async () => {
+	const rawValueArray = resbomtableData._rawValue;
+	const formattedData = rawValueArray
+	.filter(item => item.物料名称 !== null && item.物料名称 !== "")  // 过滤掉物料名称为空的行
+	.map(item => {
+	  return {
+		UNIQID: item.UNIQID !== undefined ? item.UNIQID : "",
+		BOM_物料名称: item.物料名称 !== null ? item.物料名称 : "",
+		BOM_计划用量: item.计划用料 !== null ? item.计划用料 : "",
+		BOM_标准用量: item.定额用料 !== null ? item.定额用料 : "",
+		BOM_实际用量: item.裁床实际用料 !== null ? item.裁床实际用料 : "",
+		Bom_领用数量: item.裁床领用面料 !== null ? item.裁床领用面料 : "",
+		BOM_退还数量: item.裁床退回仓库面料 !== null ? item.裁床退回仓库面料 : "",
 		BOM_desc: item.备注 !== null ? item.备注 : "",
 		BOM_desc: item.备注 !== null ? item.备注 : "",
 		BOM_门封: item.门封 !== null ? item.门封 : "",
 		BOM_门封: item.门封 !== null ? item.门封 : "",
 		BOM_投料单位: "米",
 		BOM_投料单位: "米",
 		Sys_ID: userStore.userInfo.nickName,
 		Sys_ID: userStore.userInfo.nickName,
-		Sys_rq: currentDate
-	  }
-	});
-	console.log(formattedData);
+		Sys_rq: currentDate
+	  }
+	});
+	console.log(formattedData);
 
 
 	const add_FabricEditdata = await FabricEdit(formattedData);
 	const add_FabricEditdata = await FabricEdit(formattedData);
 	if (add_FabricEditdata.code === 0) {
 	if (add_FabricEditdata.code === 0) {
@@ -2223,7 +2255,8 @@ const res_bomenterDialog = async () => {
 }
 }
 
 
 // 取消
 // 取消
-const res_bomcloseDialog = () => {
+const 
+res_bomcloseDialog = () => {
 	res_bomdialogFormVisible.value = false;
 	res_bomdialogFormVisible.value = false;
 }
 }
 
 
@@ -2257,34 +2290,34 @@ const bombomupdateCompanyFunc = async (row) => {
 }
 }
 
 
 
 
-// BOM数据获取
-const _editTestCoefficient = async () => {
-  try {
-    // 获取 BOM 数据
-    const orderBomListdata = await orderBomList({ order: _Gd_gdbh.value });
-    console.log(orderBomListdata);
-
-    // 过滤数据,只保留 UNIQID 相同的项
-    const filteredData = orderBomListdata.data.filter(item => item.UNIQID === UNIQID.value);
-
-    // 处理数据
-    edit_resbomtableData.value = filteredData.map(item => ({
-      物料名称: item.物料名称,
-      计划用料: item.计划用料,
-      定额用料: item.定额用料,
-      裁床实际用料: item.裁床实际用料,
-      裁床领用面料: item.裁床领用面料,
-      裁床退回仓库面料: item.裁床退回仓库面料,
+// BOM数据获取
+const _editTestCoefficient = async () => {
+  try {
+    // 获取 BOM 数据
+    const orderBomListdata = await orderBomList({ order: _Gd_gdbh.value });
+    console.log(orderBomListdata);
+
+    // 过滤数据,只保留 UNIQID 相同的项
+    const filteredData = orderBomListdata.data.filter(item => item.UNIQID === UNIQID.value);
+
+    // 处理数据
+    edit_resbomtableData.value = filteredData.map(item => ({
+      物料名称: item.物料名称,
+      计划用料: item.计划用料,
+      定额用料: item.定额用料,
+      裁床实际用料: item.裁床实际用料,
+      裁床领用面料: item.裁床领用面料,
+      裁床退回仓库面料: item.裁床退回仓库面料,
       备注: item.备注,
       备注: item.备注,
 	  门封: item.门封,
 	  门封: item.门封,
-	  投料单位 : "米",
-      UNIQID: item.UNIQID // 保留 UNIQID 以便后续使用
-    }));
-
-  } catch (error) {
-    console.error(error);
-  }
-};
+	  投料单位 : "米",
+      UNIQID: item.UNIQID // 保留 UNIQID 以便后续使用
+    }));
+
+  } catch (error) {
+    console.error(error);
+  }
+};
 
 
 
 
 //一键修改
 //一键修改
@@ -2564,6 +2597,47 @@ const fj_delclick = async () => {
   res1.code === 0 && ElMessage.success('删除成功')
   res1.code === 0 && ElMessage.success('删除成功')
 }
 }
 
 
+//BOM表格复选框
+const del_bom = ref(true)//删除BOM资料
+const bom_Selection = ref('')//存储选中Uniqid
+const bomSelectionChange = (selection, type) => {
+  const ids = selection.map(item => {
+    return item.UNIQID
+  })
+  bom_Selection.value = ids.join(',')
+  console.log("bom复选框",bom_Selection.value)
+}
+
+// 删除BOM资料按钮
+const delbom_delclick = async () => {
+  try {
+    // 弹出确认框
+    await ElMessageBox.confirm('此操作将永久删除该文件, 是否继续?', '提示', {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning',
+    });
+    // 用户点击“确定”后执行以下逻辑
+    const params = {
+		UNIQID: bom_Selection._value,
+    };
+    console.log('删除参数:', params);
+    // 调用删除接口
+    const res1 = await Bomdel(params);
+    if (res1.code === 0) {
+      ElMessage.success('删除成功');
+    } else {
+      ElMessage.error('删除失败');
+      return; // 如果删除失败,直接返回
+    }
+    // 重新获取BOM列表数据
+    const orderBomListdata = await orderBomList({ order: _Gd_gdbh.value });
+    bomtableData.splice(0, bomtableData.length, ...orderBomListdata.data);
+  } catch (error) {
+    // 用户点击“取消”或弹框关闭
+    console.log('用户取消删除操作');
+  }
+};
 
 
   //合计
   //合计
   const getSummaries = (param) => {  
   const getSummaries = (param) => {  

+ 10 - 9
src/view/yunyin/shengchanguanli/yangyipihe.vue

@@ -32,7 +32,8 @@
 							 :show-overflow-tooltip="true"
 							 :show-overflow-tooltip="true"
 							style="width: 100%;height: 65vh" border  :data="tableData1" row-key="ID" @selection-change="handleSelectionChange">
 							style="width: 100%;height: 65vh" border  :data="tableData1" row-key="ID" @selection-change="handleSelectionChange">
 						<el-table-column   align="center" type="selection" width="40"/>
 						<el-table-column   align="center" type="selection" width="40"/>
-						<el-table-column   align="center" label="附件状态" prop="status"  width="100" />
+						<el-table-column   align="center" label="技术附件状态" prop="status"  width="110" />
+						<el-table-column   align="center" label="订单附件状态" prop="orderstatus"  width="110" />
 						<el-table-column   align="left" label="客户" prop="客户编号"  width="70" />
 						<el-table-column   align="left" label="客户" prop="客户编号"  width="70" />
 						<el-table-column   align="left" label="订单编号" prop="订单编号"  width="120" />
 						<el-table-column   align="left" label="订单编号" prop="订单编号"  width="120" />
 						<el-table-column   align="left" label="生产款号" prop="生产款号"  width="150" />
 						<el-table-column   align="left" label="生产款号" prop="生产款号"  width="150" />
@@ -40,9 +41,9 @@
 						<el-table-column   align="left" label="工单状态" prop="gd_statu"  width="90" />
 						<el-table-column   align="left" label="工单状态" prop="gd_statu"  width="90" />
 						<el-table-column   align="left" label="订单数量" prop="订单数量"  width="90" />
 						<el-table-column   align="left" label="订单数量" prop="订单数量"  width="90" />
 						<el-table-column   align="left" label="船样合计" prop="船样合计"  width="90" />
 						<el-table-column   align="left" label="船样合计" prop="船样合计"  width="90" />
-						<el-table-column   align="left" label="船样描述" prop="船样描述"  width="150" />
+						<el-table-column   align="left" label="船样描述" prop="船样描述"  width="200" />
 						<el-table-column   align="left" label="单位" prop="单位"  width="60" />
 						<el-table-column   align="left" label="单位" prop="单位"  width="60" />
-						<el-table-column   align="left" label="粘衬" prop="粘衬"  width="120" />
+						<el-table-column   align="left" label="粘衬" prop="粘衬"  width="360" />
 						<el-table-column   align="left" label="要求" prop="要求"  width="360" />
 						<el-table-column   align="left" label="要求" prop="要求"  width="360" />
 						<el-table-column   align="left" label="箱唛要求" prop="箱唛要求"  width="360" />
 						<el-table-column   align="left" label="箱唛要求" prop="箱唛要求"  width="360" />
 						<el-table-column   align="left" label="工单完工数量" prop="工单完工数量"  width="140" />
 						<el-table-column   align="left" label="工单完工数量" prop="工单完工数量"  width="140" />
@@ -50,9 +51,9 @@
 						<el-table-column   align="left" label="制单人" prop="Sys_id"  width="160" />
 						<el-table-column   align="left" label="制单人" prop="Sys_id"  width="160" />
 						<el-table-column   align="left" label="制单日期" prop="Sys_rq"  width="160" />
 						<el-table-column   align="left" label="制单日期" prop="Sys_rq"  width="160" />
 						<!-- <el-table-column   align="left" label="接单日期" prop="接单日期"  width="120" /> -->
 						<!-- <el-table-column   align="left" label="接单日期" prop="接单日期"  width="120" /> -->
-						<el-table-column   align="left" label="出库日期" prop="出库日期"  width="120" />
-						<el-table-column   align="left" label="落货日期" prop="落货日期"  width="120" />
-						<el-table-column   align="left" label="更新时间" prop="Mod_rq"  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="Mod_rq"  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="120" />
 						<el-table-column   align="left" label="审核日期" prop="审核日期"  width="120" />
 					</el-table>
 					</el-table>
@@ -294,13 +295,13 @@ const handleSelectionChange = (selection, type) => {
 const hptg_onClick = async () => {
 const hptg_onClick = async () => {
 	console.log(_Uniqid.value)
 	console.log(_Uniqid.value)
 	console.log(_Sys_id.value)
 	console.log(_Sys_id.value)
-	const Approvals = await Approval({Uniqid:_Uniqid.value,sys_id:_Sys_id.value});
+	const Approvals = await Approval({Uniqid:_Uniqid.value,sys_id:userStore.userInfo.nickName});
 	if (Approvals.code === 0) {
 	if (Approvals.code === 0) {
 		searchInfo.value = ''
 		searchInfo.value = ''
 		ElMessage({type: 'success',message: '核批成功'})
 		ElMessage({type: 'success',message: '核批成功'})
 		const UnapprovalListtable = await UnapprovalList({search:searchInfo.value});
 		const UnapprovalListtable = await UnapprovalList({search:searchInfo.value});
-		const workOrderDetaildata1 = UnapprovalListtable.data
-		tableData1.splice(0,tableData1.length,...workOrderDetaildata1);
+		tableData1.splice(0,tableData1.length,...UnapprovalListtable.data.table);
+		total.value = UnapprovalListtable.data.total
 	} else {
 	} else {
 		ElMessage({ type: 'error',message: '核批失败'})
 		ElMessage({ type: 'error',message: '核批失败'})
 	}
 	}