liuhairui hai 1 ano
pai
achega
9087db8f73

+ 6 - 13
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -6,7 +6,7 @@
           <!--          按钮部分-->
           <el-form ref="elSearchFormRef"  :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
             <el-form-item>
-              <!--按钮 clearable-->
+              <!--按钮-->
               <el-input v-model="searchInfo" placeholder="搜索工单编号"  style="width: 180px;"></el-input>
               <el-button type="primary" title="搜索" icon="search"  @click="onSubmit"></el-button>
               <el-button type="primary" title="设置工单的状态-->【计划中】 【生产中】 【已完成】" icon="edit" @click="onStatusClick" class="bt">工单状态设置</el-button>
@@ -27,12 +27,9 @@
                 <el-button type="primary" title="可【批量设置】所选择的生产任务的生产机台" icon="edit"  @click="onjztzClick" class="bt">机组调整</el-button>
                 <el-button type="primary" title="给担负起那设备做生产任务排程" icon="edit"  @click="oncjsbpcClick" class="bt">车间设备制程排序</el-button>
               </div>
-
               <el-button type="primary" title="打印生产工单" icon="edit" @click="pd_gdprintonClick" class="bt">工单打印</el-button>
               <el-button type="primary" icon="edit" @click="pd_gxclhconClick" class="bt">工序产量核查</el-button>
               <el-button type="primary" icon="edit" @click="pd_lcdlistonClick" class="bt">流程单查询</el-button>
-
-
             </el-form-item>
           </el-form>
 
@@ -94,7 +91,6 @@
               </template>
             </el-table>
           </el-dialog>
-
           <!--机组调整【弹窗】-->
           <el-dialog v-model="jizuDisplay" title="机组调整" style="width: 600px;">
             <el-row class="">
@@ -175,7 +171,6 @@
             </div>
 
           </el-dialog>
-
           <!--工序产量核查【弹窗】-->
           <el-dialog v-model="pd_gxclhclist" title="工序产量核查" style="width: 100%;height: 100%;margin: 0px;padding: 0px">
             <el-button type="" @click="gxclhcCancel">退出</el-button>
@@ -205,7 +200,6 @@
               </template>
             </el-table>
           </el-dialog>
-
           <!--流程单查询【弹窗】-->
           <el-dialog v-model="pd_lcdlist" title="工单工序生产进程" style="width: 100%;height: 100%;margin: 0px;padding: 0px;">
             <div style="width: 100%;height: 100%;">
@@ -253,7 +247,7 @@
         </layout-sider>
         <layout-content>
           <el-main>
-
+<!--          customTree 排程 制程  dataTree // 计划中,排产中 ,dataTree 车间-->
             <div class="gva-table-box"  v-if="treeType === 'customTree'">
               <el-table ref="multipleTable" style="width: 100%;height: 25vh"
                         :row-style="{ height: '20px' }" :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -698,10 +692,8 @@ const handleNodeClick = async (node) => {
   });
   // 获取点击的节点
   const clickedNodeId = node['$treeNodeId'];
-  console.log(clickedNodeId);
   const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
   if (clickedNode) {
-    console.log(clickedNode);
     // 给当前点击的节点改变颜色
     clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
   }
@@ -713,9 +705,10 @@ const handleNodeClick = async (node) => {
     treeType.value = 'dataTree'
     // 使用字符串分割获取#前面的数据
     _machine.value = node.label.split('#')[0].trim() + '#';
-    console.log('机台-------' + _machine.value)
+    console.log('点击了机台-------' + _machine.value)
     const zhubiao = await MachineWorkOrderList({ machine:_machine.value})
-    // console.log(zhubiao)
+    console.log("获取出来的数据【排程↑】【制程↓】↓↓↓↓↓↓↓↓↓↓↓↓↓")
+    console.log(zhubiao)
     chejianData.value = zhubiao.data['排程'];
     chejianfuData.value = zhubiao.data['制程'];
   }
@@ -740,7 +733,7 @@ const schandleNodeClick = async (node) => {
   bottomData.value = []
   yjtableData.value = []
   gytableData.value = []
-  console.log(node.number)
+  console.log('点击了-------' + node.number)
   switch (node.number) {
     case "计划中":
       const jhz_Projectdata = await Project({status:currentNode.value,search:'',page:1,limit:30});

+ 16 - 7
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -890,12 +890,14 @@
                 <div>
                   <el-form-item label="关键字:"  class="mab" prop="keyOrder">
                     <el-space>
-                      <el-input v-model="cpdh_keyword" @keyup.enter="cpdh_ProductValue" style="width: 100%;"/>
+                      <el-input v-model="cpdh_keyword" @keyup.enter="cpdh_ProductValue" style="width: 100%;" ref="addgdzlcpdhInput"/>
                       <el-button @click="gongdanSearchHandle(cpdh_keyword, '产品代号')">刷新</el-button>
                     </el-space>
                   </el-form-item>
                   <div style="border:1px solid #eee; width:100%; height: 400px; overflow-y: auto">
-                    <el-tree :data="cpdhDataList" :props="{children: 'children',label: 'name', value: '产品编号'}" @node-click="selectGongDanNode($event, '产品代号')" />
+                    <el-tree :data="cpdhDataList"
+                             :props="{children: 'children',label: 'name', value: '产品编号'}"
+                             @node-click="selectGongDanNode($event, '产品代号')" />
                   </div>
                 </div>
               </el-form>
@@ -1931,15 +1933,12 @@ const selectGongDanNode = (node, type) => {
 }
 
 const xzgdzlInput =ref()
+const addgdzlcpdhInput =ref()
 const xzgdzlTree = ref()
 const currentNodeKey = ref('')
 
 //新增工单资料弹窗 键盘 input框跳转
 const add_gdzlent = async (event,id1,id2,id3) => {
-  if (id2 === '产品代号' && event.key==='Tab' || id2 === '产品代号' && event.key=== 'Enter') {
-    await _ProductCodeList()
-    cpdhModal.value = true
-  }
   if(event.keyCode === 40){
     if(id3!=''){
       document.getElementById(id3).focus()
@@ -1984,6 +1983,17 @@ const add_gdzlent = async (event,id1,id2,id3) => {
       }, 200)
     })
   }
+
+  if (id2 === '产品代号' && event.key==='Tab' || id2 === '产品代号' && event.key=== 'Enter') {
+    await _ProductCodeList()
+    cpdhModal.value = true
+    //自动获取光标
+    await nextTick(() => {
+      setTimeout(() => {
+        addgdzlcpdhInput.value.focus()
+      }, 200)
+    })
+  }
 }
 let isdeFun = false
 watch(() => khdhModal.value, async v => {
@@ -2039,7 +2049,6 @@ watch(() => khdhModal.value, async v => {
       }
     }
   })
-
 })
 
 // =========== 新增印件资料 ===========