licp
2024-03-22 e2140d53c0d017da55bbebc22a24671662febd12
src/components/view/b1-inspect-order-plan.vue
@@ -82,8 +82,8 @@
</style>
<template>
   <div class="ins-order-plan-main">
      <p style="font-size: 16px;padding:19.5px 0px">检验任务</p>
      <div class="search">
      <p style="font-size: 16px;padding:19.5px 0px" v-show="state==0">检验任务</p>
      <div class="search" v-show="state==0">
         <el-form :inline="true" :model="searchForm" class="form-inline">
            <el-form-item label="样品名称:">
               <el-input clearable v-model="searchForm.sampleName" size="small" placeholder="请输入"></el-input>
@@ -100,7 +100,7 @@
            </el-form-item>
         </el-form>
      </div>
      <div class="center">
      <div class="center" v-show="state==0">
         <div class="center-options">
            <el-row>
               <el-col :span="21">
@@ -127,6 +127,7 @@
            :url="$api.insOrderPlan.selectInsOrderPlanList" :upUrl="$api.user.updateUser" :componentData="componentData"
            :key="upIndex" @upUser="upUser" />
      </div>
    <Inspection v-if="state==1" @goback="state=0"/>
      <el-dialog title="提示" :visible.sync="claimVisible" width="400px">
         是否认领委托编号<span style="color:#33C130">{{sampleUserForm.entrustCode}}</span>的任务
         <span slot="footer" class="dialog-footer">
@@ -139,12 +140,14 @@
<script>
   import ValueTable from '../tool/value-table.vue'
  import Inspection from '../do/b1-inspect-order-plan/Inspection.vue'
   import {
      getYearAndMonthAndDays
   } from '../../util/date'
   export default {
      components: {
         ValueTable
         ValueTable,
      Inspection
      },
      data() {
         return {
@@ -166,7 +169,7 @@
               entity: {
                  viewSelf: false,
                  state: 1,
                  childrenLaboratory: null,
                  sonLaboratory: null,
                  insState: null,
                  sampleName: null,
                  orderBy: {
@@ -177,6 +180,7 @@
               isIndex: true,
               showSelect: false,
               select: false,
               sort: false,
               do: [{
                     id: '',
                     font: '检验',
@@ -218,7 +222,8 @@
            },
            upIndex: 0,
            planTotal: 0,
            insStateList: []
            insStateList: [],
        state:0//0:台账页,1:检验页面,默认为0
         }
      },
      created() {
@@ -228,16 +233,6 @@
         this.$nextTick(() => {
            this.refreshTable()
         })
      },
      watch: {
         tabList(newVal) {
            if (newVal && newVal.length > 0) {
               this.componentData.entity.childrenLaboratory = newVal[0].value
               this.$nextTick(() => {
                  this.refreshTable()
               })
            }
         }
      },
      methods: {
         upUser() {
@@ -308,7 +303,7 @@
         },
         handleTab(m, i) {
            this.tabIndex = i;
            this.componentData.entity.childrenLaboratory = m.value
            this.componentData.entity.sonLaboratory = m.value
            this.refreshTable()
         },
         getTypeDicts() {
@@ -356,9 +351,6 @@
                     label: ele.label,
                     value: ele.value
                  }
               })
               this.$nextTick(() => {
                  this.componentData.entity.childrenLaboratory = this.tabList[0].value
               })
            })
         }