zck 4 months ago
parent
commit
0b3c3b0482

+ 18 - 0
src/api/mes/job.js

@@ -800,6 +800,24 @@ export const getPPDetaiDel = (params) => {
   }) 
 }
 
+//印版管理->印版管理报废印版左侧菜单
+export const getPrintDateList = (params) => {
+  return service({
+    url: '/mes_server/Printing_Plate/getPrintDateList',
+    method: 'get',
+    params
+  }) 
+}
+
+//印版管理->获取报废印版资料
+export const getPrintdata = (params) => {
+  return service({
+    url: '/mes_server/Printing_Plate/getPrintdata',
+    method: 'get',
+    params
+  }) 
+}
+
 
 
 //电化铝领用记录->左侧菜单

+ 38 - 0
src/api/yunyin/yunying.js

@@ -810,6 +810,44 @@ export const ProductgetCouplet = (params) => {
     })
 }
 
+//查询糊盒标准工单
+export const HuheWorkOrderSearch = (params) => {
+    return service({
+        url: '/mes_server/work_order/HuheWorkOrderSearch',
+        method: 'get',
+        params
+    })
+}
+
+//复制糊盒工单
+export const HuheWorkOrderCopy = (params) => {
+    return service({
+        url: '/mes_server/work_order/HuheWorkOrderCopy',
+        method: 'get',
+        params
+    })
+}
+
+//糊盒标准工单左侧菜单栏
+export const HuheDataList = (params) => {
+    return service({
+        url: '/mes_server/work_order/HuheDataList',
+        method: 'get',
+        params
+    })
+}
+
+//糊盒标准工单列表
+export const HuheWorkList = (params) => {
+    return service({
+        url: '/mes_server/work_order/HuheWorkList',
+        method: 'get',
+        params
+    })
+}
+
+
+
 //产品工艺排序
 export const ProductYgSort = (params) => {
     return service({

+ 3 - 1
src/view/job/processSheet/BoxprocessSheet.vue

@@ -336,7 +336,9 @@ for (let i = start; i <= end; i++) {
         }))
       };
       console.log("执行打印:", currentIndex);
-      hiprintTemplate.print2(printdata);
+	  console.log(printdata)
+	  return;
+    //   hiprintTemplate.print2(printdata);
     }, delay);
   })(i, i - start + 1);  // 传入 currentIndex 和 relativeIndex
 }

+ 269 - 0
src/view/performance/12-orderAccounting/componets/xzgdlx.vue

@@ -0,0 +1,269 @@
+<template>
+  <el-dialog
+    :model-value="modelValue"
+    :title="`修正工单类型`"
+    fullscreen
+    :before-close="()=>{emits('update:modelValue', false )}"
+  >
+    <el-button
+      type="primary"
+      style="width:80px; height: 40px;margin-bottom: 20px"
+      @click="handleUpdate"
+    >更新</el-button>
+
+    <el-button
+      type="primary"
+      style="width:80px; height: 40px;margin-bottom: 20px"
+      @click="handleSearch"
+    >定位</el-button>
+
+    <!-- <el-button
+      type="success"
+      style="width:80px; height: 40px;margin-bottom: 20px"
+      @click="handlecreate"
+    >新增</el-button>
+
+    <el-button
+      type="primary"
+      style="width:80px; height: 40px;margin-bottom: 20px"
+      @click="oncreate"
+    >保存</el-button> -->
+
+    <el-button
+      type="primary"
+      style="width:80px; height: 40px;margin-bottom: 20px"
+      @click="emits('update:modelValue', false )"
+    >退出</el-button>
+
+    <el-table
+      ref="table"
+      highlight-current-row
+      show-overflow-tooltip
+      border
+      :data="tableData"
+      :row-style="{ height: '25px' }"
+      :cell-style="{ padding: '0px' }"
+      :header-row-style="{ height: '20px' }"
+      :header-cell-style="{ padding: '0px' }"
+      style="width: 100%;height: 75vh;"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column
+        type="selection"
+        width="55"
+      />
+      <el-table-column
+        label="工单编号"
+        prop="Yj_gdbh"
+        width="100"
+      />
+      <el-table-column
+        label="印件号"
+        prop="yj_Yjno"
+        width="73"
+      />
+      <el-table-column
+        label="印件代号"
+        prop="yj_Yjdh"
+        width="140"
+      />
+      <el-table-column
+        label="印件名称"
+        prop="yj_yjmc"
+        width="300"
+      />
+      <el-table-column
+  label="工单类型"
+  prop="工单类型"
+  width="150"
+>
+  <template #default="{ row }">
+    <el-select v-model="row['工单类型']">
+      <el-option label="国外" value="国外" />
+      <el-option label="国内" value="国内" />
+      <el-option label="不结算" value="不结算" />
+    </el-select>
+  </template>
+</el-table-column>
+    </el-table>
+
+  </el-dialog>
+
+</template>
+
+<script>
+export default {
+  name: 'Xzgdtl',
+}
+import service from '@/utils/request'
+
+// 获取工单类型
+const getWorkorderStatus = (params) => {
+  return service({
+    url: '/mes_server/order_super_loss/getWorkorderStatus',
+    method: 'get',
+    params
+  })
+}
+
+// 修改工单类型
+const updateWorkorderStatus = (params) => {
+  return service({
+    url: '/mes_server/order_super_loss/updateWorkorderStatus',
+    method: 'get',
+    params
+  })
+}
+
+</script>
+
+<script setup>
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { watch, ref, reactive, defineProps, defineEmits, onBeforeUnmount } from 'vue'
+import { useUserStore } from '@/pinia/modules/user'
+const userStore = useUserStore()
+const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
+
+const props = defineProps(['modelValue', 'gdbh','yjno'])
+const emits = defineEmits(['update:modelValue','update-data'])
+const tableData = ref([])
+const table = ref(null)
+const multipleSelection = ref([])
+const getTable = async() => {
+  let params
+  if (props?.['gdbh']) {
+    const { gdbh,yjno } = props
+    params = {
+      workorder: gdbh,
+      yjno: yjno,
+    }
+  } else {
+    return
+  }
+  const res = await getWorkorderStatus(params)
+  if (res.code === 0) {
+      tableData.value = [res.data]
+    }
+  console.log(tableData.value)
+}
+getTable()
+
+const handleSelectionChange = (val) => {
+  multipleSelection.value = val
+  console.log(multipleSelection.value)
+}
+
+const handleSearch = () => {
+  ElMessageBox.prompt('输入工单编号', '定位', {
+    confirmButtonText: '确认',
+    cancelButtonText: '取消',
+  })
+    .then(({ value }) => {
+      console.log(value)
+      if (!value) {
+        getTable()
+      } else {
+        tableData.value = tableData.value.filter(item => {
+          return item['Gd_gdbh'] === value ?? item
+        })
+      }
+      ElMessage({
+        type: 'success',
+        message: '定位',
+      })
+    })
+    .catch(() => {
+      ElMessage({
+        type: 'info',
+        message: '取消',
+      })
+    })
+}
+
+const handleUpdate = async() => {
+  console.log(multipleSelection.value)
+  if (multipleSelection.value.length === 0) {
+    ElMessage({
+      type: 'error',
+      message: '未选择行',
+    })
+    return
+  }
+  const params = ({
+    workorder: multipleSelection.value[0]['Yj_gdbh'],
+    yjno: multipleSelection.value[0]['yj_Yjno'],
+    status: multipleSelection.value[0]['工单类型'],
+  })
+  console.log(params)
+  const res = await updateWorkorderStatus(params)
+  if (res['code'] === 0) {
+    ElMessage({
+      type: 'success',
+      message: '更新成功',
+    })
+    emits('update-data', false);
+  }
+}
+
+// const Iscreate = ref(false)
+// const handlecreate = async() => {
+//   console.log(tableData.value.length)
+//   if (tableData.value.length != 0) {
+//     ElMessage({
+//       type: 'error',
+//       message: '已有投料记录,无法新增',
+//     })
+//     return
+//   }else{
+//     const res = await getFeedList({
+//     workorder: props?.['gdbh'],
+//     yjno: props?.['yjno'],
+//   })
+//   if (res.code === 0) {
+//     tableData.value = res.data.map(item => ({
+//       ...item,
+//       单位: item.BOM_投料单位 || '张'  // 设置默认值
+//     }))
+//   }
+//   Iscreate.value = true
+// }
+// }
+// const oncreate = async() => {
+//   if(!Iscreate.value){
+//     ElMessage({
+//       type: 'error',
+//       message: '请先新增投料记录',
+//     })
+//     return
+//   }
+//   if (tableData.value[0]['实际投料'] === undefined) {
+//     ElMessage({
+//       type: 'error',
+//       message: '未输入投料数量',
+//     })
+//     return
+//   }else{const params = {
+//       st_gdbh: tableData.value[0]['Gd_gdbh'],
+//       st_wlbh: tableData.value[0]['yj_zzdh'],
+//       st_sl: tableData.value[0]['实际投料'],
+//       st_dw:tableData.value[0]['单位'],
+//       sys_id:userStore.userInfo.nickName,
+//       cpdh:tableData.value[0]['yj_yjdh'],
+//     }
+//     console.log(params)
+//     const res = await feedAdd(params)
+//     if (res['code'] === 0) {
+//       ElMessage({
+//         type: 'success',
+//         message: '新增成功',
+//       })
+//       emits('update-data', false);
+//     }
+//     }
+    
+// }
+</script>
+
+<style scoped>
+
+</style>

+ 7 - 0
src/view/performance/12-orderAccounting/index.vue

@@ -15,6 +15,7 @@
                
               <el-button type="primary" icon="edit" class="bt" @click="dialogKhszclick">考核设置</el-button>
               <el-button type="primary" icon="edit" class="bt"@click=" () => { dialogXzgdtl = true; }">修正工单投料</el-button>
+              <el-button type="primary" icon="edit" class="bt"@click=" () => { dialogXzgdlx = true; }">修正工单类型</el-button>
               <el-button type="primary" icon="edit" class="bt"@click=" () => { dialogGxclhc = true;}">工序产量核查</el-button>
               <el-button type="primary" icon="edit"class="bt"@click="() => {dialogGdzjfptj = true;}">工单质检废品统计</el-button>
               <el-button type="primary" icon="edit" class="bt"@click="() => {dialogHjfpfb = true;}">核检废品分布</el-button>
@@ -117,6 +118,9 @@
             <!-- 修正工单投料 -->
             <Xzgdtl v-if="dialogXzgdtl" v-model="dialogXzgdtl" @update-data = "exitXzgdtl" :gdbh="gdbh" :yjno="yjno"/>
 
+            <!-- 修正工单类型 -->
+            <Xzgdlx v-if="dialogXzgdlx" v-model="dialogXzgdlx" @update-data = "exitXzgdlx" :gdbh="gdbh" :yjno="yjno"/>
+
             <!-- 工序产量核查 -->
             <Gxclhc v-if="dialogGxclhc"  v-model="dialogGxclhc"
               :gdbh="gdbh" :jjcp_yjno = "jjcp_yjno"
@@ -368,6 +372,7 @@ import {
 import {hiprint} from "vue-plugin-hiprint";
 import Gdcjstj from '@/view/performance/12-orderAccounting/componets/gdcjstj.vue'
 import Xzgdtl from '@/view/performance/12-orderAccounting/componets/xzgdtl.vue'
+import Xzgdlx from '@/view/performance/12-orderAccounting/componets/xzgdlx.vue'
 import Gxclhc from '@/view/performance/12-orderAccounting/componets/gxclhc.vue'
 import Gongdanzhijianfeipintongji from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
 import Detail from '@/view/performance/12-orderAccounting/componets/detail.vue'
@@ -402,6 +407,7 @@ const dialogGdcjstj = ref(false)
 const dialogDetail = ref(false)
 // const dialogKhsz = ref(false)
 const dialogXzgdtl = ref(false)
+const dialogXzgdlx = ref(false)
 const dialogGxclhc = ref(false)
 const dialogGdzjfptj = ref(false)
 const dialogHjfpfb = ref(false)
@@ -513,6 +519,7 @@ const tableCols1 = [
   // { label: '超损工单', prop: 'csgd', width: '110' ,sortable:'sortable'},
   { label: '工单编号', prop: 'Gd_gdbh', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
   { label: '参与考核', prop: '考核', width: '110' ,sortable:'sortable'},
+  { label: '工单类型', prop: '工单类型', width: '70'},
   { label: '印件号', prop: 'jjcp_yjno', width: '70'},
   { label: '联数', prop: 'yj_ls', width: '70'},
   { label: '产品代号', prop: '成品编码', width: '110' ,sortable:'sortable'},