|
|
@@ -1,16 +1,7 @@
|
|
|
<template>
|
|
|
- <h3>工单生产批次信息查询</h3>
|
|
|
+ <h3>工单生产批次质量档案查询</h3>
|
|
|
|
|
|
- <div
|
|
|
- style="
|
|
|
- width: 60%;
|
|
|
- height: 470px;
|
|
|
- position: fixed;
|
|
|
- left: 25%;
|
|
|
- padding: 20px;
|
|
|
- border-radius: 8px;
|
|
|
- background-color: #fff;
|
|
|
- box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);">
|
|
|
+ <div style="padding: 20px; height: 100%; overflow: auto;">
|
|
|
<div style="margin-top: 10px;">
|
|
|
<!-- 提示信息 -->
|
|
|
<hr>
|
|
|
@@ -28,38 +19,60 @@
|
|
|
<!-- 表格展示区域 -->
|
|
|
<div class="gva-table-box" style="margin-top: 15px;">
|
|
|
<el-table
|
|
|
- ref="multipleTable"
|
|
|
- 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' }"
|
|
|
- :data="tableDatalcd"
|
|
|
- :border="true"
|
|
|
- :tooltip-effect="'dark'"
|
|
|
- row-key="ID"
|
|
|
- highlight-current-row
|
|
|
- @row-click="tableRowClicklcd"
|
|
|
- @row-dblclick="updateCompanyFunclcd"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
+ ref="multipleTable"
|
|
|
+ style="width: 100%; max-height: 350px; overflow: auto;"
|
|
|
+ :row-style="{ height: '20px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
+ :data="tableDatalcd"
|
|
|
+ :border="true"
|
|
|
+ :tooltip-effect="'dark'"
|
|
|
+ row-key="ID"
|
|
|
+ highlight-current-row
|
|
|
+ @row-click="tableRowClicklcd"
|
|
|
+ @row-dblclick="updateCompanyFunclcd"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
<el-table-column align="left" label="工单编号" width="115" prop="Gd_gdbh" />
|
|
|
<el-table-column align="left" label="行号" width="60" prop="行号" />
|
|
|
<el-table-column align="left" label="工序名称" prop="Gd_cpmc" />
|
|
|
<!-- <el-table-column prop="工单" label="工单编号-行号-工序名称" align="left" sortable show-overflow-tooltipmin-width="300"/> -->
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <div class="gva-pagination">
|
|
|
+ <el-pagination
|
|
|
+ @size-change="OShandleSizeChange"
|
|
|
+ @current-change="OShandleCurrentChange"
|
|
|
+ :current-page="OSpage"
|
|
|
+ :page-size="OSpageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="OStotal">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 机台生产日报表维护弹窗 -->
|
|
|
- <el-dialog v-model="popdialog" title="机台生产日报表维护" destroy-on-close width="90%" style="height: 92%; margin-left: 5%; margin-top: 1%;">
|
|
|
+ <el-dialog
|
|
|
+ v-model="popdialog"
|
|
|
+ destroy-on-close
|
|
|
+ width="90%"
|
|
|
+ style="height: 92%; margin-left: 5%; margin-top: 1%;">
|
|
|
<div>
|
|
|
<!-- 顶层布局 -->
|
|
|
<layout>
|
|
|
<!-- 顶部的搜索区域 -->
|
|
|
<layout-header>
|
|
|
+ <div style="display: flex; justify-content: center; width: 100%;">
|
|
|
+ <h3 style="font-size: 24px; font-weight: bold;">工单批次质量档案</h3>
|
|
|
+</div>
|
|
|
+ <div style="display: flex; justify-content: right;margin-right: 100px;">
|
|
|
+ <el-button type="primary" class="bt" style="margin-left: 20px;" @click="pd_gdprintonClick" >工单打印</el-button>
|
|
|
+ </div>
|
|
|
<el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule">
|
|
|
<!-- 添加按钮 -->
|
|
|
<el-button type="primary" icon="edit" style="color: white;margin-left: 20px;" @click="ontuicclick" class="bt" title="退出">退出</el-button>
|
|
|
</el-form>
|
|
|
</layout-header>
|
|
|
+
|
|
|
|
|
|
<!-- 左右布局 -->
|
|
|
<layout style="height: calc(100% - 50px); display: flex;">
|
|
|
@@ -100,7 +113,8 @@
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<el-tab-pane label="工艺及生产班组" @click="showTable('工艺及生产班组')" name="first">
|
|
|
<el-table tooltip-effect="dark" :data="lcdtableData" row-key="ID"
|
|
|
- highlight-current-row="true"
|
|
|
+ highlight-current-row="true" empty-text="没有找到工艺生产数据"
|
|
|
+ class="custom-table"
|
|
|
:row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
border :show-overflow-tooltip="true" :cell-class-name="planUsageCellClass"
|
|
|
@@ -122,16 +136,20 @@
|
|
|
<el-table-column align="left" label="班组人员09" width="105" :formatter="(row) => `${row.sczl_bh9 || ''} ${row.name9 || ''}`"/>
|
|
|
<el-table-column align="left" label="班组人员10" width="105" :formatter="(row) => `${row.sczl_bh10 || ''} ${row.name10 || ''}`"/>
|
|
|
</el-table>
|
|
|
+ <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
|
|
|
+ 共 {{ lcdTableTotal }} 条记录
|
|
|
+ </div>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane label="制程检验记录" @click="showTable('制程检验记录')" name="second">
|
|
|
<el-table tooltip-effect="dark" :data="zcjyjltableData" row-key="ID"
|
|
|
- highlight-current-row="true"
|
|
|
+ highlight-current-row="true" empty-text="未找到该流程制程检验记录"
|
|
|
+ class="custom-table"
|
|
|
:row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
border :show-overflow-tooltip="true" :cell-class-name="planUsageCellClass"
|
|
|
- style="width: 100%;height: 65vh" ref="tablzcycjl_gxmc"
|
|
|
- @row-dblclick="zcycjlSelectClick">
|
|
|
+ style="width: 100%;height: 56vh" ref="tablzcycjl_gxmc"
|
|
|
+ @row-dblclick="zcjyjlSelectClick">
|
|
|
<el-table-column align="left" label="流程单号" width="100" prop="流程单号" />
|
|
|
<el-table-column align="left" label="工序名称" width="260" prop="工序名称" />
|
|
|
<el-table-column align="left" label="班组编号" width="100" prop="班组编号" />
|
|
|
@@ -141,21 +159,70 @@
|
|
|
<el-table-column align="left" label="项目备注" width="160" prop="项目备注" />
|
|
|
<el-table-column align="left" label="修改标准" width="160" prop="修改标准" />
|
|
|
</el-table>
|
|
|
+ <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
|
|
|
+ 共 {{ zcjyjlTotal }} 条记录
|
|
|
+ </div>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
<el-tab-pane label="制程异常记录" @click="showTable('制程异常记录')" name="third">
|
|
|
<el-table tooltip-effect="dark" :data="zcycjltableData" row-key="ID"
|
|
|
- highlight-current-row="true"
|
|
|
+ highlight-current-row="true" empty-text="该流程未存在制程异常记录"
|
|
|
+ class="custom-table"
|
|
|
:row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
border :show-overflow-tooltip="true" :cell-class-name="planUsageCellClass"
|
|
|
- style="width: 100%;height: 65vh" ref="tablzcycjl_gxmc"
|
|
|
+ style="width: 100%;height: 56vh" ref="tablzcycjl_gxmc"
|
|
|
@row-dblclick="zcycjlSelectClick">
|
|
|
<el-table-column align="left" label="流程单号" width="100" prop="流程单号" />
|
|
|
<el-table-column align="left" label="数量" width="100" prop="数量" />
|
|
|
<el-table-column align="left" label="异常备注" width="400" prop="缺陷备注" />
|
|
|
<el-table-column align="left" label="用户" width="160" prop="用户" />
|
|
|
</el-table>
|
|
|
+ <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
|
|
|
+ 共 {{ zcycjlTotal }} 条记录
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <el-tab-pane label="物料批次信息" @click="showTable('物料批次信息')" name="fourth">
|
|
|
+ <el-table tooltip-effect="dark" :data="wlpcxxtableData" row-key="ID"
|
|
|
+ highlight-current-row="true" empty-text="未找到该流程物料批次信息"
|
|
|
+ class="custom-table"
|
|
|
+ :row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
+ border :show-overflow-tooltip="true" :cell-class-name="planUsageCellClass"
|
|
|
+ style="width: 100%;height: 56vh" ref="tablzcycjl_gxmc"
|
|
|
+ @row-dblclick="wlpcxxSelectClick">
|
|
|
+ <el-table-column align="left" label="流程单号" width="100" prop="流程单号" />
|
|
|
+ <el-table-column align="left" label="物料编号" width="100" prop="物料编号" />
|
|
|
+ <el-table-column align="left" label="物料名称" width="400" prop="物料名称" />
|
|
|
+ <el-table-column align="left" label="供方批次" width="160" prop="供方批次" />
|
|
|
+ <el-table-column align="left" label="工序名称" width="160" prop="工序名称" />
|
|
|
+ </el-table>
|
|
|
+ <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
|
|
|
+ 共 {{ wlpcxxTotal }} 条记录
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <el-tab-pane label="印版记录" @click="showTable('印版记录')" name="fifth">
|
|
|
+ <el-table tooltip-effect="dark" :data="ybtableData" row-key="ID"
|
|
|
+ highlight-current-row="true" empty-text="未找到该流程印版记录"
|
|
|
+ class="custom-table"
|
|
|
+ :row-style="{ height: '0px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
+ border :show-overflow-tooltip="true" :cell-class-name="planUsageCellClass"
|
|
|
+ style="width: 100%;height: 56vh" ref="tablzcycjl_gxmc"
|
|
|
+ @row-dblclick="ybSelectClick">
|
|
|
+ <el-table-column align="left" label="流程单号" width="100" prop="流程单号" />
|
|
|
+ <el-table-column align="left" label="存货编码" width="100" prop="存货编码" />
|
|
|
+ <el-table-column align="left" label="供方批号" width="400" prop="供方批号" />
|
|
|
+ <el-table-column align="left" label="物料名称" width="160" prop="物料名称" />
|
|
|
+ <el-table-column align="left" label="领用机台" width="160" prop="领用机台" />
|
|
|
+ <el-table-column align="left" label="工序名称" width="160" prop="工序名称" />
|
|
|
+ <el-table-column align="left" label="用户" width="160" prop="用户" />
|
|
|
+ </el-table>
|
|
|
+ <div style="text-align: right; margin-top: 10px; font-size: 14px; color: #606266;">
|
|
|
+ 共 {{ ybTotal }} 条记录
|
|
|
+ </div>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
</el-tabs>
|
|
|
@@ -166,7 +233,8 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
-
|
|
|
+ <PrintPage ref="printPageRef" />
|
|
|
+
|
|
|
</template>
|
|
|
<script>
|
|
|
//点击按钮显示下方表格
|
|
|
@@ -180,7 +248,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
<script setup>
|
|
|
@@ -196,10 +264,11 @@ import {
|
|
|
findCompany,
|
|
|
getCompanyList
|
|
|
} from '@/api/company'
|
|
|
+import PrintPage from '@/view/yunyin/shengchanguanli/components/print.vue'
|
|
|
// 全量引入格式化工具 请按需保留
|
|
|
import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
-import { ref, reactive } from 'vue'
|
|
|
+import { ref, reactive,watch,onMounted,nextTick } from 'vue'
|
|
|
import {
|
|
|
StaGetOrderList,
|
|
|
StaGetList,
|
|
|
@@ -207,6 +276,8 @@ import {
|
|
|
StaGetOrderDetail,
|
|
|
StaProcessAnomaly,
|
|
|
StaProcessInspection,
|
|
|
+ MaterialsBatch,
|
|
|
+ PrintingPlateList
|
|
|
} from '@/api/mes/job'
|
|
|
//获取当前登录用户信息
|
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
|
@@ -214,7 +285,7 @@ const userStore = useUserStore()
|
|
|
const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
|
|
|
|
|
|
defineOptions({
|
|
|
- name: 'Company'
|
|
|
+ name: 'Onderstatus'
|
|
|
})
|
|
|
|
|
|
//进入页面默认光标加载
|
|
|
@@ -226,7 +297,7 @@ setTimeout(() => {
|
|
|
}, 100);
|
|
|
|
|
|
/*
|
|
|
- 工单生产批次信息查询
|
|
|
+ 工单生产批次质量档案查询
|
|
|
*/
|
|
|
const scpconlist = ref(false);
|
|
|
const scpconClick = async () => {
|
|
|
@@ -259,9 +330,9 @@ const Enterkeysearch = (event) => {
|
|
|
};
|
|
|
//调用接口
|
|
|
const _StaGetOrderList = async (node) => {
|
|
|
- const StaGetOrderListdata = await StaGetOrderList({search:searchInfolcd.value});
|
|
|
+ const StaGetOrderListdata = await StaGetOrderList({search:searchInfolcd.value,page:OSpage.value,pageSize:OSpageSize.value});
|
|
|
console.log(StaGetOrderListdata)
|
|
|
- if (StaGetOrderListdata.data === null) {
|
|
|
+ if (StaGetOrderListdata.data.data === null) {
|
|
|
ElMessage({
|
|
|
type: 'warning',
|
|
|
message: '未搜索具体查询条件',
|
|
|
@@ -269,7 +340,8 @@ const _StaGetOrderList = async (node) => {
|
|
|
duration: 3000 // 可选:设置消息显示的持续时间(单位:毫秒)
|
|
|
});
|
|
|
}
|
|
|
- tableDatalcd.splice(0,tableDatalcd.length,...StaGetOrderListdata.data);//表格数据
|
|
|
+ tableDatalcd.splice(0,tableDatalcd.length,...StaGetOrderListdata.data.data);//表格数据
|
|
|
+ OStotal.value = StaGetOrderListdata.data.total
|
|
|
};
|
|
|
|
|
|
// 树形节点属性映射
|
|
|
@@ -330,53 +402,171 @@ const handleNodeClicklcd = (node) => {
|
|
|
_StaProcessList(node['num'])
|
|
|
_StaProcessInspection(node['num'])
|
|
|
_StaProcessAnomaly(node['num'])
|
|
|
+ _MaterialsBatch(node['num'])
|
|
|
+ _PrintingPlateList(node['num'])
|
|
|
};
|
|
|
|
|
|
-//获取左侧菜单栏
|
|
|
+// 获取左侧菜单栏
|
|
|
const _StaGetList = async (row) => {
|
|
|
const StaGetListdata = await StaGetList({gdbh:row['Gd_gdbh'],yjno:row['行号']});
|
|
|
console.log(StaGetListdata.msg)
|
|
|
+
|
|
|
if(StaGetListdata.msg === '成功'){
|
|
|
- treeDatalcd.splice(0, treeDatalcd.length, ...StaGetListdata.data);
|
|
|
- popdialog.value = true
|
|
|
- }else{
|
|
|
- console.log(StaGetListdata.msg)
|
|
|
- ElMessage({type: 'warning',message: StaGetListdata.msg})
|
|
|
+ treeDatalcd.splice(0, treeDatalcd.length, ...StaGetListdata.data);
|
|
|
+ popdialog.value = true
|
|
|
+
|
|
|
+ // 使用 nextTick 等待 DOM 更新完成后自动选择第一条
|
|
|
+ await nextTick()
|
|
|
+
|
|
|
+ // 方法1:直接触发点击事件
|
|
|
+ if (treeDatalcd.length > 0) {
|
|
|
+ // 自动点击第一条数据
|
|
|
+ const firstNode = treeDatalcd[0]
|
|
|
+ // 等待一个微小的延迟确保树已渲染
|
|
|
+ setTimeout(() => {
|
|
|
+ handleNodeClicklcd(firstNode)
|
|
|
+ }, 50)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ console.log(StaGetListdata.msg)
|
|
|
+ ElMessage({type: 'warning',message: StaGetListdata.msg})
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-//工艺及生产班组
|
|
|
const lcdtableData = reactive([])
|
|
|
+const lcdTableTotal = ref(0) // 添加总数变量
|
|
|
+
|
|
|
const _StaProcessList = async (node) => {
|
|
|
- const StaProcessListdata = await StaProcessList({gdbh:_Gd_gdbhlcd.value,yjno:_Gd_yjnolcd.value,num:node});
|
|
|
- if(StaProcessListdata.code === 0){
|
|
|
- lcdtableData.splice(0,lcdtableData.length,...StaProcessListdata.data);
|
|
|
- }else{
|
|
|
- lcdtableData.splice(0,lcdtableData.length,...[]);
|
|
|
+ try {
|
|
|
+ const StaProcessListdata = await StaProcessList({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value,num: node});
|
|
|
+ console.log('接口返回数据:', StaProcessListdata)
|
|
|
+ if (StaProcessListdata.code === 0) {
|
|
|
+ // 正确获取数据数组和总数
|
|
|
+ const tableData = StaProcessListdata.data?.data || []
|
|
|
+ const total = StaProcessListdata.data?.total || 0
|
|
|
+ lcdtableData.splice(0, lcdtableData.length, ...tableData)
|
|
|
+ lcdTableTotal.value = total
|
|
|
+ console.log('加载数据条数:', tableData.length, '总数:', total)
|
|
|
+ } else {
|
|
|
+ lcdtableData.splice(0, lcdtableData.length, ...[])
|
|
|
+ lcdTableTotal.value = 0
|
|
|
+ console.warn('接口返回错误:', StaProcessListdata.msg)
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取工艺生产数据失败:', error)
|
|
|
+ lcdtableData.splice(0, lcdtableData.length, ...[])
|
|
|
+ lcdTableTotal.value = 0
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
|
|
|
-//制程异常记录
|
|
|
+//制程检验记录
|
|
|
const zcjyjltableData = reactive([])
|
|
|
+const zcjyjlTotal = ref(0) // 添加总数变量
|
|
|
+
|
|
|
const _StaProcessInspection = async (node) => {
|
|
|
- const StaProcessInspectiondata = await StaProcessInspection({gdbh:_Gd_gdbhlcd.value,yjno:_Gd_yjnolcd.value,num:node});
|
|
|
- if(StaProcessInspectiondata.code === 0){
|
|
|
- zcjyjltableData.splice(0,zcjyjltableData.length,...StaProcessInspectiondata.data);
|
|
|
- }else{
|
|
|
- zcjyjltableData.splice(0,zcjyjltableData.length,...[]);
|
|
|
+ try {
|
|
|
+ const StaProcessInspectiondata = await StaProcessInspection({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value,num: node});
|
|
|
+
|
|
|
+
|
|
|
+ if (StaProcessInspectiondata.code === 0) {
|
|
|
+ const tableData = StaProcessInspectiondata.data?.data || []
|
|
|
+ const total = StaProcessInspectiondata.data?.total || 0
|
|
|
+ zcjyjltableData.splice(0, zcjyjltableData.length, ...tableData)
|
|
|
+ zcjyjlTotal.value = total
|
|
|
+ console.log('制程检验加载数据:', tableData.length, '条,总数:', total)
|
|
|
+ } else {
|
|
|
+ zcjyjltableData.splice(0, zcjyjltableData.length, ...[])
|
|
|
+ zcjyjlTotal.value = 0
|
|
|
+ console.warn('制程检验接口返回错误:', StaProcessInspectiondata.msg)
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取制程检验数据失败:', error)
|
|
|
+ zcjyjltableData.splice(0, zcjyjltableData.length, ...[])
|
|
|
+ zcjyjlTotal.value = 0
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
|
|
|
//制程异常记录
|
|
|
const zcycjltableData = reactive([])
|
|
|
+const zcycjlTotal = ref(0) // 添加总数变量
|
|
|
const _StaProcessAnomaly = async (node) => {
|
|
|
- const StaProcessAnomalydata = await StaProcessAnomaly({gdbh:_Gd_gdbhlcd.value,yjno:_Gd_yjnolcd.value,num:node});
|
|
|
- if(StaProcessAnomalydata.code === 0){
|
|
|
- zcycjltableData.splice(0,zcycjltableData.length,...StaProcessAnomalydata.data);
|
|
|
- }else{
|
|
|
- zcycjltableData.splice(0,zcycjltableData.length,...[]);
|
|
|
+ try {
|
|
|
+ const StaProcessAnomalydata = await StaProcessAnomaly({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value,num: node});
|
|
|
+ console.log('制程异常接口返回:', StaProcessAnomalydata)
|
|
|
+
|
|
|
+ if (StaProcessAnomalydata.code === 0) {
|
|
|
+ const tableData = StaProcessAnomalydata.data?.data || []
|
|
|
+ const total = StaProcessAnomalydata.data?.total || 0
|
|
|
+ zcycjltableData.splice(0, zcycjltableData.length, ...tableData)
|
|
|
+ zcycjlTotal.value = total
|
|
|
+ console.log('制程异常加载数据:', tableData.length, '条,总数:', total)
|
|
|
+ } else {
|
|
|
+ zcycjltableData.splice(0, zcycjltableData.length, ...[])
|
|
|
+ zcycjlTotal.value = 0
|
|
|
+ console.warn('制程异常接口返回错误:', StaProcessAnomalydata.msg)
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取制程异常数据失败:', error)
|
|
|
+ zcycjltableData.splice(0, zcycjltableData.length, ...[])
|
|
|
+ zcycjlTotal.value = 0
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
+
|
|
|
+//物料批次信息
|
|
|
+const wlpcxxtableData = reactive([])
|
|
|
+const wlpcxxTotal = ref(0) // 添加总数变量
|
|
|
+const _MaterialsBatch = async (node) => {
|
|
|
+ try {
|
|
|
+ const MaterialsBatchdata = await MaterialsBatch({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value,num: node,cpdh:_GetorderDetail.value['Gd_cpdh']});
|
|
|
+ console.log('物料批次接口返回:', MaterialsBatchdata)
|
|
|
+
|
|
|
+ if (MaterialsBatchdata.code === 0) {
|
|
|
+ const tableData = MaterialsBatchdata.data?.data || []
|
|
|
+ const total = MaterialsBatchdata.data?.total || 0
|
|
|
+ wlpcxxtableData.splice(0, wlpcxxtableData.length, ...tableData)
|
|
|
+ wlpcxxTotal.value = total
|
|
|
+ console.log('物料批次加载数据:', tableData.length, '条,总数:', total)
|
|
|
+ } else {
|
|
|
+ wlpcxxtableData.splice(0, wlpcxxtableData.length, ...[])
|
|
|
+ wlpcxxTotal.value = 0
|
|
|
+ console.warn('物料批次接口返回错误:', MaterialsBatchdata.msg)
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取物料批次数据失败:', error)
|
|
|
+ wlpcxxtableData.splice(0, wlpcxxtableData.length, ...[])
|
|
|
+ wlpcxxTotal.value = 0
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//印版记录
|
|
|
+const ybtableData = reactive([])
|
|
|
+const ybTotal = ref(0) // 添加总数变量
|
|
|
+const _PrintingPlateList = async (node) => {
|
|
|
+ try {
|
|
|
+ const PrintingPlateListdata = await PrintingPlateList({gdbh: _Gd_gdbhlcd.value,yjno: _Gd_yjnolcd.value});
|
|
|
+ console.log('印版记录接口返回:', PrintingPlateListdata)
|
|
|
+
|
|
|
+ if (PrintingPlateListdata.code === 0) {
|
|
|
+ const tableData = PrintingPlateListdata.data?.data || []
|
|
|
+ const total = PrintingPlateListdata.data?.total ||
|
|
|
+
|
|
|
+
|
|
|
+ 0
|
|
|
+ ybtableData.splice(0, ybtableData.length, ...tableData)
|
|
|
+ console.log('印版记录接口返回数据:', ybtableData)
|
|
|
+ ybTotal.value = total
|
|
|
+ console.log('印版记录加载数据:', tableData.length, '条,总数:', total)
|
|
|
+ } else {
|
|
|
+ ybtableData.splice(0, ybtableData.length, ...[])
|
|
|
+ ybTotal.value = 0
|
|
|
+ console.warn('印版记录接口返回错误:', PrintingPlateListdata.msg)
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取印版记录数据失败:', error)
|
|
|
+ ybtableData.splice(0, ybtableData.length, ...[])
|
|
|
+ ybTotal.value = 0
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
//退出按钮
|
|
|
const ontuicclick = async () => {
|
|
|
@@ -388,6 +578,49 @@ const ontuicclicks = async () => {
|
|
|
scpconlist.value = false
|
|
|
};
|
|
|
|
|
|
+// 2. 添加 props 定义
|
|
|
+const props = defineProps({
|
|
|
+ defaultSearchValue: {
|
|
|
+ type: String,
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+// 3. 监听默认搜索值变化,自动触发搜索
|
|
|
+watch(() => props.defaultSearchValue, (newVal) => {
|
|
|
+ if (newVal) {
|
|
|
+ searchInfolcd.value = newVal;
|
|
|
+ onSubmitlcd(); // 自动调用搜索方法
|
|
|
+ }
|
|
|
+}, { immediate: true }) // immediate: true 表示组件挂载时就执行一次
|
|
|
+
|
|
|
+
|
|
|
+// 分页
|
|
|
+const OSpage = ref(1)
|
|
|
+const OStotal = ref(0)
|
|
|
+const OSpageSize = ref(15)
|
|
|
+const OShandleCurrentChange = (val) => {
|
|
|
+ OSpage.value = val;
|
|
|
+ _StaGetOrderList();
|
|
|
+};
|
|
|
+
|
|
|
+// 修改页面容量 点击多少条/页
|
|
|
+const OShandleSizeChange = (val) => {
|
|
|
+ // page.value = 10;
|
|
|
+ OSpageSize.value = val;
|
|
|
+ _StaGetOrderList();
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+//工单打印
|
|
|
+const printPageRef = ref()
|
|
|
+const pd_gdprintonClick = () => {
|
|
|
+ if( _GetorderDetail.value['Gd_gdbh']==''){
|
|
|
+ ElMessage({ type: 'warning', message: '未获取到工单' });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ printPageRef.value.open(_GetorderDetail.value['Gd_gdbh'])
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -472,4 +705,21 @@ const ontuicclicks = async () => {
|
|
|
:deep(.el-tree-node:focus > .el-tree-node__content){
|
|
|
background: #ff80ff !important;
|
|
|
}
|
|
|
+
|
|
|
+ /* 如果使用 scoped */
|
|
|
+ :deep(.center-title-dialog.el-dialog__header) {
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+
|
|
|
+:deep(.center-title-dialog .el-dialog__title) {
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.custom-table ::v-deep .el-table__empty-text {
|
|
|
+ color: #ff6b6b;
|
|
|
+ font-size: 32px;
|
|
|
+ font-weight: bold;
|
|
|
+ padding: 30px 0;
|
|
|
+}
|
|
|
</style>
|