yangan
2024-08-02 331eef7c57b435f4c8bedb31b3ef6daf68a18db0
pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue
@@ -140,7 +140,7 @@
        bunkerId:'',
        bunkerName:'',
        samplingPerson: '',
        type: 7,  //1 EDC、2 PVC、3 硫酸、4 氢氧化钠 5 液氯 6、原盐钙镁 7、原盐TOC 8、原盐全检
        type: 7,  //1 EDC、2 聚氯乙烯树脂、3 硫酸、4 氢氧化钠 5 液氯 6、原盐钙镁 7、原盐TOC 8、原盐全检
      },
      filedId:'',
      customerIdShow: false,
@@ -164,6 +164,12 @@
          required: true,
          message: '请选择采样地点',
          trigger: ['blur', 'change']
        }],
        tonnage:[{
          type: 'number',
          required: true,
          message: '请输入吨数',
          trigger: ['blur', 'change']
        }]
      }
    }
@@ -178,12 +184,13 @@
    this.$refs.uForm.setRules(this.rules)
  },
  onLoad(opt) {
    if(opt.params) {  //查看
      this.submitShow = false
      this.modelForm = Object.assign({},JSON.parse(opt.params))
      console.log(this.modelForm,'接收到上个页面传过来的参数===')
      return
      this.$nextTick(() => {
        this.modelForm = Object.assign({},JSON.parse(opt.params))
        console.log(this.modelForm,'接收到上个页面传过来的参数===')
        return
      })
    }
    this.modelForm.samplingTime = todayDate(); //当前时间
    this.modelForm.samplingPerson = uni.getStorageSync('name')
@@ -255,9 +262,9 @@
    },
    inputVal(val) {
      let temp = val.replace(/[^0-9.]+/g,'')
      let temp = val.toString().replace(/[^0-9.]+/g,'')
      this.$nextTick(() => {
        this.modelForm.tonnage = temp
        this.modelForm.tonnage = Number(temp)
      })
    }
  },