Jelajahi Sumber

超节损优化

zck 1 tahun lalu
induk
melakukan
3b06024031

+ 14 - 22
src/view/performance/12-orderAccounting/componets/gxclhc.vue

@@ -1,24 +1,11 @@
 <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="emits('update:modelValue', false )"
-    >退出</el-button>
+  <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="emits('update:modelValue', false )">退出</el-button>
 
     <el-form inline>
       <el-form-item label="工单编号">
-        <el-input
-          v-model="input"
-          style="width: 100px"
-          @keyup.enter="handleGetTable"
-          placeholder="Enter回车"
-        />
+        <el-input v-model="input" style="width: 100px" @keyup.enter="handleGetTable"  placeholder="Enter回车" />
+        <el-input v-model="jjcp_yjno" style="width: 100px" @keyup.enter="handleGetTable"  placeholder="Enter回车" />
         <el-input
           v-model="cpmc"
           class="cpmc"
@@ -59,7 +46,7 @@
         <el-table-column
           label="折算车头产量"
           width="120"
-          prop=""
+          prop="折算车头产量"
         />
 
         <el-table-column
@@ -70,7 +57,7 @@
         <el-table-column
           label="制程废品"
           width="120"
-          prop=""
+          prop="sczl_zcfp"
         />
         <el-table-column
           label="制程废品率"
@@ -138,18 +125,23 @@ const getGxMc = (params) => {
 <script setup>
 import { watch, ref, reactive, defineProps, defineEmits, onBeforeUnmount } from 'vue'
 
-const props = defineProps(['modelValue', 'gdbh'])
+const props = defineProps(['modelValue', 'gdbh','jjcp_yjno'])
+console.log(props)
 const emits = defineEmits(['update:modelValue'])
 const input = ref(props.gdbh)
+const jjcp_yjno = ref(props.jjcp_yjno)
 const cpmc = ref('')
 const tableData = ref([])
 const handleGetTable = async() => {
+  console.log(jjcp_yjno.value)
+  console.log(input.value)
   const ret = await getGxMc({ gdbh: input.value })
   if (ret['code'] === 0) {
     cpmc.value = ret['data'][0]['Gd_cpmc']
-    console.log(ret['data'])
+    // console.log(ret['data'])
   }
-  const res = await getOrderProcessCount({ order: input.value })
+  const res = await getOrderProcessCount({ order: input.value,yjno:jjcp_yjno.value })
+  console.log(res)
   if (res['code'] === 0) {
     const { data } = res
     tableData.value = data.map(item => ({

+ 48 - 14
src/view/performance/12-orderAccounting/componets/khsz.vue

@@ -5,17 +5,8 @@
     fullscreen
     :before-close="()=>{emits('update:modelValue', false )}"
   >
-    <el-button
-      type="primary"
-      disabled
-      style="width:80px; height: 40px;margin-bottom: 20px"
-      @click=""
-    >更新</el-button>
-    <el-button
-      type="primary"
-      style="width:80px; height: 40px;margin-bottom: 20px"
-      @click="emits('update:modelValue', false )"
-    >退出</el-button>
+    <el-button  type="primary" style="width:80px; height: 40px;margin-bottom: 20px" @click="renew">更新</el-button>
+    <el-button type="primary" style="width:80px; height: 40px;margin-bottom: 20px" @click="emits('update:modelValue', false )">退出</el-button>
 
     <el-form
       inline
@@ -31,6 +22,15 @@
         />
       </el-form-item>
 
+      <el-form-item label="印件号">
+        <el-input
+          v-model="yjno"
+          autocomplete="off"
+          style="width: 100px"
+          @keyup.enter="handleGetTable"
+          placeholder="Enter回车"
+        />
+      </el-form-item>
       <el-table
         :data="tableData"
         border
@@ -114,19 +114,52 @@ export const getOrderYj = (params) => {
     params
   })
 }
+export const updateOrderYj = (params) => {
+  return service({
+    url: '/mes_server/order_super_loss/updateOrderYj',
+    method: 'get',
+    params
+  })
+}
 
 </script>
 
 <script setup>
 import { watch, ref, reactive, defineProps, defineEmits, onBeforeUnmount, onMounted } from 'vue'
-
-const props = defineProps(['modelValue', 'gdbh'])
+import { ElMessage, ElMessageBox } from 'element-plus'
+const props = defineProps(['modelValue', 'gdbh','yjno'])
 const emits = defineEmits(['update:modelValue'])
 const input = ref(props.gdbh)
+const yjno =ref(props.yjno)
 const tableData = ref([])
+// const modelValue =ref(true)
+
+//更新
+const renew = async() => {
+  let params = {};
+  params.order = tableData.value['0']['Yj_gdbh']
+  params.yj_yjno = tableData.value['0']['yj_Yjno']
+  params.examine = tableData.value['0']['新考核设置']
+  console.log(params)
+    const res = await updateOrderYj(params);
+    if (res['code'] === 0) {
+    ElMessage({type: 'success',message: '更新成功'})
+    emits('update:modelValue', false )
+  } else {
+    ElMessage({type: 'error',message: '更新失败'})
+  }
+  console.log(res)  
+
+
+  
+}
+
+
+
+
 const handleGetTable = async() => {
   if (!input.value) return
-  const res = await getOrderYj({ order: input.value })
+  const res = await getOrderYj({ order: input.value ,yjno:yjno.value})
   if (res['code'] === 0) {
     const { data } = res
     data['当前考核设置'] = data['质量考核'] === 0 ? '参与' : '剔除'
@@ -136,6 +169,7 @@ const handleGetTable = async() => {
     tableData.value = arr
   }
 }
+//
 
 // 进入后自动搜索
 onMounted(() => {

+ 2 - 2
src/view/performance/12-orderAccounting/index.vue

@@ -12,7 +12,7 @@
               <!--<el-button type="primary" disabled icon="edit" @click="" style="margin-left: 10px">工艺方案复制</el-button>-->
               <el-button type="primary" icon="edit" class="bt" @click=" () => { dialogGdcjstj = true; }">工单超节损统计</el-button>
 
-              <el-button type="primary" icon="edit" class="bt"@click=" () => { dialogKhsz = true; }">考核设置</el-button>
+              <el-button type="primary" icon="edit" class="bt" @click=" () => { dialogKhsz = true}">考核设置</el-button>
 
               <el-button type="primary" icon="edit" class="bt"@click=" () => { dialogXzgdtl = true; }">修正工单投料</el-button>
 
@@ -264,9 +264,9 @@ import {
   EmployeeDataCollect,
   getTable,
 } from '@/api/mes_api_gty/orderAccounting'
+import Khsz from '@/view/performance/12-orderAccounting/componets/khsz.vue'
 import {hiprint} from "vue-plugin-hiprint";
 import Gdcjstj from '@/view/performance/12-orderAccounting/componets/gdcjstj.vue'
-import Khsz from '@/view/performance/12-orderAccounting/componets/khsz.vue'
 import Xzgdtl from '@/view/performance/12-orderAccounting/componets/xzgdtl.vue'
 import Gxclhc from '@/view/performance/12-orderAccounting/componets/gxclhc.vue'
 import Gongdanzhijianfeipintongji from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'