| | |
| | | </block>
|
| | | </view>
|
| | | <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>
|
| | | </view>
|
| | | </template>
|
| | |
| | | matnrCode: '',
|
| | | max: 99999999,
|
| | | pkCode: '',
|
| | | buttonPermissions: [] // 按钮权限列表
|
| | | }
|
| | | },
|
| | | computed: {
|
| | |
| | | return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0
|
| | | }
|
| | | },
|
| | | mounted() {},
|
| | | mounted() {
|
| | | // 获取按钮权限
|
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || [];
|
| | | console.log('当前页面按钮权限:', this.buttonPermissions);
|
| | | },
|
| | | methods: {
|
| | | // 检查按钮权限
|
| | | hasButtonPermission(route) {
|
| | | return this.buttonPermissions.includes(route);
|
| | | },
|
| | | async search() {
|
| | | const find = this.list.find(el => el.trackCode === this.barcode);
|
| | | find ? this.scrollTo() : this.getDet();
|