licp
2024-04-07 36181abc48c6d890efcc56b0e76d600f6d3ecb7f
src/components/do/b1-sample/detail.vue
@@ -13,14 +13,7 @@
        <div class="search_label">样品编号:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable
                     v-model="entity.sample" disabled></el-input>
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label">样品数量:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable
                     v-model="entity.sample" disabled></el-input>
                     v-model="entity.sampleCode" disabled></el-input>
        </div>
      </div>
      <div class="search_thing">
@@ -31,67 +24,78 @@
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label">样品数量:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable
                     v-model="entity.num" disabled></el-input>
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label">单位:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable
                     v-model="entity.sample" disabled></el-input>
                     v-model="entity.unit" disabled></el-input>
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label">入库时间:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable
                     v-model="entity.sample" disabled></el-input>
                     v-model="entity.date" disabled></el-input>
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label">入库人:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable
                     v-model="entity.sample" disabled></el-input>
                     v-model="entity.user" disabled></el-input>
        </div>
      </div>
      <div class="search_thing">
      <div class="search_thing" >
        <div class="search_label">库位号:</div>
        <div class="search_input">
          <el-input size="small" placeholder="请输入" clearable
                     v-model="entity.sample" disabled></el-input>
                     v-model="entity.code" disabled style="min-width: 230px;"></el-input>
        </div>
      </div>
    </div>
    <h4>检验项目</h4>
    <div class="table">
      <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border>
      <el-table class="el-table" ref="productTable" :data="products" height="380px" tooltip-effect="dark" border>
            <el-table-column type="index" align="center" label="序号" width="70" :key="Math.random()">
            </el-table-column>
            <el-table-column prop="inspectionItemSubclass" label="检验项" min-width="100"
            <el-table-column prop="inspectionItem" label="检验项" min-width="100"
               show-overflow-tooltip></el-table-column>
            <el-table-column prop="sonLaboratory" label="检验项分类" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="method" label="实验室" min-min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="inspectionItemSubclass" label="检验项分类" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="laboratory" label="实验室" min-min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="unit" label="单位" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="price" label="设备" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="manDay" label="委托编号" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="manHourGroup" label="检验人" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="section" label="检验时间" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="ask" label="结论" min-width="100">
            <el-table-column prop="equipValue" label="设备" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="entrustCode" label="委托编号" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="updateUserName" label="检验人" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="updateTime" label="检验时间" min-width="100" show-overflow-tooltip></el-table-column>
            <el-table-column prop="insResult" label="结论" min-width="100">
               <template slot-scope="scope">
            <el-tag
              :type="scope.row.type" size="medium">{{scope.row.label}}</el-tag>
              :type="scope.row.insResult==1?'success':'danger'" size="medium">{{scope.row.insResult==1?'合格':'不合格'}}</el-tag>
               </template>
            </el-table-column>
         </el-table>
    </div>
    <h4>出入库历史</h4>
    <div class="table" style="margin-bottom: 20px;">
      <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border>
      <el-table class="el-table" ref="productTable" :data="histories" height="380px" tooltip-effect="dark" border>
            <el-table-column type="index" align="center" label="序号" width="70" :key="Math.random()">
            </el-table-column>
            <el-table-column prop="inspectionItemSubclass" label="类型"
               show-overflow-tooltip></el-table-column>
            <el-table-column prop="sonLaboratory" label="操作人"  show-overflow-tooltip></el-table-column>
            <el-table-column prop="method" label="操作时间"  show-overflow-tooltip></el-table-column>
            <el-table-column prop="unit" label="库位号" show-overflow-tooltip></el-table-column>
            <el-table-column prop="price" label="存放周期(h)" show-overflow-tooltip></el-table-column>
            <el-table-column prop="state" label="类型"
               show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag :type="scope.row.state==1?'success':'danger'">{{ scope.row.state==1?'入库':'出库' }}</el-tag>
          </template>
        </el-table-column>
            <el-table-column prop="createUserName" label="操作人"  show-overflow-tooltip></el-table-column>
            <el-table-column prop="createTime" label="操作时间"  show-overflow-tooltip></el-table-column>
            <el-table-column prop="warehouseCode" label="库位号" show-overflow-tooltip></el-table-column>
            <!-- <el-table-column prop="price" label="存放周期(h)" show-overflow-tooltip></el-table-column> -->
         </el-table>
    </div>
  </div>
@@ -99,15 +103,32 @@
<script>
export default {
  props:['id'],
  data(vm) {
      return{
        entity:{},
        productList:[]
        entity:{
          num:1,
        },
        products:[],
        histories:[]
      }
  },
  mounted(){
    this.getInfo()
  },
  methods:{
    hanldeBack(){
      this.$emit('hanldeBack')
    },
    getInfo(){
      this.$axios.post(this.$api.warehouse.getSampleRecord, {
        id: this.id
      }).then(res => {
        let {histories,insSample,sampleHistory,products} = res.data;
        this.entity = {num:1,...insSample,...sampleHistory};
        this.histories = histories;
        this.products = products;
      })
    }
  }
}