已修改3个文件
67 ■■■■■ 文件已修改
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -277,6 +277,7 @@
  upPlanUser2: "/insOrderPlan/upPlanUser2", //任务交接
  verifyPlan: "/insOrderPlan/verifyPlan", //复核检验任务
  submitPlan: "/insOrderPlan/submitPlan", //检验任务提交
  changeSampleCode: "/insOrderPlan/changeSampleCode", //样品编号更改
  inspectionOrderDetailsTaskSwitching:
    "/insOrderPlan/inspectionOrderDetailsTaskSwitching", // 检验单详情-任务切换
  getInsProduct: "/insOrderPlan/getInsProduct", // 获取检验项目和模板内容
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -315,6 +315,7 @@
          <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="showSampleChangeDialog"  v-show="!isLook">样品编号更改</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>
@@ -1168,6 +1169,21 @@
        <el-button type="primary" @click="upInsReview" :loading="reviewLoading">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="修改样品编号"
      :visible.sync="changeSampleDialog"
      width="30%"
      :before-close="handleCloseSampleChangeDialog">
      <el-form ref="changeSampleFormRef" :model="changeSampleForm" :rules="{sampleCode:[{required:true,message:'请输入样品编号',trigger:'blur'}]}">
        <el-form-item label="样品编号:" prop="sampleCode" >
        <el-input clearable v-model="changeSampleForm.sampleCode" placeholder='样品编号'></el-input>
      </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handleCloseSampleChangeDialog">取 消</el-button>
        <el-button type="primary" @click="confirmChangeSample">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
@@ -1206,6 +1222,10 @@
  },
  data() {
    return {
      changeSampleDialog: false,
      changeSampleForm:{
        sampleCode:null,
      },
      lookFileVisible: false, //预览文件
      experimentDia: false,
      experimentDia0: false,
@@ -1645,6 +1665,37 @@
    this.stopWorker();
  },
  methods: {
    handleCloseSampleChangeDialog(){
      this.changeSampleForm = {sampleChange:null}
      this.$refs.changeSampleFormRef.resetFields();
      this.changeSampleDialog = false
    },
    //确认修改样品编号
    confirmChangeSample(){
      this.$refs.changeSampleFormRef.validate((valid)=>{
        if(valid){
          this.$axios.post(this.$api.insOrderPlan.changeSampleCode,{
            id:this.currentSample.id,
            sampleCode:this.changeSampleForm.sampleCode
          },{
            headers:{"Content-Type":"application/json"}
          }).then(res=>{
            if(res.code==200){
              this.$message.success("修改成功")
              //调用刷新方法
              this.currentSample.sampleCode = this.changeSampleForm.sampleCode
            }
            this.$nextTick(()=>{
              this.handleCloseSampleChangeDialog()
            })
          })
        }
      })
    },
    //显示修改样品编号
    showSampleChangeDialog(){
      this.changeSampleDialog = true
    },
    // 数据采集
    getDataAcquisitionDevice() {
      if (
@@ -4510,9 +4561,11 @@
            let url = "";
            if (res.data.type == 1) {
              url = this.javaApi + "/img/" + res.data.fileUrl;
              url = url.replace(/#/g, "%23");
              file.downloadIamge(url, row.fileName);
            } else {
              url = this.javaApi + "/word/" + res.data.fileUrl;
              url = url.replace(/#/g, "%23");
              const link = document.createElement("a");
              link.href = url;
              link.download = row.fileName;
@@ -4586,6 +4639,7 @@
      } else {
        this.currentFile.url = this.javaApi + "/word/" + row.fileUrl;
      }
      this.currentFile.url = this.currentFile.url.replace(/#/g, "%23");
      this.lookFileVisible = true;
    },
    handleBack() {
src/components/view/b1-inspect-order-plan.vue
@@ -143,7 +143,7 @@
        <div class="search_thing">
          <div class="search_label">检验状态:</div>
          <div class="search_input">
            <el-select size="small" v-model="componentData.entity.insState" style="width: 100%;"
            <el-select size="small" v-model="componentData.entity.insState" clearable style="width: 100%;"
              @change="refreshTable()">
              <el-option v-for="(a, i) in insStateList" :key="i" :label="a.label" :value="a.value"></el-option>
            </el-select>
@@ -156,6 +156,16 @@
              @keyup.enter.native="refreshTable()"></el-input>
          </div>
        </div>
        <div class="search_thing">
          <div class="search_label">人员:</div>
          <div class="search_input">
           <el-select size="small" v-model="componentData.entity.userName" filterable clearable style="width: 100%;"
              @change="refreshTable()">
              <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.label">
            </el-option>
            </el-select>
          </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>