licp
2024-11-26 e6c3fccc9e412e79964a6dc2dae4c3da0c80095c
完成检验下单、检验任务、报告生成变更
已修改9个文件
509 ■■■■■ 文件已修改
src/components/do/b1-ins-order/add.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-report-preparation/order.vue 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/file-preview.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspection-order.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue
@@ -134,9 +134,9 @@
  <div class="ins_order_add" style=" display: block; ">
    <div v-show="!configShow&&!equipConfigShow&&!cableConfigShow">
      <el-row class="title">
        <el-col :span="6" style="padding-left: 20px;text-align: left;">委托单信息&nbsp;&nbsp;&nbsp;单位成本总价:<span
        <el-col :span="8" style="padding-left: 20px;text-align: left;">委托单信息&nbsp;&nbsp;&nbsp;单位成本总价:<span
            style="color: #3A7BFA">¥{{total.toFixed(2)}}</span></el-col>
        <el-col :span="18" style="text-align: right;">
        <el-col :span="16" style="text-align: right;">
          <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;" v-show="active==1"
            @change="selectInsOrderTemplateById">
            <el-option v-for="(a, ai) in templates" :key="ai" :value="a.id" :label="a.name">
@@ -234,7 +234,7 @@
            <div class="search_label"><span class="required-span">* </span>样品数量:</div>
            <div class="search_input">
              <el-input-number size="small" v-model="addObj.sampleNum" :min="1" :max="100" :precision="0"
                style="width: 65%;" @change="addStandardTree" :disabled="active>1"></el-input-number>
                style="width: 100%;" @change="addStandardTree" :disabled="active>1"></el-input-number>
            </div>
          </el-col>
          <!-- <el-col class="search_thing" :span="6">
@@ -356,7 +356,7 @@
                :disabled="active>1"
                type="date"
                placeholder="选择日期"
                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
              </el-date-picker>
            </div>
          </el-col>
@@ -368,7 +368,7 @@
                :disabled="active>1"
                type="date"
                placeholder="选择日期"
                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
              </el-date-picker>
            </div>
          </el-col>
@@ -1415,7 +1415,7 @@
          })
        })
        // 文件信息
        this.componentData0.entity.insOrderId = this.currentId
        this.componentData0.entity.insOrderId = this.currentId;
        this.$refs.fileList.selectList()
      }
    },
@@ -2847,7 +2847,7 @@
        }).then(res => {
          this.orderType = res.data
          if (res.data.length > 0) {
            this.addObj.orderType = res.data[0].value
            this.addObj.orderType = 'C'
          }
        })
      },
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -259,7 +259,7 @@
    <el-row class="title">
      <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">检验单详情
      </el-col>
      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end">
      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-top: 16px;">
        <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')">电调/非电调模板切换</el-button>
        <el-select v-model="template" size="medium" placeholder="电路预设模板" style="margin-right: 10px;margin-left: 10px;" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')"
          @change="selectInsProductTemplateById">
@@ -272,7 +272,7 @@
        <el-button size="medium" @click="templateDia=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')&&addInsProductTemplatePower">
            <span style="color: #3A7BFA;">保存模板</span>
          </el-button>
        <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">样品切换</el-button>
        <!-- <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">样品切换</el-button> -->
        <el-button size="small" type="primary" @click="taskVisible=true" v-show="!isLook">任务切换</el-button>
        <el-button size="small" type="primary" @click="handleSubmit" v-if="state==1"
          :loading="submitLoading">提交</el-button>
@@ -429,10 +429,10 @@
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='样品编号'">
                    <div style="display: flex;flex-wrap: nowrap;align-items: center;width: 100%" :title="currentSample.sampleCode">
                      <i class="el-icon-caret-left table_caret" style="width: 16px;" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i>
                      <!-- <i class="el-icon-caret-left table_caret" style="width: 16px;" @click="caretSample(-1)" v-if="!currentFiberOpticTape&&!currentFiberOptic"></i> -->
                      <div :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`">{{currentSample.sampleCode}}</div>
                      <i class="el-icon-caret-right table_caret" style="width: 16px;"
                      v-if="!currentFiberOpticTape&&!currentFiberOptic" @click="caretSample(1)"></i>
                      <!-- <i class="el-icon-caret-right table_caret" style="width: 16px;"
                      v-if="!currentFiberOpticTape&&!currentFiberOptic" @click="caretSample(1)"></i> -->
                    </div>
                  </template>
                  <template v-else-if="n.v.ps!=undefined && n.v.ps.value==='样品型号'">
@@ -750,7 +750,8 @@
      </div>
      <el-upload :action="action"
      :data="{
        orderId:id,
        orderId:this.orderId0,
        sampleId:id,
        sonLaboratory:sonLaboratory
      }"
      v-if="state==1&&fileAdd"
@@ -889,28 +890,31 @@
            :rows="2"></el-input>
          </div>
        </div>
        <table border="1" cellpadding="10" class="thermal-table">
          <tr style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;">
            <td>样品</td>
            <td>样品编号</td>
            <td>型号</td>
            <td>检验项</td>
            <td>检验子项</td>
            <td>工时</td>
          </tr>
          <template v-for="(item,index) in sampleProduct">
            <tr>
              <td :rowspan="item.insProduct.length+1">{{ item.sample }}</td>
              <td :rowspan="item.insProduct.length+1">{{ item.sampleCode }}</td>
              <td :rowspan="item.insProduct.length+1">{{ item.model }}</td>
        <template v-for="(x,y) in newUserInfo">
          <p style="margin: 10px 0;"><el-tag size="small">{{x.name}}</el-tag> 工时填写</p>
          <table border="1" cellpadding="10" class="thermal-table">
            <tr style="font-size: 18px;font-weight: 500;background-color: #F0F1F5;padding: 10px 0;box-sizing: border-box;">
              <td>样品</td>
              <td>样品编号</td>
              <td>型号</td>
              <td>检验项</td>
              <td>检验子项</td>
              <td>工时</td>
            </tr>
            <tr v-for="(m,i) in item.insProduct" :key="item.id+i">
              <td>{{ m.inspectionItem }}</td>
              <td>{{ m.inspectionItemSubclass }}</td>
              <td><el-input-number v-model="m.outputWorkTime" :min="0" :max="100" label="工时" size="small"></el-input-number></td>
            </tr>
          </template>
        </table>
            <template v-for="(item,index) in sampleProduct">
              <tr>
                <td :rowspan="item.insProduct.length+1">{{ item.sample }}</td>
                <td :rowspan="item.insProduct.length+1">{{ item.sampleCode }}</td>
                <td :rowspan="item.insProduct.length+1">{{ item.model }}</td>
              </tr>
              <tr v-for="(m,i) in item.insProduct" :key="item.id+i">
                <td>{{ m.inspectionItem }}</td>
                <td>{{ m.inspectionItemSubclass }}</td>
                <td><el-input-number v-model="x.timeArr[i]" :min="0" :max="100" label="工时" size="small"></el-input-number></td>
              </tr>
            </template>
          </table>
        </template>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="experimentDia = false">取 消</el-button>
@@ -949,7 +953,7 @@
  import PowerCapacity from './power-capacity.vue'
  import filePreview from '../../tool/file-preview.vue'
  export default {
    props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack'],
    props: ['sonLaboratory', 'orderId', 'state','inspectorList','version','orderStateId','isLook','num1','noBack','orderId0','userInfo'],
    components: {
      ValueTable,
      CircuitParameters1,
@@ -1010,8 +1014,9 @@
        },
        componentData0: {
          entity: {
            insOrderId:'',
            sonLaboratory:this.sonLaboratory
            insSampleId:'',
            sonLaboratory:this.sonLaboratory,
            insOrderId:''
          },
          isIndex: true,
          showSelect: false,
@@ -1156,6 +1161,7 @@
        templateLoading:false,
        templateName:'',
        addInsProductTemplatePower:false,//配置模板权限
        newUserInfo:[]
      }
    },
    // 用于上传文件的信息
@@ -1191,11 +1197,12 @@
      id(val) {
        this.loading = true
        this.$axios.post(this.$api.insOrderPlan.doInsOrder, {
          id: val,
          sampleId: val,
          laboratory: this.sonLaboratory
        }).then(async res => {
          this.insOrder = res.data.insOrder;
          this.componentData0.entity.insOrderId = val;
          this.componentData0.entity.insSampleId = val;
          this.componentData0.entity.insOrderId = this.orderId0;
          this.$refs.fileList.selectList()
          this.urgentList.forEach(m => {
            if (m.value == this.insOrder.type) {
@@ -3218,7 +3225,7 @@
      },
      // 复核
      upInsReview(e,type) {
        this.$confirm(`是否${type}?`, "提示", {
        this.$confirm(type=='结束试验'?'确认结束试验?确定后此委托单停止试验,并且无法再次检验!':`是否${type}?`, "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
@@ -3227,7 +3234,7 @@
          // 继续试验
          this.reviewLoading = true;
          this.$axios.post(this.$api.insOrderPlan.verifyPlan, {
            orderId: this.orderId,
            sampleId: this.orderId,
            type: e,
            laboratory: this.sonLaboratory,
            tell: null
@@ -3251,7 +3258,7 @@
        if (this.noReason) {
          this.reviewLoading = true;
          this.$axios.post(this.$api.insOrderPlan.verifyPlan, {
            orderId: this.orderId,
            sampleId: this.orderId,
            type: 0,
            laboratory: this.sonLaboratory,
            tell: this.noReason
@@ -3280,18 +3287,18 @@
            return
          }
        }
        let num =0
        this.sampleProduct.forEach(item=>{
          item.insProduct.forEach(a=>{
            if(!a.outputWorkTime){
              num++
            }
          })
        })
        if(num>0){
          this.$message.error('请输入完成工时')
          return
        }
        // let num =0
        // this.newUserInfo.forEach(item=>{
        //   item.timeArr.forEach(a=>{
        //     if(!a){
        //       num++
        //     }
        //   })
        // })
        // if(num>0){
        //   this.$message.error('请输入完成工时')
        //   return
        // }
        this.experimentDia = false
        this.experimentDia0 = false
        if(this.insOrder.orderType=='C'){
@@ -3311,6 +3318,21 @@
          return
        }
        this.experimentDia = true
        this.newUserInfo = []
        this.userInfo.name.forEach((item,index)=>{
          let timeArr = []
          this.sampleProduct.forEach(m=>{
            m.insProduct.forEach(a=>{
              timeArr.push(0)
            })
          })
          let obj = {
            name:item,
            id:this.userInfo.ids[index],
            timeArr:timeArr
          }
          this.newUserInfo.push(obj)
        })
        if (this.sonLaboratory === '电路试验') {
          this.experimentDia0 = true
        }
@@ -3323,27 +3345,30 @@
        this.addVerifyDia = false
        this.submitLoading = true;
        this.$axios.post(this.$api.insOrderPlan.checkSubmitPlan, {
          orderId: this.orderId,
          sampleId: this.orderId,
          laboratory: this.sonLaboratory,
        }).then(res => {
          if (res.code === 200) {
            let auxiliaryOutputWorkingHoursList = []
            this.sampleProduct.forEach(item=>{
              item.insProduct.forEach(a=>{
                let obj = {
                  inspectionItem:a.inspectionItem,
                  outputWorkTime:a.outputWorkTime,
                  inspectionItemSubclass:a.inspectionItemSubclass,
                  sample:item.sampleCode,
                  insProductId:a.id,
                  num:item.num1
                }
                auxiliaryOutputWorkingHoursList.push(obj)
              item.insProduct.forEach((a,i)=>{
                this.newUserInfo.forEach(b=>{
                  let obj = {
                    inspectionItem:a.inspectionItem,
                    outputWorkTime:b.timeArr[i],
                    inspectionItemSubclass:a.inspectionItemSubclass,
                    sample:item.sampleCode,
                    insProductId:a.id,
                    num:item.num1,
                    check:b.id
                  }
                  auxiliaryOutputWorkingHoursList.push(obj)
                })
              })
            })
            if(!res.data||res.data.length==0){
              this.$axios.post(this.$api.insOrderPlan.submitPlan, {
                orderId: this.orderId,
                sampleId: this.orderId,
                laboratory: this.sonLaboratory,
                verifyUser: this.verifyUser,
                entrustCode: this.insOrder.entrustCode,
@@ -3382,7 +3407,7 @@
                type: ""
              }).then(() => {
                this.$axios.post(this.$api.insOrderPlan.submitPlan, {
                  orderId: this.orderId,
                  sampleId: this.orderId,
                  laboratory: this.sonLaboratory,
                  verifyUser: this.verifyUser,
                  auxiliaryOutputWorkingHoursList:auxiliaryOutputWorkingHoursList,
@@ -3413,7 +3438,7 @@
      async handleCType(){
        if(this.insOrder.departmentLims=='质量部'){
          await this.$axios.post(this.$api.insOrderPlan.verifyPlan, {
            orderId: this.orderId,
            sampleId: this.orderId,
            type: 1,
            laboratory: this.sonLaboratory,
            tell: null
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -86,7 +86,7 @@
              <div style="text-align: center;">{{ n.unit }}</div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" v-html="n.tell"></div>
              <div style="text-align: center;" v-html="n.ask"></div>
            </el-col>
            <el-col :span="16">
              <div class="content" style="text-align: center;width: 100%;overflow-x: auto;">
@@ -127,7 +127,7 @@
              <div style="text-align: center;">{{ n.unit }}</div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" v-html="n.tell"></div>
              <div style="text-align: center;" v-html="n.ask"></div>
            </el-col>
            <el-col :span="16">
              <div class="content" style="text-align: center;width: 100%;overflow-x: auto;">
@@ -189,7 +189,7 @@
              <div style="text-align: center;">{{ n.unit }}</div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" v-html="n.tell"></div>
              <div style="text-align: center;" v-html="n.ask"></div>
            </el-col>
            <el-col :span="16">
              <div class="content" style="text-align: center;width: 100%;overflow-x: auto;">
@@ -235,7 +235,7 @@
              <div style="text-align: center;">{{ n.unit }}</div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" v-html="n.tell"></div>
              <div style="text-align: center;" v-html="n.ask"></div>
            </el-col>
            <el-col :span="17">
              <div class="content" style="text-align: center;width: 100%;overflow-x: auto;">
@@ -302,7 +302,7 @@
        {
          name:'电压驻波比',
          unit:'/',
          tell:'≤1.45',
          ask:'≤1.45',
          result:'',
          conclusion:'合格',
          portList:[],
@@ -312,7 +312,7 @@
        {
          name:'同极化隔离度',
          unit:'dB',
          tell:'≤1.45',
          ask:'≤1.45',
          result:'',
          conclusion:'合格',
          portList:[],
@@ -323,7 +323,7 @@
          name:'互调',
          band:'2100MHz',
          unit:'dB',
          tell:'≤1.45',
          ask:'≤1.45',
          result:'',
          conclusion:'合格',
          portList:[],
@@ -333,7 +333,7 @@
        {
          name:'偏差',
          unit:'dB',
          tell:'≤1.45',
          ask:'≤1.45',
          result:'',
          conclusion:'合格',
          portList:[],
@@ -344,7 +344,7 @@
          name:'最大耦合度',
          unit:'dB',
          band:'2100MHz',
          tell:'≤1.45',
          ask:'≤1.45',
          result:'',
          conclusion:'合格',
          portList:[],
@@ -479,19 +479,19 @@
                  this.angleList = angleList
                  this.upTemplateState = false;
                }
                let tell = ''
                if(item.tell.includes(',')){
                  item.tell.split(',').forEach((m,i)=>{
                    tell = tell + m+ (i==item.tell.split(',').length-1?'':'<br/>')
                let ask = ''
                if(item.ask.includes(',')){
                  item.ask.split(',').forEach((m,i)=>{
                    ask = ask + m+ (i==item.ask.split(',').length-1?'':'<br/>')
                  })
                }else{
                  tell = item.tell
                  ask = item.ask
                }
                console.log(tell)
                console.log(ask)
                let obj = {
                  inspectionItemSubclass: item.inspectionItemSubclass,
                  unit:item.unit,
                  tell:tell,
                  ask:ask,
                  result:n.result,
                  id:item.id,
                  often:n.often,
@@ -773,8 +773,8 @@
      this.$delete(this.loading, y)
      this.$set( this.loading, y, true)
      this.$axios.post(this.$api.insOrderPlan.saveInsContext2, {
        orderId:this.orderId,
        sampleId:this.sampleId,
        // orderId:this.orderId,
        sampleId:this.orderId,
        sonLaboratory:h.projectList[0].sonLaboratory,
        frequency:h.band,
        insProductResult2s:arr
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -86,7 +86,7 @@
              <div style="text-align: center;">{{ n.unit }}</div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" v-html="n.tell"></div>
              <div style="text-align: center;" v-html="n.ask"></div>
            </el-col>
            <el-col :span="16">
              <div class="content" style="text-align: center;width: 100%;overflow-x: auto;">
@@ -127,7 +127,7 @@
              <div style="text-align: center;">{{ n.unit }}</div>
            </el-col>
            <el-col :span="2">
              <div style="text-align: center;" v-html="n.tell"></div>
              <div style="text-align: center;" v-html="n.ask"></div>
            </el-col>
            <el-col :span="16">
              <div class="content" style="text-align: center;width: 100%;overflow-x: auto;">
@@ -213,7 +213,7 @@
        {
          inspectionItemSubclass:'电压驻波比',
          unit:'/',
          tell:'≤1.45',
          ask:'≤1.45',
          result:0,
          portList:[],
          angleList:[],
@@ -222,7 +222,7 @@
        {
          inspectionItemSubclass:'同极化隔离度',
          unit:'dB',
          tell:'≤1.45',
          ask:'≤1.45',
          result:0,
          portList:[],
          angleList:[],
@@ -232,7 +232,7 @@
          inspectionItemSubclass:'互调',
          often:'',//互调特有字段
          unit:'dB',
          tell:'≤1.45',
          ask:'≤1.45',
          result:0,
          portList:[],
          angleList:[],
@@ -350,18 +350,18 @@
                  this.angleList = angleList
                  this.upTemplateState = false
                }
                let tell = ''
                if(item.tell.includes(',')){
                  item.tell.split(',').forEach((m,i)=>{
                    tell = tell + m+ (i==item.tell.split(',').length-1?'':'<br/>')
                let ask = ''
                if(item.ask.includes(',')){
                  item.ask.split(',').forEach((m,i)=>{
                    ask = ask + m+ (i==item.ask.split(',').length-1?'':'<br/>')
                  })
                }else{
                  tell = item.tell
                  ask = item.ask
                }
                let obj = {
                  inspectionItemSubclass: item.inspectionItemSubclass,
                  unit:item.unit,
                  tell:tell,
                  ask:ask,
                  result:n.result,
                  id:item.id,
                  often:n.often,
@@ -649,8 +649,8 @@
      this.$set( this.loading, y, true)
      // this.loading[y] = true
      this.$axios.post(this.$api.insOrderPlan.saveInsContext2, {
        orderId:this.orderId,
        sampleId:this.sampleId,
        // orderId:this.orderId,
        sampleId:this.orderId,
        sonLaboratory:h.projectList[0].sonLaboratory,
        frequency:h.band,
        insProductResult2s:arr
src/components/do/b1-report-preparation/order.vue
@@ -38,55 +38,60 @@
      :append-to-body="true"
      :modal="!dialogVisible0"
      >
      <span>请选择委托编号为 <span style="color: #3A7BFA">{{currentInfo.entrustCode}}</span> 要生成的数据</span>
      <span style="font-size: 16px;">请选择委托编号为 <span style="color: #3A7BFA">{{currentInfo.entrustCode}}</span> 要生成的数据</span>
      <div style="max-height: 75vh;overflow-y: auto;">
        <el-card class="box-card" style="margin-top: 16px;" v-for="(item,index) in historyList" :key="index">
          <div slot="header" style="display: flex;justify-content: space-between;">
            <span>{{ item.laboratory }}</span>
          </div>
          <el-table
            :data="item.insOrderUserList"
            border
            style="width: 100%" @selection-change="list=>handleSelectionChange(list,item.insOrderUserList)">
            <el-table-column
              type="selection"
              width="55">
            </el-table-column>
            <el-table-column
              prop="submitTime"
              label="提交日期"
              min-width="150">
            </el-table-column>
            <el-table-column
              prop="submitUserName"
              label="提交人"
              min-width="90">
            </el-table-column>
            <el-table-column
              prop="term"
              label="实验阶段"
              min-width="120">
            </el-table-column>
            <el-table-column
              prop="note"
              label="实验操作"
              min-width="120">
            </el-table-column>
            <el-table-column
              prop="tell"
              label="再次检验原因"
              min-width="120">
            </el-table-column>
            <el-table-column
              fixed="right"
              label="操作"
              min-width="100">
              <template slot-scope="scope">
                <el-button @click="lookDetail(item,scope.row.num)" type="text" size="small">查看</el-button>
              </template>
            </el-table-column>
          </el-table>
        </el-card>
        <template v-for="(a,b) in sampleList">
          <el-divider></el-divider>
          <p style="margin: 10px 0;font-weight: 700;">样品:<el-tag size="small">{{a.insSample.sample}}</el-tag> &nbsp;&nbsp;&nbsp;&nbsp;样品编号:{{a.insSample.sampleCode}}</p>
          <el-card class="box-card" style="margin-top: 16px;" v-for="(item,index) in a.historyList" :key="index">
            <div slot="header" style="display: flex;justify-content: space-between;">
              <span>{{ item.laboratory }}</span>
            </div>
            <el-table
              :data="item.insOrderUserList"
              border
              style="width: 100%" @selection-change="list=>handleSelectionChange(list,item.insOrderUserList)">
              <el-table-column
                type="selection"
                width="55">
              </el-table-column>
              <el-table-column
                prop="submitTime"
                label="提交日期"
                min-width="150">
              </el-table-column>
              <el-table-column
                prop="submitUserName"
                label="提交人"
                min-width="90">
              </el-table-column>
              <el-table-column
                prop="term"
                label="实验阶段"
                min-width="120">
              </el-table-column>
              <el-table-column
                prop="note"
                label="实验操作"
                min-width="120">
              </el-table-column>
              <el-table-column
                prop="tell"
                label="再次检验原因"
                min-width="120">
              </el-table-column>
              <el-table-column
                fixed="right"
                label="操作"
                min-width="100">
                <template slot-scope="scope">
                  <el-button @click="lookDetail(item,scope.row.num,a.insSample)" type="text" size="small">查看</el-button>
                </template>
              </el-table-column>
            </el-table>
          </el-card>
          <p v-if="a.historyList.length==0" style="text-align: center;">暂无可生成的数据</p>
        </template>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="loading0" @click="handleNoCreate">不生成</el-button>
@@ -98,7 +103,9 @@
      :visible.sync="dialogVisible0"
      width="100%" :fullscreen="true" :modal="false" :append-to-body="true">
      <Inspection v-if="dialogVisible0"
      :orderId="currentInfo.id"
      :orderId="sampleId"
      :orderId0="orderId0"
      :userInfo="{}"
      :inspectorList="currentItem.inspectorList"
      :sonLaboratory="currentItem.laboratory"
      :state="2"
@@ -129,7 +136,7 @@
          sampleModel: null,
          sampleCode: null,
          outEntrustCode: null,
          state: 1,
          state: 4,
          name:null,
          engineering:null,
          production:null,
@@ -210,7 +217,10 @@
      currentItem:{},
      loading0:false,
      loading1:false,
      dialogVisible0:false
      dialogVisible0:false,
      sampleList:[],
      sampleId:null,
      orderId0:null,
    }
  },
  mounted() {
@@ -242,38 +252,65 @@
    handleCreateReport(row){
      this.currentInfo = row
      this.$axios.get(this.$api.insReport.getInsOrderStateCount+'?id='+row.id).then(res => {
        this.historyList = res.data
        this.historyList.forEach(item => {
          item.arr = []
          this.$set(item,'numValue',1)
          // item.checked = false;
          if(item.num>0){
            for(var i=0;i<item.num;i++){
              item.arr.push({
                label:'记录'+(i+1),
                value:i+1
              })
        this.sampleList = res.data
        this.sampleList.forEach(a=>{
          a.historyList = a.insOrderStates
          a.historyList.forEach(item => {
            item.arr = []
            this.$set(item,'numValue',1)
            if(item.num>0){
              for(var i=0;i<item.num;i++){
                item.arr.push({
                  label:'记录'+(i+1),
                  value:i+1
                })
              }
            }
          }
          })
        })
        // this.historyList = res.data
        // this.historyList.forEach(item => {
        //   item.arr = []
        //   this.$set(item,'numValue',1)
        //   // item.checked = false;
        //   if(item.num>0){
        //     for(var i=0;i<item.num;i++){
        //       item.arr.push({
        //         label:'记录'+(i+1),
        //         value:i+1
        //       })
        //     }
        //   }
        // })
        this.dialogVisible = true
      })
    },
    // 生成报告
    handleCreate(){
      let arr = []
      this.historyList.forEach(item => {
        item.insOrderUserList.forEach(item1 => {
          if(item1.state==1){
            arr.push({
              laboratory:item.laboratory,
              num:item1.num,
              insOrderUsersId:item1.id
            })
          }
      let insReportDto1s = []
      let num = 0;
      this.sampleList.forEach(a => {
        let insReportDto2s = []
        a.historyList.forEach(item => {
          item.insOrderUserList.forEach(item1 => {
            if(item1.state==1){
              let obj0 = {
                laboratory:item.laboratory,
                num:item1.num,
                insOrderUsersId:item1.id
              }
              insReportDto2s.push(obj0)
              num++
            }
          })
        })
        let obj0 = {
          sampleId:a.insSample.id,
          insReportDto2s:insReportDto2s
        }
        insReportDto1s.push(obj0)
      })
      if(arr.length==0){
      if(num==0){
        this.$message.error("请先选择需要生成的记录!")
        return
      }
@@ -281,7 +318,7 @@
      this.$axios.post(this.$api.insReport.isReport, {
        id:this.currentInfo.id,
        state:1,
        insReportDto1s:arr
        insReportDto1s:insReportDto1s
      },{
        headers: {
          'Content-Type': 'application/json'
@@ -319,12 +356,14 @@
      })
    },
    // 查看检验详情
    lookDetail(row,value){
    lookDetail(row,value,insSample){
      this.dialogVisible0 = true
      let inspectorList = []
      if(row.userName){
        inspectorList = row.userName.split(',')
      }
      this.sampleId = insSample.id
      this.orderId0 = insSample.insOrderId
      this.currentItem = {
        num1:value,
        inspectorList:inspectorList,
src/components/tool/file-preview.vue
@@ -67,6 +67,7 @@
import VueOfficeExcel from '@vue-office/excel'
//引入相关样式
import '@vue-office/excel/lib/index.css'
import * as XLSX from "xlsx";
export default {
  components: {
    VueOfficeDocx,
@@ -164,6 +165,11 @@
          return obj
        })
        this.csvList = arr
        // console.log(333,this.csvList)
        this.csvList.forEach(m=>{
          console.log(this.calculateFormulas(m.column,m.tableData))
          m.tableData = this.calculateFormulas(m.column,m.tableData)
        })
      }).catch( err => {
        console.log(err)
      })
@@ -205,6 +211,28 @@
      }
      return result
    },
    /**
     * 计算表格公式
     *
     * @param tableHeaders 表头数据
     * @param tableData 表格数据
     */
    calculateFormulas(tableHeaders,tableData){
      // 生成 Excel Sheet 格式
      const sheetData = [tableHeaders.map(m=>m.label), ...tableData.map((row) => Object.values(row))];
      const worksheet = XLSX.utils.aoa_to_sheet(sheetData);
      // 计算公式
      XLSX.utils.sheet_add_aoa(worksheet, [], { origin: -1 });
      const newSheetData = XLSX.utils.sheet_to_json(worksheet, { header: 1 });
      // 更新表头和表格数据
      tableData = newSheetData.slice(1).map((row) =>
        row.reduce((obj, value, index) => {
          obj[newSheetData[0][index]] = value;
          return obj;
        }, {})
      );
      return tableData
    },
    resetStyle(){
      const elements = document.querySelectorAll('[style*="pt"]');
      for (const element of elements) {
@@ -213,7 +241,7 @@
          element.setAttribute('style', style.replace(/pt/g, 'px'));
        }
      }
    }
    },
  }
}
</script>
src/components/view/b1-inspect-order-plan.vue
@@ -144,6 +144,13 @@
                        </el-select>
                    </div>
                </div>
        <div class="search_thing">
                    <div class="search_label">样品编号:</div>
                    <div class="search_input">
                        <el-input size="small" placeholder="请输入" clearable
                            v-model="componentData.entity.sampleCOde" @keyup.enter.native="refreshTable()"></el-input>
                    </div>
                </div>
                <div class="search_thing" style="padding-left: 30px;">
                    <el-button size="small" @click="refresh()">重 置</el-button>
                    <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
@@ -203,12 +210,17 @@
            width="100px"
          ></el-table-column>
          <el-table-column
            prop="sampleCode"
            label="样品编号"
            width="170px"
          ></el-table-column>
          <el-table-column
            prop="type"
            label="紧急程度"
            width="100px"
          >
            <template slot-scope="scope">
              <el-tag :type="typeList.find(m=>m.value==scope.row.type).type" size="small">{{ typeList.find(m=>m.value==scope.row.type).label }}</el-tag>
              <el-tag :type="typeList.find(m=>m.value==scope.row.type)?typeList.find(m=>m.value==scope.row.type).type:''" size="small">{{ typeList.find(m=>m.value==scope.row.type)?typeList.find(m=>m.value==scope.row.type).label:'' }}</el-tag>
            </template>
          </el-table-column>
          <el-table-column
@@ -320,7 +332,7 @@
        <div style="width: 100%;height: 100%;" v-if="activeFace >0">
            <Add :active="activeFace" :currentId="currentId" :examine="examine"/>
        </div>
    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1"/>
    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1" :orderId0="orderId0" :userInfo="userInfo" />
      <el-dialog title="数据查看" :visible.sync="dataDialogVisible" width="80%">
                <div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible">
                    <ValueTable ref="ValueTableDataLook" :rowKey="'insProductId'" :url="$api.insOrder.selectSampleAndProductByOrderId"
@@ -502,7 +514,8 @@
                    entity: {
                        sonLaboratory: null,
                        insState: null,
                        userId: null
                        userId: null,
            sampleCode:null,
                    },
          sortable:true,
                    isIndex: true,
@@ -609,7 +622,8 @@
                activeFace: 0, //1:下单,2:查看,3:审核,默认为0
                currentId: null,
                entityCopy: {},
                orderId: 0,
                orderId: null,
        orderId0:null,
        personList:[],
        connectVisible:false,
        connect:{
@@ -659,7 +673,11 @@
        upLoadStorage: false,
        exportVisible: false,
        upLoadExport: false,
        selectWarehouse:false
        selectWarehouse:false,
        userInfo:{
          name:[],
          ids:[]
        }
            }
        },
        created() {
@@ -904,7 +922,7 @@
                if (row) {
                    this.sampleUserForm = {
                        entrustCode: row.entrustCode,
                        insSampleId: row.id,
                        insSampleId: row.sampleId,
            sonLaboratory: row.sonLaboratory,
                    }
                    this.claimVisible = true
@@ -912,11 +930,13 @@
            },
            confirmClaim() {
        this.loading = true;
        // this.sampleUserForm.insSampleId = this.orderId
                this.$axios.post(this.$api.insOrderPlan.claimInsOrderPlan, this.sampleUserForm, {
                    headers: {
                        'Content-Type': 'application/json'
                    }
                }).then(res => {
                    },
          noQs:true
                },).then(res => {
                    if (res.code === 200 && res.data) {
            this.loading = false;
                        this.$message.success("认领成功")
@@ -1054,14 +1074,18 @@
          inspectorList.push(user.name)
        }
        this.inspectorList = inspectorList
                this.orderId = row.id
                this.orderId = row.sampleId
        this.orderId0 = row.id
        this.version = row.version
        this.orderStateId = row.orderStateId
        this.state = 1;
        this.userInfo.name = row.userName.split(',')
        this.userInfo.ids = row.userNameId.split(',')
        this.isLook = false
      },
      handleConnect(row){
        this.orderId = row.id
        this.orderId = row.sampleId
        this.orderId0 = row.id
        this.connect = {}
        this.connectVisible=true;
        // this.$axios.post(this.$api.insOrderPlan.upPlanUser2, {
@@ -1090,7 +1114,7 @@
        // }
        this.loading = true;
          this.$axios.post(this.$api.insOrderPlan.upPlanUser, {
            orderId:this.orderId,
            sampleId:this.orderId,
            userId:this.connect.connectPerson,
            sonLaboratory:this.componentData.entity.sonLaboratory,
          }).then(res => {
@@ -1107,7 +1131,8 @@
      },
      handleReview(row){
        this.state = 2;
                this.orderId = row.id
                this.orderId = row.sampleId
        this.orderId0 = row.id
        this.version = row.version
        this.orderStateId = row.orderStateId
        this.isLook = false
@@ -1136,7 +1161,8 @@
      lookHistory(row){
        this.isLook = true
        this.state = 2;
        this.orderId = this.currentHistory.id
        this.orderId = this.currentHistory.sampleId
        this.orderId0 = this.currentHistory.id
        this.version = this.currentHistory.version
        this.orderStateId = this.currentHistory.orderStateId
        this.num1 = row.num
src/components/view/b1-inspection-order.vue
@@ -489,6 +489,9 @@
                    </el-row>
                </span>
        </el-dialog>
    <el-dialog title="报告下载" :visible.sync="downVisible" width="440px">
      <p v-for="(item,index) in downList" :key="index" style="text-align: left;">样品编号:{{item.codeUrl}} <el-button type="text" icon="el-icon-download" @click="handleDown(item)">报告下载</el-button></p>
    </el-dialog>
    </div>
</template>
@@ -571,7 +574,7 @@
                        type: 'text',
                        method: 'download',
                        disabFun: (row, index) => {
                            return row.state != 4 || row.reportId == null
                            return !row.reportDtos||row.reportDtos.length==0
                        }
                    }, {
                        id: 'verify',
@@ -810,6 +813,8 @@
        currentRole:'',
        BZinfo:[],
        BZDialogVisible:false,
        downVisible:false,
        downList:[]
            }
        },
    watch:{
@@ -1079,6 +1084,10 @@
            },
            // 下载报告
            download(row) {
        this.downList = row.reportDtos
        this.downVisible = true;
      },
      handleDown(row){
        let url = row.urlS?row.urlS:row.url;
        if(url){
          url = url.split('.')[0]+'.pdf'
src/main.js
@@ -21,7 +21,7 @@
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
const javaApi = 'http://192.168.20.249:8001';
const javaApi = 'http://172.20.10.5:8001';
// //通信测试库
// Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080";