Lexie 1 рік тому
батько
коміт
ea7bde53d9

+ 16 - 2
src/view/performance/06-packingDocuments/index.vue

@@ -712,9 +712,23 @@ const updateDetailData = async() => {
 const handleShowAdd = async() => {
   type.value = '新增'
   if(currentRow.value.UniqId==null){
+	  detailData.table = Array.from({ length: 6 }, (_, i) => i + 1)
+	    .map(num => {
+	      return {
+	        sczl_gdbh: '',
+	        sczl_yjGx: '',
+	        sczl_gxmc: '',
+	        Gd_cpmc: '',
+	        sczl_cl: '',
+	        sczl_返工产量: '',
+	        sczl_PgCl: '',
+	        sczl_计产系数: '',
+	        sczl_Jtbh1: '',
+	        sczl_dedh: '',
+	      }
+	    })
 	  dialogFormVisible.value = true
-  }else{
-	  
+  }else{ 
 	  await getTableInfo(currentRow.value?.UniqId)
 	  // 默认日期为前一天的日期
 	  const date = dayjs().subtract(1, 'day').format('YYYY-MM-DD')

+ 20 - 3
src/view/performance/09-workOrderVerification/index.vue

@@ -1081,9 +1081,26 @@ const handleSelectChange = (row, column, event) => {
 // 新增数据
 const handleShowAdd = async() => {
   type.value = '新增'
-  console.log(minUniqId.value)
-
-  getDetailData(minUniqId.value)
+  if(minUniqId.value==''){
+	  console.log('123')
+	  // 循环13行数据
+	  const table = []
+  for (let i = 1; i <= 13; i++) {
+	table.push({
+	  fp_lb: '',
+	  fp_sl: '',
+	  fp_gxmc: '',
+	  fp_bz: '',
+	  fp_bh: '',
+	  fp_name: '',
+	})
+  }
+  detailData.table = table
+	dialogFormVisible.value = true
+  }else{
+	  getDetailData(minUniqId.value)
+  }
+  
   
   // type.value='add'
   //    Object.assign(detailData);