| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="产品大类" |
| | | <el-form-item label="油品" |
| | | prop="productName"> |
| | | <el-input v-model="searchForm.productName" |
| | | style="width: 240px" |
| | |
| | | label="序号" |
| | | type="index" |
| | | width="60" /> |
| | | <el-table-column label="入库批次" |
| | | prop="inboundBatches" |
| | | width="200" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库时间" |
| | | prop="createTime" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="产品大类" |
| | | prop="productName" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" |
| | | prop="model" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="批号" |
| | | prop="batchNo" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="单位" |
| | | prop="unit" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库数量" |
| | | prop="stockInNum" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库人" |
| | | prop="createBy" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="来源" |
| | | prop="recordType" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ getRecordType(scope.row.recordType) }} |
| | | </template> |
| | | <el-table-column label="入库信息" |
| | | align="center" |
| | | :header-cell-style="groupHeaderStyle"> |
| | | <el-table-column label="入库批次" |
| | | prop="inboundBatches" |
| | | min-width="150" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库时间" |
| | | prop="inboundTime" |
| | | min-width="160" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库类别" |
| | | prop="inboundCategory" |
| | | min-width="100" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="油库" |
| | | prop="oilDepotName" |
| | | min-width="130" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="储罐号" |
| | | prop="tankNo" |
| | | min-width="90" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="油品" |
| | | prop="productName" |
| | | min-width="90" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="原厂数量(吨)" |
| | | prop="originalQuantity" |
| | | min-width="110" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="规格型号" |
| | | prop="model" |
| | | min-width="110" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="批号" |
| | | prop="batchNo" |
| | | min-width="140" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="单位" |
| | | prop="unit" |
| | | min-width="70" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库数量" |
| | | prop="stockInNum" |
| | | min-width="100" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库人" |
| | | prop="createBy" |
| | | min-width="90" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="来源" |
| | | prop="recordType" |
| | | min-width="90" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ getRecordType(scope.row.recordType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="showSourceOrderNoColumn" |
| | | label="源单号" |
| | | min-width="150" |
| | | prop="sourceOrderNo" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ formatSourceOrderNo(scope.row?.sourceOrderNo) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="审批状态" |
| | | prop="approvalStatus" |
| | | min-width="100" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tag :type="getApprovalStatusTagType(scope.row.approvalStatus)" |
| | | size="small"> |
| | | {{ getApprovalStatusLabel(scope.row.approvalStatus) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column v-if="showSourceOrderNoColumn" |
| | | label="源单号" |
| | | width="150" |
| | | prop="sourceOrderNo" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ formatSourceOrderNo(scope.row?.sourceOrderNo) }} |
| | | </template> |
| | | <el-table-column label="客户信息" |
| | | align="center" |
| | | :header-cell-style="groupHeaderStyle"> |
| | | <el-table-column label="客户名称" |
| | | prop="customerName" |
| | | min-width="160" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="客户对接人" |
| | | prop="contactPerson" |
| | | min-width="100" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="对接人电话" |
| | | prop="contactPhone" |
| | | min-width="120" |
| | | show-overflow-tooltip /> |
| | | </el-table-column> |
| | | <el-table-column label="审批状态" |
| | | prop="approvalStatus" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tag :type="getApprovalStatusTagType(scope.row.approvalStatus)" |
| | | size="small"> |
| | | {{ getApprovalStatusLabel(scope.row.approvalStatus) }} |
| | | </el-tag> |
| | | </template> |
| | | <el-table-column label="物流信息" |
| | | align="center" |
| | | :header-cell-style="groupHeaderStyle"> |
| | | <el-table-column label="司机姓名" |
| | | prop="driverName" |
| | | min-width="100" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="司机电话" |
| | | prop="driverPhone" |
| | | min-width="120" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="押运员姓名" |
| | | prop="escortName" |
| | | min-width="100" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="押运员电话" |
| | | prop="escortPhone" |
| | | min-width="120" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="车牌号" |
| | | prop="truckPlateNo" |
| | | min-width="110" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="车挂牌号" |
| | | prop="trailerPlateNo" |
| | | min-width="110" |
| | | show-overflow-tooltip /> |
| | | </el-table-column> |
| | | <el-table-column label="卸油操作信息" |
| | | align="center" |
| | | :header-cell-style="groupHeaderStyle"> |
| | | <el-table-column label="车体/铅封检验" |
| | | prop="tankInspectionStatus" |
| | | min-width="120" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="卸车鹤位" |
| | | prop="unloadingCranePosition" |
| | | min-width="100" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="密度" |
| | | prop="density" |
| | | min-width="80" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="卸油拍照" |
| | | prop="unloadPhotos" |
| | | align="center" |
| | | min-width="90"> |
| | | <template #default="scope"> |
| | | <el-image v-if="toPhotoArray(scope.row.unloadPhotos).length" |
| | | :src="getPhotoUrl(toPhotoArray(scope.row.unloadPhotos)[0])" |
| | | :preview-src-list="getPhotoUrls(scope.row.unloadPhotos)" |
| | | preview-teleported |
| | | fit="cover" |
| | | style="width: 40px; height: 40px; border-radius: 4px" /> |
| | | <span v-else>--</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="过磅数据" |
| | | align="center" |
| | | :header-cell-style="groupHeaderStyle"> |
| | | <el-table-column label="毛重(吨)" |
| | | prop="grossWeight" |
| | | min-width="90" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="皮重(吨)" |
| | | prop="tareWeight" |
| | | min-width="90" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="净重(吨)" |
| | | prop="netWeight" |
| | | min-width="90" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="亏量(吨)" |
| | | prop="lossQuantity" |
| | | min-width="90" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="实际入库体积(升)" |
| | | prop="actualVolume" |
| | | min-width="130" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="磅单" |
| | | prop="poundPhotos" |
| | | align="center" |
| | | min-width="90"> |
| | | <template #default="scope"> |
| | | <el-image v-if="toPhotoArray(scope.row.poundPhotos).length" |
| | | :src="getPhotoUrl(toPhotoArray(scope.row.poundPhotos)[0])" |
| | | :preview-src-list="getPhotoUrls(scope.row.poundPhotos)" |
| | | preview-teleported |
| | | fit="cover" |
| | | style="width: 40px; height: 40px; border-radius: 4px" /> |
| | | <span v-else>--</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination v-show="total > 0" |
| | |
| | | }); |
| | | }; |
| | | |
| | | // 分组父表头样式:区分各分类 |
| | | const groupHeaderStyle = { |
| | | background: "#e8f3ff", |
| | | color: "#1d6fd8", |
| | | fontWeight: "700", |
| | | fontSize: "13px", |
| | | }; |
| | | |
| | | // 照片字段后端存的是 JSON 字符串,出参需自行解析 |
| | | const toPhotoArray = value => { |
| | | if (!value) { |
| | | return []; |
| | | } |
| | | if (Array.isArray(value)) { |
| | | return value; |
| | | } |
| | | if (typeof value === "string") { |
| | | try { |
| | | const parsed = JSON.parse(value); |
| | | return Array.isArray(parsed) ? parsed : []; |
| | | } catch (e) { |
| | | return []; |
| | | } |
| | | } |
| | | return []; |
| | | }; |
| | | |
| | | const getPhotoUrl = photo => |
| | | typeof photo === "string" ? photo : photo?.url || photo?.previewURL || ""; |
| | | |
| | | // 图片列:取全部地址用于预览 |
| | | const getPhotoUrls = photos => |
| | | toPhotoArray(photos).map(getPhotoUrl).filter(Boolean); |
| | | |
| | | // 获取来源类型选项 |
| | | const fetchStockRecordTypeOptions = () => { |
| | | if (props.type === "0") { |