| | |
| | | type="index" |
| | | width="60" |
| | | /> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" /> |
| | | <el-table-column label="单位" prop="unit" width="70" /> |
| | | <el-table-column label="产品" prop="productCategory" /> |
| | | <el-table-column label="产品高度" prop="specificationModel" > |
| | | <template #default="scope"> |
| | | <div>{{ scope.row.specificationModel }}{{ scope.row.unit }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="高度单位" prop="unit" width="70" /> --> |
| | | <!-- <el-table-column label="供应商" prop="supplierName" width="100" /> --> |
| | | <el-table-column label="采购数量" prop="quantity" width="100" /> |
| | | <el-table-column label="待入库数量" prop="quantity0" width="100" /> |
| | | <el-table-column label="本次入库数量" prop="quantityStock" width="150"> |
| | | <el-table-column label="采购数量/件" prop="quantity" width="100" /> |
| | | <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"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="待入库数量/件" prop="quantity0" width="150" /> |
| | | <el-table-column label="本次入库数量/件" prop="quantityStock" width="150"> |
| | | <template #default="scope"> |
| | | <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="taxRate" width="120" /> |
| | | <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)" :disabled="operationType === 'edit'"/> |
| | | </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" :disabled="operationType === 'edit'"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="纸箱规格" prop="cartonSpecifications" width="150"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.cartonSpecifications" placeholder="请输入纸箱规格" style="width: 100%" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | taxInclusiveUnitPrice: Number(item?.taxInclusiveUnitPrice ?? 0), |
| | | taxInclusiveTotalPrice: 0, |
| | | originalQuantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? 0), |
| | | boxNum: item.boxNum || 0, |
| | | dollarPrice: item.dollarPrice || 0, |
| | | |
| | | })) |
| | | } catch (error) { |
| | | console.error('查询产品记录失败:', error) |
| | |
| | | proxy.$modal.msgError('本次入库数量需大于0,且不能超过待入库数量') |
| | | return |
| | | } |
| | | let isVerify = true |
| | | selectedRows.value.some((product) => { |
| | | if(!product.boxNum){ |
| | | proxy.$modal.msgError('请填写每件数量/支') |
| | | isVerify = false |
| | | return true |
| | | } |
| | | if(!product.cartonSpecifications){ |
| | | proxy.$modal.msgError('请填写纸箱规格') |
| | | isVerify = false |
| | | return true |
| | | } |
| | | if(!product.dollarPrice){ |
| | | proxy.$modal.msgError('请填写单价(美元)/件') |
| | | isVerify = false |
| | | return true |
| | | |
| | | } |
| | | return false |
| | | }) |
| | | if(!isVerify)return |
| | | |
| | | const stockInData = { |
| | | ...form.value, |
| | |
| | | id: product.id, |
| | | inboundQuantity: Number(product.quantityStock), |
| | | unitPrice: Number(product.taxInclusiveUnitPrice), |
| | | taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice) |
| | | taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice), |
| | | boxNum: Number(product.boxNum), |
| | | cartonSpecifications: product.cartonSpecifications, |
| | | dollarPrice: Number(product.dollarPrice) |
| | | |
| | | })), |
| | | }; |
| | | loading.value = true |