| | |
| | | |
| | | |
| | | <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" @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" @click="confirm">回库</button> |
| | | </view> |
| | | |
| | | <uni-popup ref="popup" class="cu-popup"> |
| | |
| | | container: '', |
| | | list: [], |
| | | range: [], |
| | | curCode: '' |
| | | curCode: '', |
| | | buttonPermissions: [] // 按钮权限列表 |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']), |
| | | }, |
| | | mounted() {}, |
| | | mounted() { |
| | | // 获取按钮权限 |
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || []; |
| | | console.log('当前页面按钮权限:', this.buttonPermissions); |
| | | }, |
| | | methods: { |
| | | async search() { |
| | | const { |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | // 检查按钮权限 |
| | | hasButtonPermission(route) { |
| | | return this.buttonPermissions.includes(route); |
| | | }, |
| | | |
| | | remove(index) { |
| | | this.list.splice(index, 1); |