|
|
@@ -119,7 +119,7 @@
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="印件编号" prop="id">
|
|
|
<el-input v-model="formData.jjcp_cpdh" id="印件编号" disabled :clearable="true" style="width: 120px;" />
|
|
|
- <el-input v-model="formData.jjcp_cpmc" id="jjcp_cpmc" disabled :clearable="true" style="width: 500px; margin-left: 10px;" />
|
|
|
+ <el-input v-model="formData.jjcp_cpmc" id="jjcp_cpmc" disabled :clearable="true" style="width: 500px; margin-left: 10px;" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -129,7 +129,7 @@
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="产品编号" prop="id">
|
|
|
<el-input v-model="formData.成品编码" id="产品编号" disabled :clearable="true" style="width: 120px;" />
|
|
|
- <el-input v-model="formData.成品名称" id="成品名称" disabled :clearable="true" style="width: 500px; margin-left: 10px;" />
|
|
|
+ <el-input v-model="formData.成品名称" id="成品名称" disabled :clearable="true" style="width: 500px; margin-left: 10px;" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -144,13 +144,13 @@
|
|
|
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="7">
|
|
|
- <el-form-item label="首末板" prop="id">
|
|
|
+ <el-form-item label="首末板" prop="id">
|
|
|
<el-input v-model="formData.jjcp_smb" id="首末板" @keydown="ent($event, '客户料号', '首末板', '入仓时间')" :clearable="true" style="width: 120px;" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="17">
|
|
|
- <el-form-item label="入仓时间" prop="id">
|
|
|
- <el-date-picker v-model="formData.jjcp_sj" type="datetime" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"id="入仓时间" @keydown="ent($event, '首末板', '入仓时间', '入仓数量')" style="width: 200px;"/>
|
|
|
+ <el-form-item label="入仓时间" prop="id">
|
|
|
+ <el-date-picker v-model="formData.jjcp_sj" type="datetime" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"id="入仓时间" @keydown="ent($event, '首末板', '入仓时间', '入仓数量')" style="width: 200px;"/>
|
|
|
|
|
|
<!-- <el-input type="datetime" v-model="formData.jjcp_sj" id="入仓时间" @keydown="ent($event, '首末板', '入仓时间', '入仓数量')" :clearable="true" style="width: 120px;" /> -->
|
|
|
</el-form-item>
|
|
|
@@ -222,32 +222,32 @@
|
|
|
<el-table-column prop="编号" label="编号" width="200" />
|
|
|
<el-table-column prop="名称" label="名称" width="200" />
|
|
|
</el-table>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
- <!-- 入仓类型选择 -->
|
|
|
- <el-dialog v-model="RCVisible" title="选择"
|
|
|
- destroy-on-close width="400px" @keydown="selectRC($event)" >
|
|
|
- <el-table tooltip-effect="dark"
|
|
|
- :data="RCselectData" row-key="ID"
|
|
|
- highlight-current-row="true" border style="width:100%"
|
|
|
- @row-dblclick="RCSelectClick"
|
|
|
- ref="tableRC"
|
|
|
- >
|
|
|
- <el-table-column prop="入仓类型" label="入仓类型" width="360" />
|
|
|
- </el-table>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 首末板选择 -->
|
|
|
- <el-dialog v-model="SMBVisible" title="选择"
|
|
|
- destroy-on-close width="200px" @keydown="selectSMB($event)" >
|
|
|
- <el-table tooltip-effect="dark" :data="SMBselectData" row-key="ID"
|
|
|
- highlight-current-row="true" border style="width:100%"
|
|
|
- :row-style="{ height: '30px' }"
|
|
|
- @row-dblclick="SMBSelectClick"
|
|
|
- ref="tableSMB"
|
|
|
- >
|
|
|
- <el-table-column prop="jjcp_smb" label="" width="160" />
|
|
|
- </el-table>
|
|
|
+ <!-- 入仓类型选择 -->
|
|
|
+ <el-dialog v-model="RCVisible" title="选择"
|
|
|
+ destroy-on-close width="400px" @keydown="selectRC($event)" >
|
|
|
+ <el-table tooltip-effect="dark"
|
|
|
+ :data="RCselectData" row-key="ID"
|
|
|
+ highlight-current-row="true" border style="width:100%"
|
|
|
+ @row-dblclick="RCSelectClick"
|
|
|
+ ref="tableRC"
|
|
|
+ >
|
|
|
+ <el-table-column prop="入仓类型" label="入仓类型" width="360" />
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 首末板选择 -->
|
|
|
+ <el-dialog v-model="SMBVisible" title="选择"
|
|
|
+ destroy-on-close width="200px" @keydown="selectSMB($event)" >
|
|
|
+ <el-table tooltip-effect="dark" :data="SMBselectData" row-key="ID"
|
|
|
+ highlight-current-row="true" border style="width:100%"
|
|
|
+ :row-style="{ height: '30px' }"
|
|
|
+ @row-dblclick="SMBSelectClick"
|
|
|
+ ref="tableSMB"
|
|
|
+ >
|
|
|
+ <el-table-column prop="jjcp_smb" label="" width="160" />
|
|
|
+ </el-table>
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog v-model="GDVisible" title="选择" destroy-on-close width="600px" @keydown="selectGD($event)" >
|
|
|
@@ -320,22 +320,21 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
- <el-dialog
|
|
|
- v-model="SMVisible"
|
|
|
- title="选择"
|
|
|
- destroy-on-close
|
|
|
- width="1200px"
|
|
|
-
|
|
|
- >
|
|
|
- <el-table
|
|
|
- tooltip-effect="dark"
|
|
|
- :data="SMselectData"
|
|
|
- row-key="ID"
|
|
|
- highlight-current-row="true"
|
|
|
- border
|
|
|
- style="width:180%"
|
|
|
- height="500px"
|
|
|
- @row-dblclick="SMSelectClick"
|
|
|
+ <el-dialog v-model="SMVisible" title="选择" destroy-on-close style='height: 100%;margin: 0px;' width="100%">
|
|
|
+ <div class="block">
|
|
|
+ <span class="demonstration">月份选择:</span>
|
|
|
+ <el-date-picker v-model="ExcelformData['rq']" type="month" placeholder="选择月份"style='width: 10%;'></el-date-picker>
|
|
|
+ <el-button type="primary" @click="ExcelonSubmit" style='margin-left: 10px;'>查询</el-button>
|
|
|
+ <el-button type="primary" class="bt" icon="download" @click="exportToExcel" >导出Excel</el-button>
|
|
|
+ <el-button type="primary" icon="edit" @click="pd_gxclhconClick" class="bt">工序产量核查</el-button>
|
|
|
+ <el-button type="primary" icon="edit" @click="pd_lcdlistonClick" class="bt">流程单查询</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table tooltip-effect="dark" :data="SMselectData"
|
|
|
+ style="width: 100%;height: 80vh"
|
|
|
+ row-key="ID" highlight-current-row="true"
|
|
|
+ borderstyle="width:180%"height="100%"
|
|
|
+ @row-dblclick="SMSelectClick"
|
|
|
+ @row-click="MBRowClick"
|
|
|
>
|
|
|
<el-table-column
|
|
|
prop="Yj_Gdbh"
|
|
|
@@ -363,15 +362,20 @@
|
|
|
width="200"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prop="jjcp_sls"
|
|
|
+ prop="sczl_cls"
|
|
|
label="包装产量"
|
|
|
width="200"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
- prop="sczl_cls"
|
|
|
+ prop="jjcp_sls"
|
|
|
label="入仓数量"
|
|
|
width="200"
|
|
|
/>
|
|
|
+ <el-table-column
|
|
|
+ prop="jjcp_smb"
|
|
|
+ label="是否末版"
|
|
|
+ width="200"
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
prop="jjcp_smb"
|
|
|
label="缺数"
|
|
|
@@ -389,7 +393,78 @@
|
|
|
/>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+ <!--工序产量核查【弹窗】-->
|
|
|
+ <el-dialog v-model="pd_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 0 0 0">
|
|
|
+ <el-input v-model="gxclhcformData['gdbh']" @keyup.enter="gxclhcProductValue" placeholder="" />
|
|
|
+ </el-form-item>
|
|
|
+ 印件选择:
|
|
|
+ <el-select v-model="gdwhformData.yjno" placeholder="请选择" allow-create filterable style="width: 100px; margin-right: 10px;">
|
|
|
+ <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: 10px;" />
|
|
|
+ </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="pd_lcdlist" title="工单工序生产进程" style="width: 100%;height: 100%;margin: 0px;padding: 0px;">
|
|
|
+ <div style="width: 100%;height: 100%;">
|
|
|
+ <el-button type="" @click="pd_lcdCancel">退出</el-button>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100%; height: 100%; display: flex; align-items: center;">
|
|
|
+ <el-form-item label="工单编号" style="margin-right: 20px; padding: 0;">
|
|
|
+ <el-input v-model="pd_lcdformData['gdbh']" @keyup.enter="pd_lcdProductValue"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="印件号" style="margin-right: 5px; padding: 0;">
|
|
|
+ <el-input v-model="pd_lcdformData['yjno']" @keyup.enter="pd_lcdProductValue"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" style="margin-right: 5px; padding: 0;">
|
|
|
+ <el-input v-model="pd_lcdformData['code']" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" style="margin-right: 5px; padding: 0;">
|
|
|
+ <el-input v-model="pd_lcdformData['name']" disabled style="width: 500px"/>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100%; height: 70vh; display: flex;">
|
|
|
+ <layout>
|
|
|
+ <layout-sider :resize-directions="['right']" :width="240" style="margin-right: 10px;height: 70vh;">
|
|
|
+ <div class="JKWTree-tree">
|
|
|
+ <el-tree :data="pd_lcd_treeData" @node-click="pd_lcd_handleNodeClick" default-expand-all></el-tree>
|
|
|
+ </div>
|
|
|
+ </layout-sider>
|
|
|
+ <layout-main>
|
|
|
+ <!-- 这里放右侧的内容 -->
|
|
|
+ <el-space wrap>
|
|
|
+ <!-- 右侧内容 -->
|
|
|
+ <template v-for="item in processList.total_process">
|
|
|
+ <el-button disabled :type="! processList.process.includes(item) ? 'danger' : 'info'" plain style="width: 50px">{{ item }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-space>
|
|
|
+ </layout-main>
|
|
|
+ </layout>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
|
@@ -410,18 +485,21 @@ import {
|
|
|
finisheddel,
|
|
|
getDayList,
|
|
|
mbList,
|
|
|
- finishedadd,
|
|
|
+ finishedadd,
|
|
|
finishedEdit
|
|
|
} from '@/api/jixiaoguanli/jitairibaobiao'
|
|
|
|
|
|
// 全量引入格式化工具 请按需保留
|
|
|
+import * as XLSX from 'xlsx'
|
|
|
import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import { Search, Refresh, Download } from '@element-plus/icons-vue'
|
|
|
import { ref, reactive, onMounted, onBeforeMount } from 'vue'
|
|
|
import { getPackingSideTable, getPackingTable } from '@/api/mes_api_gty/myapi'
|
|
|
import { TRUE } from 'sass'
|
|
|
+import { exportExcelFile } from '@/utils/excel'
|
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
|
+import { getOrderProcessCount,PrintDetailList,getOrderProcessLeft,getOrderProcessRight } from "@/api/yunyin/yunying";
|
|
|
const userStore = useUserStore()
|
|
|
const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
|
|
|
defineOptions({
|
|
|
@@ -452,63 +530,63 @@ const getTabdata = async () => {
|
|
|
|
|
|
|
|
|
}
|
|
|
- const rqHandleFocus = () =>{
|
|
|
- if(formData.value.jjcp_sj==''){
|
|
|
- formData.value.jjcp_sj = new Date(new Date().getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 19).replace('T', ' ');
|
|
|
-
|
|
|
- }
|
|
|
+ const rqHandleFocus = () =>{
|
|
|
+ if(formData.value.jjcp_sj==''){
|
|
|
+ formData.value.jjcp_sj = new Date(new Date().getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 19).replace('T', ' ');
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
getTabdata();
|
|
|
|
|
|
// 自动化生成的字典(可能为空)以及字段
|
|
|
-const formData = ref({
|
|
|
- 入仓类型: "",
|
|
|
- 仓库编号: "",
|
|
|
- 仓库名称: "",
|
|
|
- jjcp_num: "",
|
|
|
- jjcp_gdbh: "",
|
|
|
- jjcp_yjno: "",
|
|
|
- 订单编号: "",
|
|
|
- jjcp_cpdh: "",
|
|
|
- jjcp_cpmc: "",
|
|
|
- 成品编码: "",
|
|
|
- 成品名称: "",
|
|
|
- 客户料号: "",
|
|
|
- jjcp_smb: "",
|
|
|
- jjcp_sj: "",
|
|
|
- jjcp_sl: "",
|
|
|
- jjcp_dw: "张",
|
|
|
- 订单数量: "",
|
|
|
- jjcp_sls: "",
|
|
|
- 机型备注: "",
|
|
|
- jjcp_desc: "",
|
|
|
+const formData = ref({
|
|
|
+ 入仓类型: "",
|
|
|
+ 仓库编号: "",
|
|
|
+ 仓库名称: "",
|
|
|
+ jjcp_num: "",
|
|
|
+ jjcp_gdbh: "",
|
|
|
+ jjcp_yjno: "",
|
|
|
+ 订单编号: "",
|
|
|
+ jjcp_cpdh: "",
|
|
|
+ jjcp_cpmc: "",
|
|
|
+ 成品编码: "",
|
|
|
+ 成品名称: "",
|
|
|
+ 客户料号: "",
|
|
|
+ jjcp_smb: "",
|
|
|
+ jjcp_sj: "",
|
|
|
+ jjcp_sl: "",
|
|
|
+ jjcp_dw: "张",
|
|
|
+ 订单数量: "",
|
|
|
+ jjcp_sls: "",
|
|
|
+ 机型备注: "",
|
|
|
+ jjcp_desc: "",
|
|
|
|
|
|
})
|
|
|
-
|
|
|
-const initFormData = () => {
|
|
|
- formData.value = {
|
|
|
- 入仓类型: "",
|
|
|
- 仓库编号: "",
|
|
|
- 仓库名称: "",
|
|
|
- jjcp_num: "",
|
|
|
- jjcp_gdbh: "",
|
|
|
- jjcp_yjno: "",
|
|
|
- 订单编号: "",
|
|
|
- jjcp_cpdh: "",
|
|
|
- jjcp_cpmc: "",
|
|
|
- 成品编码: "",
|
|
|
- 成品名称: "",
|
|
|
- 客户料号: "",
|
|
|
- jjcp_smb: "",
|
|
|
- jjcp_sj: "",
|
|
|
- jjcp_sl: "",
|
|
|
- jjcp_dw: "张",
|
|
|
- 订单数量: "",
|
|
|
- jjcp_sls: "",
|
|
|
- 机型备注: "",
|
|
|
- jjcp_desc: "",
|
|
|
- }
|
|
|
+
|
|
|
+const initFormData = () => {
|
|
|
+ formData.value = {
|
|
|
+ 入仓类型: "",
|
|
|
+ 仓库编号: "",
|
|
|
+ 仓库名称: "",
|
|
|
+ jjcp_num: "",
|
|
|
+ jjcp_gdbh: "",
|
|
|
+ jjcp_yjno: "",
|
|
|
+ 订单编号: "",
|
|
|
+ jjcp_cpdh: "",
|
|
|
+ jjcp_cpmc: "",
|
|
|
+ 成品编码: "",
|
|
|
+ 成品名称: "",
|
|
|
+ 客户料号: "",
|
|
|
+ jjcp_smb: "",
|
|
|
+ jjcp_sj: "",
|
|
|
+ jjcp_sl: "",
|
|
|
+ jjcp_dw: "张",
|
|
|
+ 订单数量: "",
|
|
|
+ jjcp_sls: "",
|
|
|
+ 机型备注: "",
|
|
|
+ jjcp_desc: "",
|
|
|
+ }
|
|
|
}
|
|
|
// 验证规则
|
|
|
const rule = reactive({
|
|
|
@@ -560,6 +638,10 @@ const handleCurrentChange = (val) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+const ExcelformData = ref({})
|
|
|
+
|
|
|
+
|
|
|
// 查询
|
|
|
const getTableData = async () => {
|
|
|
|
|
|
@@ -592,9 +674,9 @@ function onSearch() {
|
|
|
const ADD=ref('0')
|
|
|
//新增
|
|
|
function onAdd() {
|
|
|
- // GetInfo(lastCellValue)
|
|
|
- initFormData()
|
|
|
- formData.value.jjcp_sj = new Date(new Date().getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 19).replace('T', ' ');
|
|
|
+ // GetInfo(lastCellValue)
|
|
|
+ initFormData()
|
|
|
+ formData.value.jjcp_sj = new Date(new Date().getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 19).replace('T', ' ');
|
|
|
type.value='create'
|
|
|
dialogFormVisible.value = true
|
|
|
}
|
|
|
@@ -630,6 +712,13 @@ const GetDayList = async (value) => {
|
|
|
}
|
|
|
const SMVisible = ref(false)
|
|
|
const SMselectData = ref([]);
|
|
|
+const _Gd_gdbh = ref(null)
|
|
|
+const _Gd_yjno = ref(null)
|
|
|
+const MBRowClick = async (row) => {
|
|
|
+ console.log(row)
|
|
|
+ _Gd_gdbh.value = row.Yj_Gdbh;
|
|
|
+ _Gd_yjno.value = row.yj_Yjno;
|
|
|
+}
|
|
|
//首末版统计
|
|
|
function onSMB() {
|
|
|
MbList()
|
|
|
@@ -643,6 +732,237 @@ const MbList = async (value) => {
|
|
|
console.log(TJselectData)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+//=========工序产量核查===========
|
|
|
+const pd_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 exportToExcel = () => {
|
|
|
+ const tableCols1 = [
|
|
|
+ { label: '工单编号', prop: 'Yj_Gdbh', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '印件号', prop: 'yj_Yjno', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '印件名称', prop: 'yj_yjmc', width: '600',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '计划交货数量', prop: 'yj_成品数量', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '印件投料', prop: 'yj_实际投料', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '包装产量', prop: 'sczl_cls', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '入仓数量', prop: 'jjcp_sls', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '是否末版', prop: 'jjcp_smb', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '缺数', prop: '', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '完工', prop: '', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ { label: '最近入仓时间', prop: 'jjcp_sj', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
|
|
|
+ ]
|
|
|
+
|
|
|
+ const headers = tableCols1.map(item => ({
|
|
|
+ label: item.label,
|
|
|
+ prop: item.prop
|
|
|
+ }));
|
|
|
+
|
|
|
+ //SMselectData._value table中data属性
|
|
|
+ const data = SMselectData._value.map(item => {
|
|
|
+ const row = {};
|
|
|
+ headers.forEach(({ prop }) => {
|
|
|
+ row[headers.find(h => h.prop === prop).label] = item[prop];
|
|
|
+ });
|
|
|
+ return row;
|
|
|
+ });
|
|
|
+ //引入import { exportExcelFile } from '@/utils/excel'
|
|
|
+ exportExcelFile(data);
|
|
|
+};
|
|
|
+
|
|
|
+// 工序产量核查按钮
|
|
|
+const pd_gxclhconClick = async () => {
|
|
|
+ if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
|
|
|
+ ElMessage({type: 'warning',message: '请选择具体的工单,再进行操作'})
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ gxclhcformData['gdbh'] = _Gd_gdbh.value;
|
|
|
+ pd_gxclhclist.value = true;
|
|
|
+ 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 () => {
|
|
|
+ _getOrderProcessCount();
|
|
|
+ _PrintDetailList();
|
|
|
+}
|
|
|
+//工序产量核查退出
|
|
|
+const gxclhcCancel = async () => {
|
|
|
+ pd_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 () => {
|
|
|
+ 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}`;
|
|
|
+ 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';
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// =========== 流程单查询 ===========
|
|
|
+
|
|
|
+const pd_lcdlist = ref(false);
|
|
|
+const pd_lcdformData = reactive({
|
|
|
+ gdbh: '',
|
|
|
+ code: '',
|
|
|
+ name: '',
|
|
|
+ yjno: '',
|
|
|
+});
|
|
|
+// 流程单查询按钮
|
|
|
+const processList = ref([]);
|
|
|
+const pd_lcdlistonClick = async () => {
|
|
|
+ if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
|
|
|
+ ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ pd_lcdformData['gdbh'] = _Gd_gdbh.value;
|
|
|
+ pd_lcdformData['yjno'] = _Gd_yjno.value;
|
|
|
+ pd_lcdlist.value = true;
|
|
|
+ processList.value = []
|
|
|
+ _getOrderProcessLeft_list();
|
|
|
+ }
|
|
|
+}
|
|
|
+const pd_lcdProductValue = async () => {
|
|
|
+ _getOrderProcessLeft_list();
|
|
|
+}
|
|
|
+const pd_lcd_treeData = ref([]);
|
|
|
+const _getOrderProcessLeft_list = async () => {
|
|
|
+ const order = pd_lcdformData['gdbh'];
|
|
|
+ const yjno = pd_lcdformData['yjno']
|
|
|
+ // console.log(order)
|
|
|
+ try {
|
|
|
+ //5.1流程单查询-工单工序生产进程菜单栏
|
|
|
+ const getOrderProcessLeft_list = await getOrderProcessLeft({ order:order,yjno:yjno});
|
|
|
+ console.log(getOrderProcessLeft_list)
|
|
|
+ pd_lcdformData['code'] = getOrderProcessLeft_list.data.Gd_info['code'];
|
|
|
+ pd_lcdformData['name'] = getOrderProcessLeft_list.data.Gd_info['name'];
|
|
|
+ pd_lcd_treeData.value = [{
|
|
|
+ label: order + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
|
|
|
+ // label: order + '-' + getOrderProcessLeft_list.data.Gd_info['code'] + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
|
|
|
+ value: undefined,
|
|
|
+ children: []
|
|
|
+ }]
|
|
|
+ const newData = [];
|
|
|
+ for (let key in getOrderProcessLeft_list.data.Gy_info) {
|
|
|
+ let temp = getOrderProcessLeft_list.data.Gy_info[key];
|
|
|
+ let concatenatedValue = `${temp.Gy0_yjno}-${temp.Gy0_gxh} ---> ${temp.Gy0_gxmc}`;
|
|
|
+ newData.push({ label: concatenatedValue,value: temp.Gy0_gxh });
|
|
|
+ }
|
|
|
+ pd_lcd_treeData.value[0].children = newData;
|
|
|
+ //5.2流程单查询-获取工单工序生产进程右侧【进入页面默认显示第一个】
|
|
|
+ const getOrderProcessRight_list = await getOrderProcessRight({order:order, gxNo:newData[0].value,yjno:yjno});
|
|
|
+ processList.value = getOrderProcessRight_list.data
|
|
|
+ } catch (error) {
|
|
|
+ console.error(error);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const pd_lcd_handleNodeClick = async (node) => {
|
|
|
+ if (node.value === undefined) return
|
|
|
+ const order = pd_lcdformData['gdbh'];
|
|
|
+ const yjno = pd_lcdformData['yjno'];
|
|
|
+ ////5.2流程单查询-获取工单工序生产进程右侧
|
|
|
+ const getOrderProcessRight_list = await getOrderProcessRight({order:order, gxNo:node.value,yjno:yjno});
|
|
|
+ console.log(getOrderProcessRight_list)
|
|
|
+ processList.value = getOrderProcessRight_list.data
|
|
|
+};
|
|
|
+
|
|
|
+// 流程单查询退出
|
|
|
+const pd_lcdCancel = async () => {
|
|
|
+ pd_lcdlist.value = false;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//定位
|
|
|
const GetmachineLocate = async () => {
|
|
|
const response = await finishedlocate({
|
|
|
@@ -661,8 +981,8 @@ const GetmachineLocate = async () => {
|
|
|
total.value = response.data.total
|
|
|
tableData.splice(0, tableData.length, ...processedData);
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
+}
|
|
|
+
|
|
|
//入仓类型回车事件
|
|
|
const getRCsubmit = (event) => {
|
|
|
GetRC()
|
|
|
@@ -712,8 +1032,8 @@ const selectRC = (event) => {
|
|
|
} else if (event.keyCode === 13) { // 回车键
|
|
|
RCVisible.value = false
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
//仓库编号回车事件
|
|
|
const getCKsubmit = (event) => {
|
|
|
@@ -771,10 +1091,10 @@ const selectCK = (event) => {
|
|
|
}
|
|
|
|
|
|
//工单编号回车事件
|
|
|
-const getGDsubmit = (event) => {
|
|
|
- if(formData.value.jjcp_gdbh==''){
|
|
|
- ElMessage({type: 'warning',message: '请填写工单编号'});
|
|
|
- return
|
|
|
+const getGDsubmit = (event) => {
|
|
|
+ if(formData.value.jjcp_gdbh==''){
|
|
|
+ ElMessage({type: 'warning',message: '请填写工单编号'});
|
|
|
+ return
|
|
|
}
|
|
|
GetGD()
|
|
|
}
|
|
|
@@ -790,7 +1110,7 @@ const GetGD = async () => {
|
|
|
}
|
|
|
}
|
|
|
//选择
|
|
|
-const GDSelectClick = (row, column, event) => {
|
|
|
+const GDSelectClick = (row, column, event) => {
|
|
|
console.log(111)
|
|
|
const { Gd_gdbh,yj_yjno,销售订单号,yj_Yjdh,yj_yjmc,成品代号,成品名称,客户料号,gdyj } = row
|
|
|
formData.value.jjcp_gdbh=Gd_gdbh
|
|
|
@@ -800,12 +1120,12 @@ const GDSelectClick = (row, column, event) => {
|
|
|
formData.value.jjcp_cpmc=yj_yjmc
|
|
|
formData.value.成品编码=成品代号
|
|
|
formData.value.成品名称=成品名称
|
|
|
- formData.value.客户料号=客户料号
|
|
|
- finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh}).then(res =>{
|
|
|
- if (res.code === 0) {
|
|
|
- formData.value.订单数量 = res.data.订单数量
|
|
|
- formData.value.jjcp_sls = res.data.jjcp_sls
|
|
|
- }
|
|
|
+ formData.value.客户料号=客户料号
|
|
|
+ finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh}).then(res =>{
|
|
|
+ if (res.code === 0) {
|
|
|
+ formData.value.订单数量 = res.data.订单数量
|
|
|
+ formData.value.jjcp_sls = res.data.jjcp_sls
|
|
|
+ }
|
|
|
});
|
|
|
GDVisible.value = false
|
|
|
}
|
|
|
@@ -822,12 +1142,12 @@ const setGDCurrent = (row) => {
|
|
|
formData.value.jjcp_cpmc=yj_yjmc
|
|
|
formData.value.成品编码=成品代号
|
|
|
formData.value.成品名称=成品名称
|
|
|
- formData.value.客户料号=客户料号
|
|
|
- finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh}).then(res =>{
|
|
|
- if (res.code === 0) {
|
|
|
- formData.value.订单数量 = res.data.订单数量
|
|
|
- formData.value.jjcp_sls = res.data.jjcp_sls
|
|
|
- }
|
|
|
+ formData.value.客户料号=客户料号
|
|
|
+ finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh}).then(res =>{
|
|
|
+ if (res.code === 0) {
|
|
|
+ formData.value.订单数量 = res.data.订单数量
|
|
|
+ formData.value.jjcp_sls = res.data.jjcp_sls
|
|
|
+ }
|
|
|
});
|
|
|
})
|
|
|
}
|
|
|
@@ -860,8 +1180,8 @@ const getSLsubmit = (event) => {
|
|
|
}
|
|
|
//获取工单数量信息
|
|
|
const GetSL = async () => {
|
|
|
- if(formData.value.jjcp_cpdh){
|
|
|
-
|
|
|
+ if(formData.value.jjcp_cpdh){
|
|
|
+
|
|
|
}
|
|
|
const response = await finishedgetGdsl({gdbh:formData.value.jjcp_gdbh,cpdh:formData.value.jjcp_cpdh});
|
|
|
console.log(response)
|
|
|
@@ -869,8 +1189,8 @@ const GetSL = async () => {
|
|
|
formData.value.订单数量=response.data.订单数量
|
|
|
formData.value.jjcp_sls=response.data.jjcp_sls
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
+}
|
|
|
+
|
|
|
//入仓类型回车事件
|
|
|
const getSMBsubmit = (event) => {
|
|
|
GetSMB()
|
|
|
@@ -920,8 +1240,8 @@ const selectSMB = (event) => {
|
|
|
} else if (event.keyCode === 13) { // 回车键
|
|
|
SMBVisible.value = false
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
// ============== 表格控制部分结束 ===============
|
|
|
|
|
|
@@ -1015,56 +1335,56 @@ const closeDialog = () => {
|
|
|
}
|
|
|
}
|
|
|
// 弹窗确定
|
|
|
-const enterDialog = async () => {
|
|
|
- if(formData.value.入仓类型==''){
|
|
|
- ElMessage({type: 'warning',message: '请选择入仓类型'});
|
|
|
- return;
|
|
|
- }
|
|
|
- if(formData.value.仓库编号==''){
|
|
|
- ElMessage({type: 'warning',message: '请选择仓库'});
|
|
|
- return;
|
|
|
- }
|
|
|
- if(formData.value.jjcp_gdbh==''){
|
|
|
- ElMessage({type: 'warning',message: '请填写工单编号'});
|
|
|
- return;
|
|
|
- }
|
|
|
- if(formData.value.jjcp_cpdh==''){
|
|
|
- ElMessage({type: 'warning',message: '请选择印件'});
|
|
|
- return;
|
|
|
- }
|
|
|
- if(formData.value.jjcp_sl==''){
|
|
|
- ElMessage({type: 'warning',message: '请填写入仓数量'});
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- const restoredData = {
|
|
|
- Sys_id:sys_id,
|
|
|
- 入仓类型:formData.value.入仓类型,
|
|
|
- 仓库编号:formData.value.仓库编号,
|
|
|
- 仓库名称:formData.value.仓库名称,
|
|
|
- jjcp_num:formData.value.jjcp_num,
|
|
|
- jjcp_gdbh:formData.value.jjcp_gdbh,
|
|
|
- jjcp_yjno:formData.value.jjcp_yjno,
|
|
|
- 订单编号:formData.value.订单编号,
|
|
|
- jjcp_cpdh:formData.value.jjcp_cpdh,
|
|
|
- jjcp_cpmc:formData.value.jjcp_cpmc,
|
|
|
- 成品编码:formData.value.成品编码,
|
|
|
- 成品名称:formData.value.成品名称,
|
|
|
- 客户料号:formData.value.客户料号,
|
|
|
- jjcp_smb:formData.value.jjcp_smb,
|
|
|
- jjcp_sj:formData.value.jjcp_sj,
|
|
|
- jjcp_sl:formData.value.jjcp_sl,
|
|
|
- jjcp_dw:formData.value.jjcp_dw,
|
|
|
- 机型备注:formData.value.机型备注,
|
|
|
- jjcp_desc:formData.value.jjcp_desc,
|
|
|
- }
|
|
|
+const enterDialog = async () => {
|
|
|
+ if(formData.value.入仓类型==''){
|
|
|
+ ElMessage({type: 'warning',message: '请选择入仓类型'});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(formData.value.仓库编号==''){
|
|
|
+ ElMessage({type: 'warning',message: '请选择仓库'});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(formData.value.jjcp_gdbh==''){
|
|
|
+ ElMessage({type: 'warning',message: '请填写工单编号'});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(formData.value.jjcp_cpdh==''){
|
|
|
+ ElMessage({type: 'warning',message: '请选择印件'});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(formData.value.jjcp_sl==''){
|
|
|
+ ElMessage({type: 'warning',message: '请填写入仓数量'});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const restoredData = {
|
|
|
+ Sys_id:sys_id,
|
|
|
+ 入仓类型:formData.value.入仓类型,
|
|
|
+ 仓库编号:formData.value.仓库编号,
|
|
|
+ 仓库名称:formData.value.仓库名称,
|
|
|
+ jjcp_num:formData.value.jjcp_num,
|
|
|
+ jjcp_gdbh:formData.value.jjcp_gdbh,
|
|
|
+ jjcp_yjno:formData.value.jjcp_yjno,
|
|
|
+ 订单编号:formData.value.订单编号,
|
|
|
+ jjcp_cpdh:formData.value.jjcp_cpdh,
|
|
|
+ jjcp_cpmc:formData.value.jjcp_cpmc,
|
|
|
+ 成品编码:formData.value.成品编码,
|
|
|
+ 成品名称:formData.value.成品名称,
|
|
|
+ 客户料号:formData.value.客户料号,
|
|
|
+ jjcp_smb:formData.value.jjcp_smb,
|
|
|
+ jjcp_sj:formData.value.jjcp_sj,
|
|
|
+ jjcp_sl:formData.value.jjcp_sl,
|
|
|
+ jjcp_dw:formData.value.jjcp_dw,
|
|
|
+ 机型备注:formData.value.机型备注,
|
|
|
+ jjcp_desc:formData.value.jjcp_desc,
|
|
|
+ }
|
|
|
console.log(lastCellValue)
|
|
|
let res
|
|
|
switch (type.value) {
|
|
|
case 'create':
|
|
|
res = await finishedadd(restoredData)
|
|
|
break
|
|
|
- case 'update':
|
|
|
+ case 'update':
|
|
|
restoredData.UniqId = lastCellValue;
|
|
|
res = await finishedEdit(restoredData)
|
|
|
break
|
|
|
@@ -1087,19 +1407,19 @@ const enterDialog = async () => {
|
|
|
const ent = (event,id1,id2,id3) => {
|
|
|
|
|
|
if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
|
|
|
- if(id2=='入仓类型'){
|
|
|
- getRCsubmit()
|
|
|
- }
|
|
|
+ if(id2=='入仓类型'){
|
|
|
+ getRCsubmit()
|
|
|
+ }
|
|
|
if(id2=='仓库编号'){
|
|
|
getCKsubmit()
|
|
|
- }
|
|
|
+ }
|
|
|
if(id2=='工单编号'){
|
|
|
getGDsubmit()
|
|
|
- }
|
|
|
- if(id2=='首末板'){
|
|
|
- console.log(1111)
|
|
|
- getSMBsubmit()
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(id2=='首末板'){
|
|
|
+ console.log(1111)
|
|
|
+ getSMBsubmit()
|
|
|
+ }
|
|
|
if(id3!=''){
|
|
|
document.getElementById(id3).focus()
|
|
|
}
|
|
|
@@ -1189,7 +1509,7 @@ onMounted(async () => {
|
|
|
background: #ff80ff !important;
|
|
|
/* 背景颜色 */
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|
|
|
<style scoped>
|
|
|
:deep(.el-table td .cell) {
|
|
|
line-height: 20px !important;
|
|
|
@@ -1215,4 +1535,9 @@ onMounted(async () => {
|
|
|
.mab{
|
|
|
margin-bottom: 5px;
|
|
|
}
|
|
|
+/* 工序产量核查高亮 */
|
|
|
+:deep(.lan-plan-usage-lows div) {
|
|
|
+ color: blue !important;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
</style>
|