Bladeren bron

Merge branch 'master' of https://git.7in6.com/Minong/mes-admin-backend-ui

曹鹤洋 1 jaar geleden
bovenliggende
commit
d195c4fd94

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

@@ -35,6 +35,13 @@ export const setMachineTeam = (data) => {
     data
   })
 }
+export const MachineWorkOrderEdit = (data) => {
+  return service({
+    url:'/mes_server/Reporting_Work/MachineWorkOrderEdit',
+    method: 'post',
+    data
+  })
+}
 export const ModelChangeRecord = (params) => {
   return service({
     url: '/mes_server/facility/ModelChangeRecord',
@@ -49,6 +56,13 @@ export const RemodelDetail = (params) => {
     params
   })
 }
+export const ChanliangDel = (params) => {
+  return service({
+    url: '/mes_server/facility/ChanliangDel',
+    method: 'get',
+    params
+  })
+}
 
 //客诉记录
 export const  ComplaintRecord= (params) => {

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

@@ -726,6 +726,13 @@ export const chanliangEdit = (data) => {
     data
   })
 }
+export const MachineChanliangDetailEdit = (data) => {
+  return service({
+    url:'/mes_server/facility/MachineChanliangDetailEdit',
+    method: 'post',
+    data
+  })
+}
 //关联工资核算
 //设备点检->左侧菜单栏
 export const  relatedTab= (params) => {
@@ -958,6 +965,13 @@ export const remodelGetTab = (data) => {
     data
   })
 }
+export const ChanliangDel = (params) => {
+  return service({
+    url: '/mes_server/facility/ChanliangDel',
+    method: 'get',
+    params
+  })
+}
 export const ModelChangeRecord = (params) => {
   return service({
     url: '/mes_server/facility/ModelChangeRecord',
@@ -972,4 +986,43 @@ export const index = (params) => {
     method: 'get',
     params
   })
+}
+export const ChanliangAdd = (data) => {
+  return service({
+    url:'/mes_server/facility/ChanliangAdd',
+    method: 'post',
+    data
+  })
+}
+//日产量上报添加->工单资料获取
+export const ChanliangWorkorder = (params) => {
+  return service({
+    url: '/mes_server/facility/ChanliangWorkorder',
+    method: 'get',
+    params
+  })
+}
+//日产量上报->印件资料
+export const ChanliangPrintDetail = (params) => {
+  return service({
+    url: '/mes_server/facility/ChanliangPrintDetail',
+    method: 'get',
+    params
+  })
+}
+//日产量上报添加->工艺资料
+export const ChanliangProcessDetail = (params) => {
+  return service({
+    url: '/mes_server/facility/ChanliangProcessDetail',
+    method: 'get',
+    params
+  })
+}
+//班组维护->员工姓名获取
+export const EmployeeData = (params) => {
+  return service({
+    url: '/mes_server/facility/EmployeeData',
+    method: 'get',
+    params
+  })
 }

+ 43 - 10
src/api/yunyin/yunying.js

@@ -539,6 +539,14 @@ export const WastageList  = (params) => {
         params
     })
 }
+//引用产品资料->工单列表
+export const WorkOrderDetailCope  = (params) => {
+    return service({
+        url: '/mes_server/work_order/WorkOrderDetailCope',
+        method: 'get',
+        params
+    })
+}
 
 /**工单生产排单(排产管理)*/
 //计划中工单
@@ -806,8 +814,8 @@ export const getOrderProcessRight = (params) => {
         method: 'get',
         params
     })
-}
-
+}
+
 //获取产品附件资料列表
 export const getAnnexTable = (params) => {
     return service({
@@ -820,18 +828,18 @@ export const getAnnexTable = (params) => {
 export const annexAdd = (formData) => {
     return service({
         url:'/mes_server/work_order/annexAdd',
-        method: 'post',
+        method: 'post',
 		data: formData
     })
-}
-//产品附件删除
+}
+//产品附件删除
 export const annexDel= (params) => {
     return service({
         url:'/mes_server/work_order/annexDel',
         method: 'get',
         params
     })
-}
+}
 //获取工单附件资料列表
 export const getGdAnnexTable = (params) => {
     return service({
@@ -844,15 +852,40 @@ export const getGdAnnexTable = (params) => {
 export const gdAnnexAdd = (formData) => {
     return service({
         url:'/mes_server/work_order/gdAnnexAdd',
-        method: 'post',
+        method: 'post',
 		data: formData
     })
-}
-//工单附件删除
+}
+//工单附件删除
 export const gdAnnexDel= (params) => {
     return service({
         url:'/mes_server/work_order/gdAnnexDel',
         method: 'get',
         params
     })
-}
+}
+
+//计算员工计件工资
+export const staffSalaryCount= (data) => {
+    return service({
+        url:'/mes_server/staff_salary/staffSalaryCount',
+        method: 'post',
+        data
+    })
+}
+//引用产品资料印件、工艺资料->工单信息获取
+export const ProductCopeDetail= (params) => {
+    return service({
+        url:'/mes_server/work_order/ProductCopeDetail',
+        method: 'get',
+        params
+    })
+}
+//引用产品印件、工艺资料
+export const WorkOrderDetailListCope = (data) => {
+    return service({
+        url:'/mes_server/work_order/WorkOrderDetailListCope',
+        method: 'post',
+        data
+    })
+}

+ 2 - 0
src/pinia/modules/user.js

@@ -56,6 +56,8 @@ export const useUserStore = defineStore('user', () => {
     })
     try {
       const res = await login(loginInfo)
+	  console.log(loginInfo)
+	  console.log(res)
       if (res.code === 0) {
         setUserInfo(res.data.user)
         setToken(res.data.token)

File diff suppressed because it is too large
+ 1388 - 131
src/view/job/processSheet/processSheet.vue


+ 35 - 1
src/view/login/index.vue

@@ -185,6 +185,7 @@ const loginVerify = () => {
     picPath.value = ele.data.picPath
     loginFormData.captchaId = ele.data.captchaId
     loginFormData.openCaptcha = ele.data.openCaptcha
+	console.log()
   })
 }
 loginVerify()
@@ -201,7 +202,7 @@ const loginFormData = reactive({
 })
 const rules = reactive({
   username: [{ validator: checkUsername, trigger: 'blur' }],
-  // password: [{ validator: checkPassword, trigger: 'blur' }],
+  password: [{ validator: checkPassword, trigger: 'blur' }],
   captcha: [
     {
       message: '验证码格式不正确',
@@ -249,4 +250,37 @@ const checkInit = async() => {
   }
 }
 
+const GetAddr = () => {
+  var xmlhttp = null;
+  var res;
+  if (window.XMLHttpRequest) {
+    xmlhttp = new XMLHttpRequest();
+  } else if (window.ActiveXObject) {
+    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+  }
+  // 设置回调函数
+  xmlhttp.onreadystatechange = function() {
+    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+      res = eval('('+xmlhttp.response+')');
+      let result = '';
+      for (let i = 0; i < res.macAddress.length; i++) {
+        if (i % 2 === 0 && i !== 0) {
+          result += '-'; // 根据实际需求修改分隔符
+        }
+        result += res.macAddress[i];
+      }
+      console.log(result);
+      loginAndRedirect(result); // 获取MAC地址后调用自动登录函数
+    }
+  }
+  // 打开一个连接
+  xmlhttp.open("get", "http://127.0.0.1:8090/init");
+  // 发送请求
+  xmlhttp.send();
+};
+
+// 在页面加载时获取MAC地址并进行自动登录
+GetAddr();
+
+
 </script>

+ 37 - 1
src/view/performance/06-packingDocuments/index.vue

@@ -261,6 +261,7 @@
             title="选择"
             destroy-on-close
             width="600px"
+			@keydown="selectCP($event)"
           >
             <el-table
               tooltip-effect="dark"
@@ -270,6 +271,7 @@
               border
               style="width:100%"
               @row-dblclick="handleSelectClick"
+			  ref="table2"
             >
               <el-table-column
                 prop="Gd_cpmc"
@@ -641,6 +643,7 @@ const getTableGxMc = async(index, row) => {
         detailData.table[index].sczl_gxmc = Gy0_gxmc
       } else {
         selectData.splice(0, selectData.length, ...response.data)
+		setCPCurrent(selectData[0])
         detailData.selectIndex = index
         dialogSelectVisible.value = true
       }
@@ -764,7 +767,40 @@ const handleSelectClick = (row, column, event) => {
   detailData.table[index].sczl_gxmc = Gy0_gxmc
   dialogSelectVisible.value = false
 }
-
+const table2=ref()
+const setCPCurrent = (row) => {
+  setTimeout(()=>{
+	  table2.value?.setCurrentRow(row) 
+	  const { Gd_cpmc, Gy0_gxmc, jyGx } = row
+	  const index = detailData.selectIndex
+	  detailData.table[index].Gd_cpmc = Gd_cpmc
+	  detailData.table[index].sczl_yjGx = jyGx
+	  detailData.table[index].sczl_gxmc = Gy0_gxmc
+  })
+}
+const CPIndex = ref(0);
+const JYCurrent = ref(0);
+const selectCP = (event) => {
+    if (event.keyCode === 40) { // 向下箭头
+        if (CPIndex.value < selectData.length - 1) {
+            CPIndex.value++;
+            setCPCurrent(selectData[CPIndex.value]);
+        } else {
+            CPIndex.value = 0;
+            setCPCurrent(selectData[CPIndex.value]); // 到达最后一行时回到第一行			
+        }
+    } else if (event.keyCode === 38) { // 向上箭头
+        if (CPIndex.value > 0) {
+            CPIndex.value--;
+            setCPCurrent(selectData[CPIndex.value]);
+        } else {
+            CPIndex.value = selectData.length - 1;
+            setCPCurrent(selectData[CPIndex.value]); // 到达第一行时回到最后一行
+        }
+    } else if (event.keyCode === 13) { // 回车键
+        dialogSelectVisible.value = false
+    }
+}
 // 弹窗确定
 const enterDialog = () => {
   if (type.value === '查改') {

+ 60 - 8
src/view/performance/07-otherDocuments/index.vue

@@ -249,9 +249,12 @@
             :before-close="()=>{dialogGylc = false}"
             title="工艺流程"
             destroy-on-close
+			style="width: 50%px; "
+			
+			@keydown="selectGX($event)"
           >
-
-            <el-scrollbar
+		  
+            <!-- <el-scrollbar
               style="height: 50vh;width: 50vw;"
             >
               <el-tree
@@ -259,8 +262,16 @@
                 highlight-current
                 style="width: 90%;"
                 @node-click="handleSelectGylc"
+				node-key="id"
               />
-            </el-scrollbar>
+            </el-scrollbar> -->
+			
+			<el-table tooltip-effect="dark" :data="selectData" row-key="ID"
+			  highlight-current-row="true" border style="width:240px" height="500px"
+			  @row-dblclick="handleSelectClick" ref="table2" >		  
+			  <el-table-column prop="jyGx" label="检验工序" width="200" />		 
+			</el-table>
+			
           </el-dialog>
 
         </div>
@@ -463,6 +474,8 @@ const leftData = ref(0)
 const rightData = ref(0)
 const dedhTreeData = ref()
 const gylcTreeData = ref()
+const selectData = reactive([])
+
 
 // 弹窗控制标记
 const dialogFormVisible = ref(false)
@@ -508,20 +521,59 @@ const handleGdbhEnter = async() => {
 const handleGylcEnter = async() => {
   const res = await getGxMc({ gdbh: detailData.sczl_gdbh, keyword: '' })
   if (res.code === 0) {
-    const ret = res.data.map(item => ({
-      ...item,
-      label: item['jyGx'],
-    }))
-    gylcTreeData.value = ret
+	const data =res.data
+	selectData.splice(0, selectData.length, ...data)
+	setGXCurrent[selectData[0]]
     dialogGylc.value = true
   }
 }
 
+// 工单选择框
+const handleSelectClick = (row, column, event) => {
+  const { jyGx, Gy0_gxh } = row
+  detailData.Sczl_gxmc=row.jyGx
+  detailData.sczl_gxh = row.Gy0_gxh
+  dialogGylc.value = false
+}
+const table2 = ref()
+const setGXCurrent = (row) => {
+  setTimeout(()=>{
+	  table2.value?.setCurrentRow(row)
+	  const { jyGx, Gy0_gxh } = row
+	  detailData.Sczl_gxmc=row.jyGx
+	  detailData.sczl_gxh = row.Gy0_gxh 
+  })
+}
 const handleSelectGylc = (node, check) => {
+   console.log(node.key)
+   console.log(check)
   detailData.Sczl_gxmc = node['jyGx']
   detailData.sczl_gxh = node['Gy0_gxh']
   dialogGylc.value = false
 }
+const currentIndex = ref(0);
+const GXCurrent = ref(0);
+const selectGX = (event) => {
+    if (event.keyCode === 40) { // 向下箭头
+        if (currentIndex.value < selectData.length - 1) {
+            currentIndex.value++;
+            setGXCurrent(selectData[currentIndex.value]);
+        } else {
+            currentIndex.value = 0;
+            setGXCurrent(selectData[currentIndex.value]); // 到达最后一行时回到第一行			
+        }
+    } else if (event.keyCode === 38) { // 向上箭头
+        if (currentIndex.value > 0) {
+            currentIndex.value--;
+            setGXCurrent(selectData[currentIndex.value]);
+        } else {
+            currentIndex.value = selectData.length - 1;
+            setGXCurrent(selectData[currentIndex.value]); // 到达第一行时回到最后一行
+        }
+    } else if (event.keyCode === 13) { // 回车键
+        dialogGylc.value = false
+    }
+}
 
 const handleGjdhEnter = async() => {
   const res = await getDedh({ sczl_jtbh: '' })

+ 41 - 1
src/view/performance/09-workOrderVerification/index.vue

@@ -399,6 +399,7 @@
             title="选择"
             destroy-on-close
             width="800px"
+			@keydown="selectSL($event)"
           >
             <el-table
               tooltip-effect="dark"
@@ -408,6 +409,7 @@
               border
               style="width:100%"
               @row-dblclick="handleSelectClick"
+			  ref="table2"
             >
               <el-table-column
                 v-for=" column in selectColumns "
@@ -816,6 +818,7 @@ const handleFpslEnter = async(index, row) => {
   }
   selectIndex = index
   Object.assign(selectData, res.data)
+  setCurrent(selectData[0])
   dialogSelectVisible2.value = true
 }
 
@@ -835,7 +838,44 @@ const handleSelectClick = (row, column, event) => {
   detailData.table[index].fp_name = name
   dialogSelectVisible2.value = false
 }
-
+const table2 = ref()
+const setCurrent = (row) => {
+  setTimeout(()=>{
+	  table2.value?.setCurrentRow(row)
+	  // SelectClick(row)
+	  // console.log(row)
+	  // console.log(table)
+	  const { sczl_gxmc, sczl_bzdh, sczl_bh1, name } = row
+	  const index = selectIndex
+	  detailData.table[index].fp_gxmc = sczl_gxmc
+	  detailData.table[index].fp_bz = sczl_bzdh
+	  detailData.table[index].fp_bh = sczl_bh1
+	  detailData.table[index].fp_name = name
+  })
+}
+const SLIndex = ref(0);
+const JYCurrent = ref(0);
+const selectSL = (event) => {
+    if (event.keyCode === 40) { // 向下箭头
+        if (SLIndex.value < selectData.length - 1) {
+            SLIndex.value++;
+            setCurrent(selectData[SLIndex.value]);
+        } else {
+            SLIndex.value = 0;
+            setCurrent(selectData[SLIndex.value]); // 到达最后一行时回到第一行			
+        }
+    } else if (event.keyCode === 38) { // 向上箭头
+        if (SLIndex.value > 0) {
+            SLIndex.value--;
+            setCurrent(selectData[SLIndex.value]);
+        } else {
+            SLIndex.value = selectData.length - 1;
+            setCurrent(selectData[SLIndex.value]); // 到达第一行时回到最后一行
+        }
+    } else if (event.keyCode === 13) { // 回车键
+        dialogSelectVisible2.value = false
+    }
+}
 // 弹窗确定
 const enterDialog = async() => {
   if (type.value === '查改') {

+ 6 - 4
src/view/performance/12-orderAccounting/componets/gdcjstj.vue

@@ -44,6 +44,7 @@ const props = defineProps({
 })
 const input = ref(props['gdbh'])
 
+// 按工序打印
 const handlePrint1 = async() => {
   // 引入后初始化
   hiprint.init()
@@ -101,8 +102,8 @@ const handlePrint1 = async() => {
         'mbbfl': item['target_loss_rate'],
         'sjbfl': item['actual_loss_rate'],
         'cdbl': item['超节损承担比例'],
-        'cjsje': item[''],
-        'zgqr': item[''],
+        'gxcjsje': item['工序超节损金额'].substring(0, item['工序超节损金额'].length - 2),
+        'zgqr': '',
       })),
     }
     console.log(tableData)
@@ -110,6 +111,7 @@ const handlePrint1 = async() => {
   }
 }
 
+// 按班组打印
 const handlePrint2 = async() => {
   // 引入后初始化
   hiprint.init()
@@ -139,7 +141,7 @@ const handlePrint2 = async() => {
       'clf': data['材料废'],
       'wff': data['外发废'],
       'ltcl': data['零头处理'],
-      'zcf': data[''],
+      'zcf': data['zcfp'],
       'zjf': data['工单质检废'],
       'wxs': data[''],
       'mbhgl': data['target_rate'],
@@ -159,7 +161,7 @@ const handlePrint2 = async() => {
         'wxsft': item['无形损分摊'],
         'jssl': item['节损数量'],
         'cdbl': item['超节损承担比例'],
-        'jsj': `<span style="color: red;">${item['loss'] ? item['loss'] : ''}</span>`,
+        'jsj': `<span style="color: red;">${item['节损奖'] ? item['节损奖'] : ''}</span>`,
       })),
     }
     console.log(tableData)

+ 1 - 1
src/view/performance/12-orderAccounting/componets/template-bz.json

@@ -1678,7 +1678,7 @@
                         "bottom": 198.0000057220459,
                         "vCenter": 405.75,
                         "hCenter": 177.7500057220459,
-                        "fontSize": 9,
+                        "fontSize": 8,
                         "lineHeight": 18,
                         "maxRows": 21,
                         "columns": [

+ 76 - 6
src/view/performance/12-orderAccounting/index.vue

@@ -91,7 +91,7 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="()=>{pd_lcdlist = true}"
+                @click="()=>{pd_lcdlist = true; pd_lcdProductValue()}"
               >流程单查询
               </el-button>
 
@@ -173,7 +173,8 @@
                   style="margin-right: 20px; padding: 0;"
                 >
                   <el-input
-                    v-model="gdbh"
+                    v-model="pd_lcdformData['gdbh']"
+                    @keyup.enter="pd_lcdProductValue"
                   />
                 </el-form-item>
                 <el-form-item
@@ -181,7 +182,7 @@
                   style="margin-right: 5px; padding: 0;"
                 >
                   <el-input
-                    v-model="gdbh"
+                    v-model="pd_lcdformData['code']"
                     disabled
                   />
                 </el-form-item>
@@ -190,7 +191,7 @@
                   style="margin-right: 5px; padding: 0;"
                 >
                   <el-input
-                    v-model="gdbh"
+                    v-model="pd_lcdformData['name']"
                     disabled
                     style="width: 500px"
                   />
@@ -205,7 +206,9 @@
                   >
                     <div class="JKWTree-tree">
                       <el-tree
+                        :data="pd_lcd_treeData"
                         default-expand-all
+                        @node-click="pd_lcd_handleNodeClick"
                       />
                     </div>
                   </layout-sider>
@@ -213,14 +216,14 @@
                     <!-- 这里放右侧的内容 -->
                     <el-space wrap>
                       <!-- 右侧内容 -->
-                      <!-- <template v-for="item in processList.total_process">
+                      <template v-for="item in processList.total_process">
                         <el-button
                           disabled
                           :type="! processList.process.includes(item) ? 'danger' : 'info'"
                           plain
                           style="width: 50px"
                         >{{ item }}</el-button>
-                      </template> -->
+                      </template>
                     </el-space>
                   </layout-main>
                 </layout>
@@ -322,6 +325,26 @@
     </layout>
   </div>
 </template>
+
+<script>
+import service from '@/utils/request'
+// 5.1流程单查询-工单工序生产进程菜单栏
+export const getOrderProcessLeft = (params) => {
+  return service({
+    url: '/mes_server/work_order_verification/getOrderProcessLeft',
+    method: 'get',
+    params
+  })
+}
+// 5.2流程单查询-获取工单工序生产进程右侧
+export const getOrderProcessRight = (params) => {
+  return service({
+    url: '/mes_server/work_order_verification/getOrderProcessRight',
+    method: 'get',
+    params
+  })
+}
+</script>
 <script setup>
 import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
 import { ref, watch } from 'vue'
@@ -335,6 +358,7 @@ import Gongdanzhijianfeipintongji
 import Detail from '@/view/performance/12-orderAccounting/componets/detail.vue'
 import Hjfpfb from './componets/hjfpfb.vue'
 import PrintPage from '@/view/yunyin/shengchanguanli/components/print.vue'
+import { reactive } from 'vue'
 
 // 弹窗
 const dialogGdcjstj = ref(false)
@@ -422,6 +446,7 @@ const searchInfo = ref('')
 watch(currentRow, (value, oldValue, onCleanup) => {
   gdbh.value = value?.['Gd_gdbh']
   date.value = value?.['date']
+  pd_lcdformData['gdbh'] = value?.['Gd_gdbh']
 })
 
 // 显示上方表格
@@ -483,6 +508,51 @@ function handleGddy() {
 }
 
 const pd_lcdlist = ref(false)
+const processList = ref([])
+
+const pd_lcdformData = reactive({})
+const pd_lcdProductValue = async() => {
+  _getOrderProcessLeft_list()
+}
+const pd_lcd_treeData = ref([])
+const _getOrderProcessLeft_list = async() => {
+  const order = pd_lcdformData['gdbh']
+  console.log(order)
+  try {
+    // 5.1流程单查询-工单工序生产进程菜单栏
+    const getOrderProcessLeft_list = await getOrderProcessLeft({ order: order })
+    console.log(getOrderProcessLeft_list)
+    pd_lcdformData['code'] = getOrderProcessLeft_list.data.Gd_info['code']
+    pd_lcdformData['name'] = getOrderProcessLeft_list.data.Gd_info['name']
+    pd_lcd_treeData.value = [{
+      label: order + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
+      // label: order + '-' + getOrderProcessLeft_list.data.Gd_info['code'] + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
+      value: undefined,
+      children: []
+    }]
+    const newData = []
+    for (const key in getOrderProcessLeft_list.data.Gy_info) {
+      const temp = getOrderProcessLeft_list.data.Gy_info[key]
+      const concatenatedValue = `${temp.Gy0_yjno}-${temp.Gy0_gxh} ---> ${temp.Gy0_gxmc}`
+      newData.push({ label: concatenatedValue, value: temp.Gy0_gxh })
+    }
+    pd_lcd_treeData.value[0].children = newData
+    // 5.2流程单查询-获取工单工序生产进程右侧【进入页面默认显示第一个】
+    const getOrderProcessRight_list = await getOrderProcessRight({ order: order, gxNo: newData[0].value })
+    processList.value = getOrderProcessRight_list.data
+  } catch (error) {
+    console.error(error)
+  }
+}
+
+const pd_lcd_handleNodeClick = async(node) => {
+  if (node.value === undefined) return
+  const order = pd_lcdformData['gdbh']
+  // //5.2流程单查询-获取工单工序生产进程右侧
+  const getOrderProcessRight_list = await getOrderProcessRight({ order: order, gxNo: node.value })
+  console.log(getOrderProcessRight_list)
+  processList.value = getOrderProcessRight_list.data
+}
 </script>
 
 <style scoped>

+ 32 - 9
src/view/performance/Dayreportattached.vue

@@ -137,9 +137,9 @@
 					 @node-dblclick="handleNodeDoubleClick"
 					 ></el-tree>     
 		  </el-dialog>
-		  <el-dialog v-model="BzVisible" title="选择" destroy-on-close width="200px" >
+		  <el-dialog v-model="BzVisible" title="选择" destroy-on-close width="200px" @keydown="selectBZ($event)" >
 		    <el-table tooltip-effect="dark" :data="selectDataBz" row-key="ID"
-		      highlight-current-row="true" border style="width:100%"
+		      highlight-current-row="true" border style="width:100%" ref="table2"
 		      @row-dblclick="SelectClickBz"
 		    >
 		      <el-table-column prop="sczl_bzdh" label="班组" width="150" />			        	 
@@ -557,23 +557,46 @@ const getBzsubmit = () => {
 	selectDataBz.splice(0, selectDataBz.length, ...data)
 	if(!GetjtbhVisible.value){
 		BzVisible.value=true
+		setCurrent(selectDataBz[0])
 	}
 	
 			
 }
-
+const table2 = ref()
+const setCurrent = (row) => {
+  setTimeout(()=>{
+	  table2.value?.setCurrentRow(row)
+	  // SelectClick(row)
+	  // console.log(row)
+	  // console.log(table)
+	  const {sczl_bzdh } = row
+	  	formData.value.sczl_bzdh=row.sczl_bzdh
+	  	console.log(row)
+  })
+}
 //班组选择
 const selectDataBz = reactive([])
 const BzVisible = ref(false)
 const SelectClickBz = (row, column, event) => {
-  const {sczl_bzdh } = row
-
-	formData.value.sczl_bzdh=row.sczl_bzdh
-
-  BzVisible.value = false
+ const {sczl_bzdh } = row
+ 
+ 	formData.value.sczl_bzdh=row.sczl_bzdh
+ 
+ BzVisible.value = false
+}
+const selectBZ = (event) => {
+	// console.log(selectDataBz.length);
+	if (event.keyCode === 40) { // Enter 或向下箭头
+	    setCurrent(selectDataBz[1]);
+		
+	} else if (event.keyCode === 38) {
+		setCurrent(selectDataBz[0]);
+	
+	} else if (event.keyCode === 13) {
+		    BzVisible.value = false
+	}
 }
 
-
 // 更新数据
 const updateDetailData = async() => {
   const restoredData = {

+ 51 - 26
src/view/performance/Dayreports.vue

@@ -436,12 +436,12 @@
 		    </el-table>
 		  </el-dialog>
 		  
-		  <el-dialog v-model="BzVisible" title="选择" destroy-on-close width="200px" >
+		  <el-dialog v-model="BzVisible" title="选择" destroy-on-close width="200px" @keydown="selectBZ($event)">
 		    <el-table tooltip-effect="dark" :data="selectDataBz" row-key="ID"
 		      highlight-current-row="true" border style="width:100%"
-		      @row-dblclick="SelectClickBz"
+		      @row-dblclick="SelectClickBz" @row-click="SelectClick" ref="table2" 
 		    >
-		      <el-table-column prop="sczl_bzdh" label="班组" width="150" />			        	 
+		      <el-table-column prop="sczl_bzdh" label="班组" width="150"/>
 		    </el-table>
 		  </el-dialog>
 
@@ -819,20 +819,20 @@ const ent1 = (event) => {
   
   if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
     for (let i = currentIndex + 1; i < inputs.length; i++) {
-      if (!inputs[i].readOnly) {
-		  nextTick(()=>{
-			  inputs[i].focus();
-			  inputs[i].select();
-		  })
+      if (!inputs[i].readOnly) {
+        nextTick(()=>{
+          inputs[i].focus();
+          inputs[i].select();
+        })
         break;
       }
     }
   } else if (event.keyCode === 38) { // 向上箭头
     for (let i = currentIndex - 1; i >= 0; i--) {
       if (!inputs[i].readOnly) {
-        nextTick(()=>{
-        	inputs[i].focus();
-			inputs[i].select();
+        nextTick(()=>{
+          inputs[i].focus();
+          inputs[i].select();
         })
         break;
       }
@@ -841,9 +841,10 @@ const ent1 = (event) => {
     if (event.target.selectionStart === 0) {
       for (let i = currentIndex - 1; i >= 0; i--) {
         if (!inputs[i].readOnly) {
-          nextTick(()=>{
-          	inputs[i].focus();
-			inputs[i].setSelectionRange(0, 0);
+          nextTick(()=>{
+            inputs[i].focus();
+            inputs[i].setSelectionRange(0, 0);
+            inputs[i].select(); // 全选输入框内容
           })
           break;
         }
@@ -853,9 +854,9 @@ const ent1 = (event) => {
     if (event.target.selectionStart === 0) {
       for (let i = currentIndex - 1; i >= 0; i--) {
         if (!inputs[i].readOnly) {
-          nextTick(()=>{
-          	inputs[i].focus();
-			inputs[i].select();
+          nextTick(()=>{
+            inputs[i].focus();
+            inputs[i].select();
           })
           break;
         }
@@ -865,16 +866,17 @@ const ent1 = (event) => {
     if (event.target.selectionStart === event.target.value.length) {
       for (let i = currentIndex + 1; i < inputs.length; i++) {
         if (!inputs[i].readOnly) {
-          nextTick(()=>{
-          	inputs[i].focus();
-			inputs[i].select();
+          nextTick(()=>{
+            inputs[i].focus();
+            inputs[i].select();
           })
           break;
         }
       }
     }
   }
-}
+}
+
 
 
 //追加字体颜色和不可输入
@@ -1141,9 +1143,8 @@ const getBzsubmit = () => {
 	selectDataBz.splice(0, selectDataBz.length, ...data)
 	if(!JtbhVisible.value){
 		BzVisible.value=true
-	}
-	
-			
+		setCurrent(selectDataBz[0])
+	}	
 }
 
 //班组选择
@@ -1156,7 +1157,30 @@ const SelectClickBz = (row, column, event) => {
 
   BzVisible.value = false
 }
-
+const table2 = ref()
+const setCurrent = (row) => {
+  setTimeout(()=>{
+	  table2.value?.setCurrentRow(row)
+	  // SelectClick(row)
+	  // console.log(row)
+	  // console.log(table)
+	  const {sczl_bzdh } = row
+	  	formData.value.sczl_bzdh=row.sczl_bzdh
+	  	console.log(row)
+  })
+}
+const selectBZ = (event) => {
+	// console.log(selectDataBz.length);
+	if (event.keyCode === 40) { // Enter 或向下箭头
+	    setCurrent(selectDataBz[1]);
+		
+	} else if (event.keyCode === 38) {
+		setCurrent(selectDataBz[0]);
+	
+	} else if (event.keyCode === 13) {
+		    BzVisible.value = false
+	}
+}
 //mult失去焦点事件
 const mult = () => {
 	formData.value.sczl_cl = parseFloat(mult1.value*mult2.value)
@@ -1940,7 +1964,8 @@ function exportExcel() {
 }
 
 // 生命周期钩子
-onMounted(async () => {
+onMounted(async () => {
+
 });
 </script>
 

+ 100 - 7
src/view/performance/MachineDocuments.vue

@@ -222,11 +222,11 @@
 		    </el-table>
 		  </el-dialog>
 		  
-		 <el-dialog v-model="dialogSelectVisible" title="选择" destroy-on-close width="600px" >
+		 <el-dialog v-model="dialogSelectVisible" title="选择" destroy-on-close width="600px" @keydown="selectGX($event)" >
             <el-table tooltip-effect="dark" :data="selectData"
               row-key="ID" highlight-current-row="true"
               border style="width:100%"
-              @row-dblclick="handleSelectClick"
+              @row-dblclick="handleSelectClick" ref="table2"
             >
               <el-table-column prop="Gd_cpmc" label="印件名称" width="340" />
 			  <el-table-column prop="jyGx" label="检验工序" width="150" />
@@ -254,10 +254,10 @@
 		      </el-table>
 		  </el-dialog>
 			
-		   <el-dialog v-model="LbVisible" title="选择" destroy-on-close width="200px" >
+		   <el-dialog v-model="LbVisible" title="选择" destroy-on-close width="200px" @keydown="selectJY($event)" >
 		     <el-table tooltip-effect="dark" :data="selectDataLb" row-key="ID"
 		       highlight-current-row="true" border style="width:100%"
-		       :row-style="{ height: '30px' }" @row-dblclick="SelectClickLb"
+		       :row-style="{ height: '30px' }" @row-dblclick="SelectClickLb"  ref="table3"
 		     >
 		       <el-table-column prop="sczl_检验类别" label="可选名称" width="150" />			        	 
 		     </el-table>
@@ -739,6 +739,7 @@ const getMachineGxMcsubmit = async() => {
 					return false
 				  }
 				  selectData.splice(0, selectData.length, ...response.data)
+				  setGXCurrent(selectData[0])
 				  dialogSelectVisible.value=true
 			}
 		}
@@ -765,6 +766,39 @@ const handleSelectClick = (row, column, event) => {
   setColorReadonly('yjmc');
   dialogSelectVisible.value = false
 }
+const currentIndex = ref(0);
+const GXCurrent = ref(0);
+const selectGX = (event) => {
+    if (event.keyCode === 40) { // 向下箭头
+        if (currentIndex.value < selectData.length - 1) {
+            currentIndex.value++;
+            setGXCurrent(selectData[currentIndex.value]);
+        } else {
+            currentIndex.value = 0;
+            setGXCurrent(selectData[currentIndex.value]); // 到达最后一行时回到第一行			
+        }
+    } else if (event.keyCode === 38) { // 向上箭头
+        if (currentIndex.value > 0) {
+            currentIndex.value--;
+            setGXCurrent(selectData[currentIndex.value]);
+        } else {
+            currentIndex.value = selectData.length - 1;
+            setGXCurrent(selectData[currentIndex.value]); // 到达第一行时回到最后一行
+        }
+    } else if (event.keyCode === 13) { // 回车键
+        dialogSelectVisible.value = false;
+    }
+}
+const table2 = ref()
+const setGXCurrent = (row) => {
+  setTimeout(()=>{
+	  table2.value?.setCurrentRow(row) 
+	  const { Gd_cpmc, Gy0_yjno, Gy0_gxh, Gy0_gxmc,jyGx } = row
+	  formData.value.yj_yjmc=Gd_cpmc
+	  formData.value.sczl_gxmc=Gy0_gxmc
+	  formData.value.sczl_yjgx=jyGx
+  })
+}
 
 //机台编号失去焦点事件
 const GetjtbhVisible = ref(false)
@@ -819,6 +853,7 @@ const getLbsubmit = () => {
 	//弹出选择
 	const data = [{'sczl_检验类别':''},{'sczl_检验类别':'正品板'},{'sczl_检验类别':'次品板'},{'sczl_检验类别':'废品板'}]
 	selectDataLb.splice(0, selectDataLb.length, ...data)
+	setJYCurrent(selectDataLb[0])
 	LbVisible.value=true
 }
 //检验类别选择
@@ -849,7 +884,58 @@ const SelectClickLb = (row, column, event) => {
 	}
   LbVisible.value = false
 }
-
+const table3=ref()
+const setJYCurrent = (row) => {
+  setTimeout(()=>{
+	  table3.value?.setCurrentRow(row) 
+	  const {sczl_检验类别 } = row
+	  	formData.value.sczl_检验类别=row.sczl_检验类别
+		
+		//查询废品系数
+		if(row.sczl_检验类别!=''){
+			var value = {
+				'gdbh':formData.value.sczl_gdbh,
+				'yjno':parseInt(formData.value.sczl_yjgx.split('-')[0]),
+				'gxh':parseInt(formData.value.sczl_yjgx.split('-')[1]),
+				'type':formData.value.sczl_检验类别
+				}
+			getMachineScrapFactor(value).then(response=>{
+				if(response.code==0){
+					if(response.data!=null){
+						formData.value.sczl_废品率系数 = response.data.num;
+					}
+					setColorReadonly('废品率系数')
+				}
+			});
+			
+		}else{
+			unsetColorReadonly('废品率系数')
+		}
+  })
+}
+const JYIndex = ref(0);
+const JYCurrent = ref(0);
+const selectJY = (event) => {
+    if (event.keyCode === 40) { // 向下箭头
+        if (JYIndex.value < selectDataLb.length - 1) {
+            JYIndex.value++;
+            setJYCurrent(selectDataLb[JYIndex.value]);
+        } else {
+            JYIndex.value = 0;
+            setJYCurrent(selectDataLb[JYIndex.value]); // 到达最后一行时回到第一行			
+        }
+    } else if (event.keyCode === 38) { // 向上箭头
+        if (JYIndex.value > 0) {
+            JYIndex.value--;
+            setJYCurrent(selectDataLb[JYIndex.value]);
+        } else {
+            JYIndex.value = selectDataLb.length - 1;
+            setJYCurrent(selectDataLb[JYIndex.value]); // 到达第一行时回到最后一行
+        }
+    } else if (event.keyCode === 13) { // 回车键
+        LbVisible.value = false
+    }
+}
 //获取定额代号
 const GetMachineDedhVisible = ref(false)
 let GetMachineDedhtreeData = reactive([]);
@@ -1255,8 +1341,15 @@ function doubleClick(row, column, event) {
   GetMachineInfo(table.value)
 }
 // 单击表格操作
-function Click(row, column, event) {
-    lastCellValue= row['UniqId'];
+function Click(row, column, event) {
+   console.log(row)
+   lastCellValue= row['UniqId'];
+   const parts = row['sczl_yjgx'].split('-')
+   ScrapFactor.yjno=parts[0]
+   ScrapFactor.gdbh=row['sczl_gdbh']
+   ScrapFactor.type=row['sczl_检验类别']
+   ScrapFactor.gxh=parts[1]
+   console.log(ScrapFactor)
    console.log(lastCellValue)
   // if(row['table_type']=='db_sczl'){
   // 	 dialogFormVisible.value = true

File diff suppressed because it is too large
+ 733 - 657
src/view/performance/Manualdocuments.vue


+ 110 - 62
src/view/performance/chejianbaogong.vue

@@ -8,10 +8,11 @@
 			<el-button type="primary" size="large" @click="onzhicheng"  >制程检验</el-button>
 			<el-button type="primary" size="large" @click="ondianjian"  >设备点检</el-button>
 			<el-button type="primary" size="large" @click="onxuncha" >管理巡查</el-button>
-<!--			<el-button type="primary" size="large" @click="onstatus" >设置机台状态</el-button>-->
+			<el-button type="primary" size="large" @click="onstatus" >设置机台状态</el-button>
 			<el-button type="primary" size="large" @click="onyinban">印版领退</el-button>
 			<el-button type="primary" size="large" @click="onClear" >换型清场</el-button>
 			<el-button type="primary" size="large" @click="oncomplaints" >客诉记录</el-button>
+
 		</div>
 		</header>
 
@@ -29,16 +30,33 @@
 
 <div class="gva-search-box" style="overflow: hidden; padding: 0; display: flex;">
 			<div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0; margin-left: 20px; margin-top: 20px;">
-						  <el-form-item label="工单编号" prop="name">
-							<el-row :gutter="24">
-							  <el-col :span="6">
-								<el-input v-model="formData.工单编号"  placeholder="" />
-							  </el-col>
-							  <el-col :span="18">
-								<el-input v-model="formData.产品名称"  placeholder="" />
-							  </el-col>
-							</el-row>
-						  </el-form-item>
+<!--						  <el-form-item label="工单编号" prop="name">-->
+<!--							<el-row :gutter="24">-->
+<!--							  <el-col :span="6">-->
+<!--								<el-input v-model="formData.工单编号"  placeholder="" />-->
+<!--							  </el-col>-->
+<!--							  <el-col :span="18">-->
+<!--								<el-input v-model="formData.产品名称"  placeholder="" />-->
+<!--							  </el-col>-->
+<!--							</el-row>-->
+<!--						  </el-form-item>-->
+              <el-row :gutter="20">
+                <el-col :span="6">
+                  <el-form-item label="机台号" prop="id">
+                    <el-input v-model="formData.机台号"  placeholder="" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="工单编号" prop="id">
+                    <el-input v-model="formData.工单编号"  placeholder="" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item prop="name">
+                    <el-input v-model="formData.产品名称"  placeholder="" />
+                  </el-form-item>
+                </el-col>
+              </el-row>
 						  <el-row :gutter="20">
 							<el-col :span="6">
 							 <el-form-item label="印件编号" prop="id">
@@ -303,7 +321,7 @@
           </el-tabs>
           </el-dialog>
 
-          <el-dialog v-model="detailShow" style="width: 140vh" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
+          <el-dialog v-model="detailShow" style="width: 105vh" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
             <el-table ref="multipleTable"
                         :row-style="{ height: '20px' }"
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -551,8 +569,8 @@
 			</div>
 			<div style="height: 17vh; width: 15vh;margin-top: 5vh;">
 				<el-button type="text"></el-button>
-				 <el-button style="margin-bottom: 5px;" @click="addBz" >新增</el-button>
-				 <el-button  style="margin-bottom: 1vh;" @click="selectBz" >更新当前班组</el-button>
+				 <el-button style="margin-bottom: 1vh; width:10vh" @click="addBz" >新         增</el-button>
+				 <el-button  style="margin-bottom: 1vh;width:10vh" @click="selectBz" >更新当前班组</el-button>
 <!--				 <el-button style="margin-bottom: 1vh;" @click="delBz" >删除当前班组</el-button>-->
 			</div>
 			</div>
@@ -561,7 +579,7 @@
 
 
 
-		<el-dialog v-model="complaintsShow" style="width: 140vh; height:78vh;" lock-scroll :before-close="closecomplaintsShow" title="产品客诉查询" destroy-on-close>
+		<el-dialog v-model="complaintsShow" style="width: 100vh; height:78vh;" lock-scroll :before-close="closecomplaintsShow" title="产品客诉查询" destroy-on-close>
 		  <el-table ref="multipleTable"
 		           :row-style="{ height: '20px' }"
 		           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -669,7 +687,7 @@
 		  title="设备点检记录"
 		  destroy-on-close
 		  width="150vh"
-		  style="height: 78vh;"
+		  style="width: 100vh; height:78vh;"
 		>
 		  <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
 		    <el-col :span="4" style="margin-bottom: 0px;margin-top: 0px;">
@@ -703,7 +721,7 @@
 		        highlight-current-row="true"
 				:show-overflow-tooltip="true"
 		        border  @row-click="dianjianhandle"
-		        style="width:100%; height:45vh; margin-top: 5px;"
+		        style="width:70vh; height:45vh; margin-top: 5px;"
 		        @row-dblclick="handleSelectClick"
 		        :row-class-name="rowClassName"
 		      >
@@ -768,7 +786,7 @@
 		  title="制程检验记录"
 		  destroy-on-close
 		  width="160vh"
-		  style="height: 78vh;"
+		  style="width: 100vh; height:78vh;"
 		>
 		  <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
 		    <el-col :span="5" style="margin-top=0px; margin-bottom: 0px;">
@@ -820,9 +838,9 @@
 		            :data="zhibiaoselectData"
 		            row-key="ID"
 		            highlight-current-row="true"
-		          				:show-overflow-tooltip="true"
+		          	:show-overflow-tooltip="true"
 		            border  @row-click="dianjianhandle"
-		            style="width:100%; height:40vh;"
+		            style="width:70vh; height:40vh;"
 		            @row-dblclick="handleSelectClick"
 		            :row-class-name="rowClassName"
 		          >
@@ -880,7 +898,7 @@
 		            highlight-current-row="true"
 		          				:show-overflow-tooltip="true"
 		            border  @row-click="dianjianhandle"
-		            style="width:100%; height:40vh;"
+		            style="width:70vh; height:40vh;"
 		            @row-dblclick="handleSelectClick"
 		            :row-class-name="rowClassName"
 		          >
@@ -919,7 +937,7 @@
 		  title="换型清场"
 		  destroy-on-close
 		  width="145vh"
-		  style="height: 78vh;"
+		  style="width: 100vh; height:78vh;"
 		>
       <header>
         <div style="height: 50px;margin-left: 1vh;">
@@ -941,7 +959,7 @@
 		    <div v-if="huanxingstatus" style="flex: 0; margin: 0;">
 		      <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
 		        <el-tab-pane label="换型清场明细信息" @click="showTable('换型清场明细信息')"  name="first">
-					<div style="width:110vh">
+					<div style="width:70vh">
 						<el-descriptions :column="9" border>
 						  <el-descriptions-item :span="9">
 							  <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
@@ -1097,7 +1115,7 @@
 		            highlight-current-row="true"
 		          	:show-overflow-tooltip="true"
 		            border  @row-click="dianjianhandle"
-		            style="width:115vh; height:50vh;"
+		            style="width:70vh; height:50vh;"
 		            @row-dblclick="handleSelectClick"
 		            :row-class-name="rowClassName"
 		          >
@@ -1218,7 +1236,7 @@
 		  title="印版领退"
 		  destroy-on-close
 		  width="130vh"
-		  style="height: 78vh;"
+		  style="width: 120vh; height:78vh;"
 		>
       <header>
         <div style="height: 50px;margin-left: 1vh;">
@@ -1246,7 +1264,7 @@
 
 		  <div style="display: flex;">
 		    <div style="flex: 1;">
-		      <el-aside width="28vh" style="margin: 0;">
+		      <el-aside width="20vh" style="margin: 0;">
 		        <div class="JKWTree-tree" style="height: 100%; border-right: 1px solid #ebeef5;">
 		          <el-tree :data="yinbantreeData" :props="defaultProps" highlight-current="true"
 		            @node-click="yinbanNodeClick" @node-dblclick="handleNodeDoubleClick"></el-tree>
@@ -1261,7 +1279,7 @@
 		        highlight-current-row="true"
 				    :show-overflow-tooltip="true"
 		        border  @row-click="dianjianhandle"
-		        style="width:100vh; height:50vh;"
+		        style="width:90vh; height:50vh;"
 		        @row-dblclick="handleSelectClick"
 		        :row-class-name="rowClassName"
             @selection-change="handleybSelectionChange"
@@ -1341,7 +1359,7 @@
 		  title="管理人员现场巡查记录"
 		  destroy-on-close
 		  width="162vh"
-		  style="height: 78vh;"
+		  style="width: 120vh; height:78vh;"
 		>
 		  <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
 		    <el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
@@ -1417,7 +1435,7 @@
 		        row-key="ID"
 		        highlight-current-row="true"
 		        border  @row-click="dianjianhandle"
-		        style="width:138vh; height:42vh;"
+		        style="width:90vh; height:42vh;"
 		        @row-dblclick="handleSelectClick"
 		        :row-class-name="rowClassName"
 			    	:show-overflow-tooltip="true"
@@ -1499,7 +1517,7 @@
 		  v-model="chanliangVisible"
 		  title="日产量上报"
 		  destroy-on-close
-		  width="160vh"
+		  width="130vh"
 		  style="height: 110vh;"
 		>
 		  <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
@@ -1608,12 +1626,12 @@
 				</el-col>
 				<el-col :span="3" style="margin-top=0px; margin-bottom: 1px;">
 				<el-form-item label="联数" prop="" style="margin-top=0px; margin-bottom: 1px;">
-				  <el-input v-model="formData3.联数" id="联数" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent($event, '来料异常', '联数', '墨色')"   placeholder="" />
+				  <el-input v-model="formData3.Gy0_ls" id="联数" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent($event, '来料异常', '联数', '墨色')"   placeholder="" />
 				</el-form-item>
 				</el-col>
 				<el-col :span="3" style="margin-top=0px; margin-bottom: 1px;">
 				<el-form-item label="墨色" prop="" style="margin-top=0px; margin-bottom: 1px;">
-				  <el-input v-model="formData3.墨色" id="墨色" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent($event, '联数', '墨色', '装版总时长')"   placeholder="" />
+				  <el-input v-model="formData3.Gy0_ms" id="墨色" style="margin-top=0px; margin-bottom: 1px;" @keydown="ent($event, '联数', '墨色', '装版总时长')"   placeholder="" />
 				</el-form-item>
 				</el-col>
 			  </el-row>
@@ -1845,7 +1863,7 @@
               v-model="bzchanliangVisible"
               title="班组产量修改"
               destroy-on-close
-              width="160vh"
+              width="140vh"
               style="height: 60vh;"
           >
             <el-row :gutter="24" style="margin-top=0px; margin-bottom: 1px;">
@@ -2189,7 +2207,9 @@ import {
   remodelDataDel,
   PrintDetailAdd,
   PrintDetailEdit,
-  chanliangEdit
+  chanliangEdit,
+  ChanliangDel,
+  MachineWorkOrderEdit
 } from '@/api/jixiaoguanli/baogong'
 
 import {
@@ -2394,6 +2414,7 @@ const FacilityProduction = async (addr) => {
   const response = await facilityProduction({machine:JTMC});
   if (response.code === 0) {
     if(response.data){
+      formData.value.机台号=JTMC.split('#')[0]
       formData.value.工单编号 = response.data.工单编号;
       formData.value.印件号 = response.data.印件号;
       formData.value.工序号 = response.data.工序名称.substring(0,2);
@@ -2624,27 +2645,14 @@ const SetMachineTeams = async(row) => {
   }
 }
 const clickybupdate = async (row) => {
-  formData.value.班组Id=row.ID
-  BZMC.value=row.班组号
-  console.log(row)
-  let sczl_bhkey=''
-  let sczl_namekey=''
-  for (let i = 1; i <= 10; i++) {
-    sczl_bhkey = `sczl_bh${i}`
-    sczl_namekey = `sczl_name${i}`
-    formData.value[sczl_bhkey] = '';
-    formData.value[sczl_namekey] = '';
-  }
-  for (let i = 0; i < Object.keys(row).length-4; i++) {
-    sczl_bhkey=`sczl_bh${i+1}`
-    sczl_namekey=`sczl_name${i+1}`
-    formData.value[sczl_bhkey] =row[i].split(' ')[0];
-    formData.value[sczl_namekey] = row[i].split(' ')[1];
-    console.log(formData)
-
-  }
-  console.log(formData)
-
+	
+	ElMessageBox.confirm('确定切换当前班组人员为工作班组人员吗?', '提示', {
+	    confirmButtonText: '确定',
+	    cancelButtonText: '取消',
+	    type: 'warning'
+	}).then(() => {
+	        setTeams(row)
+	    })
   // const response = await facilityWorklist({machine:JTMC});
   // if (response.code === 0) {
   //   sbzyData.splice(0, sbzyData.length, ...response.data);
@@ -2663,6 +2671,32 @@ const clickybupdate = async (row) => {
   //   }
   // }
 }
+const setTeams = async(row) => {
+	
+	
+	
+	formData.value.班组Id=row.ID
+	BZMC.value=row.班组号
+	console.log(row)
+	let sczl_bhkey=''
+	let sczl_namekey=''
+	for (let i = 1; i <= 10; i++) {
+	  sczl_bhkey = `sczl_bh${i}`
+	  sczl_namekey = `sczl_name${i}`
+	  formData.value[sczl_bhkey] = '';
+	  formData.value[sczl_namekey] = '';
+	}
+	for (let i = 0; i < Object.keys(row).length-4; i++) {
+	  sczl_bhkey=`sczl_bh${i+1}`
+	  sczl_namekey=`sczl_name${i+1}`
+	  formData.value[sczl_bhkey] =row[i].split(' ')[0];
+	  formData.value[sczl_namekey] = row[i].split(' ')[1];
+	  console.log(formData)
+	
+	}
+	console.log(formData)
+
+}
 //检验记录
 const InspectionRecord = async () => {
   JYData=[]
@@ -3211,7 +3245,8 @@ function oncomplaints() {
 const Complaints = async() => {
 	complaintsData.value=[]
 	selectedRowData.value={}
-    const res = await ComplaintRecord({productCode :formData.value.productCode})
+    // const res = await ComplaintRecord({productCode :formData.value.productCode})
+	const res = await ComplaintRecord({productCode :100601011})
     if (res.msg === '成功') {
 		complaintsData.value=res.data;
 		selectedRowData.value=complaintsData.value[0]
@@ -3467,8 +3502,8 @@ const GetMachineMac = async (addr) => {
   // const response = await getMachineMac({ addr: '68-ED-A4-26-60-D1' });
   if (response.code === 0) {
     if(response.data===null){
-      JTMC = 'MQ07#';
-      CJMC='烫模车间';
+      JTMC = 'JY01#';
+      CJMC='胶印车间';
       FacilityProduction(addr);
     }else{
       // 将接口返回的数据添加到树型结构中
@@ -3613,6 +3648,8 @@ const ReportInfo = async () => {
       sczl_rate8: classInfo.sczl_rate8,
       sczl_rate9: classInfo.sczl_rate9,
       sczl_rate10: classInfo.sczl_rate10,
+	  Gy0_ms:order_info.Gy0_ms,
+	  Gy0_ls:order_info.Gy0_ls,
     };
     formData3.value = { ...formData3.value, ...newData };
 	chanliangselectData.splice(0, chanliangselectData.length, ...response.data.bom)
@@ -3669,8 +3706,8 @@ const SubmitDailyProduction = async () => {
 	sczl_zccp: formData3.value.制程次品,
 	last_fp: formData3.value.前工序废,
 	less_sl: formData3.value.来料异常,
-	sczl_ls: formData3.value.联数,
-	sczl_ms: formData3.value.墨色,
+	sczl_ls: formData3.value.Gy0_ls,
+	sczl_ms: formData3.value.Gy0_ms,
 	zb_time: formData3.value.装版总时长,
 	dy_time: formData3.value.打样总工时,
 	run_time: formData3.value.通电工时,
@@ -4078,8 +4115,8 @@ const formData3= ref({
 	制程次品:'',
 	前工序废:'',
 	来料异常:'',
-	联数:'',
-	墨色:'',
+	Gy0_ms:'',
+	Gy0_ls:'',
 	装版总工时:'',
 	打样总工时:'',
 	通电工时:'',
@@ -4458,6 +4495,7 @@ const yjupdateCompanyFunc = async(row) => {
 }
 
 const setMachineTeams = async(row) => {
+	console.log(row.UniqId)
     const res = await setMachineTeam({
 			machine: JTMC.split("#")[0],
 			order:row['工单编号|质量信息'].split('|')[0],
@@ -4471,12 +4509,22 @@ const setMachineTeams = async(row) => {
 			})
     if (res.code === 0) {
       EquipmentSchedulingEdits(row)
+	  MachineWorkOrderEdits(row)
       ElMessage({
 		        type: 'success',
 		        message: '成功'
 		    })
     }
 }
+const MachineWorkOrderEdits = async(row) => {
+    const res = await MachineWorkOrderEdit({
+		    UniqId:row.UniqId,
+			machine: JTMC,
+			})
+    if (res.code === 0) {
+
+    }
+}
 
 const EquipmentSchedulingEdits = async(row) => {
   console.log(row)

+ 151 - 0
src/view/performance/jjgzzhys.vue

@@ -0,0 +1,151 @@
+<template>
+  <div style="border: 1px black solid; width: 30%; height: 33%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">
+    <div style="margin-top: 55px">
+      <el-form-item label="考勤年月:" class="mab" prop="keyOrder" label-width="100">
+        <el-input v-model="jjgzzhysformData.date" @keyup.enter="jgzzhysProductValue" style="width: 130px;"/>
+      </el-form-item>
+
+      <el-form-item label="从:" class="mab" prop="keyOrder" label-width="100">
+        <el-date-picker v-model="jjgzzhysformData.start_date" type="date" placeholder="选择日期" style="width: 130px;">
+        </el-date-picker>
+        &nbsp;到:&nbsp;&nbsp;
+        <el-date-picker v-model="jjgzzhysformData.end_date" type="date" placeholder="选择日期" style="width: 130px;">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item label="法定假日1从:" class="mab" prop="keyOrder" label-width="100">
+        <el-date-picker v-model="jjgzzhysformData.vacation_one_start" type="date" placeholder="选择日期" style="width: 130px;">
+        </el-date-picker>
+        &nbsp;&nbsp;~:&nbsp;&nbsp;
+        <el-date-picker v-model="jjgzzhysformData.vacation_one_end" type="date" placeholder="选择日期" style="width: 130px;">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item label="法定假日2从:" class="mab" prop="keyOrder" label-width="100">
+        <el-date-picker v-model="jjgzzhysformData.vacation_two_start" type="date" placeholder="选择日期" style="width: 130px;">
+        </el-date-picker>
+        &nbsp;&nbsp;~:&nbsp;&nbsp;
+        <el-date-picker v-model="jjgzzhysformData.vacation_two_end" type="date" placeholder="选择日期" style="width: 130px;">
+        </el-date-picker>
+      </el-form-item>
+
+
+      <div class="dialog-footer" style="text-align: right; margin-top: auto; margin-right: 20px;">
+        <el-button type="primary" @click="jjgzzhysclick">继 续</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+<script setup>
+import {ref, reactive} from 'vue'
+import {
+  staffSalaryCount,
+} from '@/api/yunyin/yunying'
+import { ElMessage } from 'element-plus'
+const form = reactive({})
+const visible = ref(true)
+const jjgzzhysformData = reactive({
+  date: '',
+  start_date: '',
+  end_date: '',
+  vacation_one_start: '',
+  vacation_one_end: '',
+  vacation_two_start: '',
+  vacation_two_end: '',
+});
+//=============页面默认加载获取=========
+// 获取当前日期
+const currentDate = new Date();
+// 获取当前年份和月份
+const year = currentDate.getFullYear();
+const month = currentDate.getMonth() + 1;
+// 如果月份小于 10,补零
+const formattedMonth = month < 10 ? '0' + month : month;
+// 组合年月
+jjgzzhysformData.date = year.toString() + formattedMonth.toString();
+
+// 封装日期格式化和处理月份范围的逻辑为一个函数
+const formatAndSetDates = (yearMonth) => {
+  // 提取年份和月份
+  const yearPart = yearMonth.slice(0, 4);
+  const monthPart = yearMonth.slice(4);
+  // 构建开始日期和结束日期的字符串
+  const startDateString = `${yearPart}-${monthPart}-01`;
+  const endDateString = `${yearPart}-${monthPart}-${new Date(yearPart, monthPart, 0).getDate()}`;
+  // 设置开始日期和结束日期
+  jjgzzhysformData.start_date = startDateString;
+  jjgzzhysformData.end_date = endDateString;
+};
+
+// 初始化时调用一次
+formatAndSetDates(jjgzzhysformData.date);
+
+// 考勤年月回车时调用
+const jgzzhysProductValue = () => {
+  formatAndSetDates(jjgzzhysformData.date);
+};
+
+//考勤年月按钮 继续
+const jjgzzhysclick = async () => {
+  // console.log(jjgzzhysformData.start_date)
+  function formatDate(dateString) {
+    if (dateString === null || dateString === '') {
+      return '';
+    }
+
+    const formattedDate = new Date(dateString);
+    const year = formattedDate.getFullYear();
+    const month = String(formattedDate.getMonth() + 1).padStart(2, '0');
+    const day = String(formattedDate.getDate()).padStart(2, '0');
+
+    return `${year}-${month}-${day}`;
+  }
+  const formattedData = {
+    date: jjgzzhysformData.date,
+    start_date: formatDate(jjgzzhysformData.start_date),
+    end_date: formatDate(jjgzzhysformData.end_date),
+    vacation_one_start: formatDate(jjgzzhysformData.vacation_one_start),
+    vacation_one_end: formatDate(jjgzzhysformData.vacation_one_end),
+    vacation_two_start: formatDate(jjgzzhysformData.vacation_two_start),
+    vacation_two_end: formatDate(jjgzzhysformData.vacation_two_end)
+  };
+  console.log(formattedData)
+  //目前没有接口,先不用调用
+  // const staffSalaryCount_add = await staffSalaryCount(formattedData);
+  // if (staffSalaryCount_add.code === 0) {
+  //   ElMessage({type: 'success',message: '更新成功'})
+  // } else {
+  //   ElMessage({type: 'error',message: '更新失败'})
+  // }
+};
+</script>
+<style scoped>
+:deep(.el-table td .cell) {
+  line-height: 20px !important;
+}
+:deep(.el-tabs__header){
+  margin-bottom: 0;
+}
+.search{
+  margin-left: 0px !important;
+  margin-right: 10px !important;
+}
+.bt{
+  margin-left: 2px !important;
+  padding: 3px !important;
+  font-size: 12px;
+}
+.el-tabs__header{
+  margin: 0px !important;
+}
+.gva-table-box{
+  padding: 0px !important;
+}
+.el-pagination{
+  margin-top: 0px !important;
+}
+.mab{
+  margin-bottom: 5px;
+}
+</style>
+

+ 582 - 0
src/view/performance/printYgjjmx.vue

@@ -0,0 +1,582 @@
+<template>
+  <div style="width: 30vw; height: 50vh">
+    <el-form inline @submit.prevent>
+      <el-form-item label="日期选择">
+        <div class="block">
+          <el-date-picker
+            v-model="date"
+            type="daterange"
+            range-separator="到"
+            start-placeholder="起始日期"
+            end-placeholder="结束日期"
+            value-format="YYYY.MM.DD"
+            style="width: 250px"
+          />
+        </div>
+      </el-form-item>
+
+      <el-form-item label="员工编号">
+        <el-input
+          v-model="input"
+          autocomplete="off"
+          style="width: 110px"
+          @keyup.enter="handleEnter"
+        />
+      </el-form-item>
+      <el-form-item label="">
+        <el-input
+          v-model="ygxm"
+          autocomplete="off"
+          style="width: 128px"
+          readonly
+        />
+      </el-form-item>
+
+      <br />
+      <el-form-item label="">
+        <el-button @click="handlePrint"> 打印 </el-button>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Ygjjmx",
+};
+// 2工单超节损统计(按工序)
+import service from "@/utils/request";
+//获取员工姓名
+const reportName = (params) => {
+  return service({
+    url: "/mes_server/reporting_work/getStaffName",
+    method: "get",
+    params,
+  });
+};
+//员工计件明细
+const getPieceDetail = (params) => {
+  return service({
+    url: "/mes_server/employee_daily_salary/getPieceDetail",
+    method: "get",
+    params,
+  });
+};
+</script>
+
+<script setup>
+import { ref, defineProps } from "vue";
+import { hiprint } from "vue-plugin-hiprint";
+import { ElMessage, dayjs } from "element-plus";
+
+// const props = defineProps(['gdbh'])
+const props = defineProps({
+  ygbh: {
+    type: String,
+    default: "",
+  },
+});
+const input = ref(props["ygbh"]);
+const ygxm = ref("");
+const date = ref([
+  dayjs().startOf("month").format("YYYY.MM.DD"),
+  dayjs().format("YYYY.MM.DD"),
+]);
+
+const handlePrint = async () => {
+  // 引入后初始化
+  hiprint.init();
+  const template = {
+    panels: [
+      {
+        index: 0,
+        name: 1,
+        paperType: "A4",
+        height: 210,
+        width: 297,
+        paperHeader: 78,
+        paperFooter: 577.5,
+        printElements: [
+          {
+            options: {
+              left: 320,
+              top: 20,
+              height: 18,
+              width: 130,
+              title: "员工计件明细记录",
+              coordinateSync: false,
+              widthHeightSync: false,
+              fontSize: 15,
+              textAlign: "center",
+              textContentVerticalAlign: "middle",
+              qrCodeLevel: 0,
+              draggable: false,
+            },
+            printElementType: {
+              title: "文本",
+              type: "text",
+            },
+          },
+          {
+            options: {
+              left: 320,
+              top: 45,
+              height: 12,
+              width: 130,
+              title: "文本",
+              right: 451.83339436848956,
+              bottom: 57.08334859212239,
+              vCenter: 391.83339436848956,
+              hCenter: 52.20834859212239,
+              field: "rqfw",
+              coordinateSync: false,
+              widthHeightSync: false,
+              hideTitle: true,
+              textAlign: "center",
+              textContentVerticalAlign: "middle",
+              qrCodeLevel: 0,
+              draggable: false,
+            },
+            printElementType: {
+              title: "文本",
+              type: "text",
+            },
+          },
+          {
+            options: {
+              left: 30,
+              top: 65,
+              height: 12,
+              width: 130,
+              right: 451.83339436848956,
+              bottom: 57.08334859212239,
+              vCenter: 391.83339436848956,
+              hCenter: 52.20834859212239,
+              field: "ygzl",
+              coordinateSync: false,
+              widthHeightSync: false,
+              hideTitle: true,
+              textContentVerticalAlign: "middle",
+              qrCodeLevel: 0,
+              draggable: false,
+              fontSize: 9.75,
+              color: "#0000ff",
+            },
+            printElementType: {
+              title: "文本",
+              type: "text",
+            },
+          },
+          {
+            options: {
+              left: 600,
+              top: 66,
+              height: 12,
+              width: 140,
+              title: "文本",
+              right: 756.5624885559082,
+              bottom: 76.50000286102295,
+              vCenter: 691.3124885559082,
+              hCenter: 70.50000286102295,
+              coordinateSync: false,
+              widthHeightSync: false,
+              textAlign: "right",
+              textContentVerticalAlign: "middle",
+              qrCodeLevel: 0,
+              draggable: false,
+              field: "dysj",
+              hideTitle: true,
+            },
+            printElementType: {
+              title: "文本",
+              type: "text",
+            },
+          },
+          {
+            options: {
+              left: 20,
+              top: 80,
+              height: 470,
+              width: 795,
+              field: "table",
+              coordinateSync: false,
+              widthHeightSync: false,
+              fontSize: 7.5,
+              lineHeight: 12,
+              tableHeaderRowHeight: 30,
+              tableHeaderBackground: "#ffffff",
+              tableHeaderFontSize: 9,
+              tableBodyRowHeight: 25,
+              columns: [
+                [
+                  {
+                    width: 50,
+                    title: "日期",
+                    titleSync: false,
+                    field: "rq",
+                    checked: true,
+                    columnId: "rq",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 40,
+                    title: "工单编号",
+                    titleSync: false,
+                    field: "gdbh",
+                    checked: true,
+                    columnId: "gdbh",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 135,
+                    title: "工序名称",
+                    titleSync: false,
+                    field: "gxmc",
+                    checked: true,
+                    columnId: "gxmc",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 40,
+                    title: "机台",
+                    titleSync: false,
+                    field: "jt",
+                    checked: true,
+                    columnId: "jt",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 50,
+                    title: "班组产量",
+                    titleSync: false,
+                    field: "bzcl",
+                    checked: true,
+                    columnId: "bzcl",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 30,
+                    title: "保养工时",
+                    titleSync: false,
+                    field: "bygs",
+                    checked: true,
+                    columnId: "bygs",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 30,
+                    title: "装版工时",
+                    titleSync: false,
+                    field: "zbgs",
+                    checked: true,
+                    columnId: "zbgs",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 30,
+                    title: "打样工时",
+                    titleSync: false,
+                    field: "dygs",
+                    checked: true,
+                    columnId: "dygs",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 30,
+                    title: "异常停机",
+                    titleSync: false,
+                    field: "yctj",
+                    checked: true,
+                    columnId: "yctj",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 45,
+                    title: "补产标准",
+                    titleSync: false,
+                    field: "bcbz",
+                    checked: true,
+                    columnId: "bcbz",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 45,
+                    title: "班组补产",
+                    titleSync: false,
+                    field: "bzbc",
+                    checked: true,
+                    columnId: "bzbc",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 45,
+                    title: "日定额",
+                    titleSync: false,
+                    field: "rde",
+                    checked: true,
+                    columnId: "rde",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 45,
+                    title: "达标定额",
+                    titleSync: false,
+                    field: "dbde",
+                    checked: true,
+                    columnId: "dbde",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 45,
+                    title: "千件工价",
+                    titleSync: false,
+                    field: "qjgj",
+                    checked: true,
+                    columnId: "qjgj",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 45,
+                    title: "个人计件工资",
+                    titleSync: false,
+                    field: "grjjgz",
+                    checked: true,
+                    columnId: "grjjgz",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 45,
+                    title: "个人加班工资",
+                    titleSync: false,
+                    field: "grjbgz",
+                    checked: true,
+                    columnId: "grjbgz",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                  {
+                    width: 45,
+                    title: "比例",
+                    titleSync: false,
+                    field: "bl",
+                    checked: true,
+                    columnId: "bl",
+                    fixed: false,
+                    rowspan: 1,
+                    colspan: 1,
+                    align: "right",
+                    halign: "center",
+                    tableQRCodeLevel: 0,
+                    tableSummaryTitle: true,
+                    tableSummary: "",
+                  },
+                ],
+              ],
+            },
+            printElementType: {
+              title: "表格",
+              type: "table",
+              editable: true,
+              columnDisplayEditable: true,
+              columnDisplayIndexEditable: true,
+              columnTitleEditable: true,
+              columnResizable: true,
+              columnAlignEditable: true,
+              isEnableEditField: true,
+              isEnableContextMenu: true,
+              isEnableInsertRow: true,
+              isEnableDeleteRow: true,
+              isEnableInsertColumn: true,
+              isEnableDeleteColumn: true,
+              isEnableMergeCell: true,
+            },
+          },
+        ],
+        paperNumberLeft: 736.5,
+        paperNumberTop: 66,
+        paperNumberContinue: true,
+        paperNumberFormat: "(第paperNo页 共paperCount页)",
+        backgroundColor: "#ffffff",
+        overPrintOptions: {
+          content: "",
+          opacity: 0.7,
+          type: 1,
+        },
+        watermarkOptions: {
+          content: "",
+          fillStyle: "rgba(87, 13, 248, 0.5)",
+          fontSize: "36px",
+          rotate: 25,
+          width: 413,
+          height: 310,
+          timestamp: true,
+          format: "YYYY-MM-DD HH:mm",
+        },
+      },
+    ],
+  };
+  const hiprintTemplate = new hiprint.PrintTemplate({ template });
+  const params = {
+    start_time: date.value[0],
+    end_time: date.value[1],
+    code: input.value,
+  };
+  console.log(params);
+  const res = await getPieceDetail(params);
+  if (res?.["code"] === 0) {
+    const { data } = res;
+    if (!data) {
+      ElMessage({
+        type: "info",
+        message: res["msg"],
+      });
+      return;
+    }
+    let preRq = "";
+    const getRq = (val) => {
+      const result = val === preRq ? "" : val;
+      preRq = val;
+      return result;
+    };
+    const tableData = {
+      rqfw: `(${params["start_time"]} - ${params["end_time"]})`,
+      ygzl: `员工资料:${data?.[0]?.["员工资料"]}`,
+      dysj: `打印时间:${dayjs().format("YYYY.MM.DD HH:mm:ss")}`,
+      table: data?.map((item, index) => ({
+        rq: getRq(item["sczl_rq"]),
+        gdbh: item["sczl_gdbh"],
+        gxmc: item["sczl_type"].substring(0, 20),
+        jt: item["sczl_jtbh"],
+        bzcl: item["班组车头产量"],
+        bygs: item["保养工时"],
+        zbgs: item["装版工时"],
+        dygs: item["打样工时"],
+        yctj: item["异常停机工时"],
+        bcbz: item["补产标准"],
+        bzbc: item["班组补产"],
+        rde: item["日定额"],
+        dbde: item["达标定额"],
+        qjgj: item["千件工价"],
+        grjjgz: item["个人计件工资"],
+        grjbgz: item["个人加班工资"],
+        bl: item["个人比例"],
+      })),
+    };
+    hiprintTemplate.print(tableData);
+  }
+};
+
+async function handleEnter(params) {
+  const res = await reportName({ code: input.value });
+  if (res?.["code"] === 0) {
+    ygxm.value = res?.["data"];
+  }
+}
+</script>
+
+<style scoped></style>

+ 20 - 0
src/view/performance/yuangongrigongzi.vue

@@ -40,6 +40,7 @@
               <el-button type="primary" :icon="Refresh">重置</el-button>
 			  <el-button type="primary" :icon="Search" @click="onposition">定位</el-button>
 			  <el-button type="primary" :icon="Search">查改</el-button>
+			  <el-button type="primary" @click="handlePrint">员工计件明细</el-button>
               <div style="margin-left: auto;">
                 <el-button type="primary" :icon="Download" @click="exportExcel">导出到Excel</el-button>
               </div>
@@ -326,6 +327,16 @@
       </el-container>
     </el-container>
 
+
+          <!-- 员工计件明细 -->
+          <el-dialog
+        v-model="dialogYgjjmx"
+        title="员工计件明细"
+        destroy-on-close
+      >
+        <Ygjjmx :ygbh="currentRow?.['bh']" />
+      </el-dialog>
+
   </div>
 </template>
 
@@ -347,6 +358,7 @@ 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'
 import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
+import Ygjjmx from './printYgjjmx.vue'
 defineOptions({
   name: '06-packingDocuments'
 })
@@ -666,6 +678,7 @@ const enterDialog = async () => {
 }
 // 单击表格操作
 function ontable(row, column, event) {
+  currentRow.value = row
   console.log(params.date)
   let parts = params.date.split('-')
   
@@ -707,6 +720,13 @@ function exportExcel() {
   console.log('导出到excel');
 }
 
+const currentRow = ref()
+const dialogYgjjmx = ref(false)
+function handlePrint() {
+  dialogYgjjmx.value = true
+  console.log(currentRow.value);
+}
+
 // 生命周期钩子
 onMounted(async () => {
 });

+ 92 - 13
src/view/yunyin/shengchanguanli/chengpinrucang.vue

@@ -84,7 +84,7 @@
 			   <el-form-item label="仓库" prop="name">
 				 <el-row :gutter="20">
 				   <el-col :span="12">
-					 <el-input v-model="formData.仓库编号" id="仓库编号"  @keydown="ent($event, '入仓类型', '仓库编号', '仓库名称')"  @keyup.enter.native="getCKsubmit" :clearable="true" placeholder="ZT01733" />
+					 <el-input v-model="formData.仓库编号" id="仓库编号"  @keydown="ent($event, '入仓类型', '仓库编号', '仓库名称')"   :clearable="true" placeholder="ZT01733" />
 				   </el-col>   
 				   <el-col :span="12">
 					 <el-input v-model="formData.仓库名称" id="仓库名称"  @keydown="ent($event, '仓库编号', '仓库名称', '单据编号')" :clearable="true" placeholder="" />
@@ -241,6 +241,7 @@
             title="选择"
             destroy-on-close
             width="600px"
+			@keydown="selectCK($event)"
           			>
             <el-table
               tooltip-effect="dark"
@@ -250,6 +251,7 @@
               border
               style="width:100%"
               @row-dblclick="CKSelectClick"
+			  ref="table2"
             >
               <el-table-column
                 prop="编号"
@@ -271,6 +273,7 @@
 		    title="选择"
 		    destroy-on-close
 		    width="600px"
+			@keydown="selectGD($event)"
 		  			>
 		    <el-table
 		      tooltip-effect="dark"
@@ -280,6 +283,7 @@
 		      border
 		      style="width:100%"
 		      @row-dblclick="GDSelectClick"
+			  ref="table3"
 		    >
 			<el-table-column
 			  prop="gdyj"
@@ -393,7 +397,8 @@
 		    v-model="SMVisible"
 		    title="选择"
 		    destroy-on-close
-		    width="600px"
+		    width="1200px"
+			
 		  			>
 		    <el-table
 		      tooltip-effect="dark"
@@ -401,46 +406,47 @@
 		      row-key="ID"
 		      highlight-current-row="true"
 		      border
-		      style="width:100%"
+		      style="width:180%"
+			  height="500px"
 		      @row-dblclick="SMSelectClick"
 		    >
 				<el-table-column
-				  prop="gdyj"
+				  prop="Yj_Gdbh"
 				  label="工单编号"
 				  width="180"
 				/>
 		      <el-table-column
-		        prop="Gd_gdbh"
+		        prop="yj_Yjno"
 		        label="印件号"
 		        width="200"
 		      />
 			  <el-table-column
-				prop="yj_yjno"
+				prop="yj_yjmc"
 				label="印件名称"
 				width="200"
 			  />
 			  <el-table-column
-				prop="销售订单号"
+				prop="yj_成品数量"
 				label="计划交货数量"
 				width="200"
 			  />
 			  <el-table-column
-				prop="yj_Yjdh"
+				prop="yj_实际投料"
 				label="印件投料"
 				width="200"
 			  />
 			  <el-table-column
-				prop="yj_yjmc"
+				prop="jjcp_sls"
 				label="包装产量"
 				width="200"
 			  />
 			  <el-table-column
-				prop="成品代号"
+				prop="sczl_cls"
 				label="入仓数量"
 				width="200"
 			  />
 			  <el-table-column
-				prop="成品名称"
+				prop="jjcp_smb"
 				label="缺数"
 				width="200"
 			  />
@@ -450,7 +456,7 @@
 				width="200"
 			  />
 			  <el-table-column
-				prop="客户料号"
+				prop="jjcp_sj"
 				label="最近入仓时间"
 				width="200"
 			  />
@@ -651,7 +657,7 @@ function onSMB() {
 	SMVisible.value=true
 }
 const MbList = async (value) => {
-  const response = await mbList({page:page.value,limit:limit.value});
+  const response = await mbList();
   console.log(response.data) 
   if (response.code === 0) {
 	 SMselectData.value=response.data.rows
@@ -689,6 +695,7 @@ const GetCK = async () => {
   console.log(response) 
   if (response.code === 0) {
   CKselectData.splice(0, CKselectData.length, ...response.data)
+  setCKCurrent(CKselectData[0])
   CKVisible.value=true
   }
 }
@@ -699,6 +706,38 @@ const CKSelectClick = (row, column, event) => {
   formData.value.仓库名称=名称
   CKVisible.value = false
 }
+const table2=ref()
+const setCKCurrent = (row) => {
+  setTimeout(()=>{
+	  table2.value?.setCurrentRow(row) 
+	  const { 编号,名称 } = row
+	  formData.value.仓库编号=编号
+	  formData.value.仓库名称=名称
+  })
+}
+const CKIndex = ref(0);
+const JYCurrent = ref(0);
+const selectCK = (event) => {
+    if (event.keyCode === 40) { // 向下箭头
+        if (CKIndex.value < CKselectData.length - 1) {
+            CKIndex.value++;
+            setCKCurrent(CKselectData[CKIndex.value]);
+        } else {
+            CKIndex.value = 0;
+            setCKCurrent(CKselectData[CKIndex.value]); // 到达最后一行时回到第一行			
+        }
+    } else if (event.keyCode === 38) { // 向上箭头
+        if (CKIndex.value > 0) {
+            CKIndex.value--;
+            setCKCurrent(CKselectData[CKIndex.value]);
+        } else {
+            CKIndex.value = CKselectData.length - 1;
+            setCKCurrent(CKselectData[CKIndex.value]); // 到达第一行时回到最后一行
+        }
+    } else if (event.keyCode === 13) { // 回车键
+        CKVisible.value = false
+    }
+}
   
 //工单编号回车事件
 const getGDsubmit = (event) => {
@@ -713,6 +752,7 @@ const GetGD = async () => {
   console.log(response) 
   if (response.code === 0) {
   GDselectData.splice(0, GDselectData.length, ...response.data)
+  setGDCurrent(GDselectData[0])
   GDVisible.value=true
   }
 }
@@ -729,6 +769,44 @@ const GDSelectClick = (row, column, event) => {
   formData.value.客户料号=客户料号
   GDVisible.value = false
 }
+const table3=ref()
+const setGDCurrent = (row) => {
+  setTimeout(()=>{
+	  table3.value?.setCurrentRow(row) 
+	  
+	  const { Gd_gdbh,yj_yjno,销售订单号,yj_Yjdh,yj_yjmc,成品代号,成品名称,客户料号,gdyj } = row
+	  formData.value.jjcp_gdbh=Gd_gdbh
+	  formData.value.jjcp_yjno=yj_yjno
+	  formData.value.订单编号=销售订单号
+	  formData.value.jjcp_cpdh=yj_Yjdh
+	  formData.value.jjcp_cpmc=yj_yjmc
+	  formData.value.成品编码=成品代号
+	  formData.value.成品名称=成品名称
+	  formData.value.客户料号=客户料号	  
+  })
+}
+const GDIndex = ref(0);
+const selectGD = (event) => {
+    if (event.keyCode === 40) { // 向下箭头
+        if (GDIndex.value < GDselectData.length - 1) {
+            GDIndex.value++;
+            setGDCurrent(GDselectData[GDIndex.value]);
+        } else {
+            GDIndex.value = 0;
+            setGDCurrent(GDselectData[GDIndex.value]); // 到达最后一行时回到第一行			
+        }
+    } else if (event.keyCode === 38) { // 向上箭头
+        if (GDIndex.value > 0) {
+            GDIndex.value--;
+            setGDCurrent(GDselectData[GDIndex.value]);
+        } else {
+            GDIndex.value = GDselectData.length - 1;
+            setGDCurrent(GDselectData[GDIndex.value]); // 到达第一行时回到最后一行
+        }
+    } else if (event.keyCode === 13) { // 回车键
+        GDVisible.value = false
+    }
+}
 
 //产品编号回车事件
 const getSLsubmit = (event) => {
@@ -929,6 +1007,7 @@ const ent = (event,id1,id2,id3) => {
   if (event.keyCode === 13 || event.keyCode === 40) { // Enter 或向下箭头
     if(id2=='仓库编号'&&event.keyCode === 13){
 		getCKsubmit()
+		// document.getElementById(id3).focus()
 	}if(id2=='工单编号'&&event.keyCode === 13){
 		getGDsubmit()
 	}if(id2=='产品编号'&&event.keyCode === 13){

+ 30 - 15
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -32,6 +32,7 @@
               <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,9 +95,6 @@
             </el-table>
           </el-dialog>
 
-          <!--加入排产【弹窗】-->
-          <!--暂停完工【弹窗】-->
-          <!--暂停完工【弹窗】-->
           <!--机组调整【弹窗】-->
           <el-dialog v-model="jizuDisplay" title="机组调整" style="width: 600px;">
             <el-row class="">
@@ -244,14 +242,13 @@
             </div>
           </el-dialog>
 
-
         </div>
       </layout-header>
 
       <layout>
         <layout-sider :resize-directions="['right']" :width="190" style="margin-right: 10px;">
           <div class="JKWTree-tree" style="height: 200px">
-            <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
+            <el-tree :data="treeData" :props="defaultProps" class="treecolor"  :current-node-key="currentNodeKey" @node-click="handleNodeClick"></el-tree>
           </div>
         </layout-sider>
         <layout-content>
@@ -353,6 +350,7 @@
                         :header-cell-style="{ padding: '0px' }" :highlight-current-row="true"  @row-click="chejianRowClick"
                         style="width: 100%;height: 25vh" border tooltip-effect="dark" :data="chejianData" row-key="ID" @selection-change="PC_handleChange"
               >
+                <!-- 排程列表-->
                 <el-table-column type="selection" width="30" />
                 <template v-for="item in [
                   { align:'left', title: '工单编号', prop: '工单编号', width: 85  },
@@ -369,13 +367,14 @@
                   { align:'left', title: '工序名称', prop: '工序名称', width: 120  },
                   { align:'left', title: '机组', prop: '机组', width: 90  },
                   { align:'left', title: '设备编号', prop: '设备编号', width: 90  },
-                  { align:'left', title: 'UNIQID', prop: 'UNIQID', width: 90  },
-                  { align:'left', title: '印件号', prop: '印件号', width: 90  },
-                  { align:'left', title: '工序号', prop: '工序号', width: 90  },
+                  { align:'left', title: 'GYUID', prop: 'GYUID', width: 90  },
+                  { align:'left', title: '印件号', prop: 'yjno', width: 90  },
+                  { align:'left', title: '工序号', prop: 'gxh', width: 90  },
               ]">
                   <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
                 </template>
               </el-table>
+              <!-- 制程列表-->
               <el-table ref="chejianfuRef"
                         :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
@@ -408,8 +407,8 @@
                   { align:'left', title: '设备编号', prop: '设备编号', width: 90  },
                   { align:'left', title: '车间名称', prop: '车间名称', width: 90  },
                   { align:'left', title: 'GYUID', prop: 'GYUID', width: 90  },
-                  { align:'left', title: '印件号', prop: '印件号', width: 90  },
-                  { align:'left', title: '工序号', prop: '工序号', width: 90  },
+                  { align:'left', title: '印件号', prop: 'yjno', width: 90  },
+                  { align:'left', title: '工序号', prop: 'gxh', width: 90  },
               ]">
                   <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
                 </template>
@@ -692,17 +691,31 @@ const tableData = ref([]);
 const _machine = ref(null);
 const treeType = ref('customTree') // dataTree // 计划中,排产中 ,dataTree 车间
 const handleNodeClick = async (node) => {
+  // 取消所有节点的颜色
+  const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
+  allNodes.forEach(node => {
+    node.querySelector('.el-tree-node__label').style.color = '';
+  });
+  // 获取点击的节点
+  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';
+  }
+
   if (node.type && node.type === '__customer') {
     treeType.value = 'customTree'
     schandleNodeClick(node)
   } else if (!node.children) {
     treeType.value = 'dataTree'
-    const custom_code = node.label;
     // 使用字符串分割获取#前面的数据
-    const dataBeforeHash = custom_code.split('#')[0].trim();
-    _machine.value = dataBeforeHash + '#';
-    console.log(_machine.value)
+    _machine.value = node.label.split('#')[0].trim() + '#';
+    console.log('机台-------' + _machine.value)
     const zhubiao = await MachineWorkOrderList({ machine:_machine.value})
+    // console.log(zhubiao)
     chejianData.value = zhubiao.data['排程'];
     chejianfuData.value = zhubiao.data['制程'];
   }
@@ -1438,10 +1451,11 @@ const oneditpcClick = async () => {
       remark: item.排单备注,
       start: item.最早开工时间,
       projectTime: item.计划开工时间,
+      endTime: item.计划完工时间,
       UniqId: item.UniqId
     };
   });
-  console.log(formattedData)
+  console.log(formattedData);
   const EquipmentSchedulingEdit_edit = await EquipmentSchedulingEdit(formattedData);
   // console.log(EquipmentSchedulingEdit_edit)
   if (EquipmentSchedulingEdit_edit.code === 0) {
@@ -1608,6 +1622,7 @@ const rowContextMenu = (row) => {
 :deep(.hui-plan-usage-low div) {
   color: #8c939d !important;
 }
+
 /*工序状态更正颜色【蓝色】*/
 :deep(.lan-plan-usage-low div) {
   color: blue !important;

+ 486 - 302
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -9,7 +9,7 @@
               <el-input v-model="searchInfo"  placeholder="搜索工单编号、产品代号" style="width: 180px;"></el-input>
               <el-button type="primary" icon="search" @click="onSubmit" title="搜索"  ></el-button>
               <el-button type="primary" icon="edit"   @click="ontlssclick"       class="bt" title="按工序投料反馈,试算某产量的投料">U8投料试算</el-button>
-              <el-button type="primary" class="bt" icon="edit"  @click="jsfjClick">技术附件</el-button>
+              <el-button type="primary" class="bt" icon="edit"  @click="jsfjClick">技术附件</el-button>
               <el-button type="primary" icon="edit"   @click="onyycpzlclick"     class="bt" title="重新引用 产品资料!">引用产品资料</el-button>
               <el-button type="primary" icon="edit"   @click="oneditgxclhsclick" class="bt" title="工序产量核算">工序产量核算</el-button>
               <el-button type="primary" icon="edit"   @click="oneditgylctzclick" class="bt" title="根据实际生产需要,对工艺流程做调整">工艺流程调整</el-button>
@@ -111,10 +111,10 @@
           </el-dialog>
 
           <!--引用产品资料-->
-          <el-dialog v-model="onyycpzllist" title="获取产品资料">
+          <el-dialog v-model="onyycpzllist" title="获取工单资料">
             <div style=" padding: 0px; align-items: center;">
               <el-form-item label="工单编号" prop="processName" class="mab">
-                <el-input v-model="yycpzlformData['gdbh']" @keyup.enter="yycpzlProductValue" style="width: 23%;" />
+                <el-input v-model="yycpzlformData['gdbh']" ref="fanganRef" @click="yycpzlProductValue({ code: 'Tab'})" @keydown="yycpzlProductValue" style="width: 23%;" />
               </el-form-item>
               <el-form-item label="客户代号" prop="processName" class="mab">
                 <el-input v-model="yycpzlformData['khdh']" disabled style="width: 23%;" />
@@ -129,6 +129,9 @@
               <el-form-item label="创建选择" class="mab" >
                 <el-checkbox disabled v-model="yycpzlformData['yjzl']">获取印件资料</el-checkbox>
                 <el-checkbox disabled v-model="yycpzlformData['gyap']">获取工艺安排</el-checkbox>
+                <el-form-item label="" prop="processName" class="mab" label-width="100" >
+                  <el-input v-model="yycpzlformData['fangan']" />
+                </el-form-item>
               </el-form-item>
             </div>
             <div slot="footer" class="dialog-footer" style="text-align: right;margin-left: 25%">
@@ -137,6 +140,19 @@
             </div>
           </el-dialog>
 
+          <el-dialog v-model="openFangan" title="请选择方案" style="width: 300px;" destroy-on-close>
+            <el-tree
+                :data="WorkOrderDetailCopesFangan"
+                :props="{ children: 'children', label: '方案'}" style="border: 1px solid #efefef; padding: 5px;"
+                node-key="方案"
+                highlight-current
+                :current-node-key="defaultSelectionFangan"
+                @node-click="setFangan"
+            >
+
+            </el-tree>
+          </el-dialog>
+
           <!--工序产量核算-->
           <el-dialog v-model="gxclhslist"   title="印件投料核算"  style="width: 20%;position: fixed; bottom: 35%; left: 35%">
             <div style="display: flex; flex-direction: column;  height: 100%;">
@@ -393,6 +409,7 @@
           <div class="JKWTree-tree" style="height: 200px">
             <h3>工单管理</h3>
             <el-tree :data="treeData.data"  @node-click="handleNodeClick"></el-tree>
+<!--            <el-tree :data="treeData.data" class="treecolor"  @node-click="handleNodeClick"></el-tree>-->
           </div>
         </layout-sider>
 
@@ -543,31 +560,31 @@
                   <el-table-column align="left" label="建档时间" prop="建档时间"  width="160"/>
                   <el-table-column align="left" label="更新时间" prop="更新时间"  width="160"/>
                 </el-table>
-              </el-tab-pane>
-			  <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"
-					  :cell-class-name="planUsageCellClass"
-					  highlight-current-row="true"
-					  @row-dblclick="ExcelShow"
-					  style="width: 100%;height: 36vh" 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="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="sys_id" width="120"/>
-			        <el-table-column align="left"  label="建档日期" prop="sys_rq" width="160" />
-			        <el-table-column align="left"  label="更新日期" prop="mod_rq" width="160" />
-			  				<el-table-column fixed="right" label="操作" width="100">
-			  				    <template v-slot="{ row }">
-			  				      <button @click="jsfj_del(row)">删除</button>
-			  				    </template>
-			  				  </el-table-column>
-			      </el-table>
+              </el-tab-pane>
+			  <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"
+					  :cell-class-name="planUsageCellClass"
+					  highlight-current-row="true"
+					  @row-dblclick="ExcelShow"
+					  style="width: 100%;height: 36vh" 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="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="sys_id" width="120"/>
+			        <el-table-column align="left"  label="建档日期" prop="sys_rq" width="160" />
+			        <el-table-column align="left"  label="更新日期" prop="mod_rq" width="160" />
+			  				<el-table-column fixed="right" label="操作" width="100">
+			  				    <template v-slot="{ row }">
+			  				      <button @click="jsfj_del(row)">删除</button>
+			  				    </template>
+			  				  </el-table-column>
+			      </el-table>
 			    </el-tab-pane>
             </el-tabs>
 
@@ -850,12 +867,18 @@
                 <div>
                   <el-form-item label="关键字:"  class="mab" prop="keyOrder">
                     <el-space>
-                      <el-input v-model="khdh_keyword" @keyup.enter="khdh_ProductValue"  style="width: 100%;"/>
+                      <el-input v-model="khdh_keyword" @keyup.enter="khdh_ProductValue"  style="width: 100%;" ref="xzgdzlInput" />
                       <el-button @click="gongdanSearchHandle(khdh_keyword, '客户代号')">刷新</el-button>
                     </el-space>
                   </el-form-item>
                   <div style="border:1px solid #eee; width:100%; height: 400px; overflow-y: auto">
-                    <el-tree :data="khdhDataList" :props="{children: 'children',label: 'name', value: '客户编号'}" @node-click="selectGongDanNode($event, '客户代号')" />
+                    <el-tree
+                        :data="khdhDataList"
+                        :props="{children: 'children',label: 'name', value: '客户编号'}" :current-node-key="currentNodeKey"
+                        highlight-current
+                        node-key="客户编号"
+                        @node-click="selectGongDanNode($event, '客户代号')" ref="xzgdzlTree"
+                    />
                   </div>
                 </div>
               </el-form>
@@ -1188,28 +1211,28 @@
 		<!-- 技术附件 -->
           <el-dialog v-model="jsfjdialogFormVisible" :before-close="jsfjcloseDialog" :title="产品技术附件资料" style="margin-top: 40px" height="500px" width="800px" destroy-on-close>
 			  <el-form :model="jsfjformdata" label-position="right" ref="elFormRef" :rules="rule" label-width="75px">
-				<el-row :gutter="24">
-					<el-col :span="6">
-					  <el-form-item label="关联编号:" prop="address" class="mab">
-						<el-input v-model="jsfjformdata.关联编号"  id="关联编号" />
-					  </el-form-item>
-					</el-col>
-				</el-row>
-				<el-row :gutter="24">
-					<el-col :span="24">
-					  <el-form-item label="附件备注:" prop="address" class="mab">
-						<el-input v-model="jsfjformdata.附件备注"  id="附件备注" />
-					  </el-form-item>
-					</el-col>
-				</el-row>
-				<el-row :gutter="24">
-					<el-col :span="6"></el-col>
-					<el-col :span="12">
-						<input style="font-size:16px;" type="file" @change="uploadExcel" >
-					</el-col>
-					<el-col :span="6">
-						<el-button @click="yulan">预览</el-button>
-					</el-col>
+				<el-row :gutter="24">
+					<el-col :span="6">
+					  <el-form-item label="关联编号:" prop="address" class="mab">
+						<el-input v-model="jsfjformdata.关联编号"  id="关联编号" />
+					  </el-form-item>
+					</el-col>
+				</el-row>
+				<el-row :gutter="24">
+					<el-col :span="24">
+					  <el-form-item label="附件备注:" prop="address" class="mab">
+						<el-input v-model="jsfjformdata.附件备注"  id="附件备注" />
+					  </el-form-item>
+					</el-col>
+				</el-row>
+				<el-row :gutter="24">
+					<el-col :span="6"></el-col>
+					<el-col :span="12">
+						<input style="font-size:16px;" type="file" @change="uploadExcel" >
+					</el-col>
+					<el-col :span="6">
+						<el-button @click="yulan">预览</el-button>
+					</el-col>
 				</el-row>
 			  </el-form>
 			  <template #footer>
@@ -1219,10 +1242,10 @@
 				</div>
 			  </template>
 			</el-dialog>
-
+
 <el-dialog v-model="luckyexcelVisible" :before-close="luckyexcelCloseDialog" width="100%" top="0vh">
   <div id="luckyexcel" style="width: 100%;height: 90vh;"></div>
-</el-dialog>
+</el-dialog>
 
           </el-main>
         </layout-content>
@@ -1255,12 +1278,12 @@ export default {
 </script>
 <script setup>
 // 全量引入格式化工具 请按需保留
-import $script from 'scriptjs'
+import $script from 'scriptjs'
 import $ from 'jquery';
 import LuckyExcel from 'luckyexcel';
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import { ElMessage, ElMessageBox } from 'element-plus'
-import { ref, reactive, computed } from 'vue'
+import { ref, reactive, computed, nextTick, watch } from 'vue'
 import {
   DataList,WorkList, gdzl_MachineList,PrintCodeList,getProductYjList, getProductZzList,
   U8workOrder, ProcessDetailEdit, PrintedEdit, PrintJobOrder,WorkOrderAdd,PrintDetailAdd,
@@ -1269,9 +1292,9 @@ import {
   ProductInformation, TestCoefficient, capacityList,getOrderProcessRight,
   DataCorrection, U8Trial, ProcessFlow, AccountingParameter,setProductStatus,
   getProduct, getProductGy, ProductInformationEdit, workOrderListDetail, editProduct, getOrderProcessCount, StatusEdit,
-  PrintDetailDel, ProcessDetailDel,
-  getGdAnnexTable,
-  gdAnnexAdd,
+  PrintDetailDel, ProcessDetailDel,WorkOrderDetailCope,
+  getGdAnnexTable,
+  gdAnnexAdd,ProductCopeDetail,WorkOrderDetailListCope,
   gdAnnexDel,
 } from "@/api/yunyin/yunying";
 import PrintPage from './components/print.vue'
@@ -1907,21 +1930,12 @@ const selectGongDanNode = (node, type) => {
   }
 }
 
+const xzgdzlInput =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 _gClientList(add_gdscgdformData['客户代号'])
-    if (khdhDataList.value != null) {
-      const row = khdhDataList.value.find(item => item.客户编号 === add_gdscgdformData['客户代号'])
-      if (row) {
-        add_gdscgdformData['客户名称'] = row.客户名称
-      } else {
-        khdhModal.value = true
-      }
-    } else {
-      khdhModal.value = true
-    }
-  }
   if (id2 === '产品代号' && event.key==='Tab' || id2 === '产品代号' && event.key=== 'Enter') {
     await _ProductCodeList()
     cpdhModal.value = true
@@ -1951,7 +1965,82 @@ const add_gdzlent = async (event,id1,id2,id3) => {
       document.getElementById(id3).focus()
     }
   }
+
+  if (id2 === '客户代号' && event.key==='Tab' || id2 === '客户代号' && event.key=== 'Enter') {
+    await _gClientList(add_gdscgdformData['客户代号'])
+    if (khdhDataList.value != null) {
+      const row = khdhDataList.value.find(item => item.客户编号 === add_gdscgdformData['客户代号'])
+      if (row) {
+        add_gdscgdformData['客户名称'] = row.客户名称
+      } else {
+        khdhModal.value = true
+      }
+    } else {
+      khdhModal.value = true
+    }
+    await nextTick(() => {
+      setTimeout(() => {
+        xzgdzlInput.value.focus()
+      }, 200)
+    })
+  }
 }
+let isdeFun = false
+watch(() => khdhModal.value, async v => {
+  await nextTick(() => {
+    if (xzgdzlTree.value !== undefined) {
+      const defun = (e) => {
+        isdeFun = true
+        if (e.code === 'Enter' && currentNodeKey.value !== '') {
+          selectGongDanNode(khdhDataList.value.find(item => item['客户编号'] == currentNodeKey.value), '客户代号')
+          return
+        }
+        if (e.code === 'ArrowDown') {
+          if (currentNodeKey.value === '') {
+            currentNodeKey.value = khdhDataList.value[0].客户编号
+          } else {
+            console.log(khdhDataList.value)
+            for(let i = 0; i < khdhDataList.value.length; i++) {
+              const item = khdhDataList.value[i]
+              if (item['客户编号'] == currentNodeKey.value) {
+                if (khdhDataList.value[i + 1]) {
+                  currentNodeKey.value = khdhDataList.value[i + 1].客户编号
+                  break;
+                } else {
+                  currentNodeKey.value = khdhDataList.value[0].客户编号
+                }
+              }
+            }
+          }
+        }
+        if (e.code === 'ArrowUp') {
+          if (currentNodeKey.value === '') {
+            currentNodeKey.value = khdhDataList.value[khdhDataList.value.length - 1].客户编号
+          } else {
+            for(let i = 0; i < khdhDataList.value.length; i++) {
+              const item = khdhDataList.value[i]
+              if (item['客户编号'] == currentNodeKey.value) {
+                if (khdhDataList.value[i - 1]) {
+                  currentNodeKey.value = khdhDataList.value[i - 1].客户编号
+                  break;
+                } else {
+                  currentNodeKey.value = khdhDataList.value[khdhDataList.value.length - 1].客户编号
+                }
+              }
+            }
+          }
+        }
+      }
+      if (v === true) {
+        isdeFun || document.body.addEventListener('keydown', defun)
+        isdeFun && document.body.removeEventListener('keydown', defun)
+      } else {
+        document.body.removeEventListener('keydown', defun)
+      }
+    }
+  })
+
+})
 
 // =========== 新增印件资料 ===========
 //默认弹窗关闭
@@ -2616,8 +2705,10 @@ const yycpzlformData = reactive({
   yjzl:true,
   gyap: true,
   gyfa: '',
+  fangan: 'A',
 });
 const onyycpzllist = ref(false);
+const fanganRef = ref()
 //引用产品资料【按钮】
 const onyycpzlclick = () => {
   if(_Gd_gdbh.value == null){
@@ -2625,19 +2716,33 @@ const onyycpzlclick = () => {
     ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
   }else{
     yycpzlformData['gdbh'] = _Gd_gdbh.value;
-    _ProductInformations();
+    _WorkOrderDetailCopedata();
     onyycpzllist.value = true;
   }
 };
 //引用产品资料【回车】
-const yycpzlProductValue = async () => {
-  _ProductInformations();
+const yycpzlProductValue = async (e) => {
+  if (e.code === 'Tab') {
+    if (yycpzlformData['gdbh'] == null || yycpzlformData['gdbh'] == '') {
+      ElMessage({ type: 'warning', message: '工单那不能为空' })
+      return false;
+    }
+    await _WorkOrderDetailCopedata();
+    fanganKeyDown()
+  }
 };
+
+const yyzltableData = ref([]);
+const WorkOrderDetailCopesFangan = ref([])
+const defaultSelectionFangan = ref()
 //引用产品资料->获取产品资料
-const _ProductInformations = async ()=>{
-  let workOrder = yycpzlformData['gdbh'];
-  const ProductInformations = await ProductInformation({workOrder:workOrder});
-  if(ProductInformations.msg === '未找到工单信息'){
+const _WorkOrderDetailCopedata = async ()=>{
+  let search = yycpzlformData['gdbh'];
+  // 2403725 是带两个方案的
+  const WorkOrderDetailCopes = await ProductCopeDetail({workorder:search});
+  console.log(WorkOrderDetailCopes)
+  fanganRef.value.focus()
+  if(WorkOrderDetailCopes.msg === '未找到工单信息'){
     yycpzlformData['khdh'] = '';
     yycpzlformData['khmc'] = '';
     yycpzlformData['cpdh'] = '';
@@ -2645,33 +2750,95 @@ const _ProductInformations = async ()=>{
     ElMessage({type: 'warning',message: '未找到工单信息'})
     return false;
   }else{
-    yycpzlformData['gdbh'] = ProductInformations.data['工单编号'];
-    yycpzlformData['khdh'] = ProductInformations.data['客户代号'];
-    yycpzlformData['khmc'] = ProductInformations.data['客户名称'];
-    yycpzlformData['cpdh'] = ProductInformations.data['产品代号'];
-    yycpzlformData['cpmc'] = ProductInformations.data['产品名称'];
+    yycpzlformData['gdbh'] = WorkOrderDetailCopes.data['工单编号'];
+    yycpzlformData['khdh'] = WorkOrderDetailCopes.data['客户编号'];
+    yycpzlformData['khmc'] = WorkOrderDetailCopes.data['客户名称'];
+    yycpzlformData['cpdh'] = WorkOrderDetailCopes.data['产品编号'];
+    yycpzlformData['cpmc'] = WorkOrderDetailCopes.data['产品名称'];
+    yycpzlformData['fangan'] = WorkOrderDetailCopes.data['方案'][0]['方案'];
+    defaultSelectionFangan.value = WorkOrderDetailCopes.data['方案'][0]['方案']
+    WorkOrderDetailCopesFangan.value = WorkOrderDetailCopes.data['方案']
+  }
+}
+
+const setFangan = (node) => {
+  yycpzlformData['fangan'] = node['方案']
+  defaultSelectionFangan.value = node['方案']
+  document.removeEventListener('keydown', () => {})
+  openFangan.value = false
+}
+
+const openFangan = ref(false)
+const fanganKeyDown = () => {
+  //2403725
+  if (WorkOrderDetailCopesFangan.value.length > 1) {
+    openFangan.value = true
+    document.addEventListener('keydown', (e) => {
+      let currentIndex
+      WorkOrderDetailCopesFangan.value.map( (item, index) => {
+        if (item['方案'] === defaultSelectionFangan.value[0]) {
+          currentIndex = index
+        }
+      })
+      if (e.code === 'ArrowDown') {
+        if (WorkOrderDetailCopesFangan.value[currentIndex + 1]) {
+          defaultSelectionFangan.value = WorkOrderDetailCopesFangan.value[currentIndex + 1]['方案']
+        } else {
+          defaultSelectionFangan.value = WorkOrderDetailCopesFangan.value[0]['方案']
+        }
+      }
+      if (e.code === 'ArrowUp') {
+        if (WorkOrderDetailCopesFangan.value[currentIndex - 1]) {
+          defaultSelectionFangan.value = WorkOrderDetailCopesFangan.value[currentIndex - 1]['方案']
+        } else {
+          defaultSelectionFangan.value = WorkOrderDetailCopesFangan.value[WorkOrderDetailCopesFangan.value.length - 1]['方案']
+        }
+      }
+      if (e.code === 'Enter') {
+        yycpzlformData['fangan'] = defaultSelectionFangan.value
+        document.removeEventListener('keydown', (e) => {
+          console.log(e)
+        })
+        openFangan.value = false
+      }
+    })
   }
 }
-//引用产品资料【执行】
+//引用产品资料【执行】按钮
 const yycpzlhandleConfirm = async () => {
   _ProductInformationEdit();
 };
 //引用产品资料->获取产品资料
 const _ProductInformationEdit = async ()=>{
+  console.log(yycpzlformData)
+  if(yycpzlformData['gdbh'] === null || yycpzlformData['gdbh'] === undefined){
+    ElMessage({type: 'warning', message: '工单编号为空'});
+    return false;
+  }
+  if(yycpzlformData['cpdh'] === null || yycpzlformData['cpdh'] === undefined){
+    ElMessage({type: 'warning', message: '产品代号为空'});
+    return false;
+  }
+  if(yycpzlformData['fangan'] === null || yycpzlformData['fangan'] === undefined){
+    ElMessage({type: 'warning', message: '工艺方案为空'});
+    return false;
+  }
   let params = {}
-  params.oldWorkOrder = _Gd_gdbh.value;
-  params.newWorkOrder = yycpzlformData['gdbh'];
+  params.workorder = yycpzlformData['gdbh'];
+  params.productCode = yycpzlformData['cpdh'];
+  params.option = yycpzlformData['fangan'];
+  console.log(params)
   try {
-    const ProductInformationEditdata = await ProductInformationEdit(params);
+    const ProductInformationEditdata = await WorkOrderDetailListCope(params);
     if (ProductInformationEditdata.code === 0) {
       ElMessage({type: 'success', message: '更新成功'})
+      onyycpzllist.value = false;
     } else {
       ElMessage({type: 'error',message: '更新失败'})
     }
   } catch (error) {
     console.error(error);
   }
-  onyycpzllist.value = false;
 }
 //引用产品资料【放弃】
 const yycpzlhandleCancel = () => {onyycpzllist.value = false;};
@@ -2708,10 +2875,25 @@ DataListdata();
 const tableData = reactive([])
 const _Gd_khdh = ref(null)
 const handleNodeClick = async (node) => {
+  // // 取消所有节点的颜色
+  // const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
+  // allNodes.forEach(node => {
+  //   node.querySelector('.el-tree-node__label').style.color = '';
+  // });
+  // // 获取点击的节点
+  // 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';
+  // }
+
   searchInfo.value = '';
   gytableData.value = [];
   yjtableData.value = [];
-  bomtableData.value = [];
+  bomtableData.value = [];
   jstableData.value = [];
   _Gd_khdh.value = node.label.substring(0, 4);
   _WorkList_page();
@@ -2773,7 +2955,7 @@ const yjtableData = ref([])
 //工艺资料
 const gytableData = ref([])
 //BOM资料
-const bomtableData = ref([])
+const bomtableData = ref([])
 //技术资料附件【暂时为空】
 const jstableData = reactive([])
 //全局调用工单编号
@@ -2790,8 +2972,8 @@ const tableRowClick = async (row) => {
   const workOrderListDetail_data = await workOrderListDetail({Gd_gdbh:_Gd_gdbh.value});
   yjtableData.value = workOrderListDetail_data.data.printList;
   gytableData.value = workOrderListDetail_data.data.processList;
-  bomtableData.value = workOrderListDetail_data.data.BOM;
-  jstableData.splice(0, jstableData.length, ...workOrderListDetail_data.data.jsData);
+  bomtableData.value = workOrderListDetail_data.data.BOM;
+  jstableData.splice(0, jstableData.length, ...workOrderListDetail_data.data.jsData);
   // jstableData.value = workOrderListDetail_data.data.jsData;
   let tmp = yjtableData.value.map(item => item.印件号)
   tmp = tmp.sort((a,b)=>b-a)
@@ -2805,7 +2987,7 @@ const type = ref('')
 let scgdformData = ref({})
 //双击修改
 const updateCompanyFunc = async(row) => {
-  console.log(row['工单编号'])
+  console.log(row)
   // if(row['status'] === '*'){
   //   ElMessage({ type: 'warning', message: '未找到该工单印件资料' });
   //   return false;
@@ -3101,26 +3283,28 @@ const gdzl_MachineList_address = reactive({
 const _cjmc = ref(null);
 //双击修改
 const gdgyupdateCompanyFunc = async(row) => {
-  // gdgyformData['设备编号'] = [];
-  console.log(row);
-  console.log(row['机台编号']);
-  // gdgyformData['设备编号'] = row['机台编号'];
-
   if(row['车间名称']){
     _cjmc.value = row['车间名称']
   }else{
     _cjmc.value = '';
   }
+  gdgyformData['设备编号'] = []
   //通过车间名称查询机台
   const MachineList_jitai = await gdzl_MachineList({address:_cjmc.value});
   if(MachineList_jitai.data === null || MachineList_jitai.data === ''){
     ElMessage({type: 'warning', message: '未找到该车间机台'})
     return false;
   }
-  console.log(MachineList_jitai.data)
-  MachineList_jitai.data.unshift(row['机台编号']);
+  const jitai = row['机台编号'].split(' ')
+  console.log(jitai)
+  jitai.map(item => {
+    MachineList_jitai.data.map(jt => {
+      if (jt.indexOf(item) > -1 && item !== '') {
+        gdgyformData['设备编号'].push(item)
+      }
+    })
+  })
   gdzl_MachineList_address.data = MachineList_jitai.data;
-
   // 示例字符串
   const processName = row['工序名称'];
   // 初始化工艺名称和工序名称
@@ -3385,221 +3569,221 @@ const delgd_delclick = async () => {
   gytableData.value = workOrderListDetail_data.data.processList;
   bomtableData.value = workOrderListDetail_data.data.BOM;
 }
-
+
 //点击技术附件按钮
 const jsfjClick = () => {
 	if(_Gd_gdbh.value == null){
 	  cgugdlist.value = false;
 	  ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
 	}else{
-	  initJsfjformdata();
+	  initJsfjformdata();
 	  jsfjformdata.value.关联编号 = _Gd_gdbh.value
 	  jsfjdialogFormVisible.value = true
 	}
-}
-//技术附件弹窗
-const jsfjdialogFormVisible = ref(false)
-const jsfjformdata = ref({
-	sys_id: '[272/超级用户]',
-	附件备注: '',
-	附件内容: '',
-	附件类型: '',
+}
+//技术附件弹窗
+const jsfjdialogFormVisible = ref(false)
+const jsfjformdata = ref({
+	sys_id: '[272/超级用户]',
+	附件备注: '',
+	附件内容: '',
+	附件类型: '',
 	关联编号: '',
-});
+});
 //技术附件弹窗取消
 const initJsfjformdata = () => {
-  jsfjformdata.value = {
-	sys_id: '[272/超级用户]',
-	附件备注: '',
-	附件内容: '',
-	附件类型: '',
-	关联编号: '',
-  }
-}
+  jsfjformdata.value = {
+	sys_id: '[272/超级用户]',
+	附件备注: '',
+	附件内容: '',
+	附件类型: '',
+	关联编号: '',
+  }
+}
 //技术附件弹窗取消
 const jsfjcloseDialog = () => {
   jsfjdialogFormVisible.value = false
-}
-const uploadExcel = (event) =>{
-	const files = event.target.files;
-	let suffixArr = name.split("."), suffix = suffixArr[suffixArr.length-1];
-	// if(suffix!="xlsx"){
-	// 	alert("Currently only supports the import of xlsx files");
-	// 	return;
-	// }
-	jsfjformdata.value.附件内容 = files[0]
-	jsfjformdata.value.附件类型 = 'XLSX'
-}
-
-const yulan = (event) =>{
-	if(!jsfjformdata.value.附件内容) return
-	$.getScript('/luckysheet/plugins/js/plugin.js', () => {
-			$script('/luckysheet/luckysheet.umd.js', () => {
-			luckyexcelVisible.value = true
-			LuckyExcel.transformExcelToLucky(jsfjformdata.value.附件内容, function(exportJson, luckysheetfile){
-				if(exportJson.sheets==null || exportJson.sheets.length==0){
-					alert("Failed to read the content of the excel file, currently does not support xls files!");
-					return;
-				}
-				if(luckyExcel) luckyExcel.destroy();
-				luckysheet.create({
-					container: 'luckyexcel', //容器的ID
-					data: exportJson.sheets,
-					title: exportJson.info.name, // 工作簿名称
-					lang: "zh", // 设定表格语言 国际化设置,允许设置表格的语言,支持中文("zh")和英文("en")
-					showtoolbar: false, // 是否显示工具栏
-					showinfobar: false, // 是否显示顶部信息栏
-					allowEdit: false, // 是否允许前台编辑
-					enableAddRow: false, // 允许增加行
-					enableAddCol: false, // 允许增加列
-					userInfo: false, // 右上角的用户信息展示样式
-					showRowBar: false, // 是否显示行号区域
-					showColumnBar: false, // 是否显示列号区域
-					sheetFormulaBar: false, // 是否显示公式栏
-					enableAddBackTop: false,//返回头部按钮
-				});
-				luckyExcel = luckysheet;
-			})
-		})
-		})
-		$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/plugins/css/pluginsCss.css'));
-		$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/plugins/plugins.css'));
-		$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/css/luckysheet.css'));
-		$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/assets/iconfont/iconfont.css'));
-	
-}
-const jsfj_del = (row) =>{
-	ElMessageBox.confirm('确定要删除吗?', '提示', {
-	    confirmButtonText: '确定',
-	    cancelButtonText: '取消',
-	    type: 'warning'
-	}).then(() => {
-		gdAnnexDel({'UniqId':row.UniqId,'gdbh':_Gd_gdbh.value}).then(response => {
-			 if(response.code==0){
-				 ElMessage({
-				   type: 'success',
-				   message: '删除成功',
-				 })
-				 
-				 let row = {
-					 '工单编号':_Gd_gdbh.value,
-					 '产品代号':_Gd_cpdh.value,
-					 '产品名称':_Gd_cpmc.value,
-				 }
-				 tableRowClick (row)
-			  }
-		   })
-	})
-	
-}
-
-//技术附件弹窗确定
-const jsfjenterDialog = () => {
-	if(jsfjformdata.value.附件备注==''){
-		ElMessage({
-			type: 'error',
-			message: '请填写附件备注'
-		});
-		return;
-	}
-	if(jsfjformdata.value.附件内容==''){
-		ElMessage({
-			type: 'error',
-			message: '请上传文件'
-		});
-		return;
-	}
-	if(jsfjformdata.value.关联编号==''){
-		ElMessage({
-			type: 'error',
-			message: '请填写关联编号'
-		});
-		return;
-	}
-	
-	let fr = new FileReader();
-	fr.readAsDataURL(jsfjformdata.value.附件内容);
-	fr.onload = function () {
-	  const restoredData = new FormData();
-	  restoredData.append('sys_id', jsfjformdata.value.sys_id);
-	  restoredData.append('附件备注', jsfjformdata.value.附件备注);
-	  restoredData.append('附件内容', fr.result);
-	  restoredData.append('附件类型', jsfjformdata.value.附件类型);
-	  restoredData.append('关联编号', jsfjformdata.value.关联编号);
-			
-	   gdAnnexAdd(restoredData).then(response => {
-		 if(response.code==0){
-			 ElMessage({
-			   type: 'success',
-			   message: '新增成功',
-			 })
-			 jsfjdialogFormVisible.value = false
-			 let row = {
-				 '工单编号':_Gd_gdbh.value,
-				 '产品代号':_Gd_cpdh.value,
-				 '产品名称':_Gd_cpmc.value,
-			 }
-			 tableRowClick (row)
-		 }
-	   })
-	}
-}
-
-//技术资料excel展示
-const ExcelShow = (row) =>{
-	if(!row.附件内容) return
-	$.getScript('/luckysheet/plugins/js/plugin.js', () => {
-		$script('/luckysheet/luckysheet.umd.js', () => {
-					function dataURLtoBlob(dataUrl) {
-					    const byteString = atob(dataUrl.split(',')[1]);
-					    const ab = new ArrayBuffer(byteString.length);
-					    const ia = new Uint8Array(ab);
-					
-					    for (let i = 0; i < byteString.length; i++) {
-					        ia[i] = byteString.charCodeAt(i);
-					    }
-					
-					    return new Blob([ab], { type: 'application/octet-stream' });
-					}
-					
-					const blob = dataURLtoBlob(row.附件内容);
-					luckyexcelVisible.value = true
-					LuckyExcel.transformExcelToLucky(blob, function(exportJson, luckysheetfile){
-						if(exportJson.sheets==null || exportJson.sheets.length==0){
-							alert("Failed to read the content of the excel file, currently does not support xls files!");
-							return;
-						}
-						if(luckyExcel) luckyExcel.destroy();
-						luckysheet.create({
-							container: 'luckyexcel', //容器的ID
-							data: exportJson.sheets,
-							title: exportJson.info.name, // 工作簿名称
-							lang: "zh", // 设定表格语言 国际化设置,允许设置表格的语言,支持中文("zh")和英文("en")
-							showtoolbar: false, // 是否显示工具栏
-							showinfobar: false, // 是否显示顶部信息栏
-							allowEdit: false, // 是否允许前台编辑
-							enableAddRow: false, // 允许增加行
-							enableAddCol: false, // 允许增加列
-							userInfo: false, // 右上角的用户信息展示样式
-							showRowBar: false, // 是否显示行号区域
-							showColumnBar: false, // 是否显示列号区域
-							sheetFormulaBar: false, // 是否显示公式栏
-							enableAddBackTop: false,//返回头部按钮
-						});
-						luckyExcel = luckysheet;
-					})
-		})
-	})
-	$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/plugins/css/pluginsCss.css'));
-	$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/plugins/plugins.css'));
-	$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/css/luckysheet.css'));
-	$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/assets/iconfont/iconfont.css'));
-	
-}
-
-let luckyExcel = null
-
-const luckyexcelVisible = ref(false)
+}
+const uploadExcel = (event) =>{
+	const files = event.target.files;
+	let suffixArr = name.split("."), suffix = suffixArr[suffixArr.length-1];
+	// if(suffix!="xlsx"){
+	// 	alert("Currently only supports the import of xlsx files");
+	// 	return;
+	// }
+	jsfjformdata.value.附件内容 = files[0]
+	jsfjformdata.value.附件类型 = 'XLSX'
+}
+
+const yulan = (event) =>{
+	if(!jsfjformdata.value.附件内容) return
+	$.getScript('/luckysheet/plugins/js/plugin.js', () => {
+			$script('/luckysheet/luckysheet.umd.js', () => {
+			luckyexcelVisible.value = true
+			LuckyExcel.transformExcelToLucky(jsfjformdata.value.附件内容, function(exportJson, luckysheetfile){
+				if(exportJson.sheets==null || exportJson.sheets.length==0){
+					alert("Failed to read the content of the excel file, currently does not support xls files!");
+					return;
+				}
+				if(luckyExcel) luckyExcel.destroy();
+				luckysheet.create({
+					container: 'luckyexcel', //容器的ID
+					data: exportJson.sheets,
+					title: exportJson.info.name, // 工作簿名称
+					lang: "zh", // 设定表格语言 国际化设置,允许设置表格的语言,支持中文("zh")和英文("en")
+					showtoolbar: false, // 是否显示工具栏
+					showinfobar: false, // 是否显示顶部信息栏
+					allowEdit: false, // 是否允许前台编辑
+					enableAddRow: false, // 允许增加行
+					enableAddCol: false, // 允许增加列
+					userInfo: false, // 右上角的用户信息展示样式
+					showRowBar: false, // 是否显示行号区域
+					showColumnBar: false, // 是否显示列号区域
+					sheetFormulaBar: false, // 是否显示公式栏
+					enableAddBackTop: false,//返回头部按钮
+				});
+				luckyExcel = luckysheet;
+			})
+		})
+		})
+		$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/plugins/css/pluginsCss.css'));
+		$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/plugins/plugins.css'));
+		$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/css/luckysheet.css'));
+		$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/assets/iconfont/iconfont.css'));
+
+}
+const jsfj_del = (row) =>{
+	ElMessageBox.confirm('确定要删除吗?', '提示', {
+	    confirmButtonText: '确定',
+	    cancelButtonText: '取消',
+	    type: 'warning'
+	}).then(() => {
+		gdAnnexDel({'UniqId':row.UniqId,'gdbh':_Gd_gdbh.value}).then(response => {
+			 if(response.code==0){
+				 ElMessage({
+				   type: 'success',
+				   message: '删除成功',
+				 })
+
+				 let row = {
+					 '工单编号':_Gd_gdbh.value,
+					 '产品代号':_Gd_cpdh.value,
+					 '产品名称':_Gd_cpmc.value,
+				 }
+				 tableRowClick (row)
+			  }
+		   })
+	})
+
+}
+
+//技术附件弹窗确定
+const jsfjenterDialog = () => {
+	if(jsfjformdata.value.附件备注==''){
+		ElMessage({
+			type: 'error',
+			message: '请填写附件备注'
+		});
+		return;
+	}
+	if(jsfjformdata.value.附件内容==''){
+		ElMessage({
+			type: 'error',
+			message: '请上传文件'
+		});
+		return;
+	}
+	if(jsfjformdata.value.关联编号==''){
+		ElMessage({
+			type: 'error',
+			message: '请填写关联编号'
+		});
+		return;
+	}
+
+	let fr = new FileReader();
+	fr.readAsDataURL(jsfjformdata.value.附件内容);
+	fr.onload = function () {
+	  const restoredData = new FormData();
+	  restoredData.append('sys_id', jsfjformdata.value.sys_id);
+	  restoredData.append('附件备注', jsfjformdata.value.附件备注);
+	  restoredData.append('附件内容', fr.result);
+	  restoredData.append('附件类型', jsfjformdata.value.附件类型);
+	  restoredData.append('关联编号', jsfjformdata.value.关联编号);
+
+	   gdAnnexAdd(restoredData).then(response => {
+		 if(response.code==0){
+			 ElMessage({
+			   type: 'success',
+			   message: '新增成功',
+			 })
+			 jsfjdialogFormVisible.value = false
+			 let row = {
+				 '工单编号':_Gd_gdbh.value,
+				 '产品代号':_Gd_cpdh.value,
+				 '产品名称':_Gd_cpmc.value,
+			 }
+			 tableRowClick (row)
+		 }
+	   })
+	}
+}
+
+//技术资料excel展示
+const ExcelShow = (row) =>{
+	if(!row.附件内容) return
+	$.getScript('/luckysheet/plugins/js/plugin.js', () => {
+		$script('/luckysheet/luckysheet.umd.js', () => {
+					function dataURLtoBlob(dataUrl) {
+					    const byteString = atob(dataUrl.split(',')[1]);
+					    const ab = new ArrayBuffer(byteString.length);
+					    const ia = new Uint8Array(ab);
+
+					    for (let i = 0; i < byteString.length; i++) {
+					        ia[i] = byteString.charCodeAt(i);
+					    }
+
+					    return new Blob([ab], { type: 'application/octet-stream' });
+					}
+
+					const blob = dataURLtoBlob(row.附件内容);
+					luckyexcelVisible.value = true
+					LuckyExcel.transformExcelToLucky(blob, function(exportJson, luckysheetfile){
+						if(exportJson.sheets==null || exportJson.sheets.length==0){
+							alert("Failed to read the content of the excel file, currently does not support xls files!");
+							return;
+						}
+						if(luckyExcel) luckyExcel.destroy();
+						luckysheet.create({
+							container: 'luckyexcel', //容器的ID
+							data: exportJson.sheets,
+							title: exportJson.info.name, // 工作簿名称
+							lang: "zh", // 设定表格语言 国际化设置,允许设置表格的语言,支持中文("zh")和英文("en")
+							showtoolbar: false, // 是否显示工具栏
+							showinfobar: false, // 是否显示顶部信息栏
+							allowEdit: false, // 是否允许前台编辑
+							enableAddRow: false, // 允许增加行
+							enableAddCol: false, // 允许增加列
+							userInfo: false, // 右上角的用户信息展示样式
+							showRowBar: false, // 是否显示行号区域
+							showColumnBar: false, // 是否显示列号区域
+							sheetFormulaBar: false, // 是否显示公式栏
+							enableAddBackTop: false,//返回头部按钮
+						});
+						luckyExcel = luckysheet;
+					})
+		})
+	})
+	$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/plugins/css/pluginsCss.css'));
+	$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/plugins/plugins.css'));
+	$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/css/luckysheet.css'));
+	$('head').append($('<link rel="stylesheet" type="text/css" />').attr('href', '/luckysheet/assets/iconfont/iconfont.css'));
+
+}
+
+let luckyExcel = null
+
+const luckyexcelVisible = ref(false)
 const luckyexcelCloseDialog = () => {
   luckyexcelVisible.value = false
 }

File diff suppressed because it is too large
+ 482 - 164
src/view/yunyin/shengchanguanli/shebeiyunxing.vue


Some files were not shown because too many files changed in this diff