|
|
@@ -475,6 +475,9 @@
|
|
|
<el-table-column v-slot="scope" align="left" label=新损耗代号 width="170" >
|
|
|
<el-input v-model="scope.row.Gy0_shdh" :clearable="false"/>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column v-slot="scope" align="left" label=新车间 width="110" >
|
|
|
+ <el-input v-model="scope.row.Gy0_site" :clearable="false" @keyup.enter="cjxz(scope.row, scope.$index)"/>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column v-slot="scope" align="left" label=新机组编号 width="115" >
|
|
|
<el-input v-model="scope.row.Gy0_sbbh" :clearable="false"/>
|
|
|
</el-table-column>
|
|
|
@@ -488,10 +491,10 @@
|
|
|
<el-input disabled v-model="scope.row.Gy0_ls" :clearable="false"/>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-slot="scope" align="left" label=车间 width="110" >
|
|
|
- <el-input v-model="scope.row.Gy0_site" :clearable="false" @keyup.enter="cjxz"/>
|
|
|
+ <el-input v-model="scope.row.Gy0_site" :clearable="false" />
|
|
|
</el-table-column>
|
|
|
<el-table-column v-slot="scope" align="left" label=设备编号 width="100" >
|
|
|
- <el-input disabled v-model="scope.row.olds_Gy0_sbbh" :clearable="false"/>
|
|
|
+ <el-input disabled v-model="scope.row.olds_Gy0_sbbh" :clearable="false"/>
|
|
|
</el-table-column>
|
|
|
<el-table-column v-slot="scope" align="left" label=客户名称 width="300" >
|
|
|
<el-input disabled v-model="scope.row.custom_name" :clearable="false"/>
|
|
|
@@ -515,6 +518,25 @@
|
|
|
</el-tree>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog
|
|
|
+ v-model="jtdisplay"
|
|
|
+ title="机台选择"
|
|
|
+ width="800px"
|
|
|
+ >
|
|
|
+ <el-select v-model="selectedMachine" placeholder="请选择机台">
|
|
|
+ <el-option
|
|
|
+ v-for="machine in jtList"
|
|
|
+ :key="machine"
|
|
|
+ :label="machine"
|
|
|
+ :value="machine"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="jtdisplay = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmSelection">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!--核算参数调整-->
|
|
|
<el-dialog v-model="hscstzlist" title="核算参数调整" style="width: 100%;height: 100%;margin: 0;">
|
|
|
<el-button type="" @click="hscstzCancel">取消</el-button>
|
|
|
@@ -1580,7 +1602,8 @@ import {
|
|
|
addProduct,
|
|
|
ProcessEdit,
|
|
|
getCouplet,
|
|
|
- ProductgetCouplet
|
|
|
+ ProductgetCouplet,
|
|
|
+ gdzl_MachineList
|
|
|
} from '@/api/yunyin/yunying'
|
|
|
defineOptions({ name: 'Company'})
|
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
|
@@ -2290,8 +2313,10 @@ const pccstzlist = ref(false);
|
|
|
const pccstztableData = ref([]);
|
|
|
const pccstzformData = reactive({cpdh: '',});
|
|
|
const cjdisplay = ref(false)
|
|
|
+const jtdisplay = ref(false)
|
|
|
const cjList = ref([])
|
|
|
-const cjtableData = reactive([]); // 表格数据
|
|
|
+const jtList = ref([])
|
|
|
+const selectedMachine = ref('');
|
|
|
let currentRowIndex = null; // 用于存储当前行的索引
|
|
|
//点击【排产参数调整】按钮
|
|
|
const pccstzClick = () => {
|
|
|
@@ -2340,6 +2365,7 @@ const pccstzConfirm = async () => {
|
|
|
shdh: item.Gy0_shdh,
|
|
|
machine: item.Gy0_sbbh,
|
|
|
time: item.Gy0_辅助工时,
|
|
|
+ wokershop: item.Gy0_site
|
|
|
};
|
|
|
});
|
|
|
const editGy_edit = await editGy(formattedData);
|
|
|
@@ -2356,8 +2382,9 @@ const pccstzCancel = () => {pccstzlist.value = false;};
|
|
|
|
|
|
|
|
|
//回车车间选择弹窗
|
|
|
-const cjxz = async (rowIndex) =>{
|
|
|
- currentRowIndex = rowIndex; // 保存当前行的索引
|
|
|
+const cjxz = async (row, index) =>{
|
|
|
+ currentRowIndex = index
|
|
|
+ console.log('55555',currentRowIndex)
|
|
|
cjdisplay.value = true
|
|
|
//车间选择数据
|
|
|
const apiData = await getDepartName()
|
|
|
@@ -2380,23 +2407,27 @@ const apiData = await getDepartName()
|
|
|
};
|
|
|
|
|
|
// 将选择的车间赋值
|
|
|
-const selectHandle = (node) => {
|
|
|
-console.log('232323',node)
|
|
|
- if (currentRowIndex !== null) {
|
|
|
- // 使用currentRowIndex来找到并更新表格中的对应行
|
|
|
- const row = tableData[currentRowIndex];
|
|
|
- if (row) {
|
|
|
- row.Gy0_site = node.label;
|
|
|
- console.log(row.Gy0_site);
|
|
|
- // 如果需要,可以在这里调用其他函数来处理更新后的数据
|
|
|
- }
|
|
|
- // 关闭对话框
|
|
|
- cjdisplay.value = false;
|
|
|
- currentRowIndex = null; // 重置当前行的索引
|
|
|
- }
|
|
|
+const selectHandle = async (node) => {
|
|
|
+console.log('232323',node.label)
|
|
|
+console.log('suoyin',currentRowIndex)
|
|
|
+pccstztableData.value[currentRowIndex].Gy0_site = node.label
|
|
|
+console.log(pccstztableData.value)
|
|
|
+const MachineList_jitai = await gdzl_MachineList({address:node.label});
|
|
|
+ console.log(MachineList_jitai.data)
|
|
|
+ console.log(123)
|
|
|
+ jtList.value = MachineList_jitai.data
|
|
|
+jtdisplay.value = true;
|
|
|
+cjdisplay.value = false;
|
|
|
};
|
|
|
|
|
|
|
|
|
+//机台确认按钮
|
|
|
+const confirmSelection = () => {
|
|
|
+ pccstztableData.value[currentRowIndex].Gy0_sbbh = selectedMachine.value.split('-->')[0]
|
|
|
+ console.log(selectedMachine.value.split('-->')[0])
|
|
|
+ jtdisplay.value = false;
|
|
|
+};
|
|
|
+
|
|
|
// =========== 核算参数调整 ===========
|
|
|
const hscstzlist = ref(false);
|
|
|
const hscstztableData = ref([]);
|