licp
2024-12-18 e529237c143617b6b8addc235bc44c1653637e60
检验提交可撤销
已修改5个文件
56 ■■■■ 文件已修改
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/humidity.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -223,6 +223,7 @@
  getInsOrderUserList: "/insOrderPlan/getInsOrderUserList", // 查看检验历史列表
  preview: "/insOrderPlan/preview", // csv文件预览
  outInsOrderState: "/insOrderPlan/outInsOrderState", // 检验任务扫码出库
  cancelSubmitPlan: "/insOrderPlan/cancelSubmitPlan", // 检验任务提交后撤销提交
}
const systemLog = {
src/components/do/b1-ins-order/add.vue
@@ -1971,13 +1971,14 @@
          let projectNum = this.totalArr.filter(a => a.state == 1).length
          if(projectNum==0){
            this.$confirm('检验项目为空,是否确认提交?', "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning"
            }).then(() => {
              this.saveMethod(sampleList)
            }).catch(() => {})
            // this.$confirm('检验项目为空,是否确认提交?', "提示", {
            //   confirmButtonText: "确定",
            //   cancelButtonText: "取消",
            //   type: "warning"
            // }).then(() => {
            //   this.saveMethod(sampleList)
            // }).catch(() => {})
            return this.$message.error('请添加检验项目')
          }else{
            let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask&&a.ask.includes(b)) && a.state == 1)
            if (isRTS&&this.PROJECT=='检测中心') {
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;margin-bottom: 16px;">
      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;height: 60px;">
        <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">
src/components/do/b1-inspect-order-plan/humidity.vue
@@ -30,7 +30,7 @@
        </tr>
        <tr>
          <td style="font-size: 16px;background-color: #F0F1F5;">实验前样品检查</td>
          <td colspan="2">
          <td :colspan="item.beforeCheck=='破损'?1:2">
            <el-select v-model="item.beforeCheck" placeholder="请选择" size="small" :disabled="state>1" @change="save(item)">
              <el-option
                v-for="item in options"
@@ -40,8 +40,12 @@
              </el-option>
            </el-select>
          </td>
          <td v-if="item.beforeCheck=='破损'">
            <el-input v-model="item.beforeNote" placeholder="破损说明" size="small" :disabled="state>1" style="display: inline-block;width: 100%;" @change="save(item)" type="textarea"
              :rows="3"></el-input>
          </td>
          <td style="font-size: 16px;background-color: #F0F1F5;">实验后样品检查</td>
          <td colspan="2">
          <td :colspan="item.afterCheck=='破损'?1:2">
            <el-select v-model="item.afterCheck" placeholder="请选择" size="small" :disabled="state>1" @change="save(item)">
              <el-option
                v-for="item in options"
@@ -50,6 +54,10 @@
                :value="item.value">
              </el-option>
            </el-select>
          </td>
          <td v-if="item.afterCheck=='破损'">
            <el-input v-model="item.afterNote" placeholder="破损说明" size="small" :disabled="state>1" style="display: inline-block;width: 100%;" @change="save(item)" type="textarea"
              :rows="3"></el-input>
          </td>
        </tr>
        <tr v-if="item.inspectionItemSubclass&&item.inspectionItemSubclass.includes('低')">
@@ -134,6 +142,8 @@
          this.$set(item,'equipName','')
          this.$set(item,'beforeCheck','')
          this.$set(item,'afterCheck','')
          this.$set(item,'afterNote','')
          this.$set(item,'beforeNote','')
        }else{
          // 赋值
          this.$set(item,'list',JSON.parse(item.insProductResult.insValue))
@@ -155,6 +165,8 @@
          this.$set(item,'equipName',item.insProductResult.equipName?JSON.parse(item.insProductResult.equipName)[0].v:'')
          this.$set(item,'beforeCheck',item.insProductResult.beforeCheck)
          this.$set(item,'afterCheck',item.insProductResult.afterCheck)
          this.$set(item,'afterNote',item.insProductResult.afterNote)
          this.$set(item,'beforeNote',item.insProductResult.beforeNote)
        }
      })
    },
@@ -240,6 +252,8 @@
        num:this.num,
        beforeCheck:item.beforeCheck,
        afterCheck:item.afterCheck,
        afterNote:item.afterNote,
        beforeNote:item.beforeNote,
      }, {
      headers: {
        'Content-Type': 'application/json'
src/components/view/b1-inspect-order-plan.vue
@@ -269,12 +269,13 @@
          <el-table-column
            fixed="right"
            align="center" label="操作"
            width="320px"
            width="340px"
          >
          <template slot-scope="scope">
            <el-button @click="handleDataLook(scope.row)" type="text" size="small">数据查看</el-button>
            <el-button @click="handleInspection(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="inspection">检验</el-button>
            <el-button @click="handleConnect(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 5  || scope.row.insState == 3||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="connect">交接</el-button>
            <el-button @click="cancelSubmitPlan(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="inspection">撤销</el-button>
            <el-button @click="handleReview(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.checkName&&!scope.row.checkName.includes(userName))" v-if="review">复核</el-button>
            <el-button @click="claimFun(scope.row)" type="text" size="small" :disabled="scope.row.userName != null || scope.row.checkName!=null" v-if="claim">认领</el-button>
            <el-button @click="lookHistory0(scope.row)" type="text" size="small">查看记录</el-button>
@@ -1188,6 +1189,23 @@
                //     }
                // })
      },
      cancelSubmitPlan(row){
        this.$confirm('确定撤销此次检验提交?', "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          this.$axios.post(this.$api.insOrderPlan.cancelSubmitPlan, {
          orderStateId: row.orderStateId
                }).then(res => {
          if(res.code==201){
            return
          }
          this.$message.success("操作成功")
          this.refreshTable('page')
        }).catch(() => {})
        }).catch(() => {})
      },
      confirmConnect(){
        if(this.connect.connectPerson==null||this.connect.connectPerson==''||this.connect.connectPerson==undefined){
          this.$message.error('未选择交接人员')