fix(生产订单): 修复绑定工艺路线时的材料规格验证和显示问题
- 修复材料规格选择时未正确绑定产品ID的问题
- 在绑定工艺路线对话框中添加材料规格必填验证
- 调整生产订单列表显示字段,增加尺寸、小盒数量等字段
- 修复切料图示在没有数据时仍显示的问题
- 将"客户名称"改为"厂家","规格"改为"纸张规格"等字段名称优化
| | |
| | | <template #default="{ row }" > |
| | | <el-tree-select |
| | | v-if="!isDetail" |
| | | v-model="row.productId" |
| | | v-model="row.productById" |
| | | placeholder="请选择" |
| | | clearable |
| | | check-strictly |
| | |
| | | <span v-else>{{ row.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="规格"> |
| | | <el-table-column> |
| | | <template #header> |
| | | <span class="required">*</span>规格 |
| | | </template> |
| | | <template #default="{ row }"> |
| | | <el-select |
| | | v-if="!isDetail" |
| | |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <!-- ================= 切料图示 ================= --> |
| | | <div class="section-title">切料图示</div> |
| | | <div class="section-title" v-if="formData.cuttingFileVo.length > 0">切料图示</div> |
| | | <ActionFileUpload |
| | | v-if="formData.cuttingFileVo.length > 0" |
| | | style="width: 50%;float: left;" |
| | | v-model:file-list="formData.cuttingFileVo" |
| | | :action="upload.url" |
| | |
| | | |
| | | const getModels = (val, row) => { |
| | | row.productId = val || "" |
| | | row.productById = val || "" |
| | | row.productName = row.name || "" |
| | | row.name = val ? findProductLabelById(productOptions.value, val) : "" |
| | | row.productModelId = "" |
| | | row.model = "" |
| | |
| | | const handleMaterialModelChange = (val, row) => { |
| | | const currentModel = (row.modelOptions || []).find(item => item.id === val) |
| | | row.productModelId = val || "" |
| | | row.productId = currentModel?.id || "" |
| | | row.model = currentModel?.model || "" |
| | | row.unit = currentModel?.unit || "" |
| | | } |
| | |
| | | if (isDetail.value) { |
| | | return |
| | | } |
| | | const materialRows = Array.isArray(formData.materialInfo) ? formData.materialInfo : [] |
| | | for (let i = 0; i < materialRows.length; i++) { |
| | | const row = materialRows[i] || {} |
| | | if (!row.productId) { |
| | | ElMessage.warning(`材料信息第${i + 1}行: 规格必填`) |
| | | return |
| | | } |
| | | |
| | | } |
| | | const rows = Array.isArray(formData.processContent) ? formData.processContent : [] |
| | | for (let i = 0; i < rows.length; i++) { |
| | | const row = rows[i] || {} |
| | |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | import BindRouteDialog from "./BindRouteDialog.vue"; |
| | | import {getDeviceLedger} from "@/api/equipmentManagement/ledger.js"; |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | width: '150px', |
| | | }, |
| | | { |
| | | label: "客户名称", |
| | | label: "厂家", |
| | | prop: "customerName", |
| | | width: '200px', |
| | | }, |
| | |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "规格", |
| | | label: "纸张规格", |
| | | prop: "specificationModel", |
| | | width: '120px', |
| | | }, |
| | |
| | | width: '200px', |
| | | }, |
| | | { |
| | | label: "需求数量", |
| | | label: "印刷数量", |
| | | prop: "quantity", |
| | | }, |
| | | { |
| | | label: "尺寸", |
| | | prop: "cutSize", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "小盒数量", |
| | | prop: "smallBoxQty", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "中盒数量", |
| | | prop: "mediumBoxQty", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "色数", |
| | | prop: "printColorCount", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "完成数量", |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "交付日期", |
| | | label: "计划交货日期", |
| | | prop: "deliveryDate", |
| | | formatData: val => (val ? dayjs(val).format("YYYY-MM-DD") : ""), |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "备注", |
| | | prop: "remark", |
| | | width: 120, |
| | | }, |
| | | { |
| | |
| | | if (type === "view") { |
| | | bindDialogType.value = "detail" |
| | | const res = await viewGetByProductWordId(row.id) |
| | | if(res?.cuttingFileVo?.id ==null){ |
| | | res.cuttingFileVo = [] |
| | | }else{ |
| | | res.cuttingFileVo = [res.cuttingFileVo] |
| | | } |
| | | rowData.value = res?.data || res |
| | | } else { |
| | | bindDialogType.value = "add" |