From 6d520cfa7da0955e64cd783ec7b2c4ab65182b21 Mon Sep 17 00:00:00 2001 From: wk Date: 星期一, 29 七月 2024 17:39:54 +0800 Subject: [PATCH] feta:门卫库管取样员 --- pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue b/pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue index e50c79c..6899cc6 100644 --- a/pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue +++ b/pages/quality-inspection-page/toc-sampling/toc-sampling-form/toc-sampling-form.vue @@ -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) }) } }, -- Gitblit v1.9.1