From 8b53f063a074d91e7093d35168bf0dc349c83ba9 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 11 七月 2024 14:14:39 +0800 Subject: [PATCH] feat::发运单详情去除折叠 --- 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