value
2024-04-26 361ad4ba15d552592ace39d7886f3fe2531f46da
检验项目绑定产品,检验对象绑定产品
已修改6个文件
140 ■■■■ 文件已修改
src/components/tool/excel.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/value-table.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/a5-capacity-scope.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspection-order.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b2-standard.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/index-index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/excel.vue
@@ -90,8 +90,8 @@
                    frozenMode: false, // '冻结方式'
                    currencyFormat: false, //货币格式
                    percentageFormat: false, //百分比格式
                    numberDecrease: false, // '减少小数位数'
                    numberIncrease: false, // '增加小数位数
                    numberDecrease: true, // '减少小数位数'
                    numberIncrease: true, // '增加小数位数
                    moreFormats: false, // '更多格式'
                    strikethrough: false, // '删除线 (Alt+Shift+5)'
                    underline: false, // '下划线 (Alt+Shift+6)'
src/components/tool/value-table.vue
@@ -236,6 +236,7 @@
              <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`请输入${a.value}`"
                v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)"></el-input>
              <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null"
              :multiple="data.selectField[a.label].choose"
                style="width: 100%;" :placeholder="`请选择${a.value}`" clearable filterable>
                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
                  :label="b.label"></el-option>
@@ -263,6 +264,7 @@
              <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`请输入${a.value}`"
                v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)"></el-input>
              <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null"
              :multiple="data.selectField[a.label].choose"
                style="width: 100%;" :placeholder="`请选择${a.value}`" clearable>
                <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value"
                  :label="b.label"></el-option>
@@ -873,6 +875,11 @@
          }
        }
        this.addLoad = true
        for (var a in this.data.selectField) {
          if (this.data.selectField[a].choose == true) {
            this.upData[a] = JSON.stringify(this.upData[a])
          }
        }
        this.upHead.forEach((item, index) => {
          if (this.data.cascaderField && this.data.cascaderField[item.label]) {
            if (this.upData[item.label]) {
src/components/view/a5-capacity-scope.vue
@@ -54,7 +54,7 @@
        </el-col>
        <el-col :span="12" style="text-align: right;">
          <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button>
          <el-button size="medium" icon="el-icon-delete">删除</el-button>
          <!-- <el-button size="medium" icon="el-icon-delete">删除</el-button> -->
        </el-col>
      </el-row>
    </div>
@@ -69,6 +69,12 @@
          <div class="search_label">检验子项:</div>
          <div class="search_input"><el-input size="small" placeholder="请输入" clearable
              v-model="itemParameterData.entity.inspectionItemSubclass" @keyup.enter.native="refreshTable()"></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="itemParameterData.entity.sample" @keyup.enter.native="refreshTable()"></el-input>
          </div>
        </div>
        <div class="search_thing" style="padding-left: 30px;">
@@ -129,13 +135,14 @@
          entity: {
            inspectionItem: null,
            inspectionItemSubclass: null,
            sample: null,
            orderBy: {
              field: 'id',
              order: 'asc'
            }
          },
          isIndex: false,
          showSelect: true,
          isIndex: true,
          showSelect: false,
          select: true,
          row: 2,
          do: [{
@@ -217,7 +224,7 @@
            props:{
              value:'name',
              label:'name',
              checkStrictly: false
              checkStrictly: true
            }
          },
          requiredAdd: ['sonLaboratory', 'inspectionItem', 'manHour', 'inspectionItemType', 'inspectionValueType',
@@ -235,8 +242,8 @@
              order: 'asc'
            }
          },
          isIndex: false,
          showSelect: true,
          isIndex: true,
          showSelect: false,
          select: true,
          do: [{
            id: 'update',
src/components/view/b1-inspection-order.vue
@@ -86,7 +86,7 @@
                            v-model="componentData.entity.entrustCode" @keyup.enter.native="refreshTable()"></el-input></div>
                </div>
                <div class="search_thing">
                    <div class="search_label">样品类型:</div>
                    <div class="search_label">样品名称:</div>
                    <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                            v-model="componentData.entity.sampleType" @keyup.enter.native="refreshTable()"></el-input></div>
                </div>
src/components/view/b2-standard.vue
@@ -143,16 +143,16 @@
      </el-row>
      <el-row class="standard_table" v-loading="tableLoad">
        <el-table class="el-table" :data="standardList" style="width: 100%;" height="220px" tooltip-effect="dark"
          highlight-current-row @row-click="rowClick" ref="standard">
          <el-table-column prop="code" label="标准编号" show-overflow-tooltip>
          highlight-current-row @row-click="rowClick" ref="standard" :key="Math.random()">
          <el-table-column prop="code" label="标准编号" show-overflow-tooltip width="180">
            <template slot-scope="scope">
              <span style="color: red;font-size: 14px;">{{scope.row['code']}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="name" label="标准名称" show-overflow-tooltip></el-table-column>
          <el-table-column prop="remark" label="备注" show-overflow-tooltip></el-table-column>
          <el-table-column prop="createUserName" label="创建人"></el-table-column>
          <el-table-column prop="createTime" label="创建时间" width="250px"></el-table-column>
          <!-- <el-table-column prop="createUserName" label="创建人"></el-table-column>
          <el-table-column prop="createTime" label="创建时间" width="250px"></el-table-column> -->
          <!-- <el-table-column label="操作" width="100" align="center" v-if="delStandardMethod">
                        <template slot-scope="scope">
                            <el-button type="text" size="small" @click="delStandardMethodByFLSSM(scope.row.id)">删除</el-button>
@@ -163,7 +163,7 @@
      <el-row class="product_table" v-loading="tableLoad2">
        <el-table :data="productList" ref="productTable" style="width: 100%;" height="100%" tooltip-effect="dark" stripe
          :fit="true" border @selection-change="handleSelectionChange" :row-class-name="tableRowClassName"
          @select="upProductSelect">
          @select="upProductSelect" @select-all="handleAll">
          <el-table-column type="selection" width="65">
          </el-table-column>
          <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip></el-table-column>
@@ -209,46 +209,32 @@
    <el-dialog title="分类添加" :visible.sync="addDia" width="400px">
      <div class="body">
        <el-row style="line-height: 50px;">
          <el-col :span="6" style="text-align: right;">
            <span class="required-span">* </span>工厂:
          </el-col>
          <el-col :span="6" style="text-align: right;">工厂:</el-col>
          <el-col :span="16" :offset="1">
            <el-select v-model="addOb.factory" size="small" style="width: 100%;" clearable>
              <el-option v-for="(a, ai) in factory" :key="ai" :value="a.value" :label="a.label"></el-option>
            </el-select>
            <el-input size="small" readonly v-model="addOb.factory"></el-input>
          </el-col>
        </el-row>
        <el-row style="line-height: 50px;">
          <el-col :span="6" style="text-align: right;">实验室:</el-col>
          <el-col :span="16" :offset="1">
            <el-input size="small" readonly v-model="addOb.laboratory"></el-input>
          </el-col>
        </el-row>
        <el-row style="line-height: 50px;">
          <el-col :span="6" style="text-align: right;">样品大类:</el-col>
          <el-col :span="16" :offset="1">
            <el-input size="small" readonly v-model="addOb.sampleType"></el-input>
          </el-col>
        </el-row>
        <el-row style="line-height: 50px;">
          <el-col :span="6" style="text-align: right;">样品名称:</el-col>
          <el-col :span="16" :offset="1">
            <el-input v-model="addOb.sample" readonly size="small"></el-input>
          </el-col>
        </el-row>
        <el-row style="line-height: 50px;">
          <el-col :span="6" style="text-align: right;">
            <span class="required-span">* </span>实验室:
          </el-col>
          <el-col :span="16" :offset="1">
            <el-select v-model="addOb.laboratory" size="small" style="width: 100%;" clearable>
              <el-option v-for="(a, ai) in laboratory" :key="ai" :value="a.value" :label="a.label"></el-option>
            </el-select>
          </el-col>
        </el-row>
        <el-row style="line-height: 50px;">
          <el-col :span="6" style="text-align: right;">
            <span class="required-span">* </span>样品大类:
          </el-col>
          <el-col :span="16" :offset="1">
            <el-select v-model="addOb.sampleType" size="small" style="width: 100%;" clearable>
              <el-option v-for="(a, ai) in sampleType" :key="ai" :value="a.value" :label="a.label"></el-option>
            </el-select>
          </el-col>
        </el-row>
        <el-row style="line-height: 50px;">
          <el-col :span="6" style="text-align: right;">
            <span class="required-span">* </span>样品名称:
          </el-col>
          <el-col :span="16" :offset="1">
            <el-input v-model="addOb.sample" placeholder="请输入样品名称" clearable size="small"></el-input>
          </el-col>
        </el-row>
        <el-row style="line-height: 50px;">
          <el-col :span="6" style="text-align: right;">
            型号:
            <span class="required-span">* </span>型号:
          </el-col>
          <el-col :span="16" :offset="1">
            <el-input v-model="addOb.model" placeholder="请输入型号" clearable size="small"></el-input>
@@ -517,12 +503,7 @@
        this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => {
          this.list = res.data
          this.list.forEach(a => {
            a.children.forEach(b => {
              b.children.forEach(c => {
                this.expandedKeys.push(c.label)
              })
              // this.expandedKeys.push(b.label)
            })
            this.expandedKeys.push(a.label)
          })
          this.treeLoad = false
        })
@@ -580,20 +561,12 @@
        })
      },
      addStandardTree() {
        if (this.addOb.factory == null || this.addOb.factory == '') {
          this.$message.error('工厂是必填项')
          return
        }
        if (this.addOb.laboratory == null || this.addOb.laboratory == '') {
          this.$message.error('实验室是必填项')
          return
        }
        if (this.addOb.sampleType == null || this.addOb.sampleType == '') {
          this.$message.error('样品大类是必填项')
          return
        }
        if (this.addOb.sample == null || this.addOb.sample == '') {
          this.$message.error('样品是必填项')
          this.$message.error('产品不存在')
          return
        }
        if (this.addOb.model == null || this.addOb.model == '') {
          this.$message.error('请填写型号')
          return
        }
        this.addLoad = true
@@ -827,12 +800,25 @@
            this.$message.error('未保存')
            return
          }
          this.$message.success('已保存')
          // this.$message.success('已保存')
        })
      },
      filterHandler(value, row, column) {
        const property = column['property'];
        return row[property] === value;
      },
      handleAll(e) {
        if (e.length > 0) {
          this.productList.map(m => {
            this.upProductSelect(null, m)
            return m
          })
        } else {
          this.productList.map(m => {
            this.upProductSelect(null, m)
            return m
          })
        }
      }
    }
  }
src/components/view/index-index.vue
@@ -281,7 +281,7 @@
            </div>
            <div class="mun">
              <p style="font-size: 20px;">254</p>
              <p style="font-size: 14px;margin-bottom: 10px;">我的代办</p>
              <p style="font-size: 14px;margin-bottom: 10px;">我的待办</p>
            </div>
          </div>
          <div class="right-1-item">