feat(inspection): 1.添加报告类型功能并优化检验流程
2.设备管理组件中的部门列表获取方法优化
已修改5个文件
63 ■■■■ 文件已修改
src/views/CNAS/resourceDemand/device/component/management.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/components/InspectionWord.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionView/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/reportPreparation/index.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/management.vue
@@ -391,7 +391,6 @@
import limsTable from "@/components/Table/lims-table.vue";
import dataAcquisitionConfig from './acquisitionConfig.vue'
import {
    obtainItemParameterList,
    exportEquipmentDetails,
    getInsProduction,
    upDeviceParameter,
@@ -400,6 +399,7 @@
    getDeviceParameter,
    delDeviceParameter,
} from '@/api/cnas/resourceDemand/device.js'
import { listDept } from '@/api/system/dept'
import { selectUserCondition } from "@/api/business/inspectionTask";
export default {
    props: {
@@ -563,7 +563,7 @@
    mounted() {
        this.selectEnumByCategory()
        this.selectDevicePrincipal()
        this.obtainItemParameterList()
        this.obtainDepartmentList()
        this.getInsProductIds()
        // 初始化
        this.clickSidebar(this.clickNodeVal)
@@ -573,13 +573,13 @@
        handleNotification(cate) {
            this.queryParams.largeCategory = cate
        },
        obtainItemParameterList() {
            obtainItemParameterList().then(res => {
        obtainDepartmentList() {
            listDept({ status: '0' }).then(res => {
                let data = []
                res.data.forEach(a => {
                    data.push({
                        label: a.laboratoryName,
                        value: a.id
                        label: a.deptName,
                        value: a.deptId
                    })
                })
                this.subordinateDepartmentsList = data
src/views/business/inspectionTask/components/InspectionWord.vue
@@ -1789,15 +1789,17 @@
      checkSubmitPlan({
        orderId: this.orderId,
        laboratory: this.sonLaboratory,
        reportType: this.reportType,
      }).then(res => {
        if (res.code === 200) {
          if (!res.data || res.data.length == 0) {
          if (!res.data || res.data.errorMsg.length == 0) {
            this.submitLoading = true;
            submitPlan({
              orderId: this.orderId,
              laboratory: this.sonLaboratory,
              verifyUser: this.verifyUser,
              entrustCode: this.insOrder.entrustCode,
              registerInsResults: this.reportType === 1,
              reportType: this.reportType
            }).then(res => {
              if (res.code === 200) {
@@ -1813,12 +1815,12 @@
          } else {
            let newData = []
            const h = this.$createElement
            for (let i in res.data) {
              const lastChar = res.data[i].slice(-1);
            for (let i in res.data.errorMsg) {
              const lastChar = res.data.errorMsg[i].slice(-1);
              if (lastChar == '-') {
                res.data[i] = res.data[i].slice(0, -1);
                res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1);
              }
              newData.push(h('p', { style: 'font-size: 14px;color: red;' }, (Number(i) + 1) + '、' + res.data[i]))
              newData.push(h('p', { style: 'font-size: 14px;color: red;' }, (Number(i) + 1) + '、' + res.data.errorMsg[i]))
            }
            newData.push(h('p', { style: 'font-size: 16px;color:#000;margin-top:12px;overflow-y: auto;max-height:80vh' }, '以上项目不合格,确定提交?'))
            this.$confirm('提示', {
@@ -1833,6 +1835,7 @@
                orderId: this.orderId,
                laboratory: this.sonLaboratory,
                verifyUser: this.verifyUser,
                registerInsResults: false,
                reportType: this.reportType
              }).then(res => {
                if (res.code === 200) {
src/views/business/inspectionTask/inspection.vue
@@ -2755,6 +2755,7 @@
      this.$refs.viewManHourDia.showDialog(this.id, 99);
    },
    openAddVerifyDia() {
      this.reportType = null;
      this.addVerifyDia = true;
    },
    confirmSubmit(registerInsResults){
@@ -2803,12 +2804,13 @@
      checkSubmitPlan({
        orderId: this.orderId,
        laboratory: this.sonLaboratory,
        reportType: this.reportType,
      }).then((res) => {
        if (res.code === 200) {
          if (!res.data || res.data.errorMsg.length == 0) {
            this.submitLoading = true;
            //检验类型为原材料
            if(this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){
            if(this.reportType === 1 && this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){
              const htmlStr = "是否登记IFS采购检验结果并移库?该操作会登记<span style='color:#ff4949'>同一零件同一订单的所有拆分批次</span>,请谨慎选择。"
              this.$confirm(htmlStr, '提示', {
                confirmButtonText: '是',
src/views/business/inspectionView/index.vue
@@ -2561,6 +2561,7 @@
      this.$refs.viewManHourDia.showDialog(this.id, 99);
    },
    openAddVerifyDia() {
      this.reportType = null;
      this.addVerifyDia = true;
    },
    submit() {
@@ -2584,15 +2585,17 @@
      checkSubmitPlan({
        orderId: this.orderId,
        laboratory: this.sonLaboratory,
        reportType: this.reportType,
      }).then((res) => {
        if (res.code === 200) {
          if (!res.data || res.data.length == 0) {
          if (!res.data || res.data.errorMsg.length == 0) {
            this.submitLoading = true;
            submitPlan({
              orderId: this.orderId,
              laboratory: this.sonLaboratory,
              verifyUser: this.verifyUser,
              entrustCode: this.insOrder.entrustCode,
              registerInsResults: this.reportType === 1,
              reportType: this.reportType,
            }).then((res) => {
              if (res.code === 200) {
@@ -2609,16 +2612,16 @@
          } else {
            let newData = [];
            const h = this.$createElement;
            for (let i in res.data) {
              const lastChar = res.data[i].slice(-1);
            for (let i in res.data.errorMsg) {
              const lastChar = res.data.errorMsg[i].slice(-1);
              if (lastChar == "-") {
                res.data[i] = res.data[i].slice(0, -1);
                res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1);
              }
              newData.push(
                h(
                  "p",
                  { style: "font-size: 14px;color: red;" },
                  Number(i) + 1 + "、" + res.data[i]
                  Number(i) + 1 + "、" + res.data.errorMsg[i]
                )
              );
            }
@@ -2645,6 +2648,7 @@
                  orderId: this.orderId,
                  laboratory: this.sonLaboratory,
                  verifyUser: this.verifyUser,
                  registerInsResults: false,
                  reportType: this.reportType,
                }).then((res) => {
                  if (res.code === 200) {
src/views/business/reportPreparation/index.vue
@@ -11,6 +11,11 @@
            <el-option v-for="(a, i) in queryStatusList" :key="i" :label="a.label" :value="a.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="报告类型" prop="reportType">
          <el-select v-model="entity.reportType" clearable size="small" @change="refreshTable()">
            <el-option v-for="item in reportTypeList" :key="item.value" :label="item.label" :value="item.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="下单类别" prop="typeSource">
          <el-select v-model="entity.typeSource" clearable size="small" @change="refreshTable()">
            <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>
@@ -228,7 +233,8 @@
        code: null,
        typeSource: null,
        orderType: null,
        materialProp: null
        materialProp: null,
        reportType: null
      },
      page: {
        current: 1,
@@ -272,6 +278,10 @@
        { label: '抽检', value: '抽检' },
        { label: '进厂检验', value: '进厂检验' },
        { label: '季度检验', value: 'Quarterly inspection' },
      ],
      reportTypeList: [
        { label: '检测报告', value: 0 },
        { label: '检验报告', value: 1 },
      ],
      showInfoDialog: false, // 产业链信息查看
      isReport: 1,
@@ -357,6 +367,14 @@
          linkMethod: "selectAllByOne",
        },
        {
          label: '报告类型',
          prop: 'reportType',
          width: '100px',
          dataType: 'tag',
          formatData: (params) => params === 0 ? '检测报告' : '检验报告',
          formatType: (params) => params === 0 ? 'warning' : 'success',
        },
        {
          label: "下单类别",
          prop: "typeSource",
          width: "100px",