| | |
| | | <div v-loading="detailLoading"> |
| | | <el-descriptions :column="3" border> |
| | | <el-descriptions-item label="退料单号">{{ |
| | | detailData.no || "--" |
| | | detailData.no || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="退货方式">{{ |
| | | getReturnTypeLabel(detailData.returnType) |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="供应商名称">{{ |
| | | detailData.supplierName || "--" |
| | | detailData.supplierName || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="项目阶段">{{ |
| | | getProjectPhaseLabel(detailData.projectPhase) |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="关联的采购订单号">{{ |
| | | detailData.purchaseContractNumber || "--" |
| | | detailData.purchaseContractNumber || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="制作日期">{{ |
| | | detailData.preparedAt || "--" |
| | | detailData.preparedAt || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="制单人">{{ |
| | | detailData.preparedUserName || "--" |
| | | detailData.preparedUserName || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="退料人">{{ |
| | | detailData.returnUserName || "--" |
| | | detailData.returnUserName || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货类型">{{ |
| | | getShippingTypeLabel(detailData.shippingType) |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item v-if="String(detailData.shippingType) === '1'" label="发货车牌号">{{ |
| | | detailData.truckPlateNo || "--" |
| | | detailData.truckPlateNo || '/' |
| | | }}</el-descriptions-item> |
| | | <template v-else-if="String(detailData.shippingType) === '2'"> |
| | | <el-descriptions-item label="快递公司">{{ |
| | | detailData.expressCompany || "--" |
| | | detailData.expressCompany || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="快递单号">{{ |
| | | detailData.expressNo || "--" |
| | | detailData.expressNo || '/' |
| | | }}</el-descriptions-item> |
| | | </template> |
| | | <el-descriptions-item label="整单折扣额">{{ |
| | | formatAmount(detailData.totalDiscountAmount) |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="整单折扣率">{{ |
| | | detailData.totalDiscountRate ?? "--" |
| | | detailData.totalDiscountRate ?? '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="成交金额">{{ |
| | | formatAmount(detailData.totalAmount) |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="创建人">{{ |
| | | detailData.createUserName || "--" |
| | | detailData.createUserName || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="创建时间">{{ |
| | | detailData.createTime || "--" |
| | | detailData.createTime || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="最近更新时间">{{ |
| | | detailData.updateTime || "--" |
| | | detailData.updateTime || '/' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="备注" :span="3">{{ |
| | | detailData.remark || "--" |
| | | detailData.remark || '/' |
| | | }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | |
| | | label: "退货方式", |
| | | prop: "returnType", |
| | | formatData: (val) => |
| | | returnTypeOptions.find((item) => item.value === val)?.label || "--", |
| | | returnTypeOptions.find((item) => item.value === val)?.label || '/', |
| | | }, |
| | | { |
| | | label: "供应商名称", |
| | |
| | | width: 100, |
| | | formatData: (val) => |
| | | projectPhaseOptions.find((item) => String(item.value) === String(val)) |
| | | ?.label || "--", |
| | | ?.label || '/', |
| | | }, |
| | | { |
| | | label: "关联的采购订单号", |
| | |
| | | tableLoading.value = false; |
| | | tableData.value = (res.data.records || []).map((row) => ({ |
| | | ...row, |
| | | truckPlateDisplay: String(row?.shippingType) === "1" ? (row?.truckPlateNo || "--") : "--", |
| | | expressCompanyDisplay: String(row?.shippingType) === "2" ? (row?.expressCompany || "--") : "--", |
| | | expressNoDisplay: String(row?.shippingType) === "2" ? (row?.expressNo || "--") : "--", |
| | | truckPlateDisplay: String(row?.shippingType) === "1" ? (row?.truckPlateNo || '/') : '/', |
| | | expressCompanyDisplay: String(row?.shippingType) === "2" ? (row?.expressCompany || '/') : '/', |
| | | expressNoDisplay: String(row?.shippingType) === "2" ? (row?.expressNo || '/') : '/', |
| | | })); |
| | | page.total = res.data.total; |
| | | }) |
| | |
| | | const getReturnTypeLabel = (value) => { |
| | | return ( |
| | | returnTypeOptions.find((item) => String(item.value) === String(value)) |
| | | ?.label || "--" |
| | | ?.label || '/' |
| | | ); |
| | | }; |
| | | |
| | | const getProjectPhaseLabel = (value) => { |
| | | return ( |
| | | projectPhaseOptions.find((item) => String(item.value) === String(value)) |
| | | ?.label || "--" |
| | | ?.label || '/' |
| | | ); |
| | | }; |
| | | |
| | |
| | | 1: "货车", |
| | | 2: "快递", |
| | | }; |
| | | return shippingTypeMap[String(value)] || shippingTypeMap[value] || "--"; |
| | | return shippingTypeMap[String(value)] || shippingTypeMap[value] || '/'; |
| | | }; |
| | | |
| | | const formatAmount = (value) => { |
| | | if (value === null || value === undefined || value === "") { |
| | | return "--"; |
| | | return '/'; |
| | | } |
| | | const num = Number(value); |
| | | if (Number.isNaN(num)) { |