| | |
| | | <el-descriptions-item label="退料人">{{ |
| | | 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 || "--" |
| | | }}</el-descriptions-item> |
| | | <template v-else-if="String(detailData.shippingType) === '2'"> |
| | | <el-descriptions-item label="快递公司">{{ |
| | | detailData.expressCompany || "--" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="快递单号">{{ |
| | | detailData.expressNo || "--" |
| | | }}</el-descriptions-item> |
| | | </template> |
| | | <el-descriptions-item label="整单折扣额">{{ |
| | | formatAmount(detailData.totalDiscountAmount) |
| | | }}</el-descriptions-item> |
| | |
| | | prop: "returnUserName", |
| | | width: 110, |
| | | }, |
| | | { |
| | | label: "发货类型", |
| | | prop: "shippingType", |
| | | width: 100, |
| | | formatData: (val) => getShippingTypeLabel(val), |
| | | }, |
| | | { label: "发货车牌号", prop: "truckPlateDisplay", width: 140 }, |
| | | { label: "快递公司", prop: "expressCompanyDisplay", width: 140 }, |
| | | { label: "快递单号", prop: "expressNoDisplay", width: 150 }, |
| | | |
| | | { |
| | | label: "整单折扣额", |
| | |
| | | findPurchaseReturnOrderListPage({ ...searchForm.value, ...page }) |
| | | .then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records; |
| | | 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 || "--") : "--", |
| | | })); |
| | | page.total = res.data.total; |
| | | }) |
| | | .catch(() => { |
| | |
| | | ); |
| | | }; |
| | | |
| | | const getShippingTypeLabel = (value) => { |
| | | const shippingTypeMap = { |
| | | 1: "货车", |
| | | 2: "快递", |
| | | }; |
| | | return shippingTypeMap[String(value)] || shippingTypeMap[value] || "--"; |
| | | }; |
| | | |
| | | const formatAmount = (value) => { |
| | | if (value === null || value === undefined || value === "") { |
| | | return "--"; |