| | |
| | | unReceiptPaymentAmount: '未收付款金额', |
| | | templateName: '模板名称', |
| | | productCategory: '产品类别', |
| | | specificationModel: '规格型号', |
| | | specificationModel: '尺寸', |
| | | unit: '单位', |
| | | taxRate: '税率', |
| | | taxInclusiveUnitPrice: '含税单价', |
| | |
| | | 模板名称: 'templateName', |
| | | 产品类别: 'productCategory', |
| | | 产品名称: 'productCategory', |
| | | 规格型号: 'specificationModel', |
| | | 尺寸: 'specificationModel', |
| | | 单位: 'unit', |
| | | 税率: 'taxRate', |
| | | 含税单价: 'taxInclusiveUnitPrice', |
| | |
| | | form.value.productName = |
| | | type === "edit" && data ? data.productName : ""; |
| | | }; |
| | | // 打开规格型号弹框 |
| | | // 打开尺寸弹框 |
| | | const openModelDia = (type, data) => { |
| | | modelOperationType.value = type; |
| | | modelDia.value = true; |
| | |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | // 删除规格型号 |
| | | // 删除尺寸 |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | |
| | | <el-table-column prop="product" |
| | | label="产品名称" /> |
| | | <el-table-column prop="specification" |
| | | label="规格型号" /> |
| | | label="尺寸" /> |
| | | <el-table-column prop="unit" |
| | | label="单位" /> |
| | | <el-table-column prop="unitPrice" |
| | |
| | | <el-table-column prop="productCategory" |
| | | label="产品名称" /> |
| | | <el-table-column prop="specificationModel" |
| | | label="规格型号" /> |
| | | label="尺寸" /> |
| | | <el-table-column prop="unit" |
| | | label="单位" /> |
| | | <el-table-column prop="quantity" |
| | |
| | | label="产品名称" |
| | | show-overflow-tooltip /> |
| | | <el-table-column prop="specificationModel" |
| | | label="规格型号" |
| | | label="尺寸" |
| | | show-overflow-tooltip /> |
| | | <el-table-column prop="deliveryQuantity" |
| | | label="发货数量" |
| | |
| | | |
| | | const tableColumn = ref([ |
| | | { label: "产品大类", prop: "productCategory" }, |
| | | { label: "规格型号", prop: "specificationModel" }, |
| | | { label: "尺寸", prop: "specificationModel" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { |
| | | label: "产品状态", |
| | |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "尺寸", |
| | | label: "规格型号", |
| | | prop: "model", |
| | | width:200 |
| | | }, |
| | |
| | | <span class="value">{{ deviceInfo.deviceName }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | | <span class="label">尺寸:</span> |
| | | <span class="label">规格型号:</span> |
| | | <span class="value">{{ deviceInfo.deviceModel }}</span> |
| | | </div> |
| | | <div class="info-row"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="尺寸" prop="deviceModel"> |
| | | <el-input v-model="form.deviceModel" placeholder="请输入尺寸" /> |
| | | <el-form-item label="规格型号" prop="deviceModel"> |
| | | <el-input v-model="form.deviceModel" placeholder="请输入规格型号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="税率(%)" prop="taxRate"> |
| | | <!-- <el-input |
| | | v-model="form.taxRate" |
| | | placeholder="请输入税率" |
| | | type="number" |
| | | > |
| | | <template #append> % </template> |
| | | </el-input> --> |
| | | <el-select |
| | | v-model="form.taxRate" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="mathNum" |
| | | > |
| | | <el-option |
| | | v-for="dict in tax_rate" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="Number(dict.value)" |
| | | /> |
| | | <el-option label="1" :value="1" /> |
| | | <el-option label="6" :value="6" /> |
| | | <el-option label="13" :value="13" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | calculateTaxExclusiveTotalPrice, |
| | | } from "@/utils/summarizeTable"; |
| | | import { ElMessage } from "element-plus"; |
| | | import {ref, getCurrentInstance} from "vue"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const { tax_rate } = proxy.useDict("tax_rate"); |
| | | import {ref} from "vue"; |
| | | |
| | | defineOptions({ |
| | | name: "设备台账表单", |
| | |
| | | |
| | | const { form, resetForm } = useFormData({ |
| | | deviceName: undefined, // 设备名称 |
| | | deviceModel: undefined, // 尺寸 |
| | | deviceModel: undefined, // 规格型号 |
| | | deviceBrand: undefined, // 设备品牌 |
| | | type: undefined, // 设备类型 |
| | | supplierName: undefined, // 供应商 |
| | |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="尺寸"> |
| | | <el-form-item label="规格型号"> |
| | | <el-input |
| | | v-model="filters.deviceModel" |
| | | style="width: 200px" |
| | | placeholder="请输入尺寸" |
| | | placeholder="请输入规格型号" |
| | | clearable |
| | | @change="getTableData" |
| | | /> |
| | |
| | | prop: "deviceName", |
| | | }, |
| | | { |
| | | label: "尺寸", |
| | | label: "规格型号", |
| | | prop: "deviceModel", |
| | | }, |
| | | { |
| | |
| | | const showQRCode = async (row) => { |
| | | // 直接使用URL,不要用JSON.stringify包装 |
| | | const qrContent = proxy.javaApi + '/device-info?deviceId=' + row.id; |
| | | const qrDataUrl = await QRCode.toDataURL(qrContent, { width: 200, margin: 2 }); |
| | | |
| | | // 创建canvas合成带名称的二维码图片 |
| | | const canvas = document.createElement('canvas'); |
| | | const ctx = canvas.getContext('2d'); |
| | | const qrSize = 200; |
| | | const textHeight = 30; |
| | | const padding = 10; |
| | | canvas.width = qrSize + padding * 2; |
| | | canvas.height = qrSize + textHeight + padding * 2; |
| | | |
| | | // 填充白色背景 |
| | | ctx.fillStyle = '#ffffff'; |
| | | ctx.fillRect(0, 0, canvas.width, canvas.height); |
| | | |
| | | // 绘制二维码 |
| | | const qrImg = new Image(); |
| | | qrImg.src = qrDataUrl; |
| | | await new Promise((resolve) => { qrImg.onload = resolve; }); |
| | | ctx.drawImage(qrImg, padding, padding, qrSize, qrSize); |
| | | |
| | | // 绘制设备名称 |
| | | ctx.fillStyle = '#333333'; |
| | | ctx.font = 'bold 14px Arial'; |
| | | ctx.textAlign = 'center'; |
| | | ctx.fillText(row.deviceName || '', canvas.width / 2, qrSize + padding + 20); |
| | | |
| | | qrCodeUrl.value = canvas.toDataURL('image/png'); |
| | | qrCodeUrl.value = await QRCode.toDataURL(qrContent); |
| | | qrRowData.value = row; |
| | | qrDialogVisible.value = true; |
| | | }; |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="尺寸"> |
| | | <el-form-item label="规格型号"> |
| | | <el-input |
| | | v-model="form.deviceModel" |
| | | placeholder="请输入尺寸" |
| | | placeholder="请输入规格型号" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报修报修项目"> |
| | | <el-input v-model="form.machineryCategory" placeholder="请输入报修报修项目" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="维修人"> |
| | | <el-input v-model="form.maintenanceName" placeholder="请输入维修人姓名" /> |
| | | <el-form-item label="类目"> |
| | | <el-input v-model="form.machineryCategory" placeholder="请输入类目" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="id"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报修状态"> |
| | | <el-select v-model="form.status" disabled> |
| | | <el-select v-model="form.status"> |
| | | <el-option label="待维修" :value="0"></el-option> |
| | | <el-option label="已验收" :value="1"></el-option> |
| | | <el-option label="完结" :value="1"></el-option> |
| | | <el-option label="失败" :value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 验收信息展示 --> |
| | | <el-row v-if="id && form.status === 1"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="验收人"> |
| | | <el-input v-model="form.acceptanceName" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="验收时间"> |
| | | <el-input v-model="form.acceptanceTime" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="验收备注"> |
| | | <el-input v-model="form.acceptanceRemark" type="textarea" :rows="2" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="附件" prop="attachmentIds"> |
| | | <FileUpload v-model:file-list="form.storageBlobDTOs" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </FormDialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import FormDialog from "@/components/Dialog/FormDialog.vue"; |
| | | import FileUpload from "@/components/AttachmentUpload/file/index.vue"; |
| | | import { |
| | | addRepair, |
| | | editRepair, |
| | |
| | | |
| | | const userStore = useUserStore(); |
| | | const deviceOptions = ref([]); |
| | | const fileList = ref([]); |
| | | |
| | | const loadDeviceName = async () => { |
| | | const { data } = await getDeviceLedger(); |
| | |
| | | const { form, resetForm } = useFormData({ |
| | | deviceLedgerId: undefined, // 设备Id |
| | | deviceName: undefined, // 设备名称 |
| | | deviceModel: undefined, // 尺寸 |
| | | deviceModel: undefined, // 规格型号 |
| | | repairTime: dayjs().format("YYYY-MM-DD"), // 报修日期,默认当天 |
| | | repairName: userStore.nickName, // 报修人 |
| | | remark: undefined, // 故障现象 |
| | | status: 0, // 报修状态 |
| | | machineryCategory: undefined, |
| | | storageBlobDTOs: [], |
| | | maintenanceName: undefined, // 维修人 |
| | | }); |
| | | |
| | | const setDeviceModel = (deviceId) => { |
| | |
| | | form.remark = data.remark; |
| | | form.status = data.status; |
| | | form.machineryCategory = data.machineryCategory; |
| | | form.storageBlobDTOs = data.storageBlobVOs || []; |
| | | form.maintenanceName = data.maintenanceName; |
| | | form.acceptanceName = data.acceptanceName; |
| | | form.acceptanceTime = data.acceptanceTime; |
| | | form.acceptanceRemark = data.acceptanceRemark; |
| | | }; |
| | | |
| | | const sendForm = async () => { |
| | |
| | | const openAdd = async () => { |
| | | id.value = undefined; |
| | | visible.value = true; |
| | | fileList.value = []; |
| | | await nextTick(); |
| | | await loadDeviceName(); |
| | | }; |
| | |
| | | @change="getTableData" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="尺寸"> |
| | | <el-form-item label="规格型号"> |
| | | <el-input |
| | | v-model="filters.deviceModel" |
| | | style="width: 240px" |
| | | placeholder="请选择尺寸" |
| | | placeholder="请选择规格型号" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | @change="getTableData" |
| | |
| | | <template #statusRef="{ row }"> |
| | | <el-tag v-if="row.status === 2" type="danger">失败</el-tag> |
| | | <el-tag v-if="row.status === 1" type="success">完结</el-tag> |
| | | <el-tag v-if="row.status === 3" type="info">待验收</el-tag> |
| | | <el-tag v-if="row.status === 0" type="warning">待维修</el-tag> |
| | | </template> |
| | | <template #operation="{ row }"> |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | :disabled="row.status === 1 || row.status === 3" |
| | | :disabled="row.status === 1" |
| | | @click="editRepair(row.id)" |
| | | > |
| | | 编辑 |
| | |
| | | <el-button |
| | | type="success" |
| | | link |
| | | :disabled="row.status !== 0" |
| | | :disabled="row.status === 1" |
| | | @click="addMaintain(row)" |
| | | > |
| | | 维修 |
| | | </el-button> |
| | | <el-button |
| | | type="warning" |
| | | link |
| | | :disabled="row.status !== 3" |
| | | @click="openAcceptance(row)" |
| | | > |
| | | 验收 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | | link |
| | | :disabled="row.status === 1 || row.status === 3" |
| | | :disabled="row.status === 1" |
| | | @click="delRepairByIds(row.id)" |
| | | > |
| | | 删除 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | @click="openFileDialog(row)" |
| | | > |
| | | 附件 |
| | | </el-button> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | <RepairModal ref="repairModalRef" @ok="getTableData"/> |
| | | <MaintainModal ref="maintainModalRef" @ok="getTableData"/> |
| | | <AcceptanceModal ref="acceptanceModalRef" @ok="getTableData"/> |
| | | <FileList v-if="fileDialogVisible" v-model:visible="fileDialogVisible" :record-type="'device_repair'" :record-id="recordId" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {onMounted, getCurrentInstance, computed, ref, defineAsyncComponent} from "vue"; |
| | | import { onMounted, getCurrentInstance, computed } from "vue"; |
| | | import {usePaginationApi} from "@/hooks/usePaginationApi"; |
| | | import {getRepairPage, delRepair} from "@/api/equipmentManagement/repair"; |
| | | import RepairModal from "./Modal/RepairModal.vue"; |
| | | import {ElMessageBox, ElMessage} from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import MaintainModal from "./Modal/MaintainModal.vue"; |
| | | import AcceptanceModal from "./Modal/AcceptanceModal.vue"; |
| | | const FileList = defineAsyncComponent(() => import("@/components/Dialog/FileList.vue")); |
| | | |
| | | defineOptions({ |
| | | name: "设备报修", |
| | |
| | | // 模态框实例 |
| | | const repairModalRef = ref(); |
| | | const maintainModalRef = ref(); |
| | | const acceptanceModalRef = ref(); |
| | | |
| | | // 表格多选框选中项 |
| | | const multipleList = ref([]); |
| | |
| | | prop: "deviceName", |
| | | }, |
| | | { |
| | | label: "尺寸", |
| | | label: "规格型号", |
| | | align: "center", |
| | | prop: "deviceModel", |
| | | }, |
| | | { |
| | | label: "报修项目", |
| | | label: "类目", |
| | | align: "center", |
| | | prop: "machineryCategory", |
| | | }, |
| | |
| | | formatData: (cell) => (cell ? dayjs(cell).format("YYYY-MM-DD") : ""), |
| | | }, |
| | | { |
| | | label: "验收人", |
| | | align: "center", |
| | | prop: "acceptanceName", |
| | | }, |
| | | { |
| | | label: "验收时间", |
| | | align: "center", |
| | | prop: "acceptanceTime", |
| | | formatData: (cell) => (cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : ""), |
| | | }, |
| | | { |
| | | label: "状态", |
| | | align: "center", |
| | | prop: "status", |
| | |
| | | getTableData(); |
| | | }; |
| | | |
| | | // 打开附件弹窗 |
| | | const recordId =ref(0) |
| | | const fileDialogVisible = ref(false) |
| | | |
| | | const openFileDialog = async (row) => { |
| | | recordId.value = row.id |
| | | fileDialogVisible.value = true |
| | | } |
| | | |
| | | // 多选后做什么 |
| | | const handleSelectionChange = (selectionList) => { |
| | | multipleList.value = selectionList; |
| | |
| | | // 新增维修 |
| | | const addMaintain = (row) => { |
| | | maintainModalRef.value.open(row.id, row); |
| | | }; |
| | | |
| | | // 打开验收弹窗 |
| | | const openAcceptance = (row) => { |
| | | acceptanceModalRef.value.open(row); |
| | | }; |
| | | |
| | | const changePage = ({page, limit}) => { |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="尺寸"> |
| | | <el-form-item label="规格型号"> |
| | | <el-input |
| | | v-model="form.deviceModel" |
| | | placeholder="请输入尺寸" |
| | | placeholder="请输入规格型号" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | |
| | | <el-option label="失败" :value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="保养人"> |
| | | <el-input |
| | | v-model="form.maintenancePerson" |
| | | placeholder="请输入保养人姓名" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="计划保养日期"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="附件" prop="attachmentIds"> |
| | | <FileUpload v-model:file-list="form.storageBlobDTOs" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </FormDialog> |
| | | </template> |
| | |
| | | import { onMounted } from "vue"; |
| | | import dayjs from "dayjs"; |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | | import FileUpload from "@/components/AttachmentUpload/file/index.vue"; |
| | | |
| | | defineOptions({ |
| | | name: "设备保养新增计划", |
| | |
| | | const { form, resetForm } = useFormData({ |
| | | deviceLedgerId: undefined, // 设备Id |
| | | deviceName: undefined, // 设备名称 |
| | | deviceModel: undefined, // 尺寸 |
| | | deviceModel: undefined, // 规格型号 |
| | | maintenancePlanTime: undefined, // 计划保养日期 |
| | | createUser: undefined, // 录入人 |
| | | status: 0, //保修状态 |
| | | machineryCategory: undefined, |
| | | storageBlobDTOs: [], |
| | | maintenancePerson: undefined, // 保养人 |
| | | }); |
| | | |
| | | const setDeviceModel = (deviceId) => { |
| | |
| | | form.createUser = Number(data.createUser); |
| | | form.status = data.status; |
| | | form.machineryCategory = data.machineryCategory; |
| | | form.maintenancePerson = data.maintenancePerson; |
| | | if (data.maintenancePlanTime) { |
| | | form.maintenancePlanTime = dayjs(data.maintenancePlanTime).format( |
| | | "YYYY-MM-DD HH:mm:ss" |
| | | ); |
| | | } |
| | | form.storageBlobDTOs = data.storageBlobVOs || []; |
| | | form.maintenancePlanTime = dayjs(data.maintenancePlanTime).format( |
| | | "YYYY-MM-DD HH:mm:ss" |
| | | ); |
| | | }; |
| | | |
| | | // 用户列表 |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="尺寸"> |
| | | <el-form-item label="规格型号"> |
| | | <el-input |
| | | v-model="form.deviceModel" |
| | | placeholder="请输入尺寸" |
| | | placeholder="请输入规格型号" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | |
| | | deviceOptions.value = data; |
| | | }; |
| | | |
| | | // 选择设备时,回填设备名称(taskName)和尺寸(deviceModel) |
| | | // 选择设备时,回填设备名称(taskName)和规格型号(deviceModel) |
| | | const setDeviceModel = (id) => { |
| | | const option = deviceOptions.value.find((item) => item.id === id); |
| | | if (option) { |
| | |
| | | > |
| | | <el-table-column type="index" label="序号" width="60" :index="(index) => (pagination.currentPage - 1) * pagination.pageSize + index + 1" /> |
| | | <el-table-column prop="deviceName" label="设备名称" width="250" /> |
| | | <el-table-column prop="deviceModel" label="尺寸" min-width="150" /> |
| | | <el-table-column prop="deviceModel" label="规格型号" min-width="150" /> |
| | | <el-table-column prop="supplierName" label="供应商" min-width="120" /> |
| | | <el-table-column prop="unit" label="单位" width="120" /> |
| | | <el-table-column prop="number" label="数量" width="120" /> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号" prop="specification"> |
| | | <el-input v-model="form.specification" placeholder="请输入规格型号" /> |
| | | <el-form-item label="尺寸" prop="specification"> |
| | | <el-input v-model="form.specification" placeholder="请输入尺寸" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | { label: "资产编号", prop: "assetCode", width: "130" }, |
| | | { label: "资产名称", prop: "assetName", width: "150" }, |
| | | { label: "资产类别", prop: "category", dataType: "slot", slot: "category" }, |
| | | { label: "规格型号", prop: "specification", width: "120" }, |
| | | { label: "尺寸", prop: "specification", width: "120" }, |
| | | { label: "资产原值", prop: "originalValue", dataType: "slot", slot: "originalValue" }, |
| | | { label: "累计折旧", prop: "accumulatedDepreciation", dataType: "slot", slot: "accumulatedDepreciation" }, |
| | | { label: "资产净值", prop: "netValue", dataType: "slot", slot: "netValue" }, |
| | |
| | | prop="productName" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="尺寸" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="批号" prop="batchNo" show-overflow-tooltip /> |
| | | <el-table-column |
| | |
| | | // 点击详情 |
| | | const showDetailModal = (row) => { |
| | | if (!row?.productId || !row?.productModelId) { |
| | | proxy.$modal.msgError("当前数据缺少产品ID或规格型号ID"); |
| | | proxy.$modal.msgError("当前数据缺少产品ID或尺寸ID"); |
| | | return; |
| | | } |
| | | record.value = row; |
| | |
| | | <el-table-column label="产品大类" |
| | | prop="productName" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" |
| | | <el-table-column label="尺寸" |
| | | prop="model" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="单位" |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="尺寸" |
| | | prop="specificationModel" |
| | | min-width="140" |
| | | show-overflow-tooltip |
| | |
| | | minWidth: 160, |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "尺寸", |
| | | prop: "productModelName", |
| | | minWidth: 140, |
| | | }, |
| | |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | label: "规格型号", |
| | | label: "尺寸", |
| | | prop: "productModelName", |
| | | minWidth: 100, |
| | | }, |
| | |
| | | <el-descriptions-item label="报工单号">{{ record.reportNo || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="检验员">{{ record.userName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产品名称">{{ record.productName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="规格型号">{{ record.model || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="尺寸">{{ record.model || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="数量">{{ record.quantity || 0 }} {{ record.unit || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="检测单位">{{ record.checkCompany || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="检测结果"> |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" |
| | | <el-form-item label="尺寸:" |
| | | prop="productModelId"> |
| | | <el-select v-model="form.productModelId" |
| | | placeholder="请选择" |
| | |
| | | }; |
| | | testStandardOptions.value = []; |
| | | tableData.value = []; |
| | | // 先确保产品树已加载,否则编辑时产品/规格型号无法反显 |
| | | // 先确保产品树已加载,否则编辑时产品/尺寸无法反显 |
| | | await getProductOptions(); |
| | | if (operationType.value === "edit") { |
| | | // 先保存 testStandardId,避免被清空 |
| | |
| | | // 先设置表单数据,但暂时清空 testStandardId,等选项加载完成后再设置 |
| | | form.value = { ...row, testStandardId: "" }; |
| | | currentProductId.value = row.productId || 0; |
| | | // 关键:编辑时加载规格型号下拉选项,才能反显 productModelId |
| | | // 关键:编辑时加载尺寸下拉选项,才能反显 productModelId |
| | | if (currentProductId.value) { |
| | | try { |
| | | const res = await modelList({ id: currentProductId.value }); |
| | |
| | | handleChangeModel(form.value.productModelId); |
| | | } |
| | | } catch (e) { |
| | | console.error("加载规格型号失败", e); |
| | | console.error("加载尺寸失败", e); |
| | | modelOptions.value = []; |
| | | } |
| | | } |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="尺寸" |
| | | prop="specificationModel" |
| | | show-overflow-tooltip |
| | | /> |
| | |
| | | <el-descriptions-item label="产品名称">{{ |
| | | detailRow.productName || "--" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="规格型号">{{ |
| | | <el-descriptions-item label="尺寸">{{ |
| | | detailRow.specificationModel || "--" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货类型">{{ |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="规格型号" |
| | | label="尺寸" |
| | | prop="specificationModel" |
| | | min-width="160" |
| | | show-overflow-tooltip |
| | |
| | | {align: "center", label: "出库单号", prop: "outboundBatches"}, |
| | | {align: "center", label: "批次号", prop: "batchNo"}, |
| | | {align: "center", label: "产品大类", prop: "productName"}, |
| | | {align: "center", label: "规格型号", prop: "model"}, |
| | | {align: "center", label: "尺寸", prop: "model"}, |
| | | {align: "center", label: "单位", prop: "unit", width: 80}, |
| | | {align: "center", label: "总数量", prop: "stockOutNum", width: 120}, |
| | | {align: "center", label: "已退货数量", prop: "totalReturnNum", width: 120, dataType: "slot", slot: "totalReturnNum"}, |
| | |
| | | type="index" /> |
| | | <el-table-column label="产品大类" |
| | | prop="productCategory" /> |
| | | <el-table-column label="规格型号" |
| | | <el-table-column label="尺寸" |
| | | prop="specificationModel" /> |
| | | <el-table-column label="单位" |
| | | prop="unit" /> |
| | |
| | | width="60" /> |
| | | <el-table-column label="产品大类" |
| | | prop="productCategory" /> |
| | | <el-table-column label="规格型号" |
| | | <el-table-column label="尺寸" |
| | | prop="specificationModel" /> |
| | | <el-table-column label="单位" |
| | | prop="unit" /> |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="规格型号:" |
| | | <el-form-item label="尺寸:" |
| | | prop="productModelId"> |
| | | <el-select v-model="productForm.productModelId" |
| | | placeholder="请选择" |
| | |
| | | <thead> |
| | | <tr> |
| | | <th>产品名称</th> |
| | | <th>规格型号</th> |
| | | <th>尺寸</th> |
| | | <th>单位</th> |
| | | <th>单价</th> |
| | | <th>零售数量</th> |
| | |
| | | if (type === "edit") { |
| | | productForm.value = { ...row }; |
| | | productIndex.value = index; |
| | | // 编辑时根据产品大类名称反查 tree 节点 id,并加载规格型号列表 |
| | | // 编辑时根据产品大类名称反查 tree 节点 id,并加载尺寸列表 |
| | | try { |
| | | const options = |
| | | productOptions.value && productOptions.value.length > 0 |
| | |
| | | if (categoryId) { |
| | | const models = await modelList({ id: categoryId }); |
| | | modelOptions.value = models || []; |
| | | // 根据当前规格型号名称反查并设置 productModelId,便于下拉框显示已选值 |
| | | // 根据当前尺寸名称反查并设置 productModelId,便于下拉框显示已选值 |
| | | const currentModel = (modelOptions.value || []).find( |
| | | m => m.model === productForm.value.specificationModel |
| | | ); |
| | |
| | | } |
| | | } catch (e) { |
| | | // 加载失败时保持可编辑,不中断弹窗 |
| | | console.error("加载产品规格型号失败", e); |
| | | console.error("加载产品尺寸失败", e); |
| | | } |
| | | } else { |
| | | getProductOptions(); |
| | |
| | | <thead> |
| | | <tr> |
| | | <th>产品名称</th> |
| | | <th>规格型号</th> |
| | | <th>尺寸</th> |
| | | <th>单位</th> |
| | | <th>单价</th> |
| | | <th>零售数量</th> |