zouyu
2023-08-30 a970199e2417318743ca3f7852dca896906ac574
src/views/laboratory/ledger/index.vue
@@ -54,7 +54,7 @@
        <div class="table-box">
          <el-table ref="equipmentTable" node-key="father_name" :cell-style="{ textAlign: 'center' }"
            :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
            :data="equipmentTable" style="width: 100%">
            :data="equipmentTable" style="width: 100%;">
            <el-table-column type="index" label="序号" min-width="90" />
            <el-table-column prop="equipment_code" label="仪器设备编号" min-width="200" />
            <el-table-column prop="equipment_name" label="仪器设备名称" min-width="150" />
@@ -68,7 +68,6 @@
              </template>
            </el-table-column>
            <el-table-column prop="storage_place" label="存放地" min-width="200" />
            <el-table-column label="操作" min-width="120" fixed="right">
              <template slot-scope="scope">
                <el-button type="text" size="small" @click="openDetail(scope.row)">编辑</el-button>
@@ -250,7 +249,7 @@
              <el-form-item label="所属分类:" prop="classifyId" label-width="80" :rules="[
                { required: true, message: '请选择所属分类', trigger: 'change' }
              ]">
                <el-cascader v-model="equipmentform.classifyId" :options="classTree" :show-all-levels="false" />
                <el-cascader style="width: 100%;" v-model="equipmentform.classifyId" :options="classTree" :show-all-levels="false" />
              </el-form-item>
            </el-col>
            <el-col :span="11">
@@ -979,12 +978,15 @@
        fatherName: null,
        sonName: null
      }
      if (_that.addTreeForm.type != null && _that.addTreeForm.type[0] != 0) {
        data.fatherName = _that.addTreeForm.type[0]
        data.fatherName = _that.addTreeFormClassTree.filter(item => {
          return item.value == _that.addTreeForm.type[0]
        })[0].label
        data.sonName = _that.addTreeForm.name
      } else {
        data.fatherName = _that.addTreeForm.name
      }
      }      // return;
      let add = await addClassify(data);
      switch (add.message.split('-$')[0]) {
        case '1':
@@ -996,13 +998,13 @@
          _that.resetTreeForm('addTreeForm')
          break;
        case '2':
        this.$message({
          message: '已存在该分类',
          type: 'warning'
        });
          this.$message({
            message: '已存在该分类',
            type: 'warning'
          });
          break;
        case '0':
        this.$message.error('添加失败!请联系管理员');
          this.$message.error('添加失败!请联系管理员');
          break;
      }
@@ -1049,7 +1051,7 @@
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 0 24px 12px 24px;
    padding: 15px 24px 12px 24px;
    .search-bar {
      .el-radio-button.is-active {
@@ -1085,6 +1087,7 @@
    .library-bom {
      flex: 2;
      margin-right: 12px;
         height: 80vh;
      .bom-item-search {
        margin-bottom: 12px;
@@ -1116,6 +1119,7 @@
      margin-left: 12px;
      display: flex;
      flex-direction: column;
         height: 80vh;
      .table-box {
        margin-top: 30px;