| | |
| | | <div style="padding-top: 20px"> |
| | | <span class="descriptions">产品列表</span> |
| | | <PIMTable :isShowPagination="false" rowKey="id" :column="tableColumn" :tableData="tableData"> |
| | | <template #totalReturnNum="{ row }"> |
| | | {{ calcAlreadyReturned(row) }} |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | </div> |
| | |
| | | {align: "center", label: "规格型号", prop: "model"}, |
| | | {align: "center", label: "单位", prop: "unit", width: 80}, |
| | | {align: "center", label: "总数量", prop: "stockOutNum", width: 120}, |
| | | {align: "center", label: "已退货数量", prop: "totalReturnNum", width: 120, dataType: "slot", slot: "totalReturnNum"}, |
| | | {align: "center", label: "已退货数量", prop: "totalReturnNum", width: 120}, |
| | | {align: "center", label: "未退货数量", prop: "unQuantity", width: 120}, |
| | | {align: "center", label: "待处理退货数量", prop: "pendingReturnNum", width: 120}, |
| | | {align: "center", label: "退货数量", prop: "returnQuantity", width: 120}, |
| | | {align: "center", label: "退货产品单价", prop: "price", width: 120}, |
| | | {align: "center", label: "退货产品金额", prop: "amount", width: 120}, |
| | |
| | | <el-button type="primary" @click="openProductSelection" :disabled="!form.shippingId">添加产品</el-button> |
| | | </div> |
| | | <PIMTable :isShowPagination="false" rowKey="id" :column="tableColumn" :tableData="tableData"> |
| | | <template #totalReturnNum="{ row }"> |
| | | {{ calcAlreadyReturned(row) }} |
| | | </template> |
| | | <template #returnQuantity="{ row }"> |
| | | <el-input |
| | | v-model="row.returnQuantity" |
| | |
| | | <el-table-column align="center" prop="specificationModel" label="规格型号" /> |
| | | <el-table-column align="center" prop="unit" label="单位" /> |
| | | <el-table-column align="center" prop="stockOutNum" label="总数量" /> |
| | | <el-table-column align="center" label="已退货数量" prop="totalReturnNum"></el-table-column> |
| | | <el-table-column align="center" prop="unQuantity" label="未退货数量" /> |
| | | <el-table-column align="center" label="已退货数量"> |
| | | <template #default="{ row }">{{ calcAlreadyReturned(row) }}</template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column align="center" prop="pendingReturnNum" label="待处理退货数量" /> |
| | | </el-table> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | {align: "center", label: "规格型号", prop: "specificationModel" }, |
| | | {align: "center", label: "单位", prop: "unit", width: 80 }, |
| | | {align: "center", label: "总数量", prop: "stockOutNum", width: 120 }, |
| | | {align: "center", label: "已退货数量", prop: "totalReturnNum", width: 120, dataType: "slot", slot: "totalReturnNum" }, |
| | | {align: "center", label: "已退货数量", prop: "totalReturnNum", width: 120 }, |
| | | {align: "center", label: "待处理退货数量", prop: "pendingReturnNum", width: 120 }, |
| | | {align: "center", label: "未退货数量", prop: "unQuantity", width: 120 }, |
| | | {align: "center", label: "退货数量", prop: "returnQuantity", dataType: "slot", slot: "returnQuantity", width: 120 }, |
| | | {align: "center", label: "退货产品单价", prop: "price", dataType: "slot", slot: "price", width: 120 }, |
| | |
| | | proxy.resetForm("formRef"); |
| | | dialogFormVisible.value = false; |
| | | emit('close'); |
| | | data.form = { |
| | | returnNoCheckbox: true, |
| | | returnNo: "", |
| | | customerId: "", |
| | | shippingId: "", |
| | | projectId: "", |
| | | maker: "", |
| | | makeTime: "", |
| | | status: 0, |
| | | returnReason: "", |
| | | refundAmount: "", |
| | | } |
| | | }; |
| | | |
| | | const initCustomers = async () => { |
| | |
| | | |
| | | const handleReturnQuantityChange = (val, row) => { |
| | | if (val === "" || val === null) return; |
| | | const max = row.unQuantity === undefined || row.unQuantity === null ? Infinity : Number(row.unQuantity || 0); |
| | | const unQuantity = row.unQuantity === undefined || row.unQuantity === null ? Infinity : Number(row.unQuantity || 0);//未退货数量 |
| | | const pendingReturnNum = row.pendingReturnNum === undefined || row.pendingReturnNum === null ? Infinity : Number(row.pendingReturnNum || 0);//待处理退货数量 |
| | | //最大退货数量,如果为编辑状态加上待处理退货数量 |
| | | const max = operationType.value === 'edit' ? unQuantity + pendingReturnNum : unQuantity |
| | | const current = Number(val); |
| | | |
| | | if (current > max) { |