gaoluyang
4 天以前 fc68511987dde8bd9da5ee270605cc9e541bb8fe
fix(销售售后): 页面文案去掉“退货”字样,统一为售后

Co-Authored-By: Claude Code <noreply@anthropic.com>
已修改3个文件
72 ■■■■■ 文件已修改
src/views/salesManagement/returnOrder/components/detailDia.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/returnOrder/components/formDia.vue 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/returnOrder/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/returnOrder/components/detailDia.vue
@@ -1,9 +1,9 @@
<template>
  <el-dialog v-model="dialogVisible" title="退货单详情" width="90%" @close="closeDia">
  <el-dialog v-model="dialogVisible" title="售后单详情" width="90%" @close="closeDia">
    <div v-loading="loading">
      <span class="descriptions">基本信息</span>
      <el-descriptions :column="4" border>
        <el-descriptions-item label="退货单号">{{ detail.returnNo }}</el-descriptions-item>
        <el-descriptions-item label="售后单号">{{ detail.returnNo }}</el-descriptions-item>
        <el-descriptions-item label="单据状态">
          <el-tag :type="getStatusType(detail.status)">{{ getStatusText(detail.status) }}</el-tag>
        </el-descriptions-item>
@@ -20,7 +20,7 @@
        <!-- <el-descriptions-item label="项目名称">{{ detail.projectName }}</el-descriptions-item> -->
        <el-descriptions-item label="制单人">{{ detail.maker }}</el-descriptions-item>
        <el-descriptions-item label="制单时间">{{ detail.makeTime }}</el-descriptions-item>
        <el-descriptions-item label="退货原因">{{ detail.returnReason }}</el-descriptions-item>
        <el-descriptions-item label="售后原因">{{ detail.returnReason }}</el-descriptions-item>
        <el-descriptions-item label="退款总额">{{ detail.refundAmount }}</el-descriptions-item>
      </el-descriptions>
@@ -261,12 +261,12 @@
  {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},
  {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},
  {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},
  {align: "center", label: "是否有质量问题", prop: "isQuality", width: 140, formatData: (v) => ({ "1": "是", "2": "否" }[String(v)] ?? v)},
  {align: "center", label: "备注", prop: "remark", width: 150},
];
src/views/salesManagement/returnOrder/components/formDia.vue
@@ -1,12 +1,12 @@
<template>
  <div>
    <el-dialog v-model="dialogFormVisible" :title="operationType === 'edit' ? '编辑退货单' : '新增退货单'" width="90%" @close="closeDia">
    <el-dialog v-model="dialogFormVisible" :title="operationType === 'edit' ? '编辑售后单' : '新增售后单'" width="90%" @close="closeDia">
      <div>
        <span class="descriptions">基本信息</span>
        <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
          <el-row :gutter="30">
            <el-col :span="4">
              <el-form-item label="退货单号:" prop="returnNo">
              <el-form-item label="售后单号:" prop="returnNo">
                <el-input
                  :disabled="operationType === 'edit' || form.returnNoCheckbox"
                  v-model="form.returnNo"
@@ -64,8 +64,8 @@
              </el-form-item>
            </el-col> -->
            <el-col :span="4">
              <el-form-item label="退货原因:" prop="returnReason">
                <el-input v-model="form.returnReason" placeholder="请输入退货原因" />
              <el-form-item label="售后原因:" prop="returnReason">
                <el-input v-model="form.returnReason" placeholder="请输入售后原因" />
              </el-form-item>
            </el-col>
            <el-col :span="4">
@@ -176,9 +176,9 @@
        <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" prop="pendingReturnNum" 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" prop="pendingReturnNum" label="待处理售后数量" />
      </el-table>
      <template #footer>
        <div class="dialog-footer">
@@ -226,7 +226,7 @@
    returnNo: [{
      validator: (rule, value, callback) => {
        if (form.value.returnNoCheckbox) return callback();
        if (!value) return callback(new Error("请输入退货单号"));
        if (!value) return callback(new Error("请输入售后单号"));
        callback();
      }, trigger: "blur"
    }],
@@ -251,12 +251,12 @@
  {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 },
  {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 },
  {align: "center", label: "退货产品金额", prop: "amount", dataType: "slot", slot: "amount", width: 120 },
  {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 },
  {align: "center", label: "售后产品金额", prop: "amount", dataType: "slot", slot: "amount", width: 120 },
  {align: "center", label: "是否有质量问题", prop: "isQuality", dataType: "slot", slot: "isQuality", width: 140 },
  {align: "center", label: "备注", prop: "remark", dataType: "slot", slot: "remark", width: 150 },
  {align: "center", label: "操作" , prop: "action", dataType: "slot", slot: "action", width: 120 },
@@ -542,18 +542,18 @@
  proxy.$refs["formRef"].validate(valid => {
    if (!valid) return;
    if (!tableData.value || tableData.value.length === 0) {
      proxy.$modal.msgWarning("请至少添加一个退货产品");
      proxy.$modal.msgWarning("请至少添加一个售后产品");
      return;
    }
    for (let i = 0; i < tableData.value.length; i++) {
      const row = tableData.value[i];
      const qty = Number(row.num ?? row.returnQuantity ?? 0);
      if (!qty || qty <= 0) {
        proxy.$modal.msgWarning(`第${i + 1}行退货数量必须大于0`);
        proxy.$modal.msgWarning(`第${i + 1}行售后数量必须大于0`);
        return;
      }
      if (row.price === "" || row.price === null || row.price === undefined || Number(row.price) < 0) {
        proxy.$modal.msgWarning(`第${i + 1}行退货单价不能为负数`);
        proxy.$modal.msgWarning(`第${i + 1}行售后单价不能为负数`);
        return;
      }
    }
@@ -698,9 +698,9 @@
const handleReturnQuantityChange = (val, row) => {
  if (val === "" || val === null) return;
  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 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);
@@ -709,7 +709,7 @@
      row.returnQuantity = max;
      row.num = max;
    });
    proxy.$modal.msgWarning(`退货数量不能超过未退货数量(${max})`);
    proxy.$modal.msgWarning(`售后数量不能超过未售后数量(${max})`);
  } else if (current < 0) {
    proxy.$nextTick(() => {
      row.returnQuantity = 0;
src/views/salesManagement/returnOrder/index.vue
@@ -2,8 +2,8 @@
  <div class="app-container">
    <div class="search_form">
      <el-form :model="searchForm" class="demo-form-inline" :inline="true">
                <el-form-item label="退货单号">
                    <el-input v-model="searchForm.returnNo" placeholder="请输入退货单号" clearable />
                <el-form-item label="售后单号">
                    <el-input v-model="searchForm.returnNo" placeholder="请输入售后单号" clearable />
                </el-form-item>
                <el-form-item label="客户名称">
                    <el-input v-model="searchForm.customerName" placeholder="客户名称" clearable />
@@ -22,7 +22,7 @@
    </div>
    <div class="table_list">
      <div class="table_header" style="display: flex;justify-content: flex-end;margin-bottom: 10px;">
        <el-button type="primary" @click="openForm('add')">新建销售退货</el-button>
        <el-button type="primary" @click="openForm('add')">新建销售售后</el-button>
        <el-button type="danger" :disabled="selectedRows.length === 0 || selectedRows.some(row => row.status !== 0)" @click="handleDelete">删除</el-button>
      </div>
      <PIMTable
@@ -68,7 +68,7 @@
const handleRowDelete = (row) => {
  if (!row?.id) return;
  ElMessageBox.confirm("该退货单将被删除,是否确认删除?", "删除提示", {
  ElMessageBox.confirm("该售后单将被删除,是否确认删除?", "删除提示", {
    confirmButtonText: "确认",
    cancelButtonText: "取消",
    type: "warning",
@@ -82,7 +82,7 @@
const handleRowHandle = (row) => {
  if (!row?.id) return;
  ElMessageBox.confirm("是否处理该退货单?处理后将无法修改", "处理提示", {
  ElMessageBox.confirm("是否处理该售后单?处理后将无法修改", "处理提示", {
    confirmButtonText: "确认",
    cancelButtonText: "取消",
    type: "warning",
@@ -115,7 +115,7 @@
]);
const defaultColumns = [
  { label: "退货单号", prop: "returnNo", minWidth: 160 },
  { label: "售后单号", prop: "returnNo", minWidth: 160 },
  { label: "单据状态", prop: "status", minWidth: 90, dataType: "slot", slot: "status" },
  { label: "入库审批状态", prop: "stockInApprovalStatus", minWidth: 120, dataType: "slot", slot: "stockInApprovalStatus" },
  { label: "制单时间", prop: "makeTime", minWidth: 170 },