Browse Source

解决冲突

tty 1 year ago
parent
commit
7562ab7c7a
1 changed files with 25 additions and 34 deletions
  1. 25 34
      src/view/performance/09-workOrderVerification/index.vue

+ 25 - 34
src/view/performance/09-workOrderVerification/index.vue

@@ -44,7 +44,7 @@
                 @click="showGdzjfptj"
               >工单质检废品统计
               </el-button>
-			 <el-button
+              <el-button
                 type="primary"
                 :icon="Search"
                 @click="handleShowAdd"
@@ -440,14 +440,10 @@ import {
 import { ElMessage } from 'element-plus'
 import { Search, Refresh, Download } from '@element-plus/icons-vue'
 import { ref, reactive } from 'vue'
-import { getSide, getTable, getOneWorkOrder, getOrderInfo, getGxAndLeader, getWastInfo, updateData } from '@/api/mes_api_gty/workOrderVerification'
-import Meirihejiantongji from './componets/meirihejiantongji.vue'
-import Gongdanzhijianfeipintongji from './componets/gongdanzhijianfeipintongji.vue'
+import { getSide, getTable, getOneWorkOrder, getOrderInfo, getGxAndLeader, getWastInfo, updateData, add } from '@/api/mes_api_gty/workOrderVerification'
+import Meirihejiantongji from '@/view/performance/09-workOrderVerification/componets/meirihejiantongji.vue'
+import Gongdanzhijianfeipintongji from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
 import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
-import { getSide, getTable, getOneWorkOrder, getOrderInfo, getGxAndLeader, getWastInfo, updateData,add } from '@/api/mes_api_gty/workOrderVerification'
-import Meirihejiantongji from './meirihejiantongji.vue'
-import Gongdanzhijianfeipintongji from './gongdanzhijianfeipintongji.vue'
-import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/shebeizhuangtai.vue'
 
 defineOptions({
   name: '06PackingDocuments'
@@ -746,19 +742,17 @@ const handleSelectClick = (row, column, event) => {
   detailData.table[index].fp_bh = sczl_bh1
   detailData.table[index].fp_name = name
   dialogSelectVisible2.value = false
-
 }
 
 // 弹窗确定
 const enterDialog = async() => {
-
-	if (type.value === 'update') {
+  if (type.value === 'update') {
 	  updateDetailData()
-	} else if (type.value === 'add') {
+  } else if (type.value === 'add') {
 	  addDetailData()
-	}
+  }
 }
-//新增
+// 新增
 const addDetailData = async() => {
   const restoredData = {
     UniqId: detailData.UniqId,
@@ -778,7 +772,7 @@ const addDetailData = async() => {
     qczl_NumDesc6: detailData.qczl_NumDesc6,
     qczl_NumDesc7: detailData.qczl_NumDesc7,
     qczl_NumDesc8: detailData.qczl_NumDesc8,
-	sys_id:'[1003/洪桂芬]',
+    sys_id: '[1003/洪桂芬]',
   }
   detailData.table.forEach((item, index) => {
 	  const num = index + 1
@@ -787,7 +781,7 @@ const addDetailData = async() => {
 	  restoredData[`fp_bh${num}`] = item.fp_bh
 	  restoredData[`fp_bz${num}`] = item.fp_bz
 	  restoredData[`fp_gxmc${num}`] = item.fp_gxmc
-	})
+  })
   console.log(restoredData)
   const res = await add(restoredData)
   console.log(res)
@@ -800,9 +794,9 @@ const addDetailData = async() => {
     dialogFormVisible.value = false
   }
 }
-//修改
+// 修改
 const updateDetailData = async() => {
-	const restoredData = {
+  const restoredData = {
 	  UniqId: detailData.UniqId,
 	  qczl_gdbh: detailData.qczl_gdbh,
 	  qczl_yjno: detailData.qczl_yjno,
@@ -820,23 +814,23 @@ const updateDetailData = async() => {
 	  qczl_NumDesc6: detailData.qczl_NumDesc6,
 	  qczl_NumDesc7: detailData.qczl_NumDesc7,
 	  qczl_NumDesc8: detailData.qczl_NumDesc8,
-	}
-	detailData.table.forEach((item, index) => {
+  }
+  detailData.table.forEach((item, index) => {
 	  const num = index + 1
 	  restoredData[`fp_lb${num}`] = item.fp_lb
 	  restoredData[`fp_sl${num}`] = item.fp_sl
 	  restoredData[`fp_bh${num}`] = item.fp_bh
 	  restoredData[`fp_bz${num}`] = item.fp_bz
 	  restoredData[`fp_gxmc${num}`] = item.fp_gxmc
-	})
-	const res = await updateData(restoredData)
-	if (res.code === 0) {
+  })
+  const res = await updateData(restoredData)
+  if (res.code === 0) {
 	  ElMessage({
 	    type: 'success',
 	    message: res.msg,
 	  })
 	  dialogFormVisible.value = false
-	}
+  }
 }
 
 // 多选
@@ -899,7 +893,6 @@ const dialogSbyxgl = ref(false)
 const value1 = ref('')
 const table = ref(null)
 
-
 const showGdzjfptj = () => {
   value1.value = currentRow.value?.qczl_gdbh
   dialogGdzjfptj.value = true
@@ -910,15 +903,13 @@ const handleSelectChange = (row, column, event) => {
 }
 
 // 新增数据
-const handleShowAdd = async () => {
-
-    type.value='add'
-    getDetailData(currentRow.value)
-	// type.value='add'
- //    Object.assign(detailData);
-	// dialogFormVisible.value = true
-
-};
+const handleShowAdd = async() => {
+  type.value = 'add'
+  getDetailData(currentRow.value)
+  // type.value='add'
+  //    Object.assign(detailData);
+  // dialogFormVisible.value = true
+}
 </script>
 
 <style scoped>