lxp
2024-08-08 27e9d168a2192b143124387c7dc55b302d5d8c4e
Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before
已修改4个文件
已删除1个文件
96 ■■■■ 文件已修改
.nvmdrc 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/enter.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.nvmdrc
ÎļþÒÑɾ³ý
src/components/do/b1-ins-order/add.vue
@@ -1592,13 +1592,14 @@
              }
              return true
          })
          //校验检验项的要求值和要求描述
          const isTrue = this.checkRequiredValueAndRemark(filterProductList)
          if(!isTrue){
            this.$message.error('检验项的要求值与要求描述不匹配, è¯·æ£€æŸ¥')
            return
          //校验检验项的要求值和要求描述,仅委托要求
          if(this.active==1&&this.isAskOnlyRead){
            const isTrue = this.checkRequiredValueAndRemark(filterProductList)
            if(!isTrue){
              this.$message.error('检验项的要求值与要求描述不匹配, è¯·æ£€æŸ¥')
              return
            }
          }
          console.log('isHaveBushing===', this.totalArr)
          // inspectionItem
          let spcialItem = null//this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('松套管'))
@@ -1642,28 +1643,57 @@
          }
        }
      },
      /**
       * æ ¡éªŒå§”托要求的检验项的要求描述和要求值
       *
       */
      checkRequiredValueAndRemark(data){
        let isTrue = true
        try{
          data.forEach(ele=>{
            //判断(≤,≥,>,<,=)这几种情况
            //判断要求值中的数字是否包含在要求描述中
            if(['≤','≥','>','<','='].includes(ele.ask[0])){
              const askVal = ele.ask.substring(1,ele.ask.length)
              if(isNaN(askVal) || ele.tell.indexOf(askVal)<0){
                isTrue = false
              }
            }
            //判断范围(10-25),要求值必须是-
            if(ele.ask.indexOf('-')>0 && ele.ask.length>1){
              //要求描述的~和要求值的-,等效
              let tell = ele.tell
              if(ele.tell.indexOf('~')>0){
                tell = ele.tell.replace('~','-')
              }
              const splits = ele.ask.split('-')
              //满足格式要求,并且两个都是数字
              if(splits.length==2 && !isNaN(splits[0]) && !isNaN(splits[1])){
                let min = Math.min(...splits)
                let max = Math.max(...splits)
                if(ele.tell.indexOf('±')<0&&tell.indexOf(ele.ask)<0){
                /**
                 * åˆ¤æ–­æƒ…况
                 * 1.要求描述与要求描述相同
                 * 2.要求描述包含要求值
                 * 3.要求描述为3N-10N这种情况
                 * 4.要求描述为10±5这种情况
                 * 5.
                 */
                 let min = Math.min(...splits)
                 let max = Math.max(...splits)
                 if(min==max){
                  isTrue = false
                }else if(ele.tell.indexOf('±')>0&&ele.tell!=ele.ask){
                 }
                //要求描述中不包含±以及区间的数字,则返回false
                if((tell.indexOf('±')<0&&tell.indexOf('-')<0)){
                  isTrue = false
                }else if(ele.tell.indexOf('-')==0){
                  isTrue = false
                }else if(tell.indexOf('-')>0){
                  const splitTells = tell.split('-')
                  if(splitTells[0].indexOf(min)<0 || splitTells[1].indexOf(max)<0){
                    isTrue = false
                  }
                }else if(tell.indexOf('±')>0&&tell!=ele.ask){
                  //校验要求描述为10±5这种写法的情况
                  let splitNums = ele.tell.split('±')
                  if(splitNums.length<2){
                    isTrue = false
@@ -2412,6 +2442,11 @@
        this.$axios.post(this.$api.insOrder.selectInsOrderTemplateById + '?id=' + e).then(res => {
          if (res.code == 201) return
          let obj = JSON.parse(res.data)
          console.log(obj);
          //制单人设置为当前登录用户
          let user = JSON.parse(localStorage.getItem('user'))
          obj.addObj.custom = user.name
          obj.addObj.userId = user.userId
          this.addObj = obj.addObj;
          this.sampleList = obj.sampleList;
          this.selectTree = obj.selectTree
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -943,6 +943,7 @@
          requiredUp: []
        },
        upIndex: 0,
        changeType:null,
        getReportModelLoading:false,
        insOrder: {},
        sampleProduct: [],
@@ -1142,7 +1143,16 @@
        })
      },
      currentTable(val1, val0) {
        if (val0 != null && val1 != val0) {
        if(val0 !=null && val1 != val0){
        if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='成品缆检验原始记录')){
          if(this.casing.length>0){
            this.handleChange(this.casing[0].id,3)
          }
          return
        }
        if(this.changeType && this.changeType>0){
          return
        }
          this.tableLists.forEach(async (m, i) => {
            if (m.templateId == val1) {
              let list = await this.getCurrentProduct(this.currentSample.id,0)
@@ -1185,11 +1195,6 @@
            }
          })
          this.handleCasing()
          if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='成品缆检验原始记录')){
            if(this.casing.length>0){
              this.handleChange(this.casing[0].id,3)
            }
          }
        }
      },
      equipForm:{
@@ -1351,7 +1356,6 @@
                      maxNum = num
                    }
                  }
                  console.log('data[i][j].equipName',data[i][j].equipName,'data[i][j].equipValue',data[i][j].equipValue,'m.v',m.v,'m.v.ps',m.v.ps,'m.v.ps.value',m.v.ps.value,'str0',str0,'str',str,'m.v.v',m.v.v)
                  if(data[i][j].equipName&&data[i][j].equipValue&&m.v&&m.v.ps&&m.v.ps.value=='设备编码'&&str0==str){
                    if(!m.v.v){
                      this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName)
@@ -2094,6 +2098,7 @@
        })
      },
      async handleChange(m,type){
        this.changeType = type;
        if(m){
          let list = await this.getCurrentProduct(m,type)
          if(list.length>0){
src/components/view/b1-inspect-order-plan.vue
@@ -303,14 +303,14 @@
                        font: '数据查看',
                        type: 'text',
                        method: 'handleDataLook',
            disabFun: (row, index) => {
              const user = JSON.parse(localStorage.getItem('user'))
              let currentUserName = ''
              if(user){
                currentUserName = user.name
              }
                            return row.userName!=currentUserName && row.checkName!=currentUserName
                        }
            //disabFun: (row, index) => {
              //const user = JSON.parse(localStorage.getItem('user'))
             // let currentUserName = ''
             // if(user){
              //  currentUserName = user.name
              //}
                            //return row.userName.indexOf(currentUserName)<0 && row.checkName.indexOf(currentUserName)<0
                        //}
                    },{
                            id: '',
                            font: '检验',
@@ -345,7 +345,7 @@
                            type: 'text',
                            method: 'claimFun',
                            disabFun: (row, index) => {
                                return row.userName != null||(row.userName&&!row.userName.includes(JSON.parse(localStorage.getItem("user")).name))
                                return row.userName != null || row.checkName!=null
                            }
                        }
                    ],
src/view/enter.vue
@@ -183,7 +183,8 @@
                            localStorage.setItem('user', JSON.stringify({
                              account: this.ruleForm.account,
                              password: this.ruleForm.pwd,
                              name: res.data.name
                              name: res.data.name,
                userId: res.data.userId
                            }))
              sessionStorage.setItem('token', res.data.token)
              sessionStorage.setItem('reToken', res.data.reToken)