|
|
@@ -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)
|
|
|
}
|