|
@@ -6,11 +6,8 @@
|
|
|
<!-- 按钮部分-->
|
|
<!-- 按钮部分-->
|
|
|
<el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
|
|
<el-form ref="elSearchFormRef" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <el-button disabled type="primary" icon="Download" @click="exportToExcel" style="margin: 5px;float: right;">导出到Excel</el-button>
|
|
|
|
|
- <el-dialog v-model="dialogexportToExcel" disabled title="员工基本资料导出" width="50%">
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ <el-button type="primary" icon="Download" @click="exportToExcel3" style="margin: 5px;float: right;">导出到Excel(明细)</el-button>
|
|
|
|
|
+ <el-button type="primary" icon="Download" @click="exportToExcel2" style="margin: 5px;float: right;">月度明细</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
@@ -32,10 +29,11 @@
|
|
|
<div class="gva-table-box">
|
|
<div class="gva-table-box">
|
|
|
<el-table ref="multipleTable"
|
|
<el-table ref="multipleTable"
|
|
|
style="width: 100%;height: 28vh"
|
|
style="width: 100%;height: 28vh"
|
|
|
|
|
+ id="tab"
|
|
|
|
|
+ border
|
|
|
:row-style="{ height: '20px' }"
|
|
:row-style="{ height: '20px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
:header-cell-style="{ padding: '0px' }"
|
|
:header-cell-style="{ padding: '0px' }"
|
|
|
- border
|
|
|
|
|
tooltip-effect="dark"
|
|
tooltip-effect="dark"
|
|
|
:data="tabledate2" row-key="ID"
|
|
:data="tabledate2" row-key="ID"
|
|
|
@row-click="tableRowClick"
|
|
@row-click="tableRowClick"
|
|
@@ -44,12 +42,13 @@
|
|
|
@row-dblclick="updateCompanyFunc"
|
|
@row-dblclick="updateCompanyFunc"
|
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
|
:show-overflow-tooltip="true">
|
|
:show-overflow-tooltip="true">
|
|
|
- <el-table-column align="center" type="selection" width="30"/>
|
|
|
|
|
|
|
+ <!-- 多选框 -->
|
|
|
|
|
+ <!-- <el-table-column type="selection" width="30" /> -->
|
|
|
<el-table-column align="left" label="设备编号" prop="sczl_jtbh" width="81" />
|
|
<el-table-column align="left" label="设备编号" prop="sczl_jtbh" width="81" />
|
|
|
<el-table-column align="left" sortable label="班组编号" prop="sczl_bzdh" width="110" />
|
|
<el-table-column align="left" sortable label="班组编号" prop="sczl_bzdh" width="110" />
|
|
|
<el-table-column align="left" sortable label="产量合计" prop="total_cl" width="110" />
|
|
<el-table-column align="left" sortable label="产量合计" prop="total_cl" width="110" />
|
|
|
|
|
|
|
|
- <el-table-column :label="item" align="center" v-for="item in datelist" :key="item.label" :prop= "item" >
|
|
|
|
|
|
|
+ <el-table-column :label="item.slice(5,10)" align="center" v-for="item in datelist" :key="item.label" :prop= "item" >
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -69,6 +68,7 @@
|
|
|
<!-- 月度设备运行统计->机台生产工单数据详情列表 -->
|
|
<!-- 月度设备运行统计->机台生产工单数据详情列表 -->
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<el-table ref="multipleTable"
|
|
<el-table ref="multipleTable"
|
|
|
|
|
+ id="tab2"
|
|
|
:row-style="{ height: '20px' }"
|
|
:row-style="{ height: '20px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
:header-cell-style="{ padding: '0px' }"
|
|
:header-cell-style="{ padding: '0px' }"
|
|
@@ -76,7 +76,8 @@
|
|
|
highlight-current-row="true"
|
|
highlight-current-row="true"
|
|
|
@selection-change="selectionChange($event, '印件资料')"
|
|
@selection-change="selectionChange($event, '印件资料')"
|
|
|
style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jqtabledata" row-key="ID">
|
|
style="width: 100%;height: 36vh" border tooltip-effect="dark" :data="jqtabledata" row-key="ID">
|
|
|
- <el-table-column type="selection" width="30" />
|
|
|
|
|
|
|
+ <!-- 多选框 -->
|
|
|
|
|
+ <!-- <el-table-column type="selection" width="30" /> -->
|
|
|
<el-table-column align="left" sortable label="工单编号" prop="工单编号" width="110"/>
|
|
<el-table-column align="left" sortable label="工单编号" prop="工单编号" width="110"/>
|
|
|
<el-table-column align="left" sortable label="印件名称" prop="印件名称" width="600"/>
|
|
<el-table-column align="left" sortable label="印件名称" prop="印件名称" width="600"/>
|
|
|
<el-table-column align="left" sortable label="工序名称" prop="工序名称" width="110"/>
|
|
<el-table-column align="left" sortable label="工序名称" prop="工序名称" width="110"/>
|
|
@@ -123,23 +124,12 @@ export default {
|
|
|
// 全量引入格式化工具 请按需保留
|
|
// 全量引入格式化工具 请按需保留
|
|
|
import $script from 'scriptjs'
|
|
import $script from 'scriptjs'
|
|
|
import $ from 'jquery';
|
|
import $ from 'jquery';
|
|
|
|
|
+import * as XLSX from 'xlsx'
|
|
|
|
|
+import FileSaver from 'file-saver'
|
|
|
import LuckyExcel from 'luckyexcel';
|
|
import LuckyExcel from 'luckyexcel';
|
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
-import { ref, reactive, computed, nextTick, watch } from 'vue'
|
|
|
|
|
-// import {
|
|
|
|
|
-// DataList,WorkList, gdzl_MachineList,PrintCodeList,getProductYjList, getProductZzList,
|
|
|
|
|
-// U8workOrder, ProcessDetailEdit, PrintedEdit, PrintJobOrder,WorkOrderAdd,PrintDetailAdd,
|
|
|
|
|
-// WorkOrderEdit, ReferenceWorkOrder,getOrderProcessLeft,ClientList,ProductCodeList,
|
|
|
|
|
-// editGyWaste, U8DataCorrection, AccountingParameterEdit,ProcessCopy,
|
|
|
|
|
-// ProductInformation, TestCoefficient, capacityList,getOrderProcessRight,
|
|
|
|
|
-// DataCorrection, U8Trial, ProcessFlow, AccountingParameter,setProductStatus,
|
|
|
|
|
-// getProduct, getProductGy, ProductInformationEdit, workOrderListDetail, editProduct, getOrderProcessCount, StatusEdit,
|
|
|
|
|
-// PrintDetailDel, ProcessDetailDel,WorkOrderDetailCope,
|
|
|
|
|
-// getGdAnnexTable,WorkOrderData,WorkOrderDel,
|
|
|
|
|
-// gdAnnexAdd,ProductCopeDetail,WorkOrderDetailListCope,
|
|
|
|
|
-// gdAnnexDel,getLossCode,getDepartName,WastageList,getCouplet,PrintDetailList
|
|
|
|
|
-// } from "@/api/yunyin/yunying";
|
|
|
|
|
|
|
+import { ref, reactive, computed, nextTick, watch,onMounted } from 'vue'
|
|
|
import {OutputSstatisticsMenu,MachineProductDetail,MachineProduction} from "@/api/DecisionSupport/decision.js"
|
|
import {OutputSstatisticsMenu,MachineProductDetail,MachineProduction} from "@/api/DecisionSupport/decision.js"
|
|
|
defineOptions({name: 'Company'})
|
|
defineOptions({name: 'Company'})
|
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
@@ -148,259 +138,42 @@ const _username = ref('')
|
|
|
_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
|
|
_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
|
|
|
const printPageRef = ref()
|
|
const printPageRef = ref()
|
|
|
const addGongYiRef = ref()
|
|
const addGongYiRef = ref()
|
|
|
-// =========== 修正核算参数 ===========
|
|
|
|
|
-const xzhstableColumns = ref(
|
|
|
|
|
- [
|
|
|
|
|
- { label: '方案', prop: '方案', width: '65' },
|
|
|
|
|
- { label: '印件号及工序名称', prop: '印件号及工序名称', width: '300' },
|
|
|
|
|
- { label: '参照设备', prop: '参照设备', width: '90' },
|
|
|
|
|
- { label: '难度系数', prop: 'sxzhscsold_难度系数', width: '90' },
|
|
|
|
|
- { label: '新难度系数', prop: '难度系数', width: '100' },
|
|
|
|
|
- { label: '原损耗代号', prop: 'sxzhscsold_损耗代号', width: '150' },
|
|
|
|
|
- { label: '基础损耗', prop: '基础损耗', width: '90' },
|
|
|
|
|
- { label: '新损耗代号', prop: '损耗代号', width: '150' },
|
|
|
|
|
- { label: '原印刷方式', prop: 'sxzhscsold_印刷方式', width: '150' },
|
|
|
|
|
- { label: '原来版距', prop: 'sxzhscsold_版距', width: '100' },
|
|
|
|
|
- { label: '新印刷方式', prop: '印刷方式', width: '100' },
|
|
|
|
|
- { label: '新来版距', prop: '版距', width: '90' },
|
|
|
|
|
- { label: '原计损色数', prop: 'sxzhscsold_计损色数', width: '100' },
|
|
|
|
|
- { label: '新计损色数', prop: '计损色数', width: '100' },
|
|
|
|
|
- { label: '原损耗系数', prop: 'sxzhscsold_损耗系数', width: '100' },
|
|
|
|
|
- { label: '新损耗系数', prop: '损耗系数', width: '100' },
|
|
|
|
|
- ]
|
|
|
|
|
-)
|
|
|
|
|
-const handleKeyDown = (event, x, y, prop) => {
|
|
|
|
|
- const currentElement = document.getElementById(`input${x}${y}`);
|
|
|
|
|
- if (currentElement === null && currentElement === undefined) return
|
|
|
|
|
- let move = 0
|
|
|
|
|
- switch (event.keyCode) {
|
|
|
|
|
- case 13: // Enter
|
|
|
|
|
- case 40: // 向下箭头
|
|
|
|
|
- if (y < sxzhscstableData.value.length )
|
|
|
|
|
- document.getElementById(`input${x}${y + 1}`).focus();
|
|
|
|
|
- break;
|
|
|
|
|
- case 38: // 向上箭头
|
|
|
|
|
- if ( y > 0) {
|
|
|
|
|
- document.getElementById(`input${x}${y - 1}`).focus();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- case 39: // 向左箭头
|
|
|
|
|
- if ( x === 4) {
|
|
|
|
|
- move = x + 3
|
|
|
|
|
- } else if(x === 7){
|
|
|
|
|
- move = x + 3
|
|
|
|
|
- } else if( x === 10){
|
|
|
|
|
- move = x + 1
|
|
|
|
|
- }else if( x === 11){
|
|
|
|
|
- move = x + 2
|
|
|
|
|
- }else if( x === 13){
|
|
|
|
|
- move = x + 2
|
|
|
|
|
- }
|
|
|
|
|
- document.getElementById(`input${move}${y}`).focus();
|
|
|
|
|
- break;
|
|
|
|
|
- case 37: // 向右箭头
|
|
|
|
|
- if ( x === 15) {
|
|
|
|
|
- move = x - 2
|
|
|
|
|
- } else if (x=== 13) {
|
|
|
|
|
- move = x - 2
|
|
|
|
|
- }else if (x=== 11) {
|
|
|
|
|
- move = x - 1
|
|
|
|
|
- }else if (x=== 10) {
|
|
|
|
|
- move = x - 3
|
|
|
|
|
- }else if (x=== 7) {
|
|
|
|
|
- move = x - 3
|
|
|
|
|
- }
|
|
|
|
|
- document.getElementById(`input${move}${y}`).focus();
|
|
|
|
|
- break;
|
|
|
|
|
- default:
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-const xzhscslist = ref(false);
|
|
|
|
|
-const xzhscsformData = reactive({
|
|
|
|
|
- gdbh: '',
|
|
|
|
|
- cpdh: '',
|
|
|
|
|
- gdmc: '',
|
|
|
|
|
-});
|
|
|
|
|
-const sxzhscstableData = ref([]);
|
|
|
|
|
-//修正核算参数按钮
|
|
|
|
|
-const onxzhscsclick = () => {
|
|
|
|
|
- if(_Gd_gdbh.value == null){
|
|
|
|
|
- xzhscslist.value = false;
|
|
|
|
|
- ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能' })
|
|
|
|
|
- }else{
|
|
|
|
|
- xzhscsformData['gdbh'] = _Gd_gdbh.value;
|
|
|
|
|
- xzhscsformData['cpdh'] = _Gd_cpdh.value;
|
|
|
|
|
- xzhscsformData['gdmc'] = _Gd_cpmc.value;
|
|
|
|
|
- _AccountingParameterdata();
|
|
|
|
|
- xzhscslist.value = true;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-//修正核算参数回车
|
|
|
|
|
-const xzhscsgetProductValue = () => {
|
|
|
|
|
- _AccountingParameterdata()
|
|
|
|
|
-};
|
|
|
|
|
-// 修正工单核算参数表格数据
|
|
|
|
|
-const _AccountingParameterdata = async ()=>{
|
|
|
|
|
- let workOrder = xzhscsformData['gdbh'];
|
|
|
|
|
- console.log(workOrder)
|
|
|
|
|
|
|
+onMounted(()=>{
|
|
|
|
|
+ })
|
|
|
|
|
+//导出到EXCEL(明细)
|
|
|
|
|
+const exportToExcel3 = ()=>{
|
|
|
|
|
+ const el = document.getElementById('tab');
|
|
|
|
|
+ // 文件名
|
|
|
|
|
+ const filename = '导出到EXCEL(汇总).xlsx';
|
|
|
|
|
+ const wb = XLSX.utils.table_to_book(el, { raw: true });
|
|
|
|
|
+ const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
|
|
|
try {
|
|
try {
|
|
|
- const AccountingParameterdata = await AccountingParameter({workOrder:workOrder});
|
|
|
|
|
- console.log(AccountingParameterdata);
|
|
|
|
|
- sxzhscstableData.value = AccountingParameterdata.data;
|
|
|
|
|
- const formattedData = AccountingParameterdata.data.map(item=>{
|
|
|
|
|
- item.sxzhscsold_难度系数 = item.难度系数;
|
|
|
|
|
- item.sxzhscsold_损耗代号 = item.损耗代号;
|
|
|
|
|
- item.sxzhscsold_印刷方式 = item.印刷方式;
|
|
|
|
|
- item.sxzhscsold_版距 = item.版距;
|
|
|
|
|
- item.sxzhscsold_计损色数 = item.计损色数;
|
|
|
|
|
- item.sxzhscsold_损耗系数 = item.损耗系数;
|
|
|
|
|
- return item
|
|
|
|
|
- });
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(error);
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-//修正核算参数更新
|
|
|
|
|
-const xzhscsConfirm = async () => {
|
|
|
|
|
- const firstCharValid = sxzhscstableData.value.map(item => {
|
|
|
|
|
- const firstChar = item["损耗代号"] ? item["损耗代号"].charAt(0) : '';
|
|
|
|
|
- return firstChar === '0' || firstChar === '';
|
|
|
|
|
- });
|
|
|
|
|
- if(firstCharValid.includes(false)){
|
|
|
|
|
- ElMessage({type: 'warning',message: '损耗代号开头必须是 0' })
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if (sxzhscstableData.value) {
|
|
|
|
|
- const formattedData = sxzhscstableData.value.map(item => {
|
|
|
|
|
- return {
|
|
|
|
|
- Uniqid: parseInt(item.UniqId),
|
|
|
|
|
- chromatic: parseFloat(item.计损色数) ?? '',
|
|
|
|
|
- difficulty: parseFloat(item.难度系数) ?? '',
|
|
|
|
|
- loss: item.损耗代号 ??'',
|
|
|
|
|
- plate: parseInt(item.版距) ?? '',
|
|
|
|
|
- printMode: item.印刷方式 ?? '',
|
|
|
|
|
- wastage: parseFloat(item.损耗系数),
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- const AccountingParameterEditdata = await AccountingParameterEdit(formattedData);
|
|
|
|
|
- if (AccountingParameterEditdata.code === 0) {
|
|
|
|
|
- xzhscslist.value = false;
|
|
|
|
|
- ElMessage({ type: 'success', message: '更新成功' });
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({ type: 'error', message: '更新失败' });
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- console.error("数据错误");
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-//修正核算参数退出
|
|
|
|
|
-const sxzhscsCancel = () => {
|
|
|
|
|
- xzhscslist.value = false;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// =========== 质检废品系数 ===========
|
|
|
|
|
-const zjfpxs_tableColumns = ref(
|
|
|
|
|
- [
|
|
|
|
|
- { label: '产品编号', prop: '产品编号', width: '95' },
|
|
|
|
|
- { label: '产品名称', prop: '产品名称', width: '200' },
|
|
|
|
|
- { label: '印件工序及工艺', prop: '印件工序及工艺', width: '220' },
|
|
|
|
|
- { label: '新人工正品板', prop: 'scfjfpxsold_人工正品板', width: '110' },
|
|
|
|
|
- { label: '新人工次品板', prop: 'scfjfpxsold_人工次品板', width: '110' },
|
|
|
|
|
- { label: '新人工废检', prop: 'scfjfpxsold_人工废检', width: '110' },
|
|
|
|
|
- { label: '新机检正品板', prop: 'scfjfpxsold_机检正品板', width: '110' },
|
|
|
|
|
- { label: '新机检次品板', prop: 'scfjfpxsold_机检次品板', width: '110' },
|
|
|
|
|
- { label: '新机检废检', prop: 'scfjfpxsold_机检废检', width: '110' },
|
|
|
|
|
- { label: '人工正品板', prop: '人工正品板', width: '110' },
|
|
|
|
|
- { label: '人工次品板', prop: '人工次品板', width: '110' },
|
|
|
|
|
- { label: '人工废检', prop: '人工废检', width: '110' },
|
|
|
|
|
- { label: '机检正品板', prop: '机检正品板', width: '110' },
|
|
|
|
|
- { label: '机检次品板', prop: '机检次品板', width: '110' },
|
|
|
|
|
- { label: '机检废检', prop: '机检废检', width: '110' },
|
|
|
|
|
- { label: '设备编号', prop: '设备编号', width: '100' },
|
|
|
|
|
- { label: '客户名称', prop: '客户名称', width: '200' },
|
|
|
|
|
- ]
|
|
|
|
|
-)
|
|
|
|
|
-const zjfpxs_handleKeyDown = (event, x, y, prop) => {
|
|
|
|
|
- const currentElement = document.getElementById(`input${x}${y}`);
|
|
|
|
|
- if (currentElement === null && currentElement === undefined) return
|
|
|
|
|
- let move = 0
|
|
|
|
|
- switch (event.keyCode) {
|
|
|
|
|
- case 13: // Enter
|
|
|
|
|
- case 40: // 向下箭头
|
|
|
|
|
- if (y < scfjfpxstableData.value.length )
|
|
|
|
|
- document.getElementById(`input${x}${y + 1}`).focus();
|
|
|
|
|
- break;
|
|
|
|
|
- case 38: // 向上箭头
|
|
|
|
|
- if ( y > 0) {
|
|
|
|
|
- document.getElementById(`input${x}${y - 1}`).focus();
|
|
|
|
|
- }
|
|
|
|
|
- break;
|
|
|
|
|
- case 39: // 向左箭头
|
|
|
|
|
- if (x >= 9 && x <=14) {
|
|
|
|
|
- move = x + 1
|
|
|
|
|
- }
|
|
|
|
|
- document.getElementById(`input${move}${y}`).focus();
|
|
|
|
|
- break;
|
|
|
|
|
- case 37: // 向右箭头
|
|
|
|
|
- if (x >= 9 && x <=14) {
|
|
|
|
|
- move = x - 1
|
|
|
|
|
- }
|
|
|
|
|
- document.getElementById(`input${move}${y}`).focus();
|
|
|
|
|
- break;
|
|
|
|
|
- default:
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ }
|
|
|
|
|
+ return wbout;
|
|
|
|
|
+}
|
|
|
|
|
+//导出到EXCEL(明细)
|
|
|
|
|
+const exportToExcel2 = ()=>{
|
|
|
|
|
+ const el = document.getElementById('tab2');
|
|
|
|
|
+ // 文件名
|
|
|
|
|
+ const filename = '导出到EXCEL(明细).xlsx';
|
|
|
|
|
+ const wb = XLSX.utils.table_to_book(el, { raw: true });
|
|
|
|
|
+ const wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
|
|
|
|
|
+ try {
|
|
|
|
|
+ FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), filename);
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.log(e);
|
|
|
}
|
|
}
|
|
|
|
|
+ return wbout;
|
|
|
}
|
|
}
|
|
|
const scfjfpxslist = ref(false);
|
|
const scfjfpxslist = ref(false);
|
|
|
const scfjfpxsformData = reactive({
|
|
const scfjfpxsformData = reactive({
|
|
|
cpdh: '',
|
|
cpdh: '',
|
|
|
});
|
|
});
|
|
|
const scfjfpxstableData = ref([]);
|
|
const scfjfpxstableData = ref([]);
|
|
|
-//质检废品系数【按钮】
|
|
|
|
|
-const onzjfpxsclick = () => {
|
|
|
|
|
- if(_Gd_gdbh.value == null){
|
|
|
|
|
- scfjfpxslist.value = false;
|
|
|
|
|
- ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'});
|
|
|
|
|
- }else{
|
|
|
|
|
- scfjfpxsformData['cpdh'] = _Gd_gdbh.value;
|
|
|
|
|
- _TestCoefficient();
|
|
|
|
|
- scfjfpxslist.value = true;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
|
|
|
|
|
-const cp_gdprintonClick = () => {
|
|
|
|
|
- printPageRef.value.open(_Gd_gdbh.value)
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-//质检废品系数【回车】
|
|
|
|
|
-const scfjfpxsgetProductValue = () => {
|
|
|
|
|
- if(scfjfpxsformData['cpdh'] === ''){
|
|
|
|
|
- scfjfpxstableData.value = [];
|
|
|
|
|
- ElMessage({type: 'warning',message: '输入框为空'});
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- _TestCoefficient();
|
|
|
|
|
-};
|
|
|
|
|
-//修正工单核算参数->数据获取
|
|
|
|
|
-const _TestCoefficient = async ()=>{
|
|
|
|
|
- let workOrder = scfjfpxsformData['cpdh'];
|
|
|
|
|
- try {
|
|
|
|
|
- const TestCoefficientdata = await TestCoefficient({workOrder:workOrder});
|
|
|
|
|
- scfjfpxstableData.value = TestCoefficientdata.data;
|
|
|
|
|
- const formattedData = TestCoefficientdata.data.map(item=>{
|
|
|
|
|
- item.scfjfpxsold_人工正品板 = item.人工正品板;
|
|
|
|
|
- item.scfjfpxsold_人工次品板 = item.人工次品板;
|
|
|
|
|
- item.scfjfpxsold_人工废检 = item.人工废检;
|
|
|
|
|
- item.scfjfpxsold_机检正品板 = item.机检正品板;
|
|
|
|
|
- item.scfjfpxsold_机检次品板 = item.机检次品板;
|
|
|
|
|
- item.scfjfpxsold_机检废检 = item.机检废检;
|
|
|
|
|
- return item
|
|
|
|
|
- });
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(error);
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
|
|
|
//质检废品系数【更新】
|
|
//质检废品系数【更新】
|
|
|
const scfjfpxsConfirm = async () => {
|
|
const scfjfpxsConfirm = async () => {
|
|
@@ -433,47 +206,6 @@ const scfjfpxsCancel = () => {
|
|
|
//=========工序产量核查===========
|
|
//=========工序产量核查===========
|
|
|
const gd_gxclhclist = ref(false);
|
|
const gd_gxclhclist = ref(false);
|
|
|
const gxclhc_Data = ref([]);
|
|
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: '',
|
|
|
|
|
-});
|
|
|
|
|
-// 工序产量核查按钮
|
|
|
|
|
-const gd_gxclhconClick = async () => {
|
|
|
|
|
- if(_Gd_gdbh.value === '' || _Gd_gdbh.value === null){
|
|
|
|
|
- ElMessage({type: 'warning',message: '请选择具体的工单,在进行操作'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- gxclhcformData['gdbh'] = _Gd_gdbh.value;
|
|
|
|
|
- gd_gxclhclist.value = true;
|
|
|
|
|
- _getOrderProcessCount();
|
|
|
|
|
-};
|
|
|
|
|
-//工序产量核查回车
|
|
|
|
|
-const gxclhcProductValue = async () => {
|
|
|
|
|
- _getOrderProcessCount();
|
|
|
|
|
-}
|
|
|
|
|
-//工序产量核查退出
|
|
|
|
|
-const gxclhcCancel = async () => {
|
|
|
|
|
- gd_gxclhclist.value = false;
|
|
|
|
|
-};
|
|
|
|
|
//工序产量核查方法接口
|
|
//工序产量核查方法接口
|
|
|
const _getOrderProcessCount = async () => {
|
|
const _getOrderProcessCount = async () => {
|
|
|
const order = gxclhcformData['gdbh'];
|
|
const order = gxclhcformData['gdbh'];
|
|
@@ -652,73 +384,6 @@ const addgd_onclick = () => {
|
|
|
const handleDoubleClick = async ()=>{
|
|
const handleDoubleClick = async ()=>{
|
|
|
console.log(123)
|
|
console.log(123)
|
|
|
}
|
|
}
|
|
|
-//新增工单资料确定
|
|
|
|
|
-const add_gdenterDialog = async ()=>{
|
|
|
|
|
- console.log(add_gdscgdformData)
|
|
|
|
|
- if(add_gdscgdformData['工单编号'] === ''){
|
|
|
|
|
- ElMessage({type: 'warning',message: '工单编号为空'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if(add_gdscgdformData['交货日期'] === ''){
|
|
|
|
|
- ElMessage({type: 'warning',message: '交货日期为空'})
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- const startdeliveryDate = new Date(add_gdscgdformData['开单日期']);
|
|
|
|
|
- const start = startdeliveryDate.getFullYear() + '-' +
|
|
|
|
|
- (startdeliveryDate.getMonth() + 1).toString().padStart(2, '0') + '-' +
|
|
|
|
|
- startdeliveryDate.getDate().toString().padStart(2, '0') + ' ' +
|
|
|
|
|
- startdeliveryDate.getHours().toString().padStart(2, '0') + ':' +
|
|
|
|
|
- startdeliveryDate.getMinutes().toString().padStart(2, '0') + ':' +
|
|
|
|
|
- startdeliveryDate.getSeconds().toString().padStart(2, '0');
|
|
|
|
|
-
|
|
|
|
|
- const deliveryDate = new Date(add_gdscgdformData['交货日期']);
|
|
|
|
|
- const jhriqi = deliveryDate.getFullYear() + '-' +
|
|
|
|
|
- (deliveryDate.getMonth() + 1).toString().padStart(2, '0') + '-' +
|
|
|
|
|
- deliveryDate.getDate().toString().padStart(2, '0') + ' ' +
|
|
|
|
|
- deliveryDate.getHours().toString().padStart(2, '0') + ':' +
|
|
|
|
|
- deliveryDate.getMinutes().toString().padStart(2, '0') + ':' +
|
|
|
|
|
- deliveryDate.getSeconds().toString().padStart(2, '0');
|
|
|
|
|
- const formattedData = {
|
|
|
|
|
- zdgd: add_gdscgdformData['重点工单'],
|
|
|
|
|
- start: start,
|
|
|
|
|
- gdbh: add_gdscgdformData['工单编号'],
|
|
|
|
|
- sclx: add_gdscgdformData['生产类型'],
|
|
|
|
|
- khdh: add_gdscgdformData['客户代号'],
|
|
|
|
|
- khmc: add_gdscgdformData['客户名称'],
|
|
|
|
|
- cpdh: add_gdscgdformData['产品代号'],
|
|
|
|
|
- cpmc: add_gdscgdformData['产品名称'],
|
|
|
|
|
- yjno: add_gdscgdformData['印件代号'],
|
|
|
|
|
- yjmc: add_gdscgdformData['印件名称'],
|
|
|
|
|
- number: add_gdscgdformData['订单数量'],
|
|
|
|
|
- end: jhriqi,
|
|
|
|
|
- tll: add_gdscgdformData['投料率'],
|
|
|
|
|
- hgl: add_gdscgdformData['平均合格率'],
|
|
|
|
|
- pztl: add_gdscgdformData['平张投料'],
|
|
|
|
|
- wxz: add_gdscgdformData['万小张'],
|
|
|
|
|
- tldw: add_gdscgdformData['单位'],
|
|
|
|
|
- tldx: add_gdscgdformData['投料大箱'],
|
|
|
|
|
- kcdx: add_gdscgdformData['库存大箱'],
|
|
|
|
|
- xsddh: add_gdscgdformData['销售订单号'],
|
|
|
|
|
- jybm: add_gdscgdformData['警语版面'],
|
|
|
|
|
- bbh: add_gdscgdformData['版本号'],
|
|
|
|
|
- erp: add_gdscgdformData['客户ERP编码'],
|
|
|
|
|
- mysl: add_gdscgdformData['码源数量'],
|
|
|
|
|
- jcbz: add_gdscgdformData['进程备注'],
|
|
|
|
|
- remark: add_gdscgdformData['备注'],
|
|
|
|
|
- Sys_id: _username.value,
|
|
|
|
|
- };
|
|
|
|
|
- const WorkOrderAdd_add = await WorkOrderAdd(formattedData);
|
|
|
|
|
- if (WorkOrderAdd_add.code === 0) {
|
|
|
|
|
- ElMessage({type: 'success',message: '添加成功'})
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({type: 'error',message: '添加失败'})
|
|
|
|
|
- }
|
|
|
|
|
- add_gddialogFormVisible.value = false
|
|
|
|
|
-}
|
|
|
|
|
-//新增工单资料取消
|
|
|
|
|
-const add_gdcloseDialog = () => {
|
|
|
|
|
- add_gddialogFormVisible.value = false
|
|
|
|
|
-}
|
|
|
|
|
//获取客户代号,客户名称
|
|
//获取客户代号,客户名称
|
|
|
const khdhModal = ref(false)
|
|
const khdhModal = ref(false)
|
|
|
const cpdhModal = ref(false)
|
|
const cpdhModal = ref(false)
|
|
@@ -727,14 +392,6 @@ const cpdhDataList = ref([])
|
|
|
const khdh_keyword = ref('')
|
|
const khdh_keyword = ref('')
|
|
|
const cpdh_keyword = ref('')
|
|
const cpdh_keyword = ref('')
|
|
|
|
|
|
|
|
-//新增工单资料客户代号【回车】
|
|
|
|
|
-const khdh_ProductValue = async (v) => {
|
|
|
|
|
- await _gClientList(khdh_keyword.value)
|
|
|
|
|
-};
|
|
|
|
|
-//新增工单资料产品代号【回车】
|
|
|
|
|
-const cpdh_ProductValue = async (v) => {
|
|
|
|
|
- await _ProductCodeList(cpdh_keyword.value)
|
|
|
|
|
-};
|
|
|
|
|
//新增工单->客户列表
|
|
//新增工单->客户列表
|
|
|
const _gClientList = async (v = '')=>{
|
|
const _gClientList = async (v = '')=>{
|
|
|
try {
|
|
try {
|
|
@@ -1025,8 +682,6 @@ const add_gdyjenterDialog = async () => {
|
|
|
ElMessage({type: 'error',message: '添加失败' })
|
|
ElMessage({type: 'error',message: '添加失败' })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-//印件新增取消
|
|
|
|
|
-const add_dyjcloseDialog = () => {add_gdyjdialogFormVisible.value = false}
|
|
|
|
|
|
|
|
|
|
//印件新增【印件代码】树状图
|
|
//印件新增【印件代码】树状图
|
|
|
const handleTreeData = (treeData) => {
|
|
const handleTreeData = (treeData) => {
|
|
@@ -1884,8 +1539,10 @@ const handleNodeClick = async (node) => {
|
|
|
const ProductList = async(params)=>{
|
|
const ProductList = async(params)=>{
|
|
|
try {
|
|
try {
|
|
|
const ProductListData = await MachineProduction(params);
|
|
const ProductListData = await MachineProduction(params);
|
|
|
- let data = ProductListData.data.total
|
|
|
|
|
datelist.value = ProductListData.data.head
|
|
datelist.value = ProductListData.data.head
|
|
|
|
|
+
|
|
|
|
|
+ let data = ProductListData.data.total
|
|
|
|
|
+
|
|
|
data.forEach(item => {
|
|
data.forEach(item => {
|
|
|
item.forEach(element => {
|
|
item.forEach(element => {
|
|
|
tabledate2.value.push(element)
|
|
tabledate2.value.push(element)
|
|
@@ -1903,7 +1560,6 @@ const handleNodeClick = async (node) => {
|
|
|
return item;
|
|
return item;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- console.log(tabledate2.value);
|
|
|
|
|
|
|
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error(error);
|
|
console.error(error);
|