|
|
@@ -1,40 +1,66 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <layout>
|
|
|
- <!-- <layout-header> -->
|
|
|
- <div class="gva-table-box">
|
|
|
- <h1 style="margin: 0%;margin-bottom: 6px;">领料报工</h1>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 6px;">
|
|
|
+ <div style="height: 100%; width: 100%;">
|
|
|
+ <layout style="height: 100%; display: flex; flex-direction: column;">
|
|
|
+ <!-- 头部部分 -->
|
|
|
+ <div class="gva-table-box">
|
|
|
+ <h1 style="margin: 0%; margin-bottom: 6px;">派单报工</h1>
|
|
|
+ <el-row :gutter="24" style="margin-bottom: 6px;">
|
|
|
<el-input v-model="add_searchInfo" placeholder="请扫描子订单编号领料"
|
|
|
- @keyup.enter="add_onSubmit"
|
|
|
- id="searchInput"
|
|
|
- style="width: 220px;height: 50px;margin-left: 10px;">
|
|
|
- </el-input>
|
|
|
- <el-button type="primary" icon="search" @click="add_onSubmit" style="height: 50px;">领料报工</el-button>
|
|
|
- <el-form-item label="机台号:" prop="jitaihao" class="mab" style="font-size: 30px;margin: 10px;" label-width="116px">
|
|
|
- <el-input v-model="add_formData['机台号']" readonly style="width: 100px; height: 40px;" id="jitaihao" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="工序:" prop="gongxu" class="mab" style="font-size: 30px; margin: 10px;" label-width="81px">
|
|
|
- <el-input v-model="add_formData['工序']" readonly style="width: 100px; height: 40px;" id="gongxu" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="组别:" prop="zubie" class="mab" style="font-size: 30px; margin: 10px;" label-width="81px">
|
|
|
- <el-input v-model="add_formData['组别']" readonly style="width: 110px; height: 40px;" id="zubie" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="人员:" prop="renyuan" class="mab" style="font-size: 30px; margin: 10px;" label-width="81px">
|
|
|
- <el-input v-model="add_formData['人员']" readonly style="width: 110px; height: 40px;" id="renyuan" />
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
-
|
|
|
- </layout>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ @keyup.enter="add_onSubmit"
|
|
|
+ id="searchInput"
|
|
|
+ style="width: 220px; height: 50px; margin-left: 10px;">
|
|
|
+ </el-input>
|
|
|
+ <el-button type="primary" icon="search" @click="add_onSubmit" style="height: 50px;">
|
|
|
+ 派单报工
|
|
|
+ </el-button>
|
|
|
+ <el-form-item label="机台号:" prop="jitaihao" class="mab" style="font-size: 30px; margin: 10px;" label-width="116px">
|
|
|
+ <el-input v-model="add_formData['机台号']" readonly style="width: 100px; height: 40px;" id="jitaihao" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工序:" prop="gongxu" class="mab" style="font-size: 30px; margin: 10px;" label-width="81px">
|
|
|
+ <el-input v-model="add_formData['工序']" readonly style="width: 100px; height: 40px;" id="gongxu" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="组别:" prop="zubie" class="mab" style="font-size: 30px; margin: 10px;" label-width="81px">
|
|
|
+ <el-input v-model="add_formData['组别']" readonly style="width: 110px; height: 40px;" id="zubie" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="人员:" prop="renyuan" class="mab" style="font-size: 30px; margin: 10px;" label-width="81px">
|
|
|
+ <el-input v-model="add_formData['人员']" readonly style="width: 110px; height: 40px;" id="renyuan" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
|
|
|
+ <!-- 内容部分 -->
|
|
|
+ <el-main style="flex-grow: 1; padding: 0;">
|
|
|
+ <el-row :gutter="24" style="margin-bottom: 15px; margin-left: 0px; height: 100%;">
|
|
|
+ <div @contextmenu.prevent style="height: 100%; width: 100%;">
|
|
|
+ <el-table ref="multipleTableRef" style="width: 100%; height: 100%;"
|
|
|
+ :row-style="{ height: '50px' }"
|
|
|
+ :header-cell-style="{ padding: '5px', fontSize: '20px' }"
|
|
|
+ :cell-style="{ padding: '10px', fontSize: '20px' }"
|
|
|
+ :header-row-style="{ height: '20px' }"
|
|
|
+ :data="pd_data_tableData" border row-key="ID" size="small"
|
|
|
+ highlight-current-row="true" tooltip-effect="dark"
|
|
|
+ @row-dblclick="add_updateCompanyFunc"
|
|
|
+ @row-click="add_tableRowClick"
|
|
|
+ @row-contextmenu="handleRightClick"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ @selection-change="add_xpSelectionChange">
|
|
|
+ <el-table-column sortable align="left" label="订单编号" prop="订单编号" width="160"/>
|
|
|
+ <el-table-column sortable align="left" label="子订单编号" prop="子订单编号" width="160"/>
|
|
|
+ <el-table-column sortable align="left" label="班组编号" prop="班组编号" width="160"/>
|
|
|
+ <el-table-column sortable align="left" label="创建时间" prop="创建时间" width="200"/>
|
|
|
+ <el-table-column sortable align="left" label="创建人员" prop="创建人员" width="200"/>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
+ </el-main>
|
|
|
+ </layout>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
<script setup>
|
|
|
// 全量引入格式化工具 请按需保留
|
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
import {ref, reactive} from 'vue'
|
|
|
-import {processAdd} from '@/api/mes/job'
|
|
|
+import {processAdd,CfdataAllList} from '@/api/mes/job'
|
|
|
import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
|
|
|
import {getMac} from '@/api/jixiaoguanli/baogong'
|
|
|
import {ElMessage} from "element-plus";
|
|
|
@@ -77,7 +103,7 @@ const UniqId = ref('')
|
|
|
|
|
|
//物理地址获取机台编号
|
|
|
const getMachineMacdata = async () => {
|
|
|
- console.log("领料报工物理地址",Machine.value)
|
|
|
+ console.log("派单报工物理地址",Machine.value)
|
|
|
try {
|
|
|
const data = await getMachineMac({sys_sbID:Machine.value});
|
|
|
add_formData['机台号'] = data.data['机台号']
|
|
|
@@ -93,6 +119,8 @@ const getMachineMacdata = async () => {
|
|
|
} catch (error) {
|
|
|
console.error(error)
|
|
|
}
|
|
|
+ const pd_data = await CfdataAllList();
|
|
|
+ pd_data_tableData.splice(0,pd_data_tableData.length,...pd_data.data);//表格数据
|
|
|
}
|
|
|
//自动获取物理地址
|
|
|
const GetAddr = () => {
|
|
|
@@ -127,6 +155,7 @@ const GetAddr = () => {
|
|
|
GetAddr()
|
|
|
|
|
|
const add_searchInfo = ref('')//搜索
|
|
|
+const pd_data_tableData = reactive([]);
|
|
|
|
|
|
//点击【查询】按钮
|
|
|
const add_onSubmit = async ()=>{
|
|
|
@@ -140,20 +169,27 @@ const add_onSubmit = async ()=>{
|
|
|
if(add_searchInfo.value === ''){
|
|
|
ElMessage({type: 'warning',message: '请扫描子订单编号' })
|
|
|
}else{
|
|
|
- //领料
|
|
|
- let llparams = {};
|
|
|
- llparams.子订单编号 = add_searchInfo.value
|
|
|
- llparams.班组 = add_formData['机台号']
|
|
|
- llparams.订单编号 = add_searchInfo.value.split('-')[0]
|
|
|
- llparams.Sys_id = _username.value
|
|
|
- const processAdd_post = await processAdd(llparams);
|
|
|
- console.log(processAdd_post)
|
|
|
- if (processAdd_post.code === 0) {
|
|
|
- add_searchInfo.value = ''
|
|
|
- ElMessage({type: 'success',message: '领料成功'})
|
|
|
- } else {
|
|
|
- ElMessage({ type: 'error',message: '领料失败'})
|
|
|
- }
|
|
|
+ if (/-/.test(add_searchInfo.value)) {
|
|
|
+ //领料
|
|
|
+ let llparams = {};
|
|
|
+ llparams.子订单编号 = add_searchInfo.value
|
|
|
+ llparams.班组 = add_formData['机台号']
|
|
|
+ llparams.订单编号 = add_searchInfo.value.split('-')[0]
|
|
|
+ llparams.Sys_id = _username.value
|
|
|
+ const processAdd_post = await processAdd(llparams);
|
|
|
+ console.log(processAdd_post)
|
|
|
+ if (processAdd_post.code === 0) {
|
|
|
+ add_searchInfo.value = ''
|
|
|
+ ElMessage({type: 'success',message: '领料成功'})
|
|
|
+ const pd_data = await CfdataAllList();
|
|
|
+ pd_data_tableData.splice(0,pd_data_tableData.length,...pd_data.data);//表格数据
|
|
|
+ } else {
|
|
|
+ ElMessage({ type: 'error',message: '领料失败'})
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ElMessage({type: 'warning',message: '请扫描子订单编号' })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
|