| | |
| | | </el-upload> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="产品大类" prop="productCategory" width="200"> |
| | | <el-table-column label="产品名称" prop="productCategory" width="200"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.productCategory" placeholder="请输入产品大类" /> |
| | | <el-input v-model="scope.row.productCategory" placeholder="请输入产品名称" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="规格型号" prop="specificationModel" width="200"> |
| | | <el-table-column label="产品高度" prop="specificationModel" width="200"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.specificationModel" placeholder="请输入规格型号" /> |
| | | <el-input v-model="scope.row.specificationModel" placeholder="请输入产品高度" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="单位" prop="unit" width="100"> |
| | | <el-table-column label="高度单位" prop="unit" width="100"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.unit" placeholder="请输入单位" /> |
| | | <el-input v-model="scope.row.unit" placeholder="请输入高度单位" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="供应商" prop="supplierName" width="200"> |
| | | <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"> |
| | | </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 |
| | |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="入库数量" prop="inboundNum" width="150"> |
| | | </el-table-column> --> |
| | | <el-table-column label="入库数量-件" prop="inboundNum" width="150"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :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.inboundNum" @change="() => calculateTotalPrice(scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="每件数量/支" prop="boxNum" width="150"> |
| | | <template #default="scope"> |
| | | <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"> |
| | | <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="inboundDate" width="180"> |
| | | <template #default="scope"> |
| | | <el-date-picker |
| | |
| | | <!-- <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.quantityStock" @change="() => calculateTotalPrice(scope.row)" />--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <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="taxInclusiveTotalPrice" --> |
| | |
| | | Authorization: "Bearer " + getToken(), |
| | | }); |
| | | |
| | | const imeUrl = ref(import.meta.env.VITE_APP_ENV) |
| | | console.log(import.meta) |
| | | const javaApiUrl = __BASE_API__; |
| | | console.log('Java API 地址:', javaApiUrl) |
| | | |
| | | const userStore = useUserStore() |
| | | const { proxy } = getCurrentInstance() |
| | |
| | | id: null, |
| | | productCategory: '', |
| | | specificationModel: '', |
| | | cartonSpecifications:'', |
| | | unit: '', |
| | | supplierName: form.value.supplierName || '', |
| | | itemType: '', |
| | |
| | | taxInclusiveTotalPrice: 0, |
| | | taxRate: null, |
| | | taxExclusiveTotalPrice: 0, |
| | | boxNum: 0 |
| | | }); |
| | | }; |
| | | |
| | |
| | | proxy.$modal.msgError(`第${i + 1}行产品数据未填写完整(产品大类、规格型号、单位为必填)`) |
| | | return |
| | | } |
| | | if (!product.itemType) { |
| | | proxy.$modal.msgError(`第${i + 1}行请选择物品类型`) |
| | | return |
| | | } |
| | | // if (!product.itemType) { |
| | | // proxy.$modal.msgError(`第${i + 1}行请选择物品类型`) |
| | | // return |
| | | // } |
| | | if (!product.inboundDate) { |
| | | proxy.$modal.msgError(`第${i + 1}行请选择入库日期`) |
| | | return |
| | |
| | | proxy.$modal.msgError(`第${i + 1}行本次入库数量需大于0`) |
| | | return |
| | | } |
| | | const boxNum = Number(product?.boxNum ?? 0); |
| | | if (!Number.isFinite(boxNum) || boxNum <= 0) { |
| | | proxy.$modal.msgError(`第${i + 1}每盒数量需大于0`) |
| | | return |
| | | } |
| | | |
| | | } |
| | | |
| | | const payloadList = productList.value.map(product => ({ |
| | |
| | | taxExclusiveTotalPrice: Number(product.taxExclusiveTotalPrice || 0), |
| | | taxInclusiveUnitPrice: Number(product.taxInclusiveUnitPrice || 0), |
| | | taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice || 0), |
| | | url: product.url, |
| | | boxNum:Number(product.boxNum), |
| | | cartonSpecifications: product.cartonSpecifications, |
| | | url: product.url||'/src/assets/logo/logo.png', |
| | | })); |
| | | loading.value = true |
| | | if (operationType.value === 'edit') { |