Browse Source

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

liuhairui 1 year ago
parent
commit
c4e6125c5c

+ 7 - 3
src/view/performance/12-orderAccounting/componets/xzgdtl.vue

@@ -105,7 +105,7 @@
         width="150"
       >
         <template #default="{ row }">
-          <el-input v-model="row['实际投料']" />
+          <el-input @keyup.enter="handleUpdate" v-model="row['实际投料']" />
         </template>
       </el-table-column>
       <el-table-column
@@ -150,7 +150,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
 import { watch, ref, reactive, defineProps, defineEmits, onBeforeUnmount } from 'vue'
 
 const props = defineProps(['modelValue', 'gdbh','yjno'])
-const emits = defineEmits(['update:modelValue'])
+const emits = defineEmits(['update:modelValue','update-data'])
 const tableData = ref([])
 const table = ref(null)
 const multipleSelection = ref([])
@@ -206,7 +206,10 @@ const handleSearch = () => {
 
 const handleUpdate = async() => {
   if (multipleSelection.value.length === 0) {
-    console.log('未选择行')
+    ElMessage({
+      type: 'error',
+      message: '未选择行',
+    })
     return
   }
   const params = multipleSelection.value.map(item => ({
@@ -219,6 +222,7 @@ const handleUpdate = async() => {
       type: 'success',
       message: '更新成功',
     })
+    emits('update-data', false);
   }
 }
 </script>

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

@@ -173,6 +173,7 @@
             <Xzgdtl
               v-if="dialogXzgdtl"
               v-model="dialogXzgdtl"
+              @update-data = "exitXzgdtl"
               :gdbh="gdbh"
               :yjno="yjno"
             />
@@ -664,6 +665,11 @@ const exportExcel = () => {
   }
   exportExcelFile(data)
 }
+//关闭窗口
+const exitXzgdtl = (data) => {
+  console.log(data);
+  dialogXzgdtl.value = data;
+};
 </script>
 
 <style scoped>