| | |
| | | <up-button v-if="item.inspectState != 1" type="primary" size="mini" @click.stop="openForm('edit', item)">编辑</up-button> |
| | | <up-button type="info" size="mini" @click.stop="openFiles(item)">附件</up-button> |
| | | <up-button v-if="item.inspectState != 1" type="success" size="mini" @click.stop="handleConfirmSubmit(item)">提交</up-button> |
| | | <up-button type="error" size="mini" @click.stop="handleDelete(item)">删除</up-button> |
| | | <up-button v-if="hasRawCancel" type="error" size="mini" @click.stop="handleDelete(item)">删除</up-button> |
| | | </view> |
| | | </view> |
| | | <view class="pagination-container"> |
| | |
| | | } from '@/api/qualityManagement/rawMaterial.js'; |
| | | import { toast, showConfirm } from '@/utils/common'; |
| | | import useUserStore from '@/store/modules/user'; |
| | | import { checkPermi } from '@/utils/permission'; |
| | | |
| | | const userStore = useUserStore(); |
| | | const hasRawCancel = computed(() => checkPermi(['raw_cancel'])); |
| | | |
| | | const searchForm = reactive({ |
| | | batchNo: '', |
| | |
| | | }; |
| | | |
| | | const openForm = (type, item) => { |
| | | if (type === 'edit' && !hasRawEdit.value) return |
| | | const id = item?.id |
| | | uni.navigateTo({ |
| | | url: `/pages/qualityManagement/rawMaterial/form?type=${type}${id ? `&id=${id}` : ''}` |
| | |
| | | }; |
| | | |
| | | const handleDelete = (row) => { |
| | | if (!hasRawCancel.value) return |
| | | showConfirm('确认删除该记录吗?').then(res => { |
| | | if (res.confirm) { |
| | | // 对齐 PC 端:删除接口接收 id 数组 |