8 天以前 264dd309646fd10d81a348011f38f63c7beb2898
Merge remote-tracking branch 'origin/dev_NEW_pro' into dev_NEW_pro
已添加2个文件
已修改4个文件
369 ■■■■■ 文件已修改
multiple/assets/favicon/SDJCfavicon.ico 补丁 | 查看 | 原始文档 | blame | 历史
multiple/assets/logo/SDJCLogo.png 补丁 | 查看 | 原始文档 | blame | 历史
multiple/config.json 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/salesManagement/deliveryLedger.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 250 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/deliveryLedger/index.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multiple/assets/favicon/SDJCfavicon.ico
multiple/assets/logo/SDJCLogo.png
multiple/config.json
@@ -15,6 +15,15 @@
    "logo": "logo/Logo.png",
    "favicon": "favicon/favicon.ico"
  },
  "SDJC": {
    "env": {
      "VITE_APP_TITLE": "黎城县胜德建材有限公司",
      "VITE_BASE_API": "http://36.138.236.153:9000",
      "VITE_JAVA_API": "http://36.138.236.153:9001"
    },
    "logo": "logo/SDJCLogo.png",
    "favicon": "favicon/SDJCfavicon.ico"
  },
  "logo": "/src/assets/logo/logo.png",
  "favicon": "/public/favicon.ico"
}
src/api/salesManagement/deliveryLedger.js
@@ -11,6 +11,13 @@
}
// 修改发货台账
export function getDeliveryDetail(id) {
  return request({
    url: `/shippingInfo/getDateil/${id}`,
    method: "get",
  });
}
export function addOrUpdateDeliveryLedger(query) {
  return request({
    url: "/shippingInfo/update",
src/router/index.js
@@ -48,19 +48,19 @@
    hidden: true,
  },
  // 系统架构图
  {
    path: "/system-architecture",
    component: Layout,
    redirect: "/system-architecture/index",
    children: [
      {
        path: "index",
        component: () => import("@/views/systemArchitecture/index.vue"),
        name: "SystemArchitecture",
        meta: { title: "系统架构图", icon: "tree" },
      },
    ],
  },
  // {
  //   path: "/system-architecture",
  //   component: Layout,
  //   redirect: "/system-architecture/index",
  //   children: [
  //     {
  //       path: "index",
  //       component: () => import("@/views/systemArchitecture/index.vue"),
  //       name: "SystemArchitecture",
  //       meta: { title: "系统架构图", icon: "tree" },
  //     },
  //   ],
  // },
  {
    path: "/:pathMatch(.*)*",
    component: () => import("@/views/error/404"),
@@ -134,118 +134,118 @@
    ],
  },
  // 财务管理模块路由
  {
    path: "/financial",
    component: Layout,
    hidden: false,
    redirect: "/financial/general-ledger",
    alwaysShow: true,
    meta: { title: "财务管理", icon: "money" },
    children: [
      {
        path: "general-ledger",
        component: () => import("@/views/financialManagement/generalLedger/index.vue"),
        name: "GeneralLedger",
        meta: { title: "总帐科目" },
      },
      {
        path: "sales-out",
        component: () => import("@/views/financialManagement/receivable/salesOut.vue"),
        name: "SalesOut",
        meta: { title: "销售出库" },
      },
      {
        path: "sales-return",
        component: () => import("@/views/financialManagement/receivable/salesReturn.vue"),
        name: "SalesReturn",
        meta: { title: "销售退货" },
      },
      {
        path: "receivable-reconciliation",
        component: () => import("@/views/financialManagement/receivable/reconciliation.vue"),
        name: "ReceivableReconciliation",
        meta: { title: "应收对账" },
      },
      {
        path: "invoice-apply",
        component: () => import("@/views/financialManagement/receivable/invoiceApply.vue"),
        name: "InvoiceApply",
        meta: { title: "开票申请" },
      },
      {
        path: "output-invoice",
        component: () => import("@/views/financialManagement/receivable/outputInvoice.vue"),
        name: "OutputInvoice",
        meta: { title: "销项发票" },
      },
      {
        path: "receipt",
        component: () => import("@/views/financialManagement/receivable/receipt.vue"),
        name: "Receipt",
        meta: { title: "收款单" },
      },
      {
        path: "purchase-in",
        component: () => import("@/views/financialManagement/payable/purchaseIn.vue"),
        name: "PurchaseIn",
        meta: { title: "采购入库" },
      },
      {
        path: "payable-reconciliation",
        component: () => import("@/views/financialManagement/payable/reconciliation.vue"),
        name: "PayableReconciliation",
        meta: { title: "应付对账" },
      },
      {
        path: "input-invoice",
        component: () => import("@/views/financialManagement/payable/input-invoice.vue"),
        name: "InputInvoice",
        meta: { title: "进项发票" },
      },
      {
        path: "payment-apply",
        component: () => import("@/views/financialManagement/payable/paymentApply.vue"),
        name: "PaymentApply",
        meta: { title: "付款申请" },
      },
      {
        path: "payment",
        component: () => import("@/views/financialManagement/payable/payment.vue"),
        name: "Payment",
        meta: { title: "付款单" },
      },
      {
        path: "fixed-assets",
        component: () => import("@/views/financialManagement/assets/fixedAssets.vue"),
        name: "FixedAssets",
        meta: { title: "固定资产" },
      },
      {
        path: "intangible-assets",
        component: () => import("@/views/financialManagement/assets/intangibleAssets.vue"),
        name: "IntangibleAssets",
        meta: { title: "无形资产" },
      },
      {
        path: "voucher",
        component: () => import("@/views/financialManagement/voucher/index.vue"),
        name: "Voucher",
        meta: { title: "凭证" },
      },
      {
        path: "voucher-general-ledger",
        component: () => import("@/views/financialManagement/voucher/generalLedger.vue"),
        name: "VoucherGeneralLedger",
        meta: { title: "科目总帐" },
      },
      {
        path: "voucher-detail-ledger",
        component: () => import("@/views/financialManagement/voucher/detailLedger.vue"),
        name: "VoucherDetailLedger",
        meta: { title: "科目明细帐" },
      },
    ],
  },
  // {
  //   path: "/financial",
  //   component: Layout,
  //   hidden: false,
  //   redirect: "/financial/general-ledger",
  //   alwaysShow: true,
  //   meta: { title: "财务管理", icon: "money" },
  //   children: [
  //     {
  //       path: "general-ledger",
  //       component: () => import("@/views/financialManagement/generalLedger/index.vue"),
  //       name: "GeneralLedger",
  //       meta: { title: "总帐科目" },
  //     },
  //     {
  //       path: "sales-out",
  //       component: () => import("@/views/financialManagement/receivable/salesOut.vue"),
  //       name: "SalesOut",
  //       meta: { title: "销售出库" },
  //     },
  //     {
  //       path: "sales-return",
  //       component: () => import("@/views/financialManagement/receivable/salesReturn.vue"),
  //       name: "SalesReturn",
  //       meta: { title: "销售退货" },
  //     },
  //     {
  //       path: "receivable-reconciliation",
  //       component: () => import("@/views/financialManagement/receivable/reconciliation.vue"),
  //       name: "ReceivableReconciliation",
  //       meta: { title: "应收对账" },
  //     },
  //     {
  //       path: "invoice-apply",
  //       component: () => import("@/views/financialManagement/receivable/invoiceApply.vue"),
  //       name: "InvoiceApply",
  //       meta: { title: "开票申请" },
  //     },
  //     {
  //       path: "output-invoice",
  //       component: () => import("@/views/financialManagement/receivable/outputInvoice.vue"),
  //       name: "OutputInvoice",
  //       meta: { title: "销项发票" },
  //     },
  //     {
  //       path: "receipt",
  //       component: () => import("@/views/financialManagement/receivable/receipt.vue"),
  //       name: "Receipt",
  //       meta: { title: "收款单" },
  //     },
  //     {
  //       path: "purchase-in",
  //       component: () => import("@/views/financialManagement/payable/purchaseIn.vue"),
  //       name: "PurchaseIn",
  //       meta: { title: "采购入库" },
  //     },
  //     {
  //       path: "payable-reconciliation",
  //       component: () => import("@/views/financialManagement/payable/reconciliation.vue"),
  //       name: "PayableReconciliation",
  //       meta: { title: "应付对账" },
  //     },
  //     {
  //       path: "input-invoice",
  //       component: () => import("@/views/financialManagement/payable/input-invoice.vue"),
  //       name: "InputInvoice",
  //       meta: { title: "进项发票" },
  //     },
  //     {
  //       path: "payment-apply",
  //       component: () => import("@/views/financialManagement/payable/paymentApply.vue"),
  //       name: "PaymentApply",
  //       meta: { title: "付款申请" },
  //     },
  //     {
  //       path: "payment",
  //       component: () => import("@/views/financialManagement/payable/payment.vue"),
  //       name: "Payment",
  //       meta: { title: "付款单" },
  //     },
  //     {
  //       path: "fixed-assets",
  //       component: () => import("@/views/financialManagement/assets/fixedAssets.vue"),
  //       name: "FixedAssets",
  //       meta: { title: "固定资产" },
  //     },
  //     {
  //       path: "intangible-assets",
  //       component: () => import("@/views/financialManagement/assets/intangibleAssets.vue"),
  //       name: "IntangibleAssets",
  //       meta: { title: "无形资产" },
  //     },
  //     {
  //       path: "voucher",
  //       component: () => import("@/views/financialManagement/voucher/index.vue"),
  //       name: "Voucher",
  //       meta: { title: "凭证" },
  //     },
  //     {
  //       path: "voucher-general-ledger",
  //       component: () => import("@/views/financialManagement/voucher/generalLedger.vue"),
  //       name: "VoucherGeneralLedger",
  //       meta: { title: "科目总帐" },
  //     },
  //     {
  //       path: "voucher-detail-ledger",
  //       component: () => import("@/views/financialManagement/voucher/detailLedger.vue"),
  //       name: "VoucherDetailLedger",
  //       meta: { title: "科目明细帐" },
  //     },
  //   ],
  // },
];
// 动态路由,基于用户权限动态去加载
src/views/salesManagement/deliveryLedger/index.vue
@@ -174,6 +174,28 @@
          <el-descriptions-item label="快递公司">{{ detailRow.expressCompany || '--' }}</el-descriptions-item>
          <el-descriptions-item label="快递单号" :span="2">{{ detailRow.expressNumber || '--' }}</el-descriptions-item>
        </el-descriptions>
        <el-table :data="getDeliveryProductInfoList()"
                  border
                  size="small"
                  class="delivery-product-table"
                  style="width: 100%; margin-top: 16px;">
          <el-table-column label="批号"
                           prop="batchNo"
                           min-width="160"
                           show-overflow-tooltip/>
          <el-table-column label="产品名称"
                           prop="productName"
                           min-width="160"
                           show-overflow-tooltip/>
          <el-table-column label="规格型号"
                           prop="specificationModel"
                           min-width="160"
                           show-overflow-tooltip/>
          <el-table-column label="发货数量"
                           prop="deliveryQuantity"
                           min-width="120"
                           align="center"/>
        </el-table>
        <ImagePreview :file-list="detailRow.storageBlobVOs || []" />
      </div>
      <template #footer>
@@ -192,7 +214,9 @@
import {getCurrentDate} from "@/utils/index.js";
import {
  deliveryLedgerListPage,
  delDeliveryLedger, deductStock,
  delDeliveryLedger,
  deductStock,
  getDeliveryDetail,
} from "@/api/salesManagement/deliveryLedger.js";
import {delLedgerFile} from "@/api/salesManagement/salesLedger.js";
import ImageUpload from "@/components/AttachmentUpload/image/index.vue";
@@ -213,6 +237,7 @@
// 详情弹框
const detailDialogVisible = ref(false);
const detailRow = ref(null);
const detailProductList = ref([]);
// 用户信息表单弹框数据
const operationType = ref("");
@@ -320,14 +345,86 @@
};
// 打开详情弹框
const openDetail = (row) => {
const openDetail = async (row) => {
  detailRow.value = row || null;
  const list = Array.isArray(row?.commonFileList) ? row.commonFileList : [];
  detailProductList.value = [];
  detailDialogVisible.value = true;
  if (!row?.id) return;
  try {
    const res = await getDeliveryDetail(row.id);
    const detailData = res?.data;
    detailRow.value = {
      ...row,
      ...(Array.isArray(detailData) ? {} : detailData || {}),
    };
    detailProductList.value = resolveDeliveryDetailList(detailData);
  } catch (error) {
    proxy.$modal.msgError("加载发货台账详情失败");
  }
};
const resolveDeliveryDetailList = data => {
  if (Array.isArray(data)) return data;
  if (!data || typeof data !== "object") return [];
  return [
    data.batchNoDetailList,
    data.batchNoList,
    data.shippingBatchList,
    data.shippingInfoDetailList,
    data.detailList,
    data.batchDetailList,
    data.rows,
    data.records,
    data.list,
    data.data,
  ].find(value => Array.isArray(value) && value.length) || [];
};
const getDeliveryProductInfoList = () => {
  const row = detailRow.value;
  if (!row) return [];
  const normalizeBatchNoList = value => {
    if (Array.isArray(value)) return value;
    if (typeof value === "string" && value.includes(",")) {
      return value.split(",").map(item => item.trim()).filter(Boolean);
    }
    return value ? [value] : [];
  };
  const detailList = detailProductList.value.length ? detailProductList.value : [
    row.batchNoDetailList,
    row.batchNoList,
    row.shippingBatchList,
    row.shippingInfoDetailList,
    row.detailList,
    row.batchDetailList,
  ].find(value => Array.isArray(value) && value.length);
  const batchNoList = normalizeBatchNoList(row.batchNo);
  const toTableRow = (item = {}) => ({
    batchNo:
        typeof item === "string" || typeof item === "number"
            ? item
            : item.batchNo ?? item.batchNumber ?? row.batchNo ?? "--",
    productName: item.productName ?? row.productName ?? "--",
    specificationModel:
        item.specificationModel ?? item.model ?? row.specificationModel ?? "--",
    deliveryQuantity:
        item.deliveryQuantity ??
        item.quantity ??
        item.shippingQuantity ??
        row.deliveryQuantity ??
        row.quantity ??
        "--",
  });
  if (detailList?.length) {
    return detailList.map(toTableRow);
  }
  if (batchNoList.length) {
    return batchNoList.map(batchNo => toTableRow({batchNo}));
  }
  return [toTableRow()];
};
const closeDetail = () => {
  detailDialogVisible.value = false;
  detailRow.value = null;
  detailProductList.value = [];
};
// 提交表单