Mr.Shi
2023-09-07 e0673329aafe8fc5e17daa75f940807566813290
minipro_standard/pages_inspect/pages/InspectionDetails/InspectionDetails.vue
@@ -73,11 +73,41 @@
</template>
<script>
   import { getBYid } from '@/util/api/QualityAPI'
   import { deletejy } from "@/util/api/PlanningAPI"
   export default {
      data() {
         return {
            id: null,
            info: {}
         };
      },
      onLoad(option) {
         this.id = option.id
         this.getBYids()
      },
      methods: {
         getBYids() {
            getBYid(this.id)
               .then(res => {
                  if (res.code === 200 && res.data) {
                     this.info = res.data
                  }
               })
         },
         // 删除检验记录
         dele() {
            deletejy(this.id)
               .then(res => {
                  if (res.code === 200) {
                     uni.showToast({ title: '删除成功', duration: 2000, mask: true })
                     setTimeout(() => {
                        uni.navigateBack({ delta: 1 });
                     }, 2000)
                  }
               })
         }
      }
   }
</script>