| | |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="设备名称">{{ detailData.deviceName }}</el-descriptions-item> |
| | | <el-descriptions-item label="规格型号">{{ detailData.deviceModel }}</el-descriptions-item> |
| | | <el-descriptions-item label="设备品牌">{{ detailData.deviceBrand }}</el-descriptions-item> |
| | | <!-- <el-descriptions-item label="设备品牌">{{ detailData.deviceBrand }}</el-descriptions-item> --> |
| | | <el-descriptions-item label="设备类型">{{ detailData.type }}</el-descriptions-item> |
| | | <el-descriptions-item label="供应商">{{ detailData.supplierName }}</el-descriptions-item> |
| | | <el-descriptions-item label="存放位置">{{ detailData.storageLocation }}</el-descriptions-item> |
| | | <!-- <el-descriptions-item label="存放位置">{{ detailData.storageLocation }}</el-descriptions-item> --> |
| | | <el-descriptions-item label="单位">{{ detailData.unit }}</el-descriptions-item> |
| | | <el-descriptions-item label="数量">{{ detailData.number }}</el-descriptions-item> |
| | | <el-descriptions-item label="启用折旧">{{ detailData.isDepr === 1 ? '是' : '否' }}</el-descriptions-item> |
| | |
| | | label: "规格型号", |
| | | prop: "deviceModel", |
| | | }, |
| | | { |
| | | label: "设备品牌", |
| | | prop: "deviceBrand", |
| | | }, |
| | | // { |
| | | // label: "设备品牌", |
| | | // prop: "deviceBrand", |
| | | // }, |
| | | { |
| | | label: "设备类型", |
| | | prop: "type", |
| | |
| | | label: "供应商", |
| | | prop: "supplierName", |
| | | }, |
| | | { |
| | | label: "存放位置", |
| | | prop: "storageLocation", |
| | | }, |
| | | // { |
| | | // label: "存放位置", |
| | | // prop: "storageLocation", |
| | | // }, |
| | | { |
| | | label: "数量", |
| | | prop: "number", |
| | |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | // 将未入库金额并入已入库金额,未入库金额置0 |
| | | const mergeUnshippedAmount = row => { |
| | | if (row && row.unshippedAmount) { |
| | | row.shippedAmount = (Number(row.shippedAmount) || 0) + (Number(row.unshippedAmount) || 0); |
| | | row.unshippedAmount = 0; |
| | | } |
| | | return row; |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | paymentLedgerList({ |
| | |
| | | }).then(res => { |
| | | let result = res.data; |
| | | tableLoading.value = false; |
| | | tableData.value = result.records || []; |
| | | tableData.value = (result.records || []).map(mergeUnshippedAmount); |
| | | total.value = result.total || 0; |
| | | if (tableData.value.length > 0) { |
| | | currentSupplierId.value = tableData.value[0].supplierId; |
| | |
| | | tableLoadingSon.value = false; |
| | | let result = res.data; |
| | | if (Array.isArray(result)) { |
| | | tableDataSon.value = result; |
| | | tableDataSon.value = result.map(mergeUnshippedAmount); |
| | | sonPage.total = result.length; |
| | | handlePagination({ page: sonPage.current, limit: sonPage.size }); |
| | | } else { |
| | | originalTableDataSon.value = result.records || []; |
| | | originalTableDataSon.value = (result.records || []).map(mergeUnshippedAmount); |
| | | sonPage.total = result.total || 0; |
| | | } |
| | | }) |
| | |
| | | <el-table-column label="入库状态" prop="stockInStatus" width="100" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tag :type="getStockInStatusType(scope.row.stockInStatus)" size="small"> |
| | | {{ scope.row.stockInStatus || '--' }} |
| | | {{ formatStockInStatus(scope.row.stockInStatus) || '--' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | return typeMap[status] || ""; |
| | | }; |
| | | |
| | | // 入库状态显示:入库中也展示为完全入库 |
| | | const formatStockInStatus = status => { |
| | | if (status === "入库中") return "完全入库"; |
| | | return status; |
| | | }; |
| | | |
| | | // 获取入库状态标签类型 |
| | | const getStockInStatusType = status => { |
| | | const typeMap = { |
| | | "待入库": "info", // 待入库 - 灰色 |
| | | "入库中": "warning", // 入库中 - 橙色 |
| | | "入库中": "success", // 入库中 - 绿色 |
| | | "完全入库": "success", // 完全入库 - 绿色 |
| | | }; |
| | | return typeMap[status] || ""; |
| | |
| | | <div class="checkbox-group"> |
| | | <el-checkbox v-model="formData.summaryMaterial">物料</el-checkbox> |
| | | <el-checkbox v-model="formData.summaryAuxAttributes">辅助属性</el-checkbox> |
| | | <el-checkbox v-model="formData.summaryDemandDate">需求日期</el-checkbox> |
| | | <el-checkbox v-model="formData.summaryDemandDate">交货日期</el-checkbox> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | <div class="info-item" |
| | | style="width: 25%;"> |
| | | <span class="label">需求日期:</span> |
| | | <span class="label">交货日期:</span> |
| | | <span class="value">{{ formatDate(orderRow?.planCompleteTime) }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="info-value">{{ item.unit || '-' }}</div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-label">需求日期</div> |
| | | <div class="info-label">交货日期</div> |
| | | <div class="info-value">{{ item.requiredDate ? dayjs(item.requiredDate).format('YYYY-MM-DD') : '-' }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | style="width: 160px;" |
| | | @keyup.enter="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="需求日期范围:" |
| | | <el-form-item label="交货日期范围:" |
| | | prop="dateRange"> |
| | | <el-date-picker v-model="searchForm.dateRange" |
| | | type="daterange" |
| | |
| | | <el-input v-model="form.unit" |
| | | placeholder="请输入单位" /> |
| | | </el-form-item> |
| | | <el-form-item label="需求日期" |
| | | <el-form-item label="发货日期" |
| | | prop="requiredDate"> |
| | | <el-date-picker v-model="form.requiredDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | style="width: 100%" |
| | | placeholder="请选择需求日期" /> |
| | | placeholder="请选择发货日期" /> |
| | | </el-form-item> |
| | | <el-form-item label="承诺日期" |
| | | prop="promisedDeliveryDate"> |
| | |
| | | // formatData: (cell, row) => (cell ? `${cell}${row.unit || "方"}` : 0), |
| | | }, |
| | | { |
| | | label: "需求日期", |
| | | label: "发货日期", |
| | | prop: "requiredDate", |
| | | width: "160px", |
| | | className: "date-cell", |
| | |
| | | ], |
| | | qtyRequired: [{ required: true, message: "请输入数量", trigger: "blur" }], |
| | | requiredDate: [ |
| | | { required: true, message: "请选择需求日期", trigger: "change" }, |
| | | { required: true, message: "请选择发货日期", trigger: "change" }, |
| | | ], |
| | | }); |
| | | |
| | |
| | | tableAmountFormatter, |
| | | formatDecimal, |
| | | buildAmountSummaryFormat, |
| | | roundAmount, |
| | | } from "@/utils/numberFormat"; |
| | | import ImageUpload from "@/components/AttachmentUpload/image/index.vue"; |
| | | import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue"; |
| | |
| | | rawList.forEach(item => { |
| | | total += Number(getDeliveryBatchQuantity(item) || 0); |
| | | }); |
| | | currentStock.value = total; |
| | | currentStock.value = roundAmount(total); |
| | | } catch (e) { |
| | | console.error(e); |
| | | currentStock.value = 0; |
| | |
| | | return Number(currentDeliveryRow.value?.noQuantity || 0); |
| | | }; |
| | | const selectedDeliveryQuantity = computed(() => { |
| | | return (deliveryForm.value.batchNoList || []).reduce( |
| | | (sum, item) => sum + Number(item?.deliveryQuantity || 0), |
| | | 0 |
| | | return roundAmount( |
| | | (deliveryForm.value.batchNoList || []).reduce( |
| | | (sum, item) => sum + Number(item?.deliveryQuantity || 0), |
| | | 0 |
| | | ) |
| | | ); |
| | | }); |
| | | const getDeliveryBatchDeliveryMax = row => { |
| | | const productQuantity = getCurrentDeliveryRowQuantity(); |
| | | const batchQuantity = Number(getDeliveryBatchQuantity(row) || 0); |
| | | const otherBatchTotal = (deliveryForm.value.batchNoList || []).reduce( |
| | | (sum, item) => { |
| | | if (item?.id === row?.id) return sum; |
| | | return sum + Number(item?.deliveryQuantity || 0); |
| | | }, |
| | | 0 |
| | | const otherBatchTotal = roundAmount( |
| | | (deliveryForm.value.batchNoList || []).reduce( |
| | | (sum, item) => { |
| | | if (item?.id === row?.id) return sum; |
| | | return sum + Number(item?.deliveryQuantity || 0); |
| | | }, |
| | | 0 |
| | | ) |
| | | ); |
| | | const remainingProductQuantity = Math.max( |
| | | 0, |
| | | productQuantity - otherBatchTotal |
| | | const remainingProductQuantity = roundAmount( |
| | | Math.max(0, productQuantity - otherBatchTotal) |
| | | ); |
| | | return Math.max(0, Math.min(batchQuantity, remainingProductQuantity)); |
| | | }; |
| | | const handleDeliveryBatchQuantityChange = row => { |
| | | const productQuantity = getCurrentDeliveryRowQuantity(); |
| | | const batchQuantity = Number(getDeliveryBatchQuantity(row) || 0); |
| | | const otherBatchTotal = (deliveryForm.value.batchNoList || []).reduce( |
| | | (sum, item) => { |
| | | if (item?.id === row?.id) return sum; |
| | | return sum + Number(item?.deliveryQuantity || 0); |
| | | }, |
| | | 0 |
| | | const otherBatchTotal = roundAmount( |
| | | (deliveryForm.value.batchNoList || []).reduce( |
| | | (sum, item) => { |
| | | if (item?.id === row?.id) return sum; |
| | | return sum + Number(item?.deliveryQuantity || 0); |
| | | }, |
| | | 0 |
| | | ) |
| | | ); |
| | | const remainingProductQuantity = Math.max( |
| | | 0, |
| | | productQuantity - otherBatchTotal |
| | | const remainingProductQuantity = roundAmount( |
| | | Math.max(0, productQuantity - otherBatchTotal) |
| | | ); |
| | | const currentValue = Number(row?.deliveryQuantity || 0); |
| | | |
| | |
| | | proxy.$modal.msgWarning("请至少填写一个批号的发货数量"); |
| | | return; |
| | | } |
| | | const totalDeliveryQuantity = selectedBatchRows.reduce( |
| | | (sum, item) => sum + Number(item.deliveryQuantity || 0), |
| | | 0 |
| | | const totalDeliveryQuantity = roundAmount( |
| | | selectedBatchRows.reduce( |
| | | (sum, item) => sum + Number(item.deliveryQuantity || 0), |
| | | 0 |
| | | ) |
| | | ); |
| | | const currentRowNoQuantity = Number( |
| | | currentDeliveryRow.value?.noQuantity || 0 |