| | |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" |
| | | plain |
| | | @click="handleDelete">删除 |
| | | @click="handleDelete" |
| | | v-if="hasCReceiptCancel">删除 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | |
| | | @click="handlePreview(scope.row)">导出过磅单</el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column label="操作" |
| | | width="120" |
| | | align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | v-if="hasCReceiptEdit" |
| | | type="primary" |
| | | size="mini" |
| | | @click="handleEdit(scope.row)" |
| | | >编辑</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="margin-top: 12px; display: flex; justify-content: flex-end;"> |
| | | <pagination v-show="total > 0" |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-model="isShowEditModal" |
| | | title="编辑入库" |
| | | width="600" |
| | | @close="closeEditModal" |
| | | > |
| | | <el-form |
| | | label-width="100px" |
| | | :model="editForm" |
| | | label-position="top" |
| | | ref="editFormRef" |
| | | > |
| | | <el-form-item |
| | | label="数量" |
| | | prop="qualitity" |
| | | :rules="[{ required: true, message: '请输入数量', trigger: ['blur', 'change'] }]" |
| | | > |
| | | <el-input-number |
| | | v-model="editForm.qualitity" |
| | | :min="0" |
| | | :step="1" |
| | | :precision="0" |
| | | controls-position="right" |
| | | style="width: 100%" |
| | | placeholder="请输入数量" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="采购员" |
| | | prop="purchaser" |
| | | :rules="[{ required: true, message: '请输入采购员', trigger: ['blur', 'change'] }]" |
| | | > |
| | | <el-input v-model="editForm.purchaser" placeholder="请输入采购员" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="handleEditSubmit">确认</el-button> |
| | | <el-button @click="closeEditModal">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | toRefs, |
| | | onMounted, |
| | | getCurrentInstance, |
| | | computed, |
| | | } from "vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import { |
| | | getConsumablesInRecordListPage, |
| | | batchDeleteConsumablesInRecords, |
| | | editStockInStock, |
| | | } from "@/api/consumablesLogistics/consumablesInRecord.js"; |
| | | import { |
| | | findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions, |
| | | } from "@/api/basicData/enum.js"; |
| | | import { checkPermi } from "@/utils/permission.js"; |
| | | |
| | | const {proxy} = getCurrentInstance(); |
| | | |
| | |
| | | default: '0' |
| | | } |
| | | }) |
| | | |
| | | const hasCReceiptEdit = computed(() => checkPermi(['c_receipt_edit'])); |
| | | const hasCReceiptCancel = computed(() => checkPermi(['c_receipt_cancel'])); |
| | | |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | |
| | | }); |
| | | }; |
| | | |
| | | // 编辑耗材入库 |
| | | const isShowEditModal = ref(false); |
| | | const editFormRef = ref(null); |
| | | const editForm = ref({}); |
| | | |
| | | const handleEdit = (row) => { |
| | | editForm.value = { |
| | | id: row.id, |
| | | qualitity: row.qualitity, |
| | | purchaser: row.purchaser, |
| | | }; |
| | | isShowEditModal.value = true; |
| | | }; |
| | | |
| | | const closeEditModal = () => { |
| | | isShowEditModal.value = false; |
| | | editForm.value = {}; |
| | | editFormRef.value?.clearValidate?.(); |
| | | }; |
| | | |
| | | const handleEditSubmit = () => { |
| | | editFormRef.value?.validate?.((valid) => { |
| | | if (!valid) return; |
| | | editStockInStock(editForm.value).then(() => { |
| | | closeEditModal(); |
| | | proxy.$modal.msgSuccess("编辑成功"); |
| | | getList(); |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | fetchStockRecordTypeOptions(); |