| | |
| | | prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="发货状态:"> |
| | | <el-select v-model="searchForm.shippingStatus" |
| | | placeholder="请选择" |
| | | clearable |
| | | style="width: 160px" |
| | | @change="handleQuery"> |
| | | <el-option label="未发货" |
| | | value="未发货" /> |
| | | <el-option label="已发货" |
| | | value="已发货" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="录入日期:"> |
| | | <el-date-picker v-model="searchForm.entryDate" |
| | | value-format="YYYY-MM-DD" |
| | |
| | | <!-- 发货弹框 --> |
| | | <el-dialog v-model="deliveryFormVisible" |
| | | title="发货信息" |
| | | width="40%" |
| | | width="960px" |
| | | @close="closeDeliveryDia"> |
| | | <el-form :model="deliveryForm" |
| | | label-width="120px" |
| | |
| | | <el-table-column label="批号" |
| | | prop="batchNo" |
| | | min-width="180" /> |
| | | <el-table-column label="销售订单号" |
| | | min-width="180" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ formatDeliveryBatchSalesOrderNo(scope.row) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="产品大类" |
| | | prop="productName" |
| | | min-width="100" /> |
| | |
| | | searchForm: { |
| | | customerName: "", // 客户名称 |
| | | salesContractNo: "", // 销售合同编号 |
| | | projectName: "", // 项目名称 |
| | | shippingStatus: "", // 发货状态(未发货/已发货) |
| | | entryDate: null, // 录入日期 |
| | | entryDateStart: undefined, |
| | | entryDateEnd: undefined, |
| | |
| | | item?.stockQuantity; |
| | | return quantity ?? 0; |
| | | }; |
| | | const formatDeliveryBatchSalesOrderNo = item => |
| | | item?.salesContractNo || "--"; |
| | | const currentStock = ref(null); |
| | | const fetchCurrentStock = async (productModelId) => { |
| | | if (!productModelId) { |
| | |
| | | return; |
| | | } |
| | | try { |
| | | const res = await getStockInventoryByModelId(productModelId); |
| | | const res = await getStockInventoryByModelId(productModelId, currentId.value); |
| | | const rawList = Array.isArray(res?.data) |
| | | ? res.data |
| | | : res?.data?.records || res?.data?.rows || []; |
| | |
| | | item => Number(item?.deliveryQuantity || 0) > 0 |
| | | ); |
| | | }; |
| | | const getDeliveryBatchNoList = async productModelId => { |
| | | const getDeliveryBatchNoList = async (productModelId, salesLedgerId) => { |
| | | if (!productModelId) return []; |
| | | const res = await getStockInventoryByModelId(productModelId); |
| | | const res = await getStockInventoryByModelId(productModelId, salesLedgerId); |
| | | const rawList = Array.isArray(res?.data) |
| | | ? res.data |
| | | : res?.data?.records || res?.data?.rows || []; |
| | |
| | | |
| | | currentDeliveryRow.value = row; |
| | | const batchNoList = await getDeliveryBatchNoList( |
| | | row.productModelId || row.modelId |
| | | row.productModelId || row.modelId, |
| | | row.salesLedgerId |
| | | ); |
| | | deliveryForm.value = { |
| | | shippingCarNumber: "", |
| | |
| | | page-break-after: avoid; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |