| | |
| | | </view> |
| | | <view class="card-actions"> |
| | | <view class="btn-link btn-link-primary" v-if="item.inspectState == 0" @click.stop="openDealDialog(item)">处理</view> |
| | | <view class="btn-link btn-link-plain" v-if="item.inspectState == 0" @click.stop="openForm('edit', item)">编辑</view> |
| | | <view class="btn-link btn-link-warn" v-if="item.inspectState == 0" @click.stop="handleDelete(item)">删除</view> |
| | | <view class="btn-link btn-link-plain" v-if="item.inspectState == 0 && hasNonconformingEdit" @click.stop="openForm('edit', item)">编辑</view> |
| | | <view class="btn-link btn-link-warn" v-if="item.inspectState == 0 && hasNonconformingCancel" @click.stop="handleDelete(item)">删除</view> |
| | | </view> |
| | | </view> |
| | | <view class="load-more-wrap"> |
| | |
| | | import dayjs from 'dayjs'; |
| | | import PageHeader from '@/components/PageHeader.vue' |
| | | import { onReachBottom, onShow } from '@dcloudio/uni-app' |
| | | import { checkPermi } from '@/utils/permission' |
| | | |
| | | const hasNonconformingEdit = computed(() => checkPermi(['nonconforming_edit'])) |
| | | const hasNonconformingCancel = computed(() => checkPermi(['nonconforming_cancel'])) |
| | | |
| | | const searchForm = reactive({ |
| | | productName: '', |
| | |
| | | }; |
| | | |
| | | const handleDelete = (row) => { |
| | | if (!hasNonconformingCancel.value) return |
| | | showConfirm('确认删除该不合格记录吗?').then(async res => { |
| | | if (!res.confirm) return |
| | | await qualityUnqualifiedDel([row.id]) |
| | |
| | | }; |
| | | |
| | | const openForm = (type, row) => { |
| | | if (type === 'edit' && !hasNonconformingEdit.value) return |
| | | if (type !== 'add' && row?.inspectState == 1) { |
| | | toast('已处理的数据不能再编辑') |
| | | return |