| | |
| | | <template #default="{ row }" > |
| | | <el-tree-select |
| | | v-if="!isDetail" |
| | | v-model="row.productId" |
| | | v-model="row.productById" |
| | | placeholder="请选择" |
| | | clearable |
| | | check-strictly |
| | |
| | | :disabled="isDetail" |
| | | style="width: 100%" |
| | | /> |
| | | <span v-else>{{ row.name }}</span> |
| | | <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] || {} |