|
|
@@ -10,7 +10,7 @@
|
|
|
<el-input v-model="searchInfo" placeholder="搜索工单编号" clearable style="width: 200px;margin: 5px"></el-input>
|
|
|
<el-button type="primary" class="bt" @click="onADD" >新增</el-button>
|
|
|
<el-button type="primary" class="bt" :disabled="!selectedIds" @click="onDelete" >删除</el-button>
|
|
|
- <el-button type="primary" class="bt" icon="download" @click="hzToExcel" >导出到Excel</el-button>
|
|
|
+ <el-button type="primary" class="bt" icon="download" @click="dhlToExcel" >导出到Excel</el-button>
|
|
|
<el-button type="primary" icon="edit" @click="gd_gxclhconClick" class="bt" title="工序产量核查">工序产量核查</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -38,14 +38,14 @@
|
|
|
<el-table ref="multipleTable" style="width: 100%;height: 75vh" tooltip-effect="dark"
|
|
|
:row-style="{ height: '25px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
- :data="hztableData" border row-key="ID"
|
|
|
- size="small"
|
|
|
+ :data="dhltableData" border row-key="ID"
|
|
|
+ size="small" id="dhltable"
|
|
|
:cell-class-name="gxbgCellClass"
|
|
|
highlight-current-row="true" @row-dblclick="updateCompanyFunc"
|
|
|
@row-click="tableRowClick" :show-overflow-tooltip="true"
|
|
|
@selection-change="handleSelectionChange">
|
|
|
- <el-table-column sortable align="center" label="工单编号" prop="工单编号" width="120" />
|
|
|
- <el-table-column sortable align="center" label="领用日期" prop="领用日期" width="130" />
|
|
|
+ <el-table-column sortable align="center" label="工单编号" prop="st_gdbh" width="120" />
|
|
|
+ <el-table-column sortable align="center" label="领用日期" prop="st_rq" width="130" />
|
|
|
<el-table-column align="center" label="卷宽" prop="卷宽" width="60" />
|
|
|
<el-table-column align="center" label="卷长" prop="卷长" width="70" />
|
|
|
<el-table-column align="center" label="领用宽度" prop="领用宽度" width="90" />
|
|
|
@@ -53,11 +53,14 @@
|
|
|
<el-table-column align="center" label="机台" prop="机台" width="90" />
|
|
|
<el-table-column align="center" label="采购单号" prop="采购单号" width="110" />
|
|
|
<el-table-column align="center" label="供方批次" prop="供方批次" width="110" />
|
|
|
- <el-table-column align="center" label="物料代码" prop="物料代码" width="140" />
|
|
|
+ <el-table-column align="center" label="物料代码" prop="st_wlbh" width="140" />
|
|
|
<el-table-column align="center" label="物料名称" prop="物料名称" width="200" />
|
|
|
<el-table-column align="center" label="备注" prop="备注" width="110" />
|
|
|
<el-table-column align="center" label="成品代号" prop="成品代号" width="200" />
|
|
|
<el-table-column align="center" label="成品名称" prop="成品名称" width="200" />
|
|
|
+ <el-table-column align="center" label="印件号" prop="st_yjno" width="200" />
|
|
|
+ <el-table-column align="center" label="印件代号" prop="印件代号" width="200" />
|
|
|
+ <el-table-column align="center" label="印件名称" prop="印件名称" width="200" />
|
|
|
<el-table-column align="center" label="创建用户" prop="创建用户" width="200" />
|
|
|
<el-table-column align="center" label="创建时间" prop="创建时间" width="200" />
|
|
|
</el-table>
|
|
|
@@ -69,8 +72,213 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 设备折旧参数维护弹出框 -->
|
|
|
+ <el-dialog
|
|
|
+ v-model="dialogMachineVisible"
|
|
|
+ :before-close="sbcloseDialog"
|
|
|
+ :title="type === 'create' ? '电化铝领用记录新增' : '电化铝领用记录修改'"
|
|
|
+ destroy-on-close
|
|
|
+ style="width: 60%; margin: 5vh auto;"
|
|
|
+ >
|
|
|
+ <el-form :model="machineForm" label-width="120px">
|
|
|
+ <!-- 第一行:部门 -->
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="发生日期">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="machineForm.发生日期"
|
|
|
+ type="date"
|
|
|
+ placeholder="选择发生日期"
|
|
|
+ style="width: 100%"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="交易类型">
|
|
|
+ <el-input v-model="machineForm.交易类型" placeholder="请输入交易类型" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
+ <!-- 第二行:设备信息 -->
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="工单编号">
|
|
|
+ <el-input v-model="machineForm.工单编号" @keyup.enter="getGD()" placeholder="请输入工单编号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="machineForm.工单名称" readonly />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="印件号">
|
|
|
+ <el-input v-model="machineForm.印件号" readonly />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input v-model="machineForm.印件名称" readonly />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- 第三行:供应商 -->
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-form-item label="物料编号">
|
|
|
+ <el-input v-model="machineForm.物料编号" placeholder="请输入物料编号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-form-item label="物料名称">
|
|
|
+ <el-input v-model="machineForm.物料名称" placeholder="请输入物料名称" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- 第四行:出厂编号 -->
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="采购单号">
|
|
|
+ <el-input v-model="machineForm.采购单号" placeholder="请输入采购单号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="供方批次">
|
|
|
+ <el-input v-model="machineForm.供方批次" placeholder="请输入供方批次" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- 第五行:执行人员 -->
|
|
|
+ <el-row :gutter="20">
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="整卷长度">
|
|
|
+ <el-input v-model="machineForm.整卷长度" placeholder="请输入整卷长度" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="整卷幅宽">
|
|
|
+ <el-input v-model="machineForm.整卷幅宽" placeholder="请输入整卷幅宽" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- 第六行:保养信息 -->
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="领用宽度">
|
|
|
+ <el-input v-model="machineForm.领用宽度" placeholder="请输入领用宽度" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="领用数量">
|
|
|
+ <el-input v-model="machineForm.领用数量" placeholder="请输入领用数量" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="单位">
|
|
|
+ <el-input v-model="machineForm.单位" placeholder="请输入单位" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- 第六行:验收信息 -->
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="机台编号">
|
|
|
+ <el-input v-model="machineForm.机台编号" placeholder="请输入机台编号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 第七行:工时信息 -->
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="其他备注">
|
|
|
+ <el-input v-model="machineForm.其他备注" placeholder="请输入其他备注" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <!-- 弹窗底部按钮 -->
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer" style="width: 100%;">
|
|
|
+ <el-button @click="sbcloseDialog" style="width: 100px; height: 40px;">关 闭</el-button>
|
|
|
+ <el-button type="primary" @click="sbenterDialog" style="width: 100px; height: 40px;">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!--工序产量核查【弹窗】-->
|
|
|
+ <el-dialog v-model="gd_gxclhclist" title="工序产量核查" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
|
|
|
+ <el-button type="" @click="gxclhcCancel">退出</el-button>
|
|
|
+ <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
|
|
|
+ <div style="width: 100%; height: 60px; padding: 0px; display: flex; align-items: center;">
|
|
|
+
|
|
|
+ <el-form-item label="工单编号" prop="currentProcess" style="margin-right: 20px; padding: 20px 0px 0px 0px">
|
|
|
+ <el-input v-model="gxclhcformData['gdbh']" @keyup.enter="gxclhcProductValue" />
|
|
|
+ </el-form-item>
|
|
|
+ 印件选择:
|
|
|
+ <el-select v-model="gdwhformData.yjno" placeholder="请选择" allow-create filterable style="width: 100px;margin-right: 20px; padding: 0px;">
|
|
|
+ <el-option v-for="option in gdwhformData.yinjian" @click="ongdwhfanclick" :key="option" :label="option" :value="option" />
|
|
|
+ </el-select>
|
|
|
+ <el-input v-model="inputCpmc" readonly style="width: 50vw; margin-right: 0px;" />
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <el-table ref="paichengRef"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ :row-style="{ height: '0px' }"
|
|
|
+ :cell-style="{ padding: '0px' }" :header-row-style="{ height: '0px' }"
|
|
|
+ :header-cell-style="{ padding: '0px' }"
|
|
|
+ style="width: 100%;height: 70vh" border tooltip-effect="dark"
|
|
|
+ highlight-current-row="true"
|
|
|
+ @row-click="gxclhc_tableRowClick"
|
|
|
+ :data="gxclhc_Data" row-key="ID"
|
|
|
+ :cell-class-name="gxclhcCellClass">
|
|
|
+ <template v-for="(item, idx) in gxclhc_Columns">
|
|
|
+ <el-table-column #default="{ row, column, $index }" align="left" :label="item.label" :width="item.width" >
|
|
|
+ {{row[item.prop]}}
|
|
|
+ </el-table-column>
|
|
|
+ </template>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 工单选择弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ v-model="orderSelectDialogVisible"
|
|
|
+ title="请选择工单"
|
|
|
+ width="60%"
|
|
|
+ @keyup.enter="confirmOrderSelection"
|
|
|
+ @keydown.up="handleKeyUp"
|
|
|
+ @keydown.down="handleKeyDown"
|
|
|
+ >
|
|
|
+ <el-tree
|
|
|
+ ref="orderTreeRef"
|
|
|
+ :data="YjtreeData"
|
|
|
+ :props="treeProps"
|
|
|
+ node-key="id"
|
|
|
+ highlight-current
|
|
|
+ @node-click="handleTreeNodeClick"
|
|
|
+ style="height: 400px; overflow: auto;"
|
|
|
+ >
|
|
|
+ <template #default="{ node, data }">
|
|
|
+ <span>{{ data.yj_Yjno }} - {{ data.yj_yjmc }}</span>
|
|
|
+ </template>
|
|
|
+ </el-tree>
|
|
|
+
|
|
|
+
|
|
|
+ </el-dialog>
|
|
|
|
|
|
</el-main>
|
|
|
</layout-content>
|
|
|
@@ -81,28 +289,326 @@
|
|
|
<script setup>
|
|
|
// 全量引入格式化工具 请按需保留
|
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
-
|
|
|
- import {ref, reactive} from 'vue'
|
|
|
+ import {getOrderInfo,} from '@/api/mes_api_gty/workOrderVerification'
|
|
|
+ import {PrintDetailList,getOrderProcessCount}from "@/api/yunyin/yunying";
|
|
|
+ import {getAETab,getAEList,getAEAdd,getAEDetail,getAEUpdate,getAEDelete,getMaterials,getMachine} from "@/api/mes/job.js"
|
|
|
+ import {ref, reactive,nextTick,computed} from 'vue'
|
|
|
+ import * as XLSX from 'xlsx'
|
|
|
+ import FileSaver from 'file-saver'
|
|
|
import { exportExcelFile } from '@/utils/excel'
|
|
|
- import {ElMessage} from "element-plus";
|
|
|
+ import {ElMessage,ElMessageBox} from "element-plus";
|
|
|
defineOptions({name: 'Company'})
|
|
|
// =========== 获取左侧树侧形结构 ===========
|
|
|
+ const treeData = ref([]);
|
|
|
+ const defaultProps = {
|
|
|
+ children: 'children',
|
|
|
+ label: 'label'
|
|
|
+};
|
|
|
+const displayMod = ref("data");
|
|
|
+const getTreeData = async () => {
|
|
|
+ try {
|
|
|
+ const response = await getAETab({type: displayMod.value === 'data' ? 1 : 0 });
|
|
|
+ if (response.code === 0 && response.data) {
|
|
|
+ treeData.value = Object.entries(response.data).map(([date, items]) => ({
|
|
|
+ label: date,
|
|
|
+ children: items.map(item => ({
|
|
|
+ label: item,
|
|
|
+ children: []
|
|
|
+ }))
|
|
|
+ }));
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('获取树形数据失败:', error);
|
|
|
+ }
|
|
|
+};
|
|
|
+getTreeData()
|
|
|
+
|
|
|
+const onCountByGdbh = async () => {
|
|
|
+ displayMod.value = displayMod.value === "data" ? "gd" : "data";
|
|
|
+ await getTreeData();
|
|
|
+};
|
|
|
+
|
|
|
+const dhltableData = ref([])
|
|
|
+const nodeclick = ref('') // 选中的节点
|
|
|
+const handleNodeClick = async (node) => {
|
|
|
+ console.log(node); // 打印选中的节点信息
|
|
|
+ if(node.children.length != 0){
|
|
|
+ nodeclick.value = node.label; // 保存选中的节点信息
|
|
|
+ const response = await getAEList({search: node.label,type: displayMod.value === 'data' ? 1 : 0}); // 替换为实际的API调用
|
|
|
+ if (response.code === 0 && response.data) {
|
|
|
+ dhltableData.value = response.data;
|
|
|
+ }
|
|
|
+ }else if(node.children.length== 0){
|
|
|
+ const response = await getAEList({sys_id:node.label.split("【")[0], search:nodeclick.value,type: displayMod.value === 'data'? 1 : 0}); // 替换为实际的API调用
|
|
|
+ }
|
|
|
+ if (response.code === 0 && response.data) {
|
|
|
+ dhltableData.value = response.data;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
|
|
+ //新增
|
|
|
+ const machineForm = reactive({
|
|
|
+ })
|
|
|
+ const dialogMachineVisible = ref(false)
|
|
|
+ const type = ref('create') // 'create' 或 'update'
|
|
|
+ const onADD = () => {
|
|
|
+ // 新增逻辑
|
|
|
+ console.log('新增按钮点击');
|
|
|
+ type.value = 'create'
|
|
|
+ dialogMachineVisible.value = true
|
|
|
+ }
|
|
|
|
|
|
-
|
|
|
|
|
|
-
|
|
|
|
|
|
+// 工单选择相关状态
|
|
|
+const orderSelectDialogVisible = ref(false)
|
|
|
+const orderList = ref([])
|
|
|
+const selectedOrder = ref(null)
|
|
|
+const orderTreeRef = ref(null)
|
|
|
|
|
|
-
|
|
|
+const YjtreeData = computed(() => {
|
|
|
+ return orderList.value.map((item, index) => ({
|
|
|
+ ...item,
|
|
|
+ id: `item-${index}`, // 简化ID生成
|
|
|
+ label: `${item.yj_Yjno} - ${item.yj_yjmc} (${item.Gd_cpmc})`
|
|
|
+ }))
|
|
|
+})
|
|
|
|
|
|
+const getGD = async () => {
|
|
|
+ const res = await getOrderInfo({ order: machineForm.工单编号 })
|
|
|
+ console.log(res)
|
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
+ if (res.data.length === 1) {
|
|
|
+ // 只有一条数据,直接赋值
|
|
|
+ machineForm.工单名称 = res.data[0].Gd_cpmc
|
|
|
+ machineForm.印件号 = res.data[0].yj_Yjno
|
|
|
+ machineForm.印件名称 = res.data[0].yj_yjmc
|
|
|
+ const response = await getMaterials({ gdbh: machineForm.工单编号,yjno:machineForm.印件号 });
|
|
|
+ console.log(response)
|
|
|
+ } else if (res.data.length > 1) {
|
|
|
+ // 多条数据,显示选择弹窗
|
|
|
+ orderList.value = res.data
|
|
|
+ orderSelectDialogVisible.value = true
|
|
|
+
|
|
|
+ // 等待树渲染完成后自动选中第一个节点
|
|
|
+ nextTick(() => {
|
|
|
+ if (orderTreeRef.value && YjtreeData.value.length > 0) {
|
|
|
+ const firstNode = YjtreeData.value[0].children?.[0] || YjtreeData.value[0]
|
|
|
+ orderTreeRef.value.setCurrentKey(firstNode.id)
|
|
|
+ selectedOrder.value = firstNode.isGroup ? null : firstNode
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ ElMessage.warning('未找到相关工单信息')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.msg)
|
|
|
+ }
|
|
|
+}
|
|
|
+// 键盘导航方法
|
|
|
+const handleKeyUp = () => {
|
|
|
+ const tree = orderTreeRef.value
|
|
|
+ const current = tree.getCurrentNode()
|
|
|
+ const nodes = YjtreeData.value
|
|
|
+ const currentIndex = nodes.findIndex(node => node.id === current?.id)
|
|
|
|
|
|
+ if (currentIndex > 0) {
|
|
|
+ const prevNode = nodes[currentIndex - 1]
|
|
|
+ tree.setCurrentKey(prevNode.id)
|
|
|
+ selectedOrder.value = prevNode
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const handleKeyDown = () => {
|
|
|
+ const tree = orderTreeRef.value
|
|
|
+ const current = tree.getCurrentNode()
|
|
|
+ const nodes = YjtreeData.value
|
|
|
+ const currentIndex = nodes.findIndex(node => node.id === current?.id)
|
|
|
|
|
|
+ if (currentIndex < nodes.length - 1) {
|
|
|
+ const nextNode = nodes[currentIndex + 1]
|
|
|
+ tree.setCurrentKey(nextNode.id)
|
|
|
+ selectedOrder.value = nextNode
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 处理树节点点击
|
|
|
+const handleTreeNodeClick = (data) => {
|
|
|
+ selectedOrder.value = data
|
|
|
+ orderTreeRef.value.setCurrentKey(data.id)
|
|
|
+}
|
|
|
+
|
|
|
+// 修改自动选择逻辑
|
|
|
+nextTick(() => {
|
|
|
+ if (orderTreeRef.value && YjtreeData.value.length > 0) {
|
|
|
+ const firstNode = YjtreeData.value[0]
|
|
|
+ orderTreeRef.value.setCurrentKey(firstNode.id)
|
|
|
+ selectedOrder.value = firstNode
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+// 确认选择
|
|
|
+const confirmOrderSelection = () => {
|
|
|
+ if (!selectedOrder.value) {
|
|
|
+ ElMessage.warning('请选择一条工单记录')
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
+ // 赋值
|
|
|
+ machineForm.工单名称 = selectedOrder.value.Gd_cpmc
|
|
|
+ machineForm.印件号 = selectedOrder.value.yj_Yjno
|
|
|
+ machineForm.印件名称 = selectedOrder.value.yj_yjmc
|
|
|
+ //关闭弹窗
|
|
|
+ orderSelectDialogVisible.value = false
|
|
|
+ selectedOrder.value = null
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+ const _Gd_gdbh = ref('')
|
|
|
+ const tableRowClick = async (row) => {
|
|
|
+ _Gd_gdbh.value = row.st_gdbh;
|
|
|
+ }
|
|
|
+ //=========工序产量核查===========
|
|
|
+const gd_gxclhclist = ref(false);
|
|
|
+const gxclhc_Data = ref([]);
|
|
|
+const gxclhc_Columns = ref(
|
|
|
+ [
|
|
|
+ { label: '印件及工序名称', prop: 'concatenatedData', width: '380' },
|
|
|
+ // { label: '印件', prop: 'Gy0_yjno', width: '130' },
|
|
|
+ // { label: '工序', prop: 'Gy0_gxh', width: '130' },
|
|
|
+ // { label: '名称', prop: 'Gy0_gxmc', width: '130' },
|
|
|
+ { label: '工序计划产量', prop: 'Gy0_计划接货数', width: '120' },
|
|
|
+ { label: '联数', prop: 'Gy0_ls', width: '70' },
|
|
|
+ { label: '折算车头产量', prop: '折算车头产量', width: '120' },
|
|
|
+ { label: '实际上报产量', prop: 'sczl_cl', width: '120' },
|
|
|
+ { label: '制程废品', prop: 'sczl_zcfp', width: '120' },
|
|
|
+ { label: '制程废品率', prop: '制程废品率', width: '120' },
|
|
|
+ { label: '来料异常', prop: '来料异常', width: '90' },
|
|
|
+ { label: '流程单数', prop: 'process_num', width: '90' },
|
|
|
+ { label: '当前设备', prop: 'Gy0_sbbh', width: '120' },
|
|
|
+ { label: '工序状态', prop: 'PD_WG', width: '90'},
|
|
|
+ { label: '首板生产日期', prop: 'sczl_rq', width: '160' },
|
|
|
+ ]
|
|
|
+)
|
|
|
+const gxclhcformData = reactive({
|
|
|
+ gdbh: '',
|
|
|
+ gdmc: '',
|
|
|
+ yjno: '',
|
|
|
+});
|
|
|
+const gdwhformData = reactive({
|
|
|
+ // 下拉框选项数据
|
|
|
+ yinjian: [],
|
|
|
+ // 设置默认值
|
|
|
+ yjno: '',
|
|
|
+});
|
|
|
+const inputCpmc = ref('')
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+//导出EXCEL
|
|
|
+const dhlToExcel = async () => {
|
|
|
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// 工序产量核查按钮
|
|
|
+const gd_gxclhconClick = async () => {
|
|
|
+ if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
|
|
|
+ ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ gd_gxclhclist.value = true;
|
|
|
+ gxclhcformData['gdbh'] = _Gd_gdbh.value;
|
|
|
+ const response = await PrintDetailList ({workOrder:_Gd_gdbh.value});
|
|
|
+ console.log(response)
|
|
|
+ gdwhformData.yjno = response.data[0].no
|
|
|
+ inputCpmc.value = response.data[0].name
|
|
|
+ if (response.code === 0) {
|
|
|
+ const noFields = response.data.map(item => item.no);
|
|
|
+ gdwhformData.yinjian = noFields
|
|
|
+ } else {
|
|
|
+ console.error('查询失败:', response.msg);
|
|
|
+ }
|
|
|
+ _getOrderProcessCount();
|
|
|
+};
|
|
|
+
|
|
|
+//点击印件下拉框
|
|
|
+const ongdwhfanclick = async() => {
|
|
|
+ _PrintDetailList();
|
|
|
+ _getOrderProcessCount();
|
|
|
+}
|
|
|
+
|
|
|
+//工序产量核查回车
|
|
|
+const gxclhcProductValue = async () => {
|
|
|
+ const response = await PrintDetailList ({workOrder:gxclhcformData['gdbh']});
|
|
|
+ gdwhformData.yjno = response.data[0].no
|
|
|
+ inputCpmc.value = response.data[0].name
|
|
|
+ if (response.code === 0) {
|
|
|
+ const noFields = response.data.map(item => item.no);
|
|
|
+ gdwhformData.yinjian = noFields
|
|
|
+ } else {
|
|
|
+ console.error('查询失败:', response.msg);
|
|
|
+ }
|
|
|
+ _getOrderProcessCount();
|
|
|
+ _PrintDetailList();
|
|
|
+}
|
|
|
+//工序产量核查退出
|
|
|
+const gxclhcCancel = async () => {
|
|
|
+ gd_gxclhclist.value = false;
|
|
|
+};
|
|
|
+
|
|
|
+//印件编号获取方法接口
|
|
|
+const _PrintDetailList = async () => {
|
|
|
+ const order = gxclhcformData['gdbh'];
|
|
|
+ const response = await PrintDetailList ({workOrder:order});
|
|
|
+ const matchingItem = response.data.find(item => item.no === gdwhformData.yjno);
|
|
|
+ if (matchingItem) {
|
|
|
+ console.log(matchingItem.name)
|
|
|
+ inputCpmc.value = matchingItem.name;
|
|
|
+ } else {
|
|
|
+ console.log(`No matching item found for no: ${gdwhformData.yjno}`);
|
|
|
+ }
|
|
|
+}
|
|
|
+//工序产量核查方法接口
|
|
|
+const _getOrderProcessCount = async () => {
|
|
|
+ console.log(yjtableData['_rawValue'][0]['印件号'])
|
|
|
+ const order = gxclhcformData['gdbh'];
|
|
|
+ const yjno = gdwhformData.yjno;
|
|
|
+ const getOrderProcessCount_list = await getOrderProcessCount({order:order,yjno:yjno});
|
|
|
+ const concatenatedData = getOrderProcessCount_list.data.map(item => {
|
|
|
+ // 优化后的代码,使用模板字符串连接字段值并在单个数字前添加零
|
|
|
+ const formattedYjno = item.Gy0_yjno.length === 1 ? `0${item.Gy0_yjno}` : item.Gy0_yjno;
|
|
|
+ const formattedGxh = item.Gy0_gxh.length === 1 ? `0${item.Gy0_gxh}` : item.Gy0_gxh;
|
|
|
+ const concatenatedValue = `${formattedYjno}-${formattedGxh} ${item.Gy0_gxmc} 【${item.Add_gxmc} 】`;
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ concatenatedData: concatenatedValue, // 使用新属性名
|
|
|
+ };
|
|
|
+ });
|
|
|
+ gxclhc_Data.value = concatenatedData;
|
|
|
+};
|
|
|
+
|
|
|
+//工序产量核查
|
|
|
+const gxclhcCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
+ if (column.label === '实际上报产量' ||column.label === '制程废品' || column.label === '制程废品率' ||
|
|
|
+ column.label === '来料异常' || column.label === '流程单数' || column.label === '当前设备') {
|
|
|
+ return 'lan-plan-usage-lows';
|
|
|
+ }
|
|
|
+ if (column.label === '折算车头产量') {
|
|
|
+ return 'gxclhc—color-column-red';
|
|
|
+ }
|
|
|
+ // 如果不是 'PD_WG' 列,返回空字符串或其他样式类
|
|
|
+ if (column.label === '工序状态'){
|
|
|
+ if(row['PD_WG'] === '完工'){
|
|
|
+ return 'lan-plan-usage-lowshui';
|
|
|
+ }else{
|
|
|
+ return 'pczccolor-column-lan';
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|