| | |
| | | @click="handleDetail(row)" |
| | | >详情</el-button |
| | | > |
| | | <el-button link size="small" @click="handleDelete(row)" |
| | | >删除</el-button |
| | | <el-button |
| | | link |
| | | size="small" |
| | | :disabled="row.stockOutApproved" |
| | | :style="{ color: row.stockOutApproved ? '#c0c4cc' : undefined }" |
| | | @click="handleDelete(row)" |
| | | >{{ row.stockOutApproved }}</el-button |
| | | > |
| | | </template> |
| | | </PIMTable> |
| | |
| | | detailData.createUserName || "--" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="创建时间">{{ |
| | | detailData.createTime || "--" |
| | | formatDate(detailData.createTime) || "--" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="最近更新时间">{{ |
| | | detailData.updateTime || "--" |
| | | formatDate(detailData.updateTime) || "--" |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="备注" :span="3">{{ |
| | | detailData.remark || "--" |
| | |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | width: 170, |
| | | width: 130, |
| | | formatData: (val) => formatDate(val), |
| | | }, |
| | | { |
| | | label: "最近更新时间", |
| | | prop: "updateTime", |
| | | width: 170, |
| | | width: 130, |
| | | formatData: (val) => formatDate(val), |
| | | }, |
| | | { |
| | | label: "备注", |
| | |
| | | }, |
| | | { |
| | | name: "删除", |
| | | disabled: (row) => !!row.stockOutApproved, |
| | | clickFun: (row) => { |
| | | handleDelete(row); |
| | | }, |
| | |
| | | return num.toFixed(2); |
| | | }; |
| | | |
| | | const formatDate = (value) => { |
| | | if (!value) return ""; |
| | | return String(value).slice(0, 10); |
| | | }; |
| | | |
| | | /** 已退货数量 = 入库行总数量 − 当前可退货数量(剩余) */ |
| | | const calcAlreadyReturned = (row) => { |
| | | const total = Number(row?.stockInNum ?? row?.totalQuantity ?? row?.quantity ?? 0); |
| | | const un = Number(row?.unQuantity ?? 0); |
| | | if (!Number.isFinite(total) || !Number.isFinite(un)) return 0; |
| | | return Math.max(total - un, 0); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |