licp
2024-03-28 70bf5f310d85c3a0700d75a7a877f5a1e403d83f
合并冲突
已修改1个文件
89 ■■■■■ 文件已修改
src/components/do/b1-inspect-order-plan/Inspection.vue 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -24,6 +24,7 @@
        padding: 20px;
    position: relative;
    }
  .center-box{
    height: 100%;
    display: flex;
@@ -32,16 +33,19 @@
    flex-wrap: wrap;
        overflow-y: auto;
  }
  .tables{
    /* width: 800px; */
    margin-bottom: 16px;
  }
  .tables td{
    height: 40px;
    width: 100px;
    text-align: center;
    font-size: 14px;
  }
  .content{
    display: flex;
    width: 100%;
@@ -51,21 +55,27 @@
    padding: 5px;
    box-sizing: border-box;
  }
  .content-h-0{
    justify-content: center;
  }
  .content-h-1{
    justify-content: start;
  }
  .content-h-2{
    justify-content: end;
  }
  .content-v-0{
    align-items: center;
  }
  .content-v-1{
    align-items: start;
  }
  .content-v-2{
    align-items: end;
  }
@@ -94,6 +104,7 @@
    .el-form-item__label{
        color: #000;
    }
  .el-drawer__header::before {
    content: "";
    display: inline-block;
@@ -104,6 +115,7 @@
    margin-left: 32px;
    margin-right: 8.5px;
  }
  .el-drawer__header{
    color: #303133;
  }
@@ -151,23 +163,25 @@
        <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index">
          <tbody>
              <tr v-for="(m,i) in item.arr" :key="i">
                <td
                                :id='item.templateId+"-"+n.i+"-"+n.r+"-"+n.c'
                v-for="(n,j) in m"
                :key="j"
                :colspan="n.v.mc&&n.v.mc.cs?n.v.mc.cs:1"
                :rowspan="n.v.mc&&n.v.mc.rs?n.v.mc.rs:1"
                            <td :id='item.templateId+"-"+n.i+"-"+n.r+"-"+n.c' v-for="(n,j) in m" :key="j"
                                :colspan="n.v.mc&&n.v.mc.cs?n.v.mc.cs:1" :rowspan="n.v.mc&&n.v.mc.rs?n.v.mc.rs:1"
                :style="`background:${n.v.bg};color:${n.v.fc};font-size:${n.v.fs}px;width:${item.style.columnlen[n.c]}px;height:${item.style.rowlen[n.r]}px;font-wight:${n.v.bl?'bold':''};`">
                <div class="content" :class="`content-h-${n.v.ht} content-v-${n.v.vt}`">
                                    <template v-if="n.v.ps!=undefined && n.v.ps.value==='检验值'">
                                        <el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1" @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" />
                                        <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea" :autosize="{ minRows: 1}" v-model="n.v.v"/>
                                        <el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v"
                                            :disabled="getInspectionItemType(n.i) == 1"
                                            @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" />
                                        <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea"
                                            :autosize="{ minRows: 1}" v-model="n.v.v" />
                                        <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v">
                                            <el-option label="是" value="是"></el-option>
                                            <el-option label="否" value="否"></el-option>
                                        </el-select>
                                        <span :style="`font-family:${n.v.ff} !important;`" v-else-if="getInspectionValueType(n.i) == 4">/</span>
                                        <el-button type="primary" icon="el-icon-edit" size="mini" circle v-if="getInspectionItemType(n.i) == 1" style="border: 0;margin-left: 2px;" @click="getSystemValue(n)">
                                        <span :style="`font-family:${n.v.ff} !important;`"
                                            v-else-if="getInspectionValueType(n.i) == 4">/</span>
                                        <el-button type="primary" icon="el-icon-edit" size="mini" circle
                                            v-if="getInspectionItemType(n.i) == 1" style="border: 0;margin-left: 2px;"
                                            @click="getSystemValue(n)">
                                        </el-button>
                                    </template>
                                    <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='结论'">
@@ -193,22 +207,18 @@
        </table>
      </div>
        </div>
    <el-drawer
      title="样品切换"
      :visible.sync="sampleVisible"
      :size="500">
      <el-table class="el-table" ref="productTable" :data="sampleProduct" height="100%" tooltip-effect="dark" border highlight-current-row @row-click="handleChangeSample" :row-class-name="tableRowClassName"
      :current-row-key="currentKey" :row-key="record=>record.index"
      v-if="sampleVisible">
        <el-drawer title="样品切换" :visible.sync="sampleVisible" :size="500">
            <el-table class="el-table" ref="productTable" :data="sampleProduct" height="100%" tooltip-effect="dark" border
                highlight-current-row @row-click="handleChangeSample" :row-class-name="tableRowClassName"
                :current-row-key="currentKey" :row-key="record=>record.index" v-if="sampleVisible">
                <el-table-column type="index" align="center" label="序号" width="70px" :key="Math.random()">
                </el-table-column>
                <el-table-column prop="sampleCode" label="样品编号" min-width="100px"
                    show-overflow-tooltip></el-table-column>
                <el-table-column prop="sampleCode" label="样品编号" min-width="100px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="model" label="样品型号" min-width="100px" show-overflow-tooltip></el-table-column>
                <el-table-column prop="insState" label="检测状态" width="95px" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-tag v-for="(item, i) in typeList" :key="i" v-if="item.value == scope.row.insState"
                                        :type="item.type" size="medium" style="margin-right: 5px;">{{item.label}}</el-tag>
                        <el-tag v-for="(item, i) in typeList" :key="i" v-if="item.value == scope.row.insState" :type="item.type"
                            size="medium" style="margin-right: 5px;">{{item.label}}</el-tag>
          </template>
        </el-table-column>
                <el-table-column prop="isLeave" label="是否留样" width="95px" show-overflow-tooltip align="center">
@@ -217,18 +227,17 @@
          </template>
        </el-table-column>
        <!-- 检验单会有一个是否有配套样品字段控制显示 -->
        <el-table-column prop="joinModel" label="配套样品型号" min-width="130px" show-overflow-tooltip v-if="insOrder.mating>0"></el-table-column>
        <el-table-column prop="joinName" label="配套样品名称" min-width="130px" show-overflow-tooltip v-if="insOrder.mating>0"></el-table-column>
        <el-table-column prop="joinNum" label="配套样品数量" min-width="130px" show-overflow-tooltip v-if="insOrder.mating>0"></el-table-column>
                <el-table-column prop="joinModel" label="配套样品型号" min-width="130px" show-overflow-tooltip
                    v-if="insOrder.mating>0"></el-table-column>
                <el-table-column prop="joinName" label="配套样品名称" min-width="130px" show-overflow-tooltip
                    v-if="insOrder.mating>0"></el-table-column>
                <el-table-column prop="joinNum" label="配套样品数量" min-width="130px" show-overflow-tooltip
                    v-if="insOrder.mating>0"></el-table-column>
            </el-table>
    </el-drawer>
    <el-drawer
      title="任务切换"
      :visible.sync="taskVisible"
      :size="500">
      <ValueTable class="value-table" ref="insOrderPlan"
                    :url="$api.insOrderPlan.selectInsOrderPlanList" :componentData="componentData"
                    :key="upIndex"/>
        <el-drawer title="任务切换" :visible.sync="taskVisible" :size="500">
            <ValueTable class="value-table" ref="insOrderPlan" :url="$api.insOrderPlan.selectInsOrderPlanList"
                :componentData="componentData" :key="upIndex" />
    </el-drawer>
    </div>
</template>
@@ -288,7 +297,7 @@
        currentKey:1,
        comparisonList:[],
        excelMethodList:[],
        equipOptions:[],
        equipOptions:[]
            }
        },
        created() {
@@ -396,7 +405,10 @@
          this.comparisonList = data;
        })
      },
      tableRowClassName({ row, rowIndex }){
            tableRowClassName({
                row,
                rowIndex
            }) {
        row.index = rowIndex + 1;
      },
      handleTableData(){
@@ -420,7 +432,8 @@
                        if (b.v.ps!=undefined&&b.v.ps.value==='检验子项'){
                            let count = 0
                            for(let i in this.currentSample.insProduct){
                                if(this.currentSample.insProduct[i].inspectionItemSubclass === b.v.v && this.currentSample.insProduct[i].templateId === a.templateId){
                                if (this.currentSample.insProduct[i].inspectionItemSubclass === b.v.v && this.currentSample
                                    .insProduct[i].templateId === a.templateId) {
                                    ids.push({
                                        r: b.r,
                                        id: this.currentSample.insProduct[i].id,
@@ -645,7 +658,8 @@
      handleExcelMethod(){
        if(this.excelMethodList.length>0){
          this.excelMethodList.map(item=>{
            item.methodName = item.v.f.split('=').length>1&&item.v.f.split('=')[1].split('(')&&item.v.f.split('=')[1].split('(')[0]?item.v.f.split('=')[1].split('(')[0]:'自定义方法';
                        item.methodName = item.v.f.split('=').length > 1 && item.v.f.split('=')[1].split('(') && item.v.f.split(
                            '=')[1].split('(')[0] ? item.v.f.split('=')[1].split('(')[0] : '自定义方法';
            let valueList = [];
            if(item.v.f.includes(':')){
              valueList = [];
@@ -676,7 +690,10 @@
              mode.filter(m=>m).forEach(m=>{
                let r = m.split('')[1]-1
                let c = this.comparisonList.find(j=>j.label==m.split('')[0]).value
                valueList.push({c,r})
                                valueList.push({
                                    c,
                                    r
                                })
              })
            }
            item.valueList = valueList;