소스 검색

排产参数调整优化

zck2422052614 1 년 전
부모
커밋
ed0592b727
1개의 변경된 파일20개의 추가작업 그리고 39개의 파일을 삭제
  1. 20 39
      src/view/yunyin/chanpinziliao/chanpinziliao.vue

+ 20 - 39
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -476,10 +476,20 @@
                 <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-input   v-model="scope.row.olds_Gy0_sbbh" :clearable="false" @keyup.enter="cjxz(scope.row, scope.$index)"/>
+              </el-table-column>
+              <el-table-column v-slot="scope" align="left" label=车间 width="110" >
+                <el-input disabled  v-model="scope.row.Gy0_site" :clearable="false" />
               </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-select v-model="scope.row.Gy0_sbbh" >
+      <el-option
+        v-for="machine in jtList"
+        :key="machine"
+        :label="machine.split('-->')[0].trim()"
+        :value="machine.split('-->')[0].trim()"
+      ></el-option>
+    </el-select>
               </el-table-column>
               <el-table-column v-slot="scope"  align="left" label=新装版开工时 width="115" >
                 <el-input   v-model="scope.row.Gy0_辅助工时" :clearable="false"/>
@@ -490,12 +500,9 @@
               <el-table-column v-slot="scope" align="left" label=联数 width="70" >
                 <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" />
-              </el-table-column>
-              <el-table-column v-slot="scope" align="left" label=设备编号 width="100" >
+              <!-- <el-table-column v-slot="scope" align="left" label=设备编号 width="100" >
                 <el-input disabled v-model="scope.row.olds_Gy0_sbbh" :clearable="false"/>
-              </el-table-column>
+              </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"/>
               </el-table-column>
@@ -516,26 +523,7 @@
               node-key="value"
               >
             </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>         
 
           <!--核算参数调整-->
           <el-dialog v-model="hscstzlist" title="核算参数调整"  style="width: 100%;height: 100%;margin:  0;">
@@ -2320,6 +2308,7 @@ const selectedMachine = ref('');
 let currentRowIndex = null; // 用于存储当前行的索引
 //点击【排产参数调整】按钮
 const pccstzClick = () => {
+  pccstztableData.value.olds_Gy0_sbbh = ''
   if(_product_code.value == null){
     pccstzlist.value = false;
     ElMessage({type: 'warning',message: '请选择分类项目,再操作此功能'})
@@ -2365,7 +2354,7 @@ const pccstzConfirm = async () => {
       shdh: item.Gy0_shdh,
       machine: item.Gy0_sbbh,
       time: item.Gy0_辅助工时,
-      wokershop: item.Gy0_site
+      wokershop: item.olds_Gy0_sbbh
     };
   });
   const editGy_edit = await editGy(formattedData);
@@ -2406,28 +2395,20 @@ const apiData = await getDepartName()
 
 };
 
-// 将选择的车间赋值
+// 选择新车间并获取机台
 const selectHandle = async (node) => {
 console.log('232323',node.label)
 console.log('suoyin',currentRowIndex)
-pccstztableData.value[currentRowIndex].Gy0_site = node.label
+pccstztableData.value[currentRowIndex].olds_Gy0_sbbh = 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;
+// 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([]);