spring
4 天以前 3639cc3129fe3433f110a18d53b1cae2c4f4ff8e
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -73,6 +73,16 @@
        <el-table-column label="入库数量"
                         prop="stockInNum"
                         show-overflow-tooltip/>
        <el-table-column label="审批状态"
                         prop="approveStatus"
                         align="center"
                         width="120">
          <template #default="scope">
            <el-tag :type="getApproveStatusType(scope.row.approveStatus)">
              {{ getApproveStatusText(scope.row.approveStatus) }}
            </el-tag>
          </template>
        </el-table-column>
        <el-table-column label="入库人"
                         prop="createBy"
                         show-overflow-tooltip/>
@@ -81,6 +91,20 @@
                         show-overflow-tooltip>
          <template #default="scope">
            {{ getRecordType(scope.row.recordType) }}
          </template>
        </el-table-column>
        <el-table-column label="操作"
                         align="center"
                         width="200">
          <template #default="scope">
            <el-button
              v-if="scope.row.approveStatus === 3"
              type="primary"
              link
              @click="handleReApprove(scope.row)"
            >
              重新提起审批
            </el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -107,6 +131,7 @@
import {
  getStockInRecordListPage,
  batchDeleteStockInRecords,
  updateStockInRecordForReApprove,
} from "@/api/inventoryManagement/stockInRecord.js";
import {
  findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
@@ -152,6 +177,24 @@
  return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
}
const getApproveStatusText = (status) => {
  if (status === 0) return "待审核";
  if (status === 1) return "审核中";
  if (status === 2) return "审核完成";
  if (status === 3) return "审核未通过";
  if (status === 4) return "已重新提交";
  return "-";
};
const getApproveStatusType = (status) => {
  if (status === 0) return "warning";
  if (status === 1) return "primary";
  if (status === 2) return "success";
  if (status === 3) return "danger";
  if (status === 4) return "info";
  return "";
};
const pageProductChange = obj => {
  page.current = obj.page;
  page.size = obj.limit;
@@ -195,6 +238,34 @@
const expandedRowKeys = ref([]);
const handleReApprove = (row) => {
  if (!row || !row.id) {
    return;
  }
  ElMessageBox.confirm(
    "该记录审核未通过,是否重新提起入库审批?",
    "重新提起审批",
    {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
      type: "warning",
    }
  )
    .then(() => {
      updateStockInRecordForReApprove({ ...row })
        .then(() => {
          proxy.$modal.msgSuccess("已重新发起审批");
          getList();
        })
        .catch(() => {
          proxy.$modal.msgError("重新发起审批失败");
        });
    })
    .catch(() => {
      proxy.$modal.msg("已取消");
    });
};
// 导出
const handleOut = () => {
  ElMessageBox.confirm("是否确认导出?", "导出", {