| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 入库审批:展示入库信息 --> |
| | | <!-- <el-row v-if="isInventoryApproval"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="是否入库审核通过:"> |
| | | <el-tag :type="form.inventoryReview ? 'success' : 'danger'"> |
| | | {{ form.inventoryReview ? '是' : '否' }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> --> |
| | | <el-row v-if="isInventoryApproval"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="入库类型:"> |
| | | <el-tag type="info"> |
| | | {{ form.storageType || '-' }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="入库数量:"> |
| | | <el-tag type="warning"> |
| | | {{ form.stockInNum ?? '-' }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 入库审批:展示入库台账明细(字段形式) --> |
| | | <el-row v-if="isInventoryApproval" style="margin-top: 10px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="产品名称:"> |
| | | <el-tag type="info"> |
| | | {{ currentStockIn.productName || '-' }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-tag type="info"> |
| | | {{ currentStockIn.model || '-' }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="isInventoryApproval"> |
| | | |
| | | <el-col :span="24"> |
| | | <el-form-item label="生产订单号:"> |
| | | <el-tag type="info"> |
| | | {{ currentStockIn.productionOrderNo || '-' }} |
| | | </el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 审批人选择(动态节点) --> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | |
| | | </el-skeleton> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <el-form :model="{ activities }" ref="formRef" label-position="top"> |
| | | <el-steps :active="getActiveStep()" finish-status="success" process-status="process" align-center direction="vertical"> |
| | | <el-step |
| | |
| | | </div> |
| | | <div v-if="!activity.isShen" class="node-reason"> |
| | | <span>审批意见:</span>{{ activity.approveNodeReason }} |
| | | </div> |
| | | <div v-if="!activity.isShen" class="node-reason"> |
| | | <span>签名:</span> |
| | | <img :src="activity.urlTem" class="signImg" alt="" v-if="activity.urlTem"/> |
| | | </div> |
| | | <div v-else-if="activity.isShen"> |
| | | <el-form-item |
| | |
| | | import { WarningFilled, Edit, Check, MoreFilled } from '@element-plus/icons-vue' |
| | | import { getQuotationList } from "@/api/salesManagement/salesQuotation.js"; |
| | | import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger.js"; |
| | | import { getStockInRecordById } from "@/api/inventoryManagement/stockInRecord.js"; |
| | | const emit = defineEmits(['close']) |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | |
| | | const currentQuotation = ref({}) |
| | | const purchaseLoading = ref(false) |
| | | const currentPurchase = ref({}) |
| | | const stockInLoading = ref(false) |
| | | const currentStockIn = ref({}) |
| | | const isQuotationApproval = computed(() => Number(props.approveType) === 6) |
| | | const isPurchaseApproval = computed(() => Number(props.approveType) === 5) |
| | | const isInventoryApproval = computed(() => Number(props.approveType) === 9) |
| | | |
| | | const data = reactive({ |
| | | form: { |
| | |
| | | approveDeptId: "", |
| | | approveReason: "", |
| | | checkResult: "", |
| | | inventoryReview: false, |
| | | storageType: "", |
| | | stockInNum: null, |
| | | recordId: null, |
| | | }, |
| | | }); |
| | | const { form } = toRefs(data); |
| | |
| | | dialogFormVisible.value = true; |
| | | currentQuotation.value = {} |
| | | currentPurchase.value = {} |
| | | currentStockIn.value = {} |
| | | userListNoPageByTenantId().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | |
| | | } |
| | | } |
| | | |
| | | // 入库审批:根据 recordId 查询入库台账详情 |
| | | if (isInventoryApproval.value) { |
| | | const recordId = row?.recordId; |
| | | form.value.recordId = recordId ?? form.value.recordId; |
| | | form.value.inventoryReview = row?.inventoryReview ?? form.value.inventoryReview; |
| | | form.value.storageType = row?.storageType ?? form.value.storageType; |
| | | if (recordId) { |
| | | stockInLoading.value = true; |
| | | getStockInRecordById(recordId) |
| | | .then((res) => { |
| | | currentStockIn.value = res?.data || res || {}; |
| | | }) |
| | | .catch((err) => { |
| | | console.error("查询入库记录失败:", err); |
| | | proxy.$modal.msgError("查询入库记录失败"); |
| | | }) |
| | | .finally(() => { |
| | | stockInLoading.value = false; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | approveProcessDetails(row.approveId).then((res) => { |
| | | activities.value = res.data |
| | | // 增加isApproval字段 |
| | |
| | | return; |
| | | } |
| | | currentActivity.approveNodeStatus = status; |
| | | // 始终带上当前审批类型(入库审批为 9) |
| | | currentActivity.approveType = Number(props.approveType); |
| | | // 入库审批:把入库相关字段写入当前节点 |
| | | if (isInventoryApproval.value) { |
| | | currentActivity.recordId = form.value.recordId; |
| | | currentActivity.storageType = form.value.storageType; |
| | | currentActivity.inventoryReview = status === 1; |
| | | } |
| | | // 判断是否为最后一步 |
| | | const isLast = activities.value.findIndex(a => a.isShen) === activities.value.length-1; |
| | | updateApproveNode({ ...currentActivity, isLast }).then(() => { |
| | |
| | | currentQuotation.value = {} |
| | | purchaseLoading.value = false |
| | | currentPurchase.value = {} |
| | | stockInLoading.value = false |
| | | currentStockIn.value = {} |
| | | emit('close') |
| | | }; |
| | | defineExpose({ |