Merge branch 'dev_长治_健齿齿科器材' of http://114.132.189.42:9002/r/product-inventory-management into dev_长治_健齿齿科器材
| | |
| | | data: query, |
| | | }); |
| | | } |
| | | |
| | | // 下载返工附件 |
| | | export function downloadReturnRecord(id) { |
| | | return request({ |
| | | url: "/quality/qualityUnqualified/downloadReturnRecord", |
| | | method: "get", |
| | | params: { id }, |
| | | responseType: "blob", |
| | | }); |
| | | } |
| | |
| | | <div> |
| | | <el-button @click="handleOut">导出</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">删除</el-button> |
| | | <el-button type="primary" plain @click="handlePrint">打印</el-button> |
| | | <!-- <el-button type="primary" plain @click="handlePrint">打印</el-button> --> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | |
| | | > |
| | | <el-table-column align="center" type="selection" width="55" /> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | label="出库批次" |
| | | prop="outboundBatches" |
| | | min-width="100" |
| | | show-overflow-tooltip |
| | | /> |
| | | /> --> |
| | | <el-table-column |
| | | label="批号" |
| | | min-width="120" |
| | | show-overflow-tooltip |
| | | > |
| | | <template #default="scope"> |
| | | {{ scope.row.batchNo || "" }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="供应商" |
| | | min-width="160" |
| | | show-overflow-tooltip |
| | | > |
| | | <template #default="scope"> |
| | | {{ scope.row.supplierName || scope.row.customer || "" }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="出库日期" |
| | | prop="createTime" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">单号:</span> |
| | | <span class="value">${item.code || ''}</span> |
| | | <div> |
| | | <span class="label">批号:</span> |
| | | <span class="value">${item.batchNo || item.outboundBatches || ''}</span> |
| | | </div> |
| | | <div> |
| | | <span class="label">单号:</span> |
| | | <span class="value">${item.code || ''}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | label="序号" |
| | | type="index" |
| | | width="60"/> |
| | | <el-table-column label="入库批次" |
| | | <!-- <el-table-column label="入库批次" |
| | | prop="inboundBatches" |
| | | width="280" |
| | | show-overflow-tooltip/> |
| | | show-overflow-tooltip/> --> |
| | | <el-table-column label="批号" |
| | | min-width="160" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ scope.row.batchNo || '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="供应商" |
| | | min-width="200" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ scope.row.supplierName || scope.row.customer || '' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="入库时间" |
| | | prop="createTime" |
| | | show-overflow-tooltip/> |
| | |
| | | <el-input v-model="formState.unit" disabled /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="批号" prop="batchNo" :rules="[{ required: true, message: '请输入批号', trigger: 'blur' }]"> |
| | | <el-input v-model="formState.batchNo" placeholder="请输入批号" clearable /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="供应商" |
| | | prop="customer" |
| | | :rules="[{ required: true, message: '请选择供应商', trigger: 'change' }]" |
| | | > |
| | | <el-select |
| | | v-model="formState.customer" |
| | | placeholder="请选择供应商" |
| | | filterable |
| | | clearable |
| | | allow-create |
| | | :reserve-keyword="true" |
| | | :default-first-option="false" |
| | | > |
| | | <el-option |
| | | v-for="item in supplierList" |
| | | :key="item.id" |
| | | :label="item.supplierName" |
| | | :value="item.supplierName" |
| | | > |
| | | {{ item.supplierName}} |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="库存数量" |
| | | prop="qualitity" |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref, computed, getCurrentInstance} from "vue"; |
| | | import {ref, computed, getCurrentInstance, watch} from "vue"; |
| | | import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue"; |
| | | import {createStockInventory} from "@/api/inventoryManagement/stockInventory.js"; |
| | | import {createStockUnInventory} from "@/api/inventoryManagement/stockUninventory.js"; |
| | | import {getOptions as getSupplierOptions} from "@/api/procurementManagement/procurementLedger.js"; |
| | | |
| | | const props = defineProps({ |
| | | visible: { |
| | |
| | | productName: "", |
| | | productModelName: "", |
| | | unit: "", |
| | | batchNo: "", |
| | | customer: "", |
| | | qualitity: 0, |
| | | warnNum: 0, |
| | | remark: '', |
| | |
| | | productModelId: undefined, |
| | | productName: "", |
| | | productModelName: "", |
| | | description: '', |
| | | unit: "", |
| | | batchNo: "", |
| | | customer: "", |
| | | qualitity: 0, |
| | | warnNum: 0, |
| | | remark: '', |
| | | }; |
| | | isShow.value = false; |
| | | }; |
| | | |
| | | const supplierList = ref([]); |
| | | |
| | | const loadSuppliers = async () => { |
| | | try { |
| | | const res = await getSupplierOptions(); |
| | | // 复用采购台账筛选逻辑:isWhite=0 的供应商 |
| | | supplierList.value = (res?.data || []).filter(item => item.isWhite === 0); |
| | | } catch (e) { |
| | | console.error("获取供应商列表失败:", e); |
| | | supplierList.value = []; |
| | | } |
| | | }; |
| | | |
| | | watch( |
| | | () => props.visible, |
| | | (val) => { |
| | | if (val) { |
| | | loadSuppliers(); |
| | | } |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | |
| | | // 产品选择处理 |
| | | const handleProductSelect = async (products) => { |
| | | if (products && products.length > 0) { |
| | |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10" style="margin-left: 20px">规格型号:</span> |
| | | <el-input v-model="searchForm.model" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10" style="margin-left: 20px">UID码:</span> |
| | | <el-input v-model="searchForm.uidNo" |
| | | style="width: 200px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10" style="margin-left: 20px">批次号:</span> |
| | | <el-input v-model="searchForm.batchNo" |
| | | style="width: 200px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button> |
| | | </div> |
| | | <div> |
| | |
| | | <el-table-column label="产品大类" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="UID码" prop="uidNo" show-overflow-tooltip /> |
| | | <el-table-column label="批号" prop="batchNo" show-overflow-tooltip /> |
| | | <el-table-column label="供应商" prop="customer" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip /> |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | productName: '', |
| | | model: '', |
| | | uidNo: '', |
| | | batchNo: '', |
| | | } |
| | | }) |
| | | const { searchForm } = toRefs(data) |
| | |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10" style="margin-left: 20px">规格型号:</span> |
| | | <el-input v-model="searchForm.model" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10" style="margin-left: 20px">UID码:</span> |
| | | <el-input v-model="searchForm.uidNo" |
| | | style="width: 200px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <span class="search_title ml10" style="margin-left: 20px">批次号:</span> |
| | | <el-input v-model="searchForm.batchNo" |
| | | style="width: 200px" |
| | | placeholder="请输入" |
| | | clearable/> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button> |
| | | </div> |
| | | <div> |
| | |
| | | <el-table-column label="产品大类" prop="productName" show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="UID码" prop="uidNo" show-overflow-tooltip /> |
| | | <el-table-column label="批号" prop="batchNo" show-overflow-tooltip /> |
| | | <el-table-column label="供应商" prop="customer" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip /> |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | productName: '', |
| | | model: '', |
| | | uidNo: '', |
| | | batchNo: '', |
| | | } |
| | | }) |
| | | const { searchForm } = toRefs(data) |
| | |
| | | show-overflow-tooltip |
| | | v-if="searchForm.reportType !== 'inout'" |
| | | /> |
| | | <el-table-column |
| | | label="入库批次" |
| | | prop="inboundBatches" |
| | | width="240" |
| | | show-overflow-tooltip |
| | | v-if="searchForm.reportType !== 'inout'" |
| | | /> |
| | | <el-table-column |
| | | label="批号" |
| | | width="240" |
| | | show-overflow-tooltip |
| | | v-if="searchForm.reportType !== 'inout'" |
| | | > |
| | | <template #default="scope"> |
| | | {{ scope.row.batchNo || scope.row.inboundBatches || "" }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="供应商" |
| | | prop="supplierName" |
| | | min-width="200" |
| | | show-overflow-tooltip |
| | | v-if="searchForm.reportType !== 'inout'" |
| | | > |
| | | <template #default="scope"> |
| | | {{ scope.row.supplierName || scope.row.customer || "" }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="产品大类" |
| | | prop="productName" |
| | |
| | | visible.value = false; |
| | | materialList.value = []; |
| | | activeTab.value = 'material'; |
| | | emit('confirm'); |
| | | } catch (error) { |
| | | console.error('保存领料失败:', error); |
| | | ElMessage.error('保存领料失败'); |
| | |
| | | <material-requisition-dialog |
| | | v-model="materialRequisitionVisible" |
| | | :order-data="currentOrderData" |
| | | @confirm="handleQuery" |
| | | /> |
| | | </div> |
| | | </template> |
| | |
| | | :min="0" |
| | | :precision="2" |
| | | :controls="false" |
| | | :max="row.qualitity || 0" |
| | | :disabled="!row.qualitity" |
| | | :max="row.requisitionQty || 0" |
| | | :disabled="!row.requisitionQty" |
| | | style="width: 100%" |
| | | /> |
| | | </template> |
| | |
| | | <el-table-column prop="productName" label="产品名称" min-width="160" /> |
| | | <el-table-column prop="model" label="型号" min-width="150" /> |
| | | <el-table-column prop="unit" label="单位" width="90" align="center" /> |
| | | <el-table-column prop="qualitity" label="可领用数量" width="140" align="center" /> |
| | | <el-table-column prop="requisitionQty" label="可领用数量" width="140" align="center" /> |
| | | </el-table> |
| | | |
| | | <!-- 已选择明细展示放在报工弹框下方的 reportForm.drawMaterialList 表格里 --> |
| | |
| | | import {onMounted, ref, reactive, toRefs, nextTick, getCurrentInstance} from "vue"; |
| | | import FormDia from "@/views/qualityManagement/nonconformingManagement/components/formDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {qualityUnqualifiedDel, qualityUnqualifiedListPage} from "@/api/qualityManagement/nonconformingManagement.js"; |
| | | import {qualityUnqualifiedDel, qualityUnqualifiedListPage, downloadReturnRecord} from "@/api/qualityManagement/nonconformingManagement.js"; |
| | | import InspectionFormDia from "@/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue"; |
| | | import dayjs from "dayjs"; |
| | | |
| | |
| | | label: "操作", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 100, |
| | | width: 180, |
| | | operation: [ |
| | | { |
| | | name: "处理", |
| | |
| | | openInspectionForm("edit", row); |
| | | }, |
| | | disabled: (row) => row.inspectState === 1, |
| | | }, |
| | | { |
| | | name: "下载返工附件", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | handleDownloadReturnRecord(row); |
| | | }, |
| | | show: (row) => row.dealResult === "返工", |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | }) |
| | | }; |
| | | |
| | | // 下载返工附件 |
| | | const handleDownloadReturnRecord = async (row) => { |
| | | try { |
| | | const blobData = await downloadReturnRecord(row.id); |
| | | |
| | | // 构建 Blob |
| | | const blob = new Blob([blobData], { |
| | | type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" |
| | | }); |
| | | |
| | | // 下载 |
| | | const url = window.URL.createObjectURL(blob); |
| | | const link = document.createElement("a"); |
| | | link.href = url; |
| | | link.download = `返工附件.docx`; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(url); |
| | | |
| | | proxy.$modal.msgSuccess("下载成功"); |
| | | } catch (error) { |
| | | console.error("下载返工附件失败:", error); |
| | | proxy.$modal.msgError("下载失败"); |
| | | } |
| | | }; |
| | | |
| | | // 删除 |
| | | const handleDelete = () => { |
| | | let ids = []; |