ソースを参照

Merge remote-tracking branch 'origin/master'

tty 1 年間 前
コミット
686aade366

+ 14 - 0
src/api/jixiaoguanli/jitairibaobiao.js

@@ -99,8 +99,22 @@ export const getInfo = (params) => {
   })
 }
 
+export const getGxMc = (params) => {
+  return service({
+    url:'/mes_server/packaging_process_output/getGxMc',
+    method: 'get',
+    params
+  })
+}
 
 
+export const edit = (params) => {
+  return service({
+    url:'/mes_server/packaging_process_output/edit',
+    method: 'post',
+    params
+  })
+}
 
 
 

+ 298 - 103
src/view/performance/Packagingoutput.vue

@@ -28,7 +28,8 @@
             </div>
             <!-- 数据展示 -->
             <el-table ref="multipleTable" style="width: 100%" tooltip-effect="dark" :data="tableData" row-key="ID"
-              highlight-current-row="true"  :cell-style="cellStyle" border @selection-change="handleSelectionChange" :show-overflow-tooltip="true" @row-dblclick="doubleClick">
+              highlight-current-row="true"  :cell-style="cellStyle" border @selection-change="handleSelectionChange" 
+			  :show-overflow-tooltip="true" @row-dblclick="doubleClick">
               <el-table-column type="selection" width="55" />
 			  <el-table-column align="left" label="创建用户" prop="sys_id" width="120" />
               <el-table-column align="left" label="日期" prop="sczl_rq" width="120"/>
@@ -57,7 +58,7 @@
                   <el-form-item label="日期" prop="name">
                     <el-row :gutter="20">
                       <el-col :span="12">
-                        <el-input v-model="formData.code" :clearable="true" placeholder="ZT01733" />
+                        <el-input v-model="formData.sczl_rq" :clearable="true" placeholder="ZT01733" />
                       </el-col>
                     </el-row>
                   </el-form-item>
@@ -92,151 +93,151 @@
                             <!-- 员工1 -->
                             <el-row :gutter="5" style="margin-top: 10px;">
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                                <el-input v-model="formData.sczl_gdbh1" :clearable="true" @keyup.enter.native="getGxMcsubmit($event, '1')" placeholder="ZI00401" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" data-="" />
+                                <el-input v-model="formData.sczl_yjGx1" :clearable="true" placeholder="瞿春生" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                                <el-input v-model="formData.sczl_gxmc1" :clearable="true" placeholder="11.0" />
                               </el-col>
                               <el-col :span="9">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                                <el-input v-model="formData.Gd_cpmc1" :clearable="true" placeholder="打包废纸" />
                               </el-col>
                               <el-col :span="2">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                                <el-input v-model="formData.sczl_cl1" :clearable="true" placeholder="是" />
                               </el-col>
 							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							    <el-input v-model="formData.sczl_PgCl1" :clearable="true" placeholder="是" />
 							  </el-col>
 							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							    <el-input v-model="formData.sczl_clAdd1" :clearable="true" placeholder="是" />
 							  </el-col>
                             </el-row>
               
                             <!-- 员工2 -->
                             <el-row :gutter="5" style="margin-top: 10px;">
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                                <el-input v-model="formData.sczl_gdbh2" :clearable="true" @keyup.enter.native="getGxMcsubmit($event, '2')" placeholder="ZI00401" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                                <el-input v-model="formData.sczl_yjGx2" :clearable="true" placeholder="瞿春生" data-="" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                                <el-input v-model="formData.sczl_gxmc2" :clearable="true" placeholder="11.0" />
                               </el-col>
                               <el-col :span="9">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                                <el-input v-model="formData.Gd_cpmc2" :clearable="true" placeholder="打包废纸" />
                               </el-col>
                               <el-col :span="2">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                                <el-input v-model="formData.sczl_cl2" :clearable="true" placeholder="是" />
                               </el-col>
 							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							    <el-input v-model="formData.sczl_PgCl2" :clearable="true" placeholder="是" />
 							  </el-col>
 							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							    <el-input v-model="formData.sczl_clAdd2" :clearable="true" placeholder="是" />
 							  </el-col>
                             </el-row>
               
                             <!-- 员工3 -->
                             <el-row :gutter="5" style="margin-top: 10px;">
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                                <el-input v-model="formData.sczl_gdbh3" :clearable="true" @keyup.enter.native="getGxMcsubmit($event, '3')" placeholder="ZI00401" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                                <el-input v-model="formData.sczl_yjGx3" :clearable="true" placeholder="瞿春生" data-="" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                                <el-input v-model="formData.sczl_gxmc3" :clearable="true" placeholder="11.0" />
                               </el-col>
                               <el-col :span="9">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                                <el-input v-model="formData.Gd_cpmc3" :clearable="true" placeholder="打包废纸" />
                               </el-col>
                               <el-col :span="2">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                                <el-input v-model="formData.sczl_cl3" :clearable="true" placeholder="是" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.sczl_PgCl3" :clearable="true" placeholder="是" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.sczl_clAdd3" :clearable="true" placeholder="是" />
                               </el-col>
-							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
-							  </el-col>
-							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
-							  </el-col>
                             </el-row>
               
                             <!-- 员工4 -->
-                            <el-row :gutter="5" style="margin-top: 10px;">
+                           <el-row :gutter="5" style="margin-top: 10px;">
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                                <el-input v-model="formData.sczl_gdbh4" :clearable="true" @keyup.enter.native="getGxMcsubmit($event, '4')" placeholder="ZI00401" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                                <el-input v-model="formData.sczl_yjGx4" :clearable="true" placeholder="瞿春生" data-="" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                                <el-input v-model="formData.sczl_gxmc4" :clearable="true" placeholder="11.0" />
                               </el-col>
                               <el-col :span="9">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                                <el-input v-model="formData.Gd_cpmc4" :clearable="true" placeholder="打包废纸" />
                               </el-col>
                               <el-col :span="2">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                                <el-input v-model="formData.sczl_cl4" :clearable="true" placeholder="是" />
                               </el-col>
 							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							    <el-input v-model="formData.sczl_PgCl4" :clearable="true" placeholder="是" />
 							  </el-col>
 							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+							    <el-input v-model="formData.sczl_clAdd4" :clearable="true" placeholder="是" />
 							  </el-col>
                             </el-row>
               
                             <!-- 员工5 -->
                             <el-row :gutter="5" style="margin-top: 10px;">
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                                <el-input v-model="formData.sczl_gdbh5"  @keyup.enter.native="getGxMcsubmit($event, '5')" :clearable="true" placeholder="ZI00401" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                                <el-input v-model="formData.sczl_yjGx5" :clearable="true" placeholder="瞿春生" data-="" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                                <el-input v-model="formData.sczl_gxmc5" :clearable="true" placeholder="11.0" />
                               </el-col>
                               <el-col :span="9">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                                <el-input v-model="formData.Gd_cpmc5" :clearable="true" placeholder="打包废纸" />
                               </el-col>
                               <el-col :span="2">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                                <el-input v-model="formData.sczl_cl5" :clearable="true" placeholder="是" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.sczl_PgCl5" :clearable="true" placeholder="是" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.sczl_clAdd5" :clearable="true" placeholder="是" />
                               </el-col>
-							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
-							  </el-col>
-							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
-							  </el-col>
                             </el-row>
               
                             <!-- 员工6 -->
                             <el-row :gutter="5" style="margin-top: 10px;">
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="ZI00401" />
+                                <el-input v-model="formData.sczl_gdbh6" :clearable="true"  @keyup.enter.native="getGxMcsubmit($event, '6')" placeholder="ZI00401" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="瞿春生" />
+                                <el-input v-model="formData.sczl_yjGx6" :clearable="true" placeholder="瞿春生" data-="" />
                               </el-col>
                               <el-col :span="3">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="11.0" />
+                                <el-input v-model="formData.sczl_gxmc6" :clearable="true" placeholder="11.0" />
                               </el-col>
                               <el-col :span="9">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="打包废纸" />
+                                <el-input v-model="formData.Gd_cpmc6" :clearable="true" placeholder="打包废纸" />
                               </el-col>
                               <el-col :span="2">
-                                <el-input v-model="formData.image" :clearable="true" placeholder="是" />
+                                <el-input v-model="formData.sczl_cl6" :clearable="true" placeholder="是" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.sczl_PgCl6" :clearable="true" placeholder="是" />
+                              </el-col>
+                              <el-col :span="2">
+                                <el-input v-model="formData.sczl_clAdd6" :clearable="true" placeholder="是" />
                               </el-col>
-							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
-							  </el-col>
-							  <el-col :span="2">
-							    <el-input v-model="formData.image" :clearable="true" placeholder="是" />
-							  </el-col>
                             </el-row>
 			  
             </el-form>
@@ -265,6 +266,31 @@
           </el-dialog>
 
 
+          <el-dialog v-model="getGxMcshow" :before-close="closegetGxMcshow" :title="type==='create'?'添加':'修改'" destroy-on-close>
+                
+					<el-form :model="form" label-width="80px">
+					  <div style="display: flex; justify-content: center;">
+					    <el-form-item label="关键字">
+					      <el-input v-model="name"></el-input>
+					    </el-form-item>
+					  </div>
+					</el-form>
+
+			<el-table ref="GxMctable" style="width: 100%" tooltip-effect="dark" :data="GxMctableData" row-key="ID"
+			  highlight-current-row="true"  :cell-style="cellStyle" border @selection-change="handleSelectionChange"
+			   :show-overflow-tooltip="true" @row-dblclick="GxMcdoubleClick">			   
+			  <el-table-column align="left" label="印件工序" prop="jyGx" width="120" />
+			  <el-table-column align="left" label="工序名称" prop="Gy0_gxmc" width="120"/>
+			  <el-table-column align="left" label="印件名称" prop="Gd_cpmc" width="800"/>
+			</el-table>
+		
+			<template #footer>
+			  <div class="dialog-footer">
+			    <el-button @click="closegetGxMcshow">取 消</el-button>
+			  </div>
+			</template>
+          </el-dialog>
+
         </el-main>
       </el-container>
     </el-container>
@@ -277,12 +303,14 @@ import {
   getList,
   getTab,
   locate,
-  getInfo
+  getInfo,
+  getGxMc,
+  edit
 } from '@/api/jixiaoguanli/jitairibaobiao'
 
 // 全量引入格式化工具 请按需保留
 import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
-import { ElMessage, ElMessageBox } from 'element-plus'
+import { ElMessage, ElMessageBox, LAST_KEYS } from 'element-plus'
 import { Search, Refresh, Download } from '@element-plus/icons-vue'
 import { ref, reactive, onMounted, onBeforeMount } from 'vue'
 import { getPackingSideTable, getPackingTable } from '@/api/mes_api_gty/myapi'
@@ -321,18 +349,86 @@ getTabdata();
 
 // 自动化生成的字典(可能为空)以及字段
 const formData = ref({
-  id: '',
-  name: '',
-  date: '',
-  group: '',
-  packingOutput: '',
-  reworkOutput: '',
-  pieceOutput: '',
-  order: '',
-  user: '',
-  createTime: '',
-  updateTime: '',
-  uniqid: '',
+		  sczl_rq: '',
+          sczl_gdbh1: '',
+          sczl_gdbh2: '',
+          sczl_gdbh3: '',
+          sczl_gdbh4: '',
+          sczl_gdbh5: '',
+          sczl_gdbh6: '',
+          sczl_yjGx1: '',
+          sczl_yjGx2: '',
+          sczl_yjGx3: '',
+          sczl_yjGx4: '',
+          sczl_yjGx5: '',
+          sczl_yjGx6: '',
+          sczl_cl1: '',
+          sczl_cl2: '',
+          sczl_cl3: '',
+          sczl_cl4: '',
+          sczl_cl5: '',
+          sczl_cl6: '',
+          sczl_PgCl1:'',
+          sczl_PgCl2: '',
+          sczl_PgCl3: '',
+          sczl_PgCl4: '',
+          sczl_PgCl5: '',
+          sczl_PgCl6: '',
+          Gd_cpmc1: '',
+          Gd_cpmc2: '',
+          Gd_cpmc3: '',
+          Gd_cpmc4: '',
+          Gd_cpmc5: '',
+          Gd_cpmc6: '',
+		  sczl_clAdd1: '',
+		  sczl_clAdd2: '',
+		  sczl_clAdd3: '',
+		  sczl_clAdd4: '',
+		  sczl_clAdd5:'',
+		  sczl_clAdd6: '',
+		  UniqId:'000',
+})
+
+
+const formData2 = ref({
+	      UniqId:'000',
+		  sczl_rq: '',
+          sczl_gdbh1: '',
+          sczl_gdbh2: '',
+          sczl_gdbh3: '',
+          sczl_gdbh4: '',
+          sczl_gdbh5: '',
+          sczl_gdbh6: '',
+          sczl_yjGx1: '',
+          sczl_yjGx2: '',
+          sczl_yjGx3: '',
+          sczl_yjGx4: '',
+          sczl_yjGx5: '',
+          sczl_yjGx6: '',
+		  sczl_gxmc1: '',
+		  sczl_gxmc2: '',
+		  sczl_gxmc3: '',
+		  sczl_gxmc4: '',
+		  sczl_gxmc5: '',
+		  sczl_gxmc6: '',
+          sczl_cl1: '',
+          sczl_cl2: '',
+          sczl_cl3: '',
+          sczl_cl4: '',
+          sczl_cl5: '',
+          sczl_cl6: '',
+          sczl_PgCl1:'',
+          sczl_PgCl2: '',
+          sczl_PgCl3: '',
+          sczl_PgCl4: '',
+          sczl_PgCl5: '',
+          sczl_PgCl6: '',
+		  sczl_clAdd1: '',
+		  sczl_clAdd2: '',
+		  sczl_clAdd3: '',
+		  sczl_clAdd4: '',
+		  sczl_clAdd5:'',
+		  sczl_clAdd6: '',  
 })
 
 // 验证规则
@@ -344,6 +440,8 @@ const elSearchFormRef = ref()
 
 // =========== 表格控制部分 ===========
 const tableData = reactive([])
+const GxMctableData = reactive([])
+
 const detailData = reactive([
   {
     gdbh: '2311736',
@@ -467,6 +565,7 @@ const detailData = reactive([
   },
 ])
 const total=ref(0)
+const inputname=ref(0)
 const page = ref(1)
 const limit = ref(10)
 const searchInfo = ref('')
@@ -484,6 +583,8 @@ const locatevalue={
 }
 let table=ref(5);
 let positionvalue=ref()
+let GxMcvalue=ref()
+
 // 分页设置
 const handleSizeChange = (val) => {
   limit.value = val;
@@ -491,6 +592,8 @@ const handleSizeChange = (val) => {
   getTableData();
 }
 
+
+
 // 页面跳转
 const handleCurrentChange = (val) => {
   page.value = val
@@ -520,6 +623,7 @@ const handleNodeClick = (node, check) => {
 const Getlocate = async () => {
   
   const response = await locate(locatevalue);
+  console.log(locatevalue)
   console.log(response)
   if (response.code === 0) {
     tableData.splice(0, tableData.length, ...response.data.rows);
@@ -527,9 +631,9 @@ const Getlocate = async () => {
 }
 
 const enterpositioning = async () => {
- locatevalue.gdbh=positionvalue;
+ locatevalue.gdbh=positionvalue.value;
 
- console.log(locatevalue)
+ console.log(locatevalue.gdbh)
  Getlocate()
  closepositioningVisible()
 }
@@ -537,9 +641,94 @@ const enterpositioning = async () => {
 
 
 const getpickInfo = async (value) => {
-  
   const response = await getInfo({UniqId:value});
   console.log(response) 
+  if (response.code === 0) {
+	formData.value=response.data;
+	formData2.value=response.data;
+	console.log(formData2)
+  }
+}
+
+
+const GxMcedit = async () => {
+  
+  console.log(formData2)
+  const response = await edit(formData2);
+  if (response.code === 0) {
+	console.log(333)
+  }
+}
+
+
+const GetGxMc = async (value, num) => {
+  const response = await getGxMc({gdbh: value});
+  console.log(response);
+  if (response.code === 0) {
+    if (response.data.length > 1) {
+		
+		
+	GxMctableData.splice(0, GxMctableData.length, ...response.data);
+    getGxMcshow.value = true; 
+    }
+    
+    // 取出 data 中的第一个元素
+    const item = response.data[0];
+    
+    // 将数据拆分成变量名和内容
+    const variableName = Object.keys(item)[0]; // 变量名
+    const variableContent = item[variableName]; // 变量内容
+    
+    const variableName1 = Object.keys(item)[1]; // 变量名
+    const variableContent1 = item[variableName1]; // 变量内容
+    
+    const variableName2 = Object.keys(item)[2]; // 变量名
+    const variableContent2 = item[variableName2]; // 变量内容
+    
+    console.log(variableContent2); // 输出生成的 Vue 代码
+    
+    // 根据 response.data.length 的值动态给 formData 中的变量赋值
+    let Bname = 'Gd_cpmc' + num;
+    let Bname2= 'sczl_gxmc' + num;
+    let Bname3 = 'sczl_yjGx' + num;
+    formData.value[Bname] = variableContent; // 假设要赋的值是 123
+    formData.value[Bname2] = variableContent1;
+    formData.value[Bname3] = variableContent2;
+    console.log(formData.value[Bname]);
+  }
+}
+
+
+
+
+// const inputOnclick = (event, inputName) => {
+//  if(formData.value.sczl_gdbh6.length!=7||formData.value.sczl_gdbh5.length!=7||formData.value.sczl_gdbh3.length!=7||formData.value.sczl_gdbh4.length!=7||formData.value.sczl_gdbh2.length!=7||formData.value.sczl_gdbh1.length!=7){
+// 	  	return false
+// 	  }
+// 	  // console.log(inputName);
+// 	  let combinedString = 'formData.value.sczl_gdbh' + inputName;
+// 	  // console.log(combinedString)
+// 	  let variableName = 'sczl_gdbh'+inputName;
+// 	  let variableValue = eval('formData.value.' + variableName);
+// 	 console.log(variableValue)
+// 	  // GetGxMc(combinedString)
+
+// }
+
+const getGxMcsubmit = (event, inputName) => {
+ if(formData.value.sczl_gdbh6.length!=7||formData.value.sczl_gdbh5.length!=7||formData.value.sczl_gdbh3.length!=7||formData.value.sczl_gdbh4.length!=7||formData.value.sczl_gdbh2.length!=7||formData.value.sczl_gdbh1.length!=7){
+	  	return false
+	  }
+	   // console.log(inputName);
+	   inputname.value=inputName
+	   console.log(inputname.value)
+	  let combinedString = 'formData.value.sczl_gdbh' + inputName;
+	  // console.log(combinedString)
+	  let variableName = 'sczl_gdbh'+inputName;
+	  let variableValue = eval('formData.value.' + variableName);
+	 console.log(variableValue)
+	  GetGxMc(variableValue,inputName)
+
 }
 
 // 搜索
@@ -611,6 +800,7 @@ const updateCompanyFunc = async (row) => {
 
 // 弹窗控制标记
 const positioningVisibleshow = ref(false)
+const getGxMcshow = ref(false)
 
 const positioningVisible = () => {
     type.value = 'create'
@@ -627,7 +817,9 @@ const closepositioningVisible = () => {
   }
 }
 
-
+const closegetGxMcshow = () => {
+  getGxMcshow.value = false
+}
 
 // 打开弹窗
 const openDialog = () => {
@@ -646,44 +838,47 @@ const closeDialog = () => {
 }
 // 弹窗确定
 const enterDialog = async () => {
-  elFormRef.value?.validate( async (valid) => {
-          if (!valid) return
-           let res
-           switch (type.value) {
-             case 'create':
-               res = await createCompany(formData.value)
-               break
-             case 'update':
-               res = await updateCompany(formData.value)
-               break
-             default:
-               res = await createCompany(formData.value)
-               break
-           }
-           if (res.code === 0) {
-             ElMessage({
-               type: 'success',
-               message: '创建/更改成功'
-             })
-             closeDialog()
-             getTableData()
-           }
-   })
+      
+	  formData.value.UniqId=lastCellValue
+      GxMcedit()
+   //    GxMcedit(lastCellValue)
+	 // closeDialog()
+	 // getTableData()
 }
 
+let lastCellValue=ref()
 // 双击表格操作
-function doubleClick(row, column, event,rowIndex,columnIndex) {
+function doubleClick(row) {
   
-     console.log(row, column, event);
+     // console.log(row, column, event);
        // updateCompanyFunc(row);
        type.value = 'update';
        dialogFormVisible.value = true
- console.log(row[column.property])
- table.value=row[column.property]
- console.log(table.value)
+	   lastCellValue= row['UniqId'];
+		 console.log(lastCellValue)
+		 table.value=lastCellValue
        getpickInfo(table.value)
 }
 
+
+function GxMcdoubleClick(row) {
+
+   GxMcvalue=row
+   closegetGxMcshow()
+   console.log(GxMcvalue.Gd_cpmc)
+   
+   
+   
+   // 根据 response.data.length 的值动态给 formData 中的变量赋值
+   let Bname = 'Gd_cpmc' + inputname.value;
+   let Bname2= 'sczl_gxmc' + inputname.value;
+   let Bname3 = 'sczl_yjGx' + inputname.value;
+   formData.value[Bname] =GxMcvalue.Gd_cpmc; // 假设要赋的值是 123
+   formData.value[Bname2] = GxMcvalue.Gy0_gxmc;
+   formData.value[Bname3] = GxMcvalue.jyGx;
+   
+}
+
 // 导出excel
 function exportExcel() {
   console.log('导出到excel');

+ 288 - 74
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -3,7 +3,7 @@
     <el-container>
       <!--    左侧树侧形结构-->
       <el-aside width="300px">
-        <div class="JKWTree-tree" style="height: 746px">
+        <div class="JKWTree-tree" style="height: 346px">
           <h3> 产品管理</h3>
 <!--          <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>-->
           <el-tree :data="treeData"  :props="defaultProps" @node-click="handleNodeClick" @node-expand="handleNodeExpand">
@@ -17,17 +17,17 @@
       <!--  右侧内容区域 -->
       <el-container>
         <el-main>
-
           <!--      搜索框 -->
           <div class="gva-search-box">
             <el-form ref="elSearchFormRef" :inline="true" :model="searchInfo" class="demo-form-inline" :rules="searchRule" @keyup.enter="onSubmit">
               <!--          左侧查询输入框 -->
+
               <el-form-item>
                 <el-input v-model="searchInfo.keyword" placeholder="搜索产品编号或产品名称" clearable style="width: 200px;"></el-input>
-              </el-form-item>
-              <!--        查询和重置按钮 -->
-              <el-form-item>
-                <el-button type="primary" icon="search" @click="onSubmit">查询</el-button>
+
+                <el-button type="primary" icon="search" @click="onSubmit" style="margin-left: 10px">查询</el-button>
+<!--                <el-button icon="refresh" @click="onReset">重置</el-button>-->
+<!--                <el-button type="primary" icon="plus" @click="openDialog">新增</el-button>-->
 
                 <el-button type="primary" icon="edit" @click="onStatusClick">状态设置</el-button>
                 <el-dialog v-model="onstatuslist" title="状态设置" width="20%" style="height: 25%; position: fixed; bottom: 35%; left: 40%">
@@ -41,55 +41,136 @@
                       </div>
                       <div style="width: 100%; display: flex; justify-content: center; align-items: flex-end; height: 35%;">
                         <div slot="footer" class="dialog-footer" style="text-align: center;">
-                          <el-button @click="handleCancel">取 消</el-button>
-                          <el-button type="primary" @click="handleConfirm">确定</el-button>
+                          <el-button type="primary" @click="handleConfirm">执行</el-button>
+                          <el-button @click="handleCancel">放弃</el-button>
                         </div>
                       </div>
                     </div>
                   </div>
                 </el-dialog>
 
+<!--                <el-button type="primary" disabled icon="edit" @click="" style="margin-left: 10px">工艺方案复制</el-button>-->
+
                 <el-button type="primary" icon="edit" @click="gygmClick" style="margin-left: 10px">工艺方案更名</el-button>
                 <el-dialog v-model="gygmlist" title="工艺方案更名" width="40%" style="height: 40%; position: fixed; bottom: 30%; left: 30%">
                   <div style="display: flex; flex-direction: column;  height: 100%;">
                     <el-form-item label="产品代号:" prop="process">
-                      <el-input v-model="formData['process']" :clearable="true" placeholder="" style="width: 160px;"/>
+                      <el-input v-model="gyformData['process']" disabled :clearable="true" placeholder="" style="width: 160px;"/>
                     </el-form-item>
                     <br>
                     <el-form-item label=" " prop="processName">
-                      <el-input v-model="formData['processName']" disabled :clearable="true" placeholder="" style="width: 100%;" />
+                      <el-input v-model="gyformData['processName']" disabled :clearable="true" placeholder="" style="width: 100%;" />
                     </el-form-item>
                     <br>
                     <el-form-item label="工艺方案原名:" prop="originalName">
-                      <el-input v-model="formData['originalName']" disabled :clearable="true" placeholder="" style="width: 160px;"/>
+                      <el-select v-model="gyformData.originalName" placeholder="请选择" style="width: 160px;">
+                        <el-option v-for="option in gyformData.originalNameOptions" :key="option" :label="option" :value="option" />
+                      </el-select>
                     </el-form-item>
                     <br>
                     <el-form-item label="工艺方案新名:" prop="newName" >
-                      <el-input v-model="formData['newName']" :clearable="true" placeholder="" style="width: 160px;"/>
+                      <el-input v-model="gyformData['newName']" :clearable="true" placeholder="" style="width: 160px;"/>
                     </el-form-item>
 
                     <div class="dialog-footer" style="margin-top: 15px; margin-left: 280px;">
-                      <el-button @click="gygmhandleCancel">取 消</el-button>
-                      <el-button type="primary" @click="gygmhandleConfirm">确定</el-button>
+                      <el-button type="primary" @click="gygmhandleConfirm">执行</el-button>
+
+                      <el-button @click="gygmhandleCancel">放弃</el-button>
                     </div>
                   </div>
                 </el-dialog>
 
-<!--                <el-button icon="refresh" @click="onReset">重置</el-button>-->
-<!--                <el-button type="primary" icon="plus" @click="openDialog">新增</el-button>-->
-                <el-button type="primary" disabled icon="Download" @click="cpexportToExcel" style="margin-left: 10px">导出产品资料</el-button>
-                <el-dialog v-model="cpdialogexportToExcel" title="导出产品资料" width="50%">
-                  <!-- 在这里放入弹出页面的内容 -->
+                <el-button type="primary"  icon="edit" @click="fjClick" style="margin-left: 10px">工艺方案附加</el-button>
+                <el-dialog v-model="fjlist" title="工艺方案附加" width="1400px" style="height: 740px;bottom: 6%;">
+                  <div>
+                    <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
+                      <el-form-item label="当前产品:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
+                        <el-input v-model="fjformData['process']" disabled :clearable="true" placeholder="" style="width: 160px;"/>
+                      </el-form-item>
+                      <el-input v-model="fjformData['processName']" disabled :clearable="true" placeholder="" style="flex: 1;"/>
+                      <el-form-item label="工艺方案:" prop="originalName"  style="margin-left: 20px;">
+                        <el-select v-model="fjformData.originalName" placeholder="请选择" style="width: 160px;" @change="handleOriginalNameChange">
+                          <el-option v-for="option in fjformData.originalNameOptions" :key="option" :label="option" :value="option" />
+                        </el-select>
+                      </el-form-item>
+                    </div>
+                    <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
+                      <el-form-item label="当前产品:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
+                        <el-input v-model="fjformData['dqprocess']"  :clearable="true" placeholder="" style="width: 160px;"/>
+                      </el-form-item>
+                      <el-input v-model="fjformData['dqprocessName']"  :clearable="true" placeholder="" style="flex: 1;"/>
+                      <el-form-item label="工艺方案:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
+                        <el-input v-model="fjformData['dqoriginalName']"  :clearable="true" placeholder="" style="width: 160px;"/>
+                      </el-form-item>
+                    </div>
 
+                        <el-table ref="multipleTable"
+                                  :show-overflow-tooltip="true"
+                                  :row-style="{ height: '20px' }"
+                                  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                                  :header-cell-style="{ padding: '0px' }"
+                                  style="width: 100%;height: 450px" border tooltip-effect="dark"
+                                  :data="fjtableData" row-key="ID" @selection-change="handleSelectionChange">
+                          <el-table-column align="left" label="方案" prop="方案"  width="70"/>
+                          <el-table-column align="left" label="印件" prop="Gy0_yjno"  width="70"/>
+                          <el-table-column align="left" label="序号" prop="Gy0_gxh"  width="70"/>
+                          <el-table-column align="left" label="备注" prop="remark"  width="70"/>
+
+                        </el-table>
+                    <div class="dialog-footer" style="margin-top: 14px; margin-left: 50%;">
+                      <el-button type="primary" @click="fjbzgx">附加标准工序</el-button>
+                      <el-button type="primary" @click="gxdqcpgx">更新当前产品工序</el-button>
+                      <el-button type="primary" @click="fjhandleConfirm">建立工艺方案</el-button>
+                      <el-button type="primary" @click="fjhandleCancel">放弃操作</el-button>
+                    </div>
+                  </div>
                 </el-dialog>
 
 
+<!--                点击附加标准工序弹出框-->
+                <el-button type="primary"  icon="edit" @click="fjbzgxClick" style="margin-left: 10px;display: none" >工艺方案附加</el-button>
+                <el-dialog v-model="fjbzgxlist" title="附加标准工序" width="1400px" style="height: 740px;bottom: 6%;">
+                  <div>
+                    <div style="width: 100%; height: 60px; padding: 0px; margin: 10px 0px 0px 0px; display: flex; align-items: center;">
+                      <el-form-item label="当前产品:" prop="currentProcess" style="margin-right: 20px;padding: 0px">
+                        <el-input v-model="fjbzgxformData['process']" disabled :clearable="true" placeholder="" style="width: 160px;"/>
+                      </el-form-item>
+                      <el-input v-model="fjbzgxformData['processName']" disabled :clearable="true" placeholder="" style="flex: 1;"/>
+                      <el-form-item label="工艺方案:" prop="originalName"  style="margin-left: 20px;">
+                        <el-select v-model="ffjbzgxformData.originalName" placeholder="请选择" style="width: 160px;">
+                          <el-option v-for="option in fjbzgxformData.originalNameOptions" :key="option" :label="option" :value="option" />
+                        </el-select>
+                      </el-form-item>
+                    </div>
+
+                    <el-table ref="multipleTable"
+                              :show-overflow-tooltip="true"
+                              :row-style="{ height: '20px' }"
+                              :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                              :header-cell-style="{ padding: '0px' }"
+                              style="width: 100%;height: 450px" border tooltip-effect="dark"
+                              :data="fjbzgxtableData" row-key="ID" @selection-change="fjbzgxhandleSelectionChange">
+                      <el-table-column align="left" label="附加方案" prop="programme"  width="70"/>
+
+                    </el-table>
+                    <div class="dialog-footer" style="margin-top: 14px; margin-left: 50%;">
+                      <el-button type="primary" @click="fjbzgxzx">执行</el-button>
+                      <el-button type="primary" @click="fjbzgxfq">放弃</el-button>
+                    </div>
+                  </div>
+                </el-dialog>
+
+<!--                <el-button type="primary" disabled icon="edit" @click="gygmClick" style="margin-left: 10px">计损色数修正</el-button>-->
+<!--                <el-button type="primary" disabled icon="edit" @click="" style="margin-left: 10px">质检废品系数</el-button>-->
+
+                <el-button type="primary" disabled icon="Download" @click="cpexportToExcel" style="margin-left: 10px">导出产品资料</el-button>
+                <el-dialog v-model="cpdialogexportToExcel" title="导出产品资料" width="50%">
+                </el-dialog>
+
                 <el-button type="primary" disabled icon="Download" @click="gyexportToExcel" style="margin-left: 10px">导出工艺流程</el-button>
                 <el-dialog v-model="gydialogexportToExcel" title="导出工艺流程" width="50%">
-                  <!-- 在这里放入弹出页面的内容 -->
-                  <p>这是弹出页面的内容 导出工艺流程</p>
-
                 </el-dialog>
+
               </el-form-item>
             </el-form>
           </div>
@@ -98,11 +179,15 @@
           <div class="gva-table-box">
             <!--        数据表格 -->
             <el-table ref="multipleTable"
-                      style="width: 100%;height: 580px;"
+                      style="width: 100%;height: 40vh"
+                      :row-style="{ height: '20px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                      :header-cell-style="{ padding: '0px' }"
                       border
                       tooltip-effect="dark"
                       :data="tableData"
                       row-key="ID"
+                      :row-class-name="tableRowClass"
                       highlight-current-row="true"
                       @selection-change="handleSelectionChange"
                       @row-dblclick="updateCompanyFunc"
@@ -129,27 +214,30 @@
               <el-table-column align="left" label="工艺" prop="gyData" width="100"/>
               <el-table-column align="left" label="印件数" prop="yjData" width="100" />
             </el-table>
-            <div class="gva-pagination">
-              <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page"
-                             :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"
-                             @current-change="handleCurrentChange" @size-change="handleSizeChange" />
-            </div>
+<!--            <div class="gva-pagination">-->
+<!--              <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page"-->
+<!--                             :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"-->
+<!--                             @current-change="handleCurrentChange" @size-change="handleSizeChange" />-->
+<!--            </div>-->
 
           </div>
 
-
+          <!--      表格下的表格 -->
           <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
 
             <el-tab-pane label="印件资料"  @click="showTable('印件资料')"  name="first">
               <el-table ref="multipleTable"
                         :show-overflow-tooltip="true"
                         highlight-current-row="true"
+                        :row-style="{ height: '20px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :header-cell-style="{ padding: '0px' }"
                         @row-dblclick="yjupdateCompanyFunc"
-                        style="width: 100%;height: 400px" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
+                        style="width: 100%;height: 330px" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
                 <el-table-column type="selection" width="55" />
                 <el-table-column align="left" label="印件号" prop="yj_yjno"  width="80"/>
                 <el-table-column align="left" label="印件代号" prop="yj_yjdh" width="100" />
-                <el-table-column align="left" label="印件名称" prop="yj_yjmc" width="340" />
+                <el-table-column align="left" label="印件名称" prop="yj_yjmc" width="540" />
                 <el-table-column align="left" label="纸张单号" prop="yj_zzdh" width="100"/>
                 <el-table-column align="left" label="纸张名称" prop="yj_zzmc" width="340"/>
                 <el-table-column align="left" label="投料规格" prop="yj_tlgg" width="240"/>
@@ -167,11 +255,16 @@
               <el-table ref="multipleTable"
                         highlight-current-row="true"
                         :show-overflow-tooltip="true"
+                        :row-style="{ height: '20px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :header-cell-style="{ padding: '0px' }"
                         @row-dblclick="gyupdateCompanyFunc"
-                        style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
+                        :row-class-name="rowClassStyle"
+                        style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange"
+                        @row-click="clickybupdate">
                 <el-table-column type="selection" width="55" />
                 <el-table-column align="left" label="方案" prop="方案"  width="70"/>
-                <el-table-column align="left" label="印件" prop="Gy0_yjno" width="70" />
+                <el-table-column align="left" label="印件" prop="Gy0_yjno" width="80" />
                 <el-table-column align="left" label="工序" prop="Gy0_gxh" width="70" />
                 <el-table-column align="left" label="工序名称" prop="gy0_gxmc" width="120" />
                 <el-table-column align="left" label="工序名称" prop="add_gxmc" width="340" />
@@ -197,11 +290,16 @@
             <el-tab-pane label="印版资料" @click="showTable('印版资料')" name="third">
             <el-table ref="multipleTable"
                       highlight-current-row="true"
+                      :show-overflow-tooltip="true"
+                      :row-style="{ height: '20px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                      :header-cell-style="{ padding: '0px' }"
                       @row-dblclick="ybupdateCompanyFunc"
-                      style="width: 100%;height: 400px" border tooltip-effect="dark" :data="ybtableData" row-key="ID" @selection-change="handleSelectionChange">
+                      style="width: 100%;height: 400px" border tooltip-effect="dark" :data="ybtableData" row-key="ID" @selection-change="handleSelectionChange"
+                      >
               <el-table-column type="selection" width="55" />
-              <el-table-column align="left" label="方案" prop="YB_方案"  width="100"/>
-              <el-table-column align="left" label="印件号" prop="YB_Yjno" width="100" />
+              <el-table-column align="left" label="方案" prop="YB_方案"  width="70"/>
+              <el-table-column align="left" label="印件号" prop="YB_Yjno" width="80" />
               <el-table-column align="left" label="印版类别" prop="印版类别" width="100" />
               <el-table-column align="left" label="存货编码" prop="存货编码" width="100"/>
               <el-table-column align="left" label="印版名称" prop="印版名称"  width="440"/>
@@ -215,15 +313,19 @@
 
             <el-tab-pane label="技术资料附件" @click="showTable('技术资料附件')" name="fourth">
             <el-table ref="multipleTable"
+                      :row-style="{ height: '20px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                      :header-cell-style="{ padding: '0px' }"
+                      :show-overflow-tooltip="true"
                       highlight-current-row="true"
                       style="width: 100%;height: 400px" border tooltip-effect="dark" :data="jstableData" row-key="ID" @selection-change="handleSelectionChange">
               <el-table-column type="selection" width="55" />
-              <el-table-column align="left" label="序号" prop="序号"  width="100"/>
-              <el-table-column align="left" label="适用工序" prop="适用工序" width="100" />
-              <el-table-column align="left" label="备注" prop="备注" width="100" />
-              <el-table-column align="left" label="文件类型" prop="文件类型" width="100"/>
+              <el-table-column align="left" label="序号" prop="序号"  width="120"/>
+              <el-table-column align="left" label="适用工序" prop="适用工序" width="120" />
+              <el-table-column align="left" label="备注" prop="备注" width="120" />
+              <el-table-column align="left" label="文件类型" prop="文件类型" width="120"/>
               <el-table-column align="left" label="关联产品" prop="关联产品"  width="360"/>
-              <el-table-column align="left" label="建档用户" prop="建档用户" width="100"/>
+              <el-table-column align="left" label="建档用户" prop="建档用户" width="120"/>
               <el-table-column align="left" label="建档日期" prop="建档日期" width="160" />
               <el-table-column align="left" label="更新日期" prop="更新日期" width="160" />
             </el-table>
@@ -232,7 +334,7 @@
 
           </el-tabs>
 
-          <!-- 弹窗 -->
+          <!-- 表格弹窗 -->
           <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type==='create'?'添加产品基本资料':'修改产品基本资料'" destroy-on-close>
             <el-row>
               <el-scrollbar height="500px">
@@ -569,15 +671,32 @@ export default {
   data() {
     return {
       currentTable: '',
-      activeName: 'first',
-      // 其他表格数据...
+      activeName: 'first'
+
     };
   },
   methods: {
+    tableRowClass({row,rowIndex}){
+      if(row.状态==="停产"){
+        return "warning-row"
+      }
+
+    },
+    rowClassStyle({row,rowIndex}){
+      // debugger
+      // if(row.Gy0_yjno===this.selection.Gy0_yjno){
+      //   return "warning-row"
+      // }
+    },
+    clickybupdate(row,column,event){
+    // this.selection=row
+      // this.rowClassStyle()
+
+    },
     showTable(tableName) {
       // console.log(tableName)
       // 根据点击的按钮设置当前展示的表格
-      this.currentTable = tableName;
+      // this.currentTable = tableName;
     },
     showTableChange() {
       // 处理表格选中事件
@@ -586,7 +705,6 @@ export default {
   }
 };
 </script>
-
 <script setup>
 // 全量引入格式化工具 请按需保留
 import {createCompany, deleteCompany, deleteCompanyByIds, updateCompany, findCompany, getCompanyList} from '@/api/company'
@@ -594,6 +712,7 @@ import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDow
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { ref, reactive } from 'vue'
 import {
+  editGyName,
   getCustom,
   getDepartment,
   getProduct,
@@ -624,7 +743,6 @@ const onstatuslist = ref(false);
 const status = ref('在产'); // 默认选择在产
 const _stacode = ref(null);
 const onStatusClick = () => {
-  console.log('点击了状态设置');
   if(_product_code.value == null){
     onstatuslist.value = false;
     alert('请选择树形后,再操作此功能');
@@ -633,17 +751,14 @@ const onStatusClick = () => {
     onstatuslist.value = true;
   }
 };
-// 状态设置取消按钮
+// 状态设置放弃
 const handleCancel = () => {
   onstatuslist.value = false;
   console.log('点击了取消');
 };
-// 状态设置确定按钮
+// 状态设置执行
 const handleConfirm = async () => {
   onstatuslist.value = false;
-  // if(_stacode.value == null){
-  //   alert('请选择树形后,再操作此功能');
-  // }else{
     let statusCode;
     let code = _stacode.value;
     if (status.value === '在产') {
@@ -651,39 +766,140 @@ const handleConfirm = async () => {
     } else if (status.value === '停产') {
       statusCode = 2;
     }
-    // console.log(code);console.log(statusCode);
     const data = await setProductStatus({ code: code, status: statusCode });
     console.log(data);
-  // }
 };
 handleCancel(_stacode);
 
+// =========== 工艺方案附加 ===========
+const fjlist = ref(false);
+const fjformData = reactive({
+  process: '',//当前产品
+  processName: '',//产品名称
+  processfa: [],//工艺方案
+  originalName: '', // 工艺方案默认选择的值
+});
+
+const fjClick = () => {
+  console.log('点击了工艺方案附加');
+  if(_product_code.value == null){
+    fjlist.value = false;
+    alert('请选择分类项目,再操作此功能');
+  }else{
+    fjlist.value = true;
+    fjformData.process = _product_code.value;
+    fjformData.processName = _kehu_code.value;
+    if (gytableData.length === 0) {
+      fjlist.value = false;
+      alert('没有工艺资料');
+    } else {
+      const uniqueSchemeSet = new Set();
+      gytableData.forEach(item => {
+        uniqueSchemeSet.add(item['方案']);
+      });
+      const uniqueSchemeArray = Array.from(uniqueSchemeSet);
+      fjformData.originalNameOptions = []; // 清空原有数据
+      fjformData.originalNameOptions = fjformData.originalNameOptions.concat(uniqueSchemeArray);
+      // 设置默认选择第一个选项
+      if (fjformData.originalNameOptions.length > 0) {
+        fjformData.originalName = fjformData.originalNameOptions[0];
+      }
+    }
+    // console.log(fjformData.process)
+    // console.log(fjformData.processName)
+    // console.log(fjformData.originalName)
+    const product_code = fjformData.process
+    const plan = fjformData.originalName
+    //编号 方案 获取到了 调用接口报错
+    // const WorkListdata = await getProductGy(product_code:product_code,plan:plan);
+    // console.log(WorkListdata)
+
+  }
+};
+//附加标准工序
+const fjbzgx = async () => {
+  // let params = {}
+  // params.code = fjformData['dqprocess'];
+  // params.old_name = fjformData['dqprocessName'];
+  // params.new_name = fjformData['dqoriginalName'];
+  // console.log(params)
+
+}
+//更新当前产品工序
+const gxdqcpgx = async () => {
+  fjlist.value = false;
+};
+//建立工艺方案
+const fjhandleConfirm = async () => {
+  fjlist.value = false;
+};
+//放弃操作
+const fjhandleCancel = () => {
+  fjlist.value = false;
+};
+
 // =========== 工艺方案更名 ===========
 const gygmlist = ref(false);
 const _gygmstacode = ref(null);
+const gyformData = reactive({
+  process: '',
+  processName: '',
+  originalNameOptions: [],
+  newName: '',
+  originalName: '', // 工艺方案默认选择的值
+});
 const gygmClick = () => {
-  console.log('点击了工艺方案更名');
-  // _gygmstacode.value = _product_code.value;
-  // console.log(_product_code.value);
+  // console.log('点击了工艺方案更名');
   if(_product_code.value == null){
     gygmlist.value = false;
-    alert('请选择分类项目,然后在进入操作');
+    alert('请选择分类项目,再操作此功能');
   }else{
     gygmlist.value = true;
-    let code = _product_code.value;
-    console.log(code);
+    gyformData.process = _product_code.value;
+    gyformData.processName = _kehu_code.value;
+    if (gytableData.length === 0) {
+      gygmlist.value = false;
+      alert('没有工艺资料');
+    } else {
+      const uniqueSchemeSet = new Set();
+      gytableData.forEach(item => {
+        uniqueSchemeSet.add(item['方案']);
+      });
+      const uniqueSchemeArray = Array.from(uniqueSchemeSet);
+      gyformData.originalNameOptions = []; // 清空原有数据
+      gyformData.originalNameOptions = gyformData.originalNameOptions.concat(uniqueSchemeArray);
+      // 设置默认选择第一个选项
+      if (gyformData.originalNameOptions.length > 0) {
+        gyformData.originalName = gyformData.originalNameOptions[0];
+      }
+    }
   }
 };
-// 状态设置取消按钮
+// 工艺方案更名放弃
 const gygmhandleCancel = () => {
   gygmlist.value = false;
-  console.log('点击了取消');
 };
-// 状态设置确定按钮
+// 工艺方案更名执行
 const gygmhandleConfirm = async () => {
   gygmlist.value = false;
-
-
+  let params = {}
+  params.code = gyformData.process;
+  params.old_name = gyformData.originalName;
+  params.new_name = gyformData.newName;
+  //确定后清空 工艺方案原名 输入框
+  gyformData.originalName = ''
+  //确定后清空 工艺方案新名 输入框
+  gyformData.newName = ''
+  try {
+    const WorkListdata = await editGyName(params);
+    if (WorkListdata.code === 0) {
+      console.log(WorkListdata.msg);
+    } else {
+      console.log(WorkListdata.msg);
+    }
+  } catch (error) {
+    console.error(error);
+  }
 };
 gygmhandleCancel(_gygmstacode);
 
@@ -714,11 +930,14 @@ const gytableData = reactive([])
 const ybtableData = reactive([])
 //技术资料附件
 const jstableData = reactive([])
+//全局调用产品编号
 const _product_code = ref(null)
+//全局调用产品名称
+const _kehu_code = ref(null)
 const tableRowClick = async (row) => {
-  const product_code = row.产品编号;
   _product_code.value = row.产品编号;
-  const res = await getProductData({product_code:product_code});//接口
+  _kehu_code.value = row.产品名称;
+  const res = await getProductData({product_code:_product_code.value});
   yjtableData.splice(0, yjtableData.length, ...res.data.yjData);//印件资料表格
   gytableData.splice(0, gytableData.length, ...res.data.gyData);//工艺资料表格
   ybtableData.splice(0, ybtableData.length, ...res.data.ybData);//印版资料表格
@@ -748,7 +967,7 @@ const handleCurrentChange = (val) => {
 
 // 修改页面容量 点击多少条/页
 const handleSizeChange = (val) => {
-  page.value = 10;//默认显示十条
+  page.value = 15;//默认显示十条
   pageSize.value = val;
   _getProduct();
 };
@@ -777,12 +996,7 @@ const onReset = () => {
   getTableData()
 }
 
-// 自动化生成的字典(可能为空)以及字段
-const formData = ref({
-  address: '',
-  image: '',
-  name: '',
-})
+
 
 // 验证规则
 const rule = reactive({})

+ 24 - 22
src/view/yunyin/renliziyuan/renyuanjibenziliao.vue

@@ -29,7 +29,7 @@
                 <!--								<el-button icon="refresh" @click="onReset">重置</el-button>-->
                 <el-button type="primary" icon="plus" @click="openDialog">新增</el-button>
                 <el-button type="primary" icon="Download" @click="exportToExcel" style="float: right;">导出到Excel</el-button>
-                <el-dialog v-model="dialogexportToExcel" title="员工基本资料导出" width="50%">
+                <el-dialog v-model="dialogexportToExcel" disabled title="员工基本资料导出" width="50%">
 
                 </el-dialog>
               </el-form-item>
@@ -57,6 +57,9 @@
             <el-table ref="multipleTable"
                       style="width: 100%;height: 580px"
                       tooltip-effect="dark"
+                      :row-style="{ height: '20px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                      :header-cell-style="{ padding: '0px' }"
                       :data="tableData"
                       border
                       row-key="ID"
@@ -216,10 +219,10 @@ const dialogexportToExcel = ref(false)
 
 // =========== 获取左侧树侧形结构 ===========
 const treeData = ref({})
-const defaultProps = {
-  children: 'children',
-  label: '名称' // 将label设置为中文名称对应的字段名
-};
+// const defaultProps = {
+//   children: 'children',
+//   label: '名称' // 将label设置为中文名称对应的字段名
+// };
 const _department_code = ref(null)
 const getDepartmentdata = async () => {
   try {
@@ -236,31 +239,31 @@ const numTime = 0
 const tableData = reactive([])
 const handleNodeClick = async (node) => {
   _department_code.value = node['编号'];
-  _getStaffList()
+  console.log(node['编号'])
+  // _getStaffList()
 };
 // 点击管理中心 显示全部数据
-const handleNodeExpand = async (node) => {
-  // console.log(node)
-  _department_code.value = node['编号'];
-  _getStaffList()
-
-}
+// const handleNodeExpand = async (node) => {
+//   // console.log(node)
+//   _department_code.value = node['编号'];
+//   _getStaffList()
+// }
 
 //封装的方法
 const _getStaffList = async ()=>{
   let params = {}
   params.department_code = _department_code.value;
   params.search = _searchValue.value;
-  params.limit = pageSize.value;
-  params.page = page.value;
   params.mes_online = 1;
   params.u8_online = 1;
+  params.limit = pageSize.value;
+  params.page = page.value;
   // console.log(params)
   try {
-    const WorkListdata = await getStaffList(params);//接口调用函数
-    // console.log(WorkListdata)
-    tableData.splice(0,tableData.length,...WorkListdata.data.list);//表格数据
-    total.value = WorkListdata.data.total;//共多少条total
+    const WorkListdata = await getStaffList(params)
+    console.log(WorkListdata);
+    // tableData.splice(0,tableData.length,...WorkListdata.data.list);
+    // total.value = WorkListdata.data.total;
   } catch (error) {
     console.error(error);
   }
@@ -278,7 +281,7 @@ const handleCurrentChange = (val) => {
 
 // 修改页面容量 点击多少条/页
 const handleSizeChange = (val) => {
-  page.value = 10;//默认显示十条
+  page.value = 10;//默认显示
   pageSize.value = val;
   _getStaffList();
 };
@@ -287,7 +290,7 @@ const _searchValue = ref(null)
 // 搜索
 const onSubmit = () => {
   // const searchValue = searchInfo._rawValue.ke; // 获取搜索框输入的值
-  _searchValue.value = searchInfo._rawValue.ke;
+  // _searchValue.value = searchInfo._rawValue.ke;
   // console.log(_searchValue);
   _getStaffList()
 };
@@ -338,7 +341,6 @@ const onReset = () => {
 }
 
 
-
 // 行为控制标记(弹窗内部需要增还是改)
 const type = ref('')
 
@@ -346,7 +348,7 @@ const type = ref('')
 const updateCompanyFunc = async (row) => {
   const product_code = row.员工编号;
   formDataTest = row;
-  console.log(row);
+  // console.log(row);
   // const response = await ygjbzledit({ product_code: product_code });
   // console.log(response);
   dialogFormVisible.value = true;

+ 14 - 5
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -35,7 +35,10 @@
 
           <div class="gva-table-box">
             <el-table ref="multipleTable"
-                      style="width: 100%;height: 580px"
+                      style="width: 100%;height: 40vh"
+                      :row-style="{ height: '20px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                      :header-cell-style="{ padding: '0px' }"
                       border
                       tooltip-effect="dark"
                       :data="tableData"
@@ -64,9 +67,9 @@
               <el-table-column align="left" label="投料率" prop="投料率" width="120" />
               <el-table-column align="left" label="销售订单号" prop="销售订单号" width="120" />
             </el-table>
-            <div class="gva-pagination">
-              <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange"/>
-            </div>
+<!--            <div class="gva-pagination">-->
+<!--              <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total" @current-change="handleCurrentChange" @size-change="handleSizeChange"/>-->
+<!--            </div>-->
           </div>
 
 
@@ -75,12 +78,15 @@
               <el-tab-pane label="工艺资料"  @click="showTable('工艺资料')"  name="first">
                 <el-table ref="multipleTable"
                           :show-overflow-tooltip="true"
+                          :row-style="{ height: '20px' }"
+                          :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                          :header-cell-style="{ padding: '0px' }"
                           highlight-current-row="true"
                           style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
                   <el-table-column type="selection" width="55" />
                   <el-table-column align="left" label="工单编号" prop="工单编号"  width="100"/>
                   <el-table-column align="left" label="重点工序" prop="重点工序"  width="100"/>
-                  <el-table-column align="left" label="工序备注" prop="工序备注"  width="100"/>
+                  <el-table-column align="left" label="工序备注" prop="工序备注"  width="240"/>
                   <el-table-column align="left" label="机组" prop="机组"  width="100"/>
                   <el-table-column align="left" label="小时产能" prop="小时产能"  width="100"/>
                   <el-table-column align="left" label="生产工时" prop="生产工时"  width="100"/>
@@ -97,6 +103,9 @@
 
               <el-tab-pane label="印件资料"  @click="showTable('印件资料')"  name="second">
                 <el-table ref="multipleTable"
+                          :row-style="{ height: '20px' }"
+                          :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                          :header-cell-style="{ padding: '0px' }"
                           :show-overflow-tooltip="true"
                           highlight-current-row="true"
                           style="width: 100%;height: 400px" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">

+ 21 - 10
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -38,7 +38,10 @@
           <div class="gva-table-box">
             <!-- 表格 -->
             <el-table ref="multipleTable"
-                      style="width: 100%;height: 580px"
+                      style="width: 100%;height: 40vh"
+                      :row-style="{ height: '20px' }"
+                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                      :header-cell-style="{ padding: '0px' }"
                       border
                       tooltip-effect="dark"
                       :data="tableData"
@@ -71,18 +74,19 @@
             </el-table>
 
             <!-- 分页 -->
-            <div class="gva-pagination">
-              <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page"
-                             :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"
-                             @current-change="handleCurrentChange" @size-change="handleSizeChange" />
-            </div>
+<!--            <div class="gva-pagination">-->
+<!--              <el-pagination layout="total, sizes, prev, pager, next, jumper" :current-page="page"-->
+<!--                             :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"-->
+<!--                             @current-change="handleCurrentChange" @size-change="handleSizeChange" />-->
+<!--            </div>-->
           </div>
 
-
           <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-
             <el-tab-pane label="印件资料"  @click="showTable('印件资料')"  name="first">
               <el-table ref="multipleTable"
+                        :row-style="{ height: '20px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :header-cell-style="{ padding: '0px' }"
                         :show-overflow-tooltip="true"
                         highlight-current-row="true"
                         style="width: 100%;height: 400px" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
@@ -104,6 +108,9 @@
 
             <el-tab-pane label="工艺资料" @click="showTable('工艺资料')" name="second">
               <el-table ref="multipleTable"
+                        :row-style="{ height: '20px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :header-cell-style="{ padding: '0px' }"
                         highlight-current-row="true"
                         :show-overflow-tooltip="true"
                         style="width: 100%;height: 400px" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
@@ -135,14 +142,18 @@
 
             <el-tab-pane label="BOM资料" @click="showTable('BOM资料')" name="third">
               <el-table ref="multipleTable"
+                        :row-style="{ height: '20px' }"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                        :header-cell-style="{ padding: '0px' }"
+                        :show-overflow-tooltip="true"
                         highlight-current-row="true"
                         style="width: 100%;height: 400px" border tooltip-effect="dark" :data="bomtableData" row-key="ID" @selection-change="handleSelectionChange">
                 <el-table-column type="selection" width="55" />
                 <el-table-column align="left" label="方案" prop="方案"  width="120"/>
                 <el-table-column align="left" label="物料编号" prop="物料编号"  width="100"/>
-                <el-table-column align="left" label="物料名称" prop="物料名称"  width="340"/>
+                <el-table-column align="left" label="物料名称" prop="物料名称"  width="400"/>
                 <el-table-column align="left" label="计划用量" prop="计划用量"  width="100"/>
-                <el-table-column align="left" label="建档用户" prop="建档用户"  width="100"/>
+                <el-table-column align="left" label="建档用户" prop="建档用户"  width="120"/>
                 <el-table-column align="left" label="建档时间" prop="建档时间"  width="160"/>
                 <el-table-column align="left" label="更新时间" prop="更新时间"  width="160"/>
                 <el-table-column align="left" label="消耗定量" prop="消耗定量"  width="210"/>