Эх сурвалжийг харах

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

曹鹤洋 1 жил өмнө
parent
commit
1ba0025f85

+ 8 - 0
src/api/mes_api_gty/myapi.js

@@ -99,4 +99,12 @@ export const getOrderVerificationTable = (params) => {
     params
   })
 }
+//定额代号
+export const  getDedh= (params) => {
+  return service({
+    url:'/mes_server/packaging_count_document/getDedh',
+    method: 'get',
+    params
+  })
+}
 

+ 8 - 1
src/api/mes_api_gty/otherDocuments.js

@@ -37,7 +37,14 @@ export const getOtherInfo = (params) => {
     params
   })
 }
-
+// 获取员工姓名
+export const getYg = (params) => {
+  return service({
+    url: '/mes_server/packaging_count_document/getYg',
+    method: 'get',
+    params
+  })
+}
 // 拉料计件产量维护修改
 export const updateData = (data) => {
   return service({

+ 25 - 1
src/api/yunyin/yunying.js

@@ -451,6 +451,30 @@ export const ProductCodeList  = (params) => {
         params
     })
 }
+//新增工单->工单添加
+export const WorkOrderAdd  = (data) => {
+    return service({
+        url: '/mes_server/work_order/WorkOrderAdd',
+        method: 'post',
+        data
+    })
+}
+//打印作业通知单->工单印件及工序列表
+export const PrintCodeList  = (params) => {
+    return service({
+        url: '/mes_server/work_order/PrintCodeList',
+        method: 'get',
+        params
+    })
+}
+//打印作业通知单->工艺编号获取
+export const ProcessCodeList  = (params) => {
+    return service({
+        url: '/mes_server/work_order/ProcessCodeList',
+        method: 'get',
+        params
+    })
+}
 
 
 /**工单生产排单(排产管理)*/
@@ -712,4 +736,4 @@ export const getOrderProcessRight = (params) => {
         method: 'get',
         params
     })
-}
+}

+ 84 - 12
src/view/performance/06-packingDocuments/index.vue

@@ -144,10 +144,16 @@
                 />
               </el-form-item>
               <el-form-item label="组别">
-                <el-input
+                <!-- <el-input
                   v-model="detailData.sczl_bzdh"
                   style="width: 50px;"
-                />
+                /> -->
+				<el-select v-model="detailData.sczl_bzdh" placeholder="" style="width: 70px" 
+				           
+				>
+				  <el-option label="A班" value="A班"></el-option>
+				  <el-option label="B班" value="B班"></el-option>
+				</el-select>
               </el-form-item>
               <br>
               <el-form-item
@@ -160,10 +166,16 @@
                 />
               </el-form-item>
               <el-form-item label="冲月定额">
-                <el-input
+                <!-- <el-input
                   v-model="detailData.sczl_冲定额"
                   style="width: 50px;"
-                />
+                /> -->
+				<el-select v-model="detailData.sczl_冲定额" placeholder="" style="width: 70px"
+				           
+				>
+				  <el-option label="" value=""></el-option>
+				  <el-option label="是" value="B班"></el-option>
+				</el-select>
               </el-form-item>
 
               <el-table
@@ -262,7 +274,7 @@
                   width="100"
                 >
                   <template #default="{ row }">
-                    <el-input v-model="row.sczl_dedh" />
+                    <el-input v-model="row.sczl_dedh" @keyup.enter.native="getDedhsubmit" />
                   </template>
                 </el-table-column>
               </el-table>
@@ -334,7 +346,7 @@
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { Download, Search, Delete } from '@element-plus/icons-vue'
 import { reactive, ref } from 'vue'
-import { getGxMc, getInfo, getLocate, getPackingSideTable, getPackingTable, updatePackingTable, getYg, DeletePackingTable, addPackingTable } from '@/api/mes_api_gty/myapi'
+import { getGxMc, getInfo, getLocate, getPackingSideTable, getPackingTable, updatePackingTable, getYg, DeletePackingTable, addPackingTable,getDedh } from '@/api/mes_api_gty/myapi'
 
 defineOptions({
   name: '06PackingDocuments',
@@ -396,7 +408,7 @@ const type = ref('')
 const searchInfo = ref('')
 const currentRow = ref({})
 const multipleSelection = ref([])
-
+const minUniqId = ref('')
 // 获取列表数据
 const getTableData = async() => {
   try {
@@ -404,10 +416,18 @@ const getTableData = async() => {
       date: params.date, sys_id: params.sys_id,
       page: page.value.toString(), limit: limit.value.toString(),
     })
-    if (response.code === 0) {
-      total.value = response.data.total
-      tableData.splice(0, tableData.length, ...response.data.rows)
-    }
+   if (response.code === 0) {
+         total.value = response.data.total;
+         // 清空原有数据并填充新数据
+         tableData.splice(0, tableData.length, ...response.data.rows);
+   
+         // 获取最大的 UniqId
+        minUniqId.value= Math.min(...tableData.map(row => row.UniqId));
+         console.log('最小的 UniqId:', minUniqId.value);
+       } else {
+         console.error('获取数据失败:', response.msg);
+       }
+	
   } catch (e) {
     console.log(e)
   }
@@ -636,7 +656,44 @@ const updateDetailData = async() => {
 // 新增数据
 const handleShowAdd = () => {
   type.value = '新增'
-  getTableInfo(currentRow.value?.UniqId)
+  getTableInfo2(minUniqId.value)
+}
+// 获取详细信息
+const getTableInfo2 = async(id) => {
+  try {
+    const response = await getInfo({ UniqId: id })
+    if (response.code === 0) {
+      const { sczl_bh, name, sczl_bzdh, sczl_jsss, sczl_冲定额, sczl_desc, ...rest } = response.data
+      // 直接赋值基础属性
+	  let sczl_rq = new Date();
+	  console.log(sczl_rq);
+	  sczl_rq.setDate(sczl_rq.getDate() - 1); // 今天的前N天的日期,N自定义
+	  sczl_rq = sczl_rq.getFullYear() + '-' + (sczl_rq.getMonth() + 1) + '-' + sczl_rq.getDate();
+	  console.log(sczl_rq);
+      Object.assign(detailData, { sczl_rq, sczl_bh, name, sczl_bzdh, sczl_jsss, sczl_冲定额, sczl_desc })
+      // 生成表格数据
+      detailData.table = Array.from({ length: 6 }, (_, i) => i + 1) // 创建一个长度为6的数组 [1, 2, 3, 4, 5, 6]
+        .map(num => {
+          return {
+            sczl_gdbh: rest[`sczl_gdbh${num}`],
+            sczl_yjGx: rest[`sczl_yjGx${num}`],
+            sczl_gxmc: rest[`sczl_gxmc${num}`],
+            Gd_cpmc: rest[`Gd_cpmc${num}`],
+            sczl_cl: rest[`sczl_cl${num}`],
+            sczl_返工产量: rest[`sczl_返工产量${num}`],
+            sczl_PgCl: rest[`sczl_PgCl${num}`],
+            sczl_计产系数: rest[`sczl_计产系数${num}`],
+            sczl_Jtbh1: rest[`sczl_Jtbh${num}`],
+            sczl_dedh: rest[`sczl_dedh${num}`],
+          }
+        })
+        // .filter(item => item.sczl_gdbh !== '') // 过滤掉空的工单编号
+      detailData.UniqId = id
+      dialogFormVisible.value = true
+    }
+  } catch (e) {
+    console.log(e)
+  }
 }
 const addDetailData = async() => {
   const restoredData = {
@@ -671,6 +728,8 @@ const addDetailData = async() => {
       message: '新增成功',
     })
     dialogFormVisible.value = false
+	getTableData()
+	getSideData()
   }
 }
 
@@ -714,7 +773,20 @@ const enterDialog = () => {
     addDetailData()
   }
 }
+//定额代号回车事件
+const getDedhsubmit = () => {
+
+	 GetDedh()
+}
+//获取定额代号
+const GetDedh = async (value) => {
+  const response = await getDedh();
 
+  if(response.code==0){
+	  
+ }
+
+}
 // 导出excel
 function handleExportExcel() {
   console.log('导出到excel')

+ 51 - 13
src/view/performance/07-otherDocuments/index.vue

@@ -135,10 +135,19 @@
               <el-form-item
                 label="工序类别"
               >
-                <el-input
+                <!-- <el-input
                   v-model="detailData.sczl_Type"
                   style="width: 150px"
-                />
+                /> -->
+				<el-select v-model="detailData.sczl_Type" placeholder="" style="width: 180px"
+				           
+				>
+				  <el-option label="拆片" value="拆片"></el-option>
+				  <el-option label="包装" value="包装"></el-option>
+				  <el-option label="打包" value="打包"></el-option>
+				  <el-option label="拉料" value="拉料"></el-option>
+				  <
+				</el-select>
               </el-form-item>
 
               <el-form-item
@@ -168,10 +177,30 @@
               <el-form-item
                 label="工艺流程"
               >
-                <el-input
+               <!-- <el-input
                   v-model="detailData.image"
                   style="width: 300px"
-                />
+                /> -->
+				<el-select v-model="detailData.image" placeholder="" style="width: 180px"
+				           
+				>
+				  <el-option label="01-01-光边" value="01-01-光边"></el-option>
+				  <el-option label="01-02-胶印" value="01-02-胶印"></el-option>
+				  <el-option label="01-04-圆+五角星" value="01-04-圆+五角星"></el-option>
+				  <el-option label="01-05-磨砂" value="01-05-磨砂"></el-option>
+				  <el-option label="01-06-凹切" value="01-06-凹切"></el-option>
+				  <el-option label="01-30-拆片" value="01-30-拆片"></el-option>
+				  <el-option label="01-31-未机检前" value="01-31-未机检前"></el-option>
+				  <el-option label="01-35-机检(初检)" value="01-35-机检(初检)"></el-option>
+				  <el-option label="01-36-首次机检后" value="01-36-首次机检后"></el-option>
+				  <el-option label="01-37-次品检" value="01-37-次品检"></el-option>
+				  <el-option label="01-41-二次机检" value="01-41-二次机检"></el-option>
+				  <el-option label="01-45-二次机检后" value="01-45-二次机检后"></el-option>
+				  <el-option label="01-51-废挑正" value="01-51-废挑正"></el-option>
+				  <el-option label="01-61-抽检" value="01-61-抽检"></el-option>
+				  <el-option label="01-65-核检" value="01-65-核检"></el-option>
+				  <el-option label="01-71-包装" value="01-71-包装"></el-option>
+				</el-select>
                 <el-input
                   v-model="detailData.image"
                   style="width: 100px; margin-left: 5px"
@@ -247,7 +276,7 @@ import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDow
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { Search, Refresh, Download } from '@element-plus/icons-vue'
 import { ref, reactive, onMounted, onBeforeMount } from 'vue'
-import { getSide, getTable, getInfo, getOtherInfo, updateData,add } from '@/api/mes_api_gty/otherDocuments'
+import { getSide, getTable, getInfo, getOtherInfo, updateData,add,getYg } from '@/api/mes_api_gty/otherDocuments'
 
 defineOptions({
   name: '07OtherDocuments'
@@ -311,18 +340,26 @@ const params = {
   page: page.value.toString(),
   limit: limit.value.toString(),
 }
-
+const minUniqId = ref('')
 // 获取表格数据
 const getTableData = async() => {
   try {
     const response = await getTable(params)
     if (response.code === 0) {
-      total.value = response.data.total
-      tableData.splice(0, tableData.length, ...response.data.rows)
+           total.value = response.data.total;
+           // 清空原有数据并填充新数据
+           tableData.splice(0, tableData.length, ...response.data.rows);
+     
+           // 获取最大的 UniqId
+          minUniqId.value= Math.min(...tableData.map(row => row.UniqId));
+           console.log('最小的 UniqId:', minUniqId.value);
+         } else {
+           console.error('获取数据失败:', response.msg);
+         }
+    	
+    } catch (e) {
+      console.log(e)
     }
-  } catch (e) {
-    console.log(e)
-  }
 }
 
 // 分页设置
@@ -377,9 +414,10 @@ const handleShowDetail = () => {
   dialogFormVisible.value = true
 }
 const handleYgbhEnter = async() => {
-  const res = await getOtherInfo({ Sczl_bh1: detailData.Sczl_bh1 })
+  const res = await getYg({ sczl_bh: detailData.Sczl_bh1 })
+  console.log(detailData.Sczl_bh1)
   if (res.code === 0) {
-    detailData.name = res.data.name
+    detailData.name = res.data.ygxm
   }
 }
 

+ 7 - 4
src/view/performance/Dayreports.vue

@@ -697,7 +697,8 @@ const handleCurrentChange = (val) => {
       break
     default:
       break
-  }
+  }
+ 
 }
 
 //定位
@@ -707,7 +708,7 @@ const GetLocate = async () => {
     page: page.value.toString(), limit: limit.value.toString(),
   })
   if (response.code === 0) {
-	 
+	 console.log(response)
     const processedData = response.data.rows.map(item => {
       return {
         ...item,
@@ -733,8 +734,10 @@ const handleNodeClick = (node,check) => {
   //存放当前节点的nodeId
  if (node.params) {
    params.date = node.params.date;
-   params.sys_id = node.params.sys_id;
-   total.value = node.params.total;
+   params.sys_id = node.params.sys_id;
+   params.type = 'getTableData'
+   total.value = node.params.total;
+   page.value = 1
    getTableData();
  }
 }

+ 3 - 3
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -318,7 +318,7 @@
                 <el-table ref="multipleTable" :show-overflow-tooltip="true" :row-style="{ height: '20px' }"
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                           :header-cell-style="{ padding: '0px' }" highlight-current-row="true"
-                          style="width: 100%;height: 50vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
+                          style="width: 100%;height: 45vh" border tooltip-effect="dark" :data="gytableData" row-key="ID" @selection-change="handleSelectionChange">
                   <el-table-column align="left" label="工单编号" prop="工单编号"  width="90"/>
                   <el-table-column align="left" label="重点工序" prop="重点工序"  width="90"/>
                   <el-table-column align="left" label="印件工序及名称" prop="印件工序及名称"  width="500"/>
@@ -341,7 +341,7 @@
                           :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                           :header-cell-style="{ padding: '0px' }" :show-overflow-tooltip="true"
                           :highlight-current-row="true"
-                          style="width: 100%;height: 50vh" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
+                          style="width: 100%;height: 45vh" border tooltip-effect="dark" :data="yjtableData" row-key="ID" @selection-change="handleSelectionChange">
                   <el-table-column align="left" label="工单编号" prop="工单编号"  width="90"/>
                   <el-table-column align="left" label="印件号" prop="印件号"  width="70"/>
                   <el-table-column align="left" label="印件代号" prop="印件代号"  width="100"/>
@@ -369,7 +369,7 @@
                         :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                         :header-cell-style="{ padding: '0px' }" :highlight-current-row="true"
                         :cell-class-name="pczc_planUsageCellClass"
-                        style="width: 100%;height: 50vh" border tooltip-effect="dark" :data="bottomData" row-key="ID" @selection-change="handleSelectionChange">
+                        style="width: 100%;height: 45vh" border tooltip-effect="dark" :data="bottomData" row-key="ID" @selection-change="handleSelectionChange">
                 <template v-for="item in bottomTableF[currentNode]">
                   <el-table-column :align="item.align" :label="item.title" :prop="item.prop" :width="item.width" />
                 </template>

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 278 - 102
src/view/yunyin/shengchanguanli/gongdanziliao.vue


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно