duy 2 anni fa
parent
commit
9680e16747

+ 22 - 10
src/views/tentative/detect/components/ListItem.vue

@@ -189,6 +189,10 @@ const props = defineProps({
     checkTableId:{
         type: String,
         default: () => ('')
+    },
+    tabTypeKey:{
+        type: String,
+        default: () => ('')
     }
 })
 
@@ -201,12 +205,15 @@ const authBtnTabKeyType = ref(props.authBtnTabKey)//所属方
 const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId);
 const contractId = ref(useAppState.getContractId);
+const tabTypeKeyInfo=ref(props.tabTypeKey)
 
 //监听
 watch(() => [
     props.datas,
-], ([datas]) => {
+    props.tabTypeKey
+], ([datas,TabTypeKey]) => {
     listDatas.value = datas
+    tabTypeKeyInfo.value=TabTypeKey
     setFormDataNum(datas)
 })
 
@@ -402,17 +409,22 @@ const toBackClick = () => {
 const tableFormSaveLoading = ref(false)
 const tableFormSaveClick = async (item,index) => {
     if (isStatus.value !== '3') {
-        const res = await saveExcelBussData(item,index)
-        if (res) {
-            if(!isaddType){
-                 await getBussPdfInfo(item)
-            }else{
-                //返回
-                toBackClick()
+        if(tabTypeKeyInfo.value==='2'&&baseData.value['detectionResult']===''){
+              window.$message?.warning('请选择是否合格')
+        }else{
+             const res = await saveExcelBussData(item,index)
+            if (res) {
+                if(!isaddType){
+                    await getBussPdfInfo(item)
+                }else{
+                    //返回
+                    toBackClick()
+                }
+            
+                renewData()
             }
-           
-            renewData()
         }
+       
     } else {
         window?.$message?.warning('已上报的资料,不允许保存。')
     }

+ 1 - 0
src/views/tentative/detect/test-form.vue

@@ -45,6 +45,7 @@
                 <ListItem ref="ListItemRef" :datas="listItemData" :status="1" :baseData="listItemBaseData" @offsetTop="ListItemOffsetTop" @renew="getTableDataAll" 
                 :deviceUseIds="listDeviceUseIds"
                 :authBtnTabKey="authBtnTabKey"
+                :tabTypeKey="tabTypeKey"
                  @updeviceUseIds="updeviceUseIds"
                  @upcheckTableId="upcheckTableId"
                 />