| | |
| | | <el-input v-model="scope.row.specificationModel" placeholder="请输入产品高度" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="高度单位" prop="unit" width="100"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.unit" placeholder="请输入高度单位" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="纸箱规格" prop="cartonSpecifications" width="200"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.cartonSpecifications" placeholder="请输入纸箱规格" /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="供应商" prop="supplierName" width="200"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.supplierName" placeholder="请输入供应商" /> |
| | | </template> |
| | | </el-table-column> --> |
| | | <!-- <el-table-column label="物品类型" prop="itemType" width="150"> |
| | | <template #default="scope"> |
| | | <el-select v-model="scope.row.itemType" filterable allow-create placeholder="请选择物品类型" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in itemTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column label="入库数量-件" prop="inboundNum" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="1" :min="0" style="width: 100%" v-model="scope.row.inboundNum" @change="() => calculateTotalPrice(scope.row)" /> |
| | |
| | | <el-input-number :step="1" :min="0" style="width: 100%" v-model="scope.row.boxNum" @change="() => calculateTotalPrice(scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="单价(元)/件" prop="taxInclusiveUnitPrice" width="150"> |
| | | <el-table-column label="单价(美元)/件" prop="taxInclusiveUnitPrice" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="() => calculateTotalPrice(scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="单价(美元)/件" prop="dollarPrice" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.dollarPrice"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="入库日期" prop="inboundDate" width="180"> |
| | |
| | | productCategory: '', |
| | | specificationModel: '', |
| | | cartonSpecifications:'', |
| | | unit: '', |
| | | supplierName: form.value.supplierName || '', |
| | | itemType: '', |
| | | inboundNum: 0, |
| | |
| | | taxRate: null, |
| | | taxExclusiveTotalPrice: 0, |
| | | boxNum: 0, |
| | | dollarPrice: 0 |
| | | }); |
| | | }; |
| | | |
| | |
| | | // 验证自定义添加的数据必填字段 |
| | | for (let i = 0; i < productList.value.length; i++) { |
| | | const product = productList.value[i]; |
| | | if (!product.productCategory || !product.specificationModel || !product.unit) { |
| | | if (!product.productCategory || !product.specificationModel) { |
| | | proxy.$modal.msgError(`第${i + 1}行产品数据未填写完整(产品、产品高度、高度单位为必填)`) |
| | | return |
| | | } |
| | |
| | | proxy.$modal.msgError(`第${i + 1}行单价(元)需大于0`) |
| | | return |
| | | } |
| | | const dollarPrice = Number(product?.dollarPrice ?? 0); |
| | | if (!Number.isFinite(dollarPrice) || dollarPrice <= 0) { |
| | | proxy.$modal.msgError(`第${i + 1}行单价(美元)需大于0`) |
| | | return |
| | | } |
| | | if (!product.inboundDate) { |
| | | proxy.$modal.msgError(`第${i + 1}行请选择入库日期`) |
| | | return |
| | |
| | | inboundNum: Number(product.inboundNum), |
| | | productCategory: product.productCategory, |
| | | specificationModel: product.specificationModel, |
| | | unit: product.unit, |
| | | supplierName: product.supplierName || form.value.supplierName, |
| | | itemType: product.itemType, |
| | | inboundDate: formatDateTime(product.inboundDate, false), |
| | |
| | | boxNum:Number(product.boxNum), |
| | | cartonSpecifications: product.cartonSpecifications, |
| | | url: product.url||'', |
| | | dollarPrice: Number(product.dollarPrice || 0), |
| | | })); |
| | | loading.value = true |
| | | if (operationType.value === 'edit') { |
| | |
| | | id: row?.id ?? null, |
| | | productCategory: row?.productCategory ?? '', |
| | | specificationModel: row?.specificationModel ?? '', |
| | | unit: row?.unit ?? '', |
| | | supplierName: row?.supplierName ?? '', |
| | | itemType: row?.itemType ?? '', |
| | | inboundNum: Number(row?.inboundNum ?? row?.inboundQuantity ?? 0), |
| | |
| | | boxNum: Number(row?.boxNum ?? 0), |
| | | cartonSpecifications: row?.cartonSpecifications ?? '', |
| | | url: row?.url ?? '', |
| | | dollarPrice: Number(row?.dollarPrice ?? 0), |
| | | }] |
| | | } |
| | | } |