| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>辅数量</text></view> |
| | | <view class="text-title"> |
| | | <view> |
| | | <uni-number-box v-model="matData.weight" :value="matData.weight" :max="99999999" color="#747474" @change="changeValue2"/> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="foot flex justify-center"> |
| | |
| | | batch: null, |
| | | anfme: null, |
| | | anfme2: null, |
| | | origin: null, |
| | | }, |
| | | baseIP:'', |
| | | basePORT:'', |
| | |
| | | |
| | | }, |
| | | changeValue(value) { |
| | | this.matData.anfme = value |
| | | // this.matData.anfme = value |
| | | }, |
| | | changeValue2(value) { |
| | | let arr = this.matData.origin.split("/") |
| | | let mainAnfme = value * parseFloat(arr[1]) * parseFloat(arr[0]) |
| | | let flooredNum = Math.floor(mainAnfme * 10000) / 10000; // 截断到小数点后4位 |
| | | this.matData.weight = value |
| | | this.matData.anfme = flooredNum |
| | | }, |
| | | back() { |
| | | if (this.matData.anfme === 0) { |
| | | uni.showToast({title: '请输入数量', icon: "none", position: 'top'}); |
| | | return; |
| | | } |
| | | |
| | | console.log(this.matData); |
| | | this.getOpenerEventChannel().emit('matList', {data: this.matData}); |
| | | uni.vibrateShort(); |
| | | uni.navigateBack({ |