|
|
@@ -106,7 +106,7 @@
|
|
|
<el-dialog
|
|
|
v-model="dialogFormVisible"
|
|
|
:before-close="closeDialog"
|
|
|
- :title="type === 'create' ? '添加' : '修改'"
|
|
|
+ :title="type"
|
|
|
destroy-on-close
|
|
|
width="70%"
|
|
|
style="position: fixed; top: 35%; left: 50%; transform: translate(-50%, -50%);"
|
|
|
@@ -191,6 +191,7 @@
|
|
|
<el-input
|
|
|
v-model="detailData.qczl_gxmc"
|
|
|
style="width: 200px;"
|
|
|
+ @keyup.enter.native="getgxsubmit"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
@@ -301,8 +302,7 @@
|
|
|
>
|
|
|
<template #default="{ row }">
|
|
|
<el-input
|
|
|
- v-model="row.fp_gxmc"
|
|
|
- readonly
|
|
|
+ v-model="row.fp_gxmc"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -323,8 +323,7 @@
|
|
|
>
|
|
|
<template #default="{ row }">
|
|
|
<el-input
|
|
|
- v-model="row.fp_bh"
|
|
|
- readonly
|
|
|
+ v-model="row.fp_bh"
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -339,7 +338,6 @@
|
|
|
/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
</el-table>
|
|
|
|
|
|
</el-scrollbar>
|
|
|
@@ -398,6 +396,39 @@
|
|
|
/>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ v-model="GetjtbhVisible"
|
|
|
+ title="选择"
|
|
|
+ destroy-on-close
|
|
|
+ width="600px"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ tooltip-effect="dark"
|
|
|
+ :data="JTBHselectData"
|
|
|
+ row-key="ID"
|
|
|
+ highlight-current-row="true"
|
|
|
+ border
|
|
|
+ style="width:100%"
|
|
|
+ @row-dblclick="JTBHSelectClick"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="gxh"
|
|
|
+ label="工序号"
|
|
|
+ width="70"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="gxmc"
|
|
|
+ label="工序名称"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="addGxmc"
|
|
|
+ label="工序名称"
|
|
|
+ width="150"
|
|
|
+ />
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
<!-- 废品日统计 -->
|
|
|
<Meirihejiantongji
|
|
|
@@ -440,7 +471,7 @@ import {
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
import { Search, Refresh, Download } from '@element-plus/icons-vue'
|
|
|
import { ref, reactive } from 'vue'
|
|
|
-import { getSide, getTable, getOneWorkOrder, getOrderInfo, getGxAndLeader, getWastInfo, updateData, add } from '@/api/mes_api_gty/workOrderVerification'
|
|
|
+import { getSide, getTable, getOneWorkOrder, getOrderInfo, getGxAndLeader, getYjInfo,getWastInfo, updateData, add } from '@/api/mes_api_gty/workOrderVerification'
|
|
|
import Meirihejiantongji from '@/view/performance/09-workOrderVerification/componets/meirihejiantongji.vue'
|
|
|
import Gongdanzhijianfeipintongji from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
|
|
|
import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
|
|
|
@@ -506,11 +537,11 @@ const tableColumns = [
|
|
|
{ label: '创建用户', prop: 'sys_id', width: '200' }
|
|
|
]
|
|
|
const tableData = reactive([])
|
|
|
-
|
|
|
+const GetjtbhVisible = ref(false)
|
|
|
const total = ref(0)
|
|
|
const page = ref(1)
|
|
|
const limit = ref(10)
|
|
|
-
|
|
|
+const JTBHselectData = reactive([])
|
|
|
const searchInfo = ref('')
|
|
|
const params = {
|
|
|
date: '',
|
|
|
@@ -519,17 +550,53 @@ const params = {
|
|
|
page: page.value.toString(),
|
|
|
limit: limit.value.toString(),
|
|
|
}
|
|
|
-
|
|
|
+//获取工序
|
|
|
+const getgxsubmit = () => {
|
|
|
+ GetJtbh()
|
|
|
+}
|
|
|
+const GetJtbh = async () => {
|
|
|
+ try {
|
|
|
+ const response = await getYjInfo({ order: '2312185', yj_no: '1' });
|
|
|
+ if (response.code === 0) {
|
|
|
+ const data = response.data;
|
|
|
+ if (data) {
|
|
|
+ const tableData = data.gx_data.map(item => ({
|
|
|
+ gxh: item.Gy0_gxh,
|
|
|
+ gxmc: item.Gy0_gxmc+'-'+item.Add_gxmc,
|
|
|
+ // addGxmc: item.Add_gxmc
|
|
|
+ }));
|
|
|
+ console.log(tableData);
|
|
|
+ JTBHselectData.splice(0, JTBHselectData.length, ...tableData);
|
|
|
+ GetjtbhVisible.value = true;
|
|
|
+ // Now you can use the tableData to populate your table
|
|
|
+ } else {
|
|
|
+ console.log('No data found');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ console.log('Error: ', response.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ console.error('Error fetching data: ', error);
|
|
|
+ }
|
|
|
+};
|
|
|
+const JTBHSelectClick = (row, column, event) => {
|
|
|
+ const { gxh, gxmc } = row
|
|
|
+ detailData.qczl_gxmc=gxh+'-'+gxmc
|
|
|
+ detailData.qczl_gxh=gxh
|
|
|
+ GetjtbhVisible.value = false
|
|
|
+}
|
|
|
// 批量删除控制标记
|
|
|
const deleteVisible = ref(false)
|
|
|
const multipleSelection = ref([])
|
|
|
-
|
|
|
+const minUniqId = ref('')
|
|
|
const getTableData = async() => {
|
|
|
const response = await getTable(params)
|
|
|
if (response.code === 0) {
|
|
|
total.value = response.data.total
|
|
|
// Object.assign(tableData, response.data.rows)
|
|
|
+
|
|
|
tableData.splice(0, tableData.length, ...response.data.rows)
|
|
|
+ minUniqId.value= Math.min(...tableData.map(row => row.UniqId));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -568,7 +635,8 @@ const handleCurrentChange = () => {
|
|
|
const detailData = reactive({})
|
|
|
const selectData = reactive([])
|
|
|
const selectColumns = [
|
|
|
- { label: '', prop: 'sczl_gxmc', width: '600' },
|
|
|
+ { label: '', prop: 'sczl_gxmc', width: '500' },
|
|
|
+ { label: '', prop: 'sczl_jtbh', width: '100' },
|
|
|
{ label: '', prop: 'sczl_bzdh', width: '100' },
|
|
|
{ label: '', prop: 'name', width: '100' },
|
|
|
]
|
|
|
@@ -729,7 +797,7 @@ const handleFpslEnter = async(index, row) => {
|
|
|
|
|
|
// 双击表格操作
|
|
|
function doubleClick(row, column, event) {
|
|
|
- type.value = 'update'
|
|
|
+ type.value = '查改'
|
|
|
getDetailData(row.UniqId)
|
|
|
}
|
|
|
|
|
|
@@ -746,9 +814,9 @@ const handleSelectClick = (row, column, event) => {
|
|
|
|
|
|
// 弹窗确定
|
|
|
const enterDialog = async() => {
|
|
|
- if (type.value === 'update') {
|
|
|
+ if (type.value === '查改') {
|
|
|
updateDetailData()
|
|
|
- } else if (type.value === 'add') {
|
|
|
+ } else if (type.value === '新增') {
|
|
|
addDetailData()
|
|
|
}
|
|
|
}
|
|
|
@@ -904,8 +972,10 @@ const handleSelectChange = (row, column, event) => {
|
|
|
|
|
|
// 新增数据
|
|
|
const handleShowAdd = async() => {
|
|
|
- type.value = 'add'
|
|
|
- getDetailData(currentRow.value)
|
|
|
+ type.value = '新增'
|
|
|
+ // console.log()
|
|
|
+ getDetailData(minUniqId.value)
|
|
|
+
|
|
|
// type.value='add'
|
|
|
// Object.assign(detailData);
|
|
|
// dialogFormVisible.value = true
|