| | |
| | | <view class="text-title">{{matData.specs}}</view> |
| | | </view> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>批号</text></view> |
| | | <view class="text-title"><text>序列号</text></view> |
| | | <view class="text-title"><input type="text" v-model="matData.batch"></view> |
| | | </view> |
| | | <view class="text-box"> |
| | |
| | | matData: { |
| | | matnr: null, |
| | | maktx: null, |
| | | specs: null, |
| | | batch: null, |
| | | anfme: null, |
| | | }, |
| | |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | this.baseIP = option.baseIP |
| | | this.basePORT = option.basePORT |
| | | this.matData.matnr = option.matnr |
| | | let that = this |
| | | // #ifdef APP-NVUE |
| | | const eventChannel = this.$scope.eventChannel; // 兼容APP-NVUE |
| | | // #endif |
| | | // #ifndef APP-NVUE |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | // #endif |
| | | |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('matData', function(data) { |
| | | that.matData = data.data |
| | | }) |
| | | |
| | | }, |
| | | onShow() { |
| | | this.getMat() |
| | | this.matData.anfme = 0 |
| | | }, |
| | | methods: { |
| | | getMat() { |
| | | let that = this |
| | | |
| | | uni.request({ |
| | | // url: 'http://localhost:8081/jkwms/mat/auth', |
| | | url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/auth', |
| | | data: { |
| | | matnr: that.matData.matnr |
| | | }, |
| | | header: { |
| | | 'token':uni.getStorageSync('token') |
| | | }, |
| | | success(res) { |
| | | var res = res.data; |
| | | if (res.code === 200) { |
| | | that.matData = {} |
| | | that.matData = res.data; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | blur() { |
| | | |
| | | }, |
| | |
| | | |
| | | }, |
| | | back() { |
| | | uni.$emit('matData', this.matData); |
| | | // console.log(this.matData) |
| | | if (this.matData.anfme === 0) { |
| | | uni.showToast({title: '请输入数量', icon: "none", position: 'top'}); |
| | | return; |
| | | } |
| | | this.getOpenerEventChannel().emit('matList', {data: this.matData}); |
| | | uni.vibrateShort(); |
| | | uni.navigateBack({ |
| | | |
| | | }) |