zck 10 miesięcy temu
rodzic
commit
5b7a9e6505

+ 6 - 1
src/view/performance/12-orderAccounting/index.vue

@@ -968,7 +968,12 @@ const onrcgdsj = ref(false)
 const rcgdsjrq = ref('')
 const rcgdsj = async () => {
   console.log('点击了入仓工单数据')
-  rcgdsjrq.value = currentDates.split('-').slice(0, 2).join('-')
+  if(gdbh.value && jjcp_yjno.value){
+    rcgdsjrq.value=''
+  }else{
+    console.log(cjsriqi.value)
+    rcgdsjrq.value=	cjsriqi.value
+  }
   onrcgdsj.value = true
 }
 

+ 1 - 1
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -20,7 +20,7 @@
 			        <el-button type="primary" class="bt" icon="edit"  @click="addcp_onclick" >新增产品资料</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="addcpyj_onclick" v-if="addyj=== true">新增印件资料</el-button>
               <el-button type="primary" class="bt" icon="edit"  @click="addcpgy_onclick" v-if="addgy=== true">新增工艺资料</el-button>
-              <el-button type="primary" class="bt" icon="edit"  @click="Process_sorting" >工艺排序</el-button>
+              <el-button type="success" class="bt" icon="edit"  @click="Process_sorting" >工艺排序</el-button>
 <!--              <el-button type="primary" class="bt" icon="edit"  @click="addyb_onclick" v-if="addyb=== true">新增印版资料</el-button>-->
 			  <el-button type="primary" icon="edit"   @click="delgd_delclick" v-if="delall=== true" :disabled="yjSelection === '' && gySelection === ''"  class="bt" title="选择批量删除(印件资料或工艺资料)"  >删除</el-button>
 

+ 2 - 3
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -608,9 +608,6 @@
                   <el-table-column align="left" label="工序" prop="工序号"  width="45"/>
                   <el-table-column align="left" label="备选工序" prop="备选工序"  width="45"/>
 <!--                  <el-table-column align="left" label="工艺名称" prop="工艺名称"  width="150"/>-->
-<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="125"/>
                   <el-table-column align="left" label="计划产量" prop="计划产量"  width="73"/>
                   <el-table-column align="left" label="基础损耗" prop="基础损耗"  width="45"/>
@@ -630,6 +627,8 @@
                   <el-table-column align="left" label="印刷方式" prop="印刷方式"  width="80"/>
                   <el-table-column align="center" label="版距" prop="版距"  width="60"/>
                   <el-table-column align="left" label="建档日期" prop="建档日期"  width="150"/>
+                  <el-table-column align="left" label="建档用户" prop="建档用户"  width="90"/>
+                  <el-table-column align="left" label="更新时间" prop="更新时间"  width="150"/>
                 </el-table>
               </el-tab-pane>
 

+ 106 - 27
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -22,6 +22,8 @@
 		<el-button type="primary"  class="bt"   @click="pd_lcdlistonClick" >流程单查询</el-button>
 		<el-button type="primary"  class="bt"   @click="scpconClick" >工单生产批次信息查询</el-button>
 		<el-button type="primary" icon="Download" class="bt"   @click="llexporttoExcel" >拉料导出Excel</el-button>
+		<el-button @click="selectSameWorkOrder" type="success">全选同工单</el-button>
+		<el-button @click="invertSelection" type="info">反选</el-button>
 		<!-- <el-button type="primary" @click="onClear2" >换型清场</el-button> -->
 	</header>
 	
@@ -104,7 +106,7 @@
             <div class="gva-btn-list"></div>
             <el-tabs v-model="activName" type="card" @tab-click="duohandleClick">
 				<el-tab-pane label="设备作业清单"  @click="showTable('印件资料')"  name="first"  :class="{ 'active-tab': activeTab === 'first' }" >
-				  <el-table ref="multipleTable"
+				  <el-table ref="QDmultipleTable"
 							:show-overflow-tooltip="true"
 							highlight-current-row="true"
 							:cell-class-name="sbzyqdsatusCellClass"
@@ -129,7 +131,7 @@
 				</el-tab-pane>
 
 				<el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
-				  <el-table ref="multipleTable"
+				  <el-table ref="FPmultipleTable"
 							highlight-current-row="true"
 							:show-overflow-tooltip="true"
 							:row-style="{ height: '20px' }"
@@ -156,7 +158,7 @@
 				</el-tab-pane>
 
 				<el-tab-pane label="当班产量明细" @click="showTable('印版资料')" name="third">
-				<el-table ref="multipleTable" highlight-current-row="true"
+				<el-table ref="DBmultipleTable" highlight-current-row="true"
 						  :show-overflow-tooltip="true" :row-style="{ height: '20px' }" 
 						  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 						  :header-cell-style="{ padding: '0px' }"  @row-dblclick="ybupdateCompanyFunc"
@@ -188,7 +190,7 @@
 				</el-tab-pane>
 
 				<el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
-				<el-table ref="multipleTable"
+				<el-table ref="JYmultipleTable"
 						  :row-style="{ height: '20px' }"
 						  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 						  :header-cell-style="{ padding: '0px' }"
@@ -208,7 +210,7 @@
 
           <el-dialog v-model="detailShow" fullscreen style="font-size: 50px;font-weight: bold;" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
             <div>
-				<el-table ref="multipleTable"
+				<el-table ref="JTWHmultipleTable"
 					:row-style="{ height: '20px' }"
 					:cell-style="{ padding: '0px' ,color:'blue'}" :header-row-style="{ height: '20px' }"
 					:header-cell-style="{ padding: '0px' }"
@@ -313,7 +315,7 @@
 		<el-dialog v-model="detailShow_rcl" fullscreen
            style="font-size: 50px;font-weight: bold;" lock-scroll :before-close="closeDetailShow_rcl" title="日产量批量维护" destroy-on-close>
             <div>
-				<el-table ref="multipleTable"
+				<el-table ref="WHmultipleTable"
 					:row-style="{ height: '20px' }"
 					:cell-style="{ padding: '0px' ,color:'blue'}" :header-row-style="{ height: '20px' }"
 					:header-cell-style="{ padding: '0px' }"
@@ -484,7 +486,7 @@
 			      <!-- 表格展示区域 -->
 			      <div class="gva-table-box" style="margin-top: 15px;">
 			        <el-table 
-						ref="multipleTable"
+						ref="PCmultipleTable"
 						style="width: 100%; height: 30vh; verflow: auto;" 
 						:row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
 						:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -1101,7 +1103,7 @@
 				<el-table-column align="left" label="更新时间" prop="更新时间" width="160" />
 			  </el-table>
 			  
-			  <el-table ref="multipleTable"
+			  <el-table ref="JPmultipleTable"
 						v-else
 						:show-overflow-tooltip="true"
 						@selection-change="selectionChange($event)"
@@ -1143,7 +1145,7 @@
 			</el-tab-pane>
 
 			<el-tab-pane label="当日制程检验记录"  @click="showTable('印件资料')"  name="second">
-			  <el-table ref="multipleTable"
+			  <el-table ref="JYmultipleTable"
 						:row-style="{ height: '20px' }"
 						:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
 						:header-cell-style="{ padding: '0px' }"
@@ -4735,27 +4737,104 @@ const JPtablebllickHandlerlistedit = (row, column, event) => {
    }
  };
 
+const multipleTable = ref(null) // 确保已经获取表格ref
+const JPmultipleTable = ref(null)
 const Selection_ids = ref('')
 const customer = ref('')
-// 印件资料多选、工艺资料多选
+// // 印件资料多选、工艺资料多选
+// const selectionChange = (selection) => {
+// 	if(selection.length !==0){
+// 		customer.value = selection[0].工单编号
+// 	}else{
+// 		customer.value = ''
+// 	}
+// 	const ids = selection.map(item => {
+// 	  return item.UniqId
+// 	})
+//     Selection_ids.value = ids.join(',')
+// }
+
+// const checkboxT = (row, index) => {
+// 	if(customer.value != ''){
+// 		return row.工单编号 === customer.value
+// 	}else{
+// 		return true
+// 	}
+// }
+
+// 复选框变化时记录工单编号
 const selectionChange = (selection) => {
-	if(selection.length !==0){
-		customer.value = selection[0].工单编号
-	}else{
-		customer.value = ''
-	}
-	const ids = selection.map(item => {
-	  return item.UniqId
-	})
-    Selection_ids.value = ids.join(',')
+  if (selection.length !== 0) {
+    customer.value = selection[0].工单编号
+  } else {
+    customer.value = ''
+  }
+  
+  const ids = selection.map(item => item.UniqId)
+  Selection_ids.value = ids.join(',')
 }
 
-const checkboxT = (row, index) => {
-	if(customer.value != ''){
-		return row.工单编号 === customer.value
-	}else{
-		return true
-	}
+// 全选同工单(自动识别当前表格类型)
+const selectSameWorkOrder = () => {
+  if (!customer.value) return ElMessage.warning('请先选择一条数据')
+  
+  // 动态获取当前表格数据
+  const currentTableData = isJPJT.value ? JPgytableData.value : gytableData.value
+  
+  const validData = currentTableData.filter(item => 
+    !item.isTotal && 
+    !(item.产品名称?.includes('A班产量:') || item.产品名称?.includes('B班产量:'))
+  )
+  
+  // 找出相同工单的数据
+  const sameWorkOrderItems = validData.filter(item => 
+    item.工单编号 === customer.value
+  )
+
+  // 根据 isJPJT.value 选择对应的表格引用
+  const tableRef = isJPJT.value ? JPmultipleTable.value : multipleTable.value
+  
+  // 清除选择
+  tableRef.clearSelection()
+  
+  // 选择相同工单的行
+  sameWorkOrderItems.forEach(row => {
+    tableRef.toggleRowSelection(row, true)
+  })
+  
+  Selection_ids.value = sameWorkOrderItems.map(item => item.UniqId).join(',')
+}
+
+const invertSelection = async () => {
+  // 动态获取当前表格数据
+  const currentTableData = isJPJT.value ? JPgytableData.value : gytableData.value
+  
+  const validData = currentTableData.filter(item => 
+    !item.isTotal && 
+    !(item.产品名称?.includes('A班产量:') || item.产品名称?.includes('B班产量:'))
+  )
+  
+  // 根据 isJPJT.value 选择对应的表格引用
+  const tableRef = isJPJT.value ? JPmultipleTable.value : multipleTable.value
+  
+  // 获取当前选择
+  const currentSelected = tableRef.getSelectionRows()
+  
+  // 清除选择
+  tableRef.clearSelection()
+
+  // 反选操作
+  validData.forEach(row => {
+    tableRef.toggleRowSelection(
+      row, 
+      !currentSelected.some(selected => selected.UniqId === row.UniqId)
+    )
+  })
+  
+  Selection_ids.value = tableRef
+    .getSelectionRows()
+    .map(item => item.UniqId)
+    .join(',')
 }
 
 //删除
@@ -8228,7 +8307,7 @@ const FacilitychanLiang = async () => {
 			UniqId: "",bzdh: "",cpmc: "",dedh: "",gxh: "",gxmc: "",num: "",sczl_bh98: "",sj1: "",sj2: "",yjno: "",
 			主电表: "",产量:totalA,保养工时: 保养工时A,制程废品: 制程废品A,制程次品:制程次品A,前工序废: 前工序废A,千件工价: "",印刷方式: "",备注: "",
 			工单编号: "",工序: "",异常总工时: 异常工时A,异常类型: "",异常补时: 异常补时工时A,打样工时: 打样工时A,日定额: "",更新时间: "",来料异常: 来料异常A,用户: "",码包: "",
-			码开始行: "",码结束行: "",组员1: "",组员2: "",组员3: "",色度数: "",装版工时: 装版工时A,辅电表: "",通电工时: 通电工时A,难度系数: "",
+			码开始行: "",码结束行: "",组员1: "",组员2: "",组员3: "",色度数: "",装版工时: 装版工时A,辅电表: "",通电工时: 通电工时A,难度系数: "",isTotal: true,
 		}
 		gytableData.value.push(rowA)
 	}
@@ -8238,7 +8317,7 @@ const FacilitychanLiang = async () => {
 			UniqId: "",bzdh: "",cpmc: "",dedh: "",gxh: "",gxmc: "",num: "",sczl_bh98: "",sj1: "",sj2: "",yjno: "",
 			主电表: "",产量:totalB,保养工时: 保养工时B,制程废品: 制程废品B,制程次品:制程次品B,前工序废: 前工序废B,千件工价: "",印刷方式: "",备注: "",
 			工单编号: "",工序: "",异常总工时: 异常工时B,异常类型: "",异常补时: 异常补时工时B,打样工时: 打样工时B,日定额: "",更新时间: "",来料异常: 来料异常B,用户: "",码包: "",
-			码开始行: "",码结束行: "",组员1: "",组员2: "",组员3: "",色度数: "",装版工时: 装版工时B,辅电表: "",通电工时: 通电工时B,难度系数: "",
+			码开始行: "",码结束行: "",组员1: "",组员2: "",组员3: "",色度数: "",装版工时: 装版工时B,辅电表: "",通电工时: 通电工时B,难度系数: "",isTotal: true,
 		}
 		gytableData.value.push(rowB)
 	}