| | |
| | | |
| | | |
| | | <view class="cu-bar btn-group foot"> |
| | | <button class="cu-btn text-blue line-blue shadow" @click="clear">清空</button> |
| | | <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">入库</button> |
| | | <button v-if="hasButtonPermission('reset')" class="cu-btn text-blue line-blue shadow" @click="clear">清空</button> |
| | | <button v-if="hasButtonPermission('submit')" class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm">入库</button> |
| | | </view> |
| | | |
| | | |
| | |
| | | curCode: '', |
| | | whAreaId:'', |
| | | repeatClick: false, |
| | | buttonPermissions: [] // 按钮权限列表 |
| | | |
| | | } |
| | | }, |
| | |
| | | mounted() { |
| | | this.getRece() |
| | | this.whAreaId = uni.getStorageSync('whAreaId') |
| | | |
| | | // 获取按钮权限 |
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || []; |
| | | console.log('当前页面按钮权限:', this.buttonPermissions); |
| | | }, |
| | | methods: { |
| | | methods: { |
| | | hasButtonPermission(route) { |
| | | return this.buttonPermissions.includes(route); |
| | | }, |
| | | selChange(val) { |
| | | uni.setStorageSync('whAreaId', val) |
| | | }, |