909_purchase.js 7.7 KB
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
  909: {
    path: "/purchaseManage",
    name: "purchaseManage",
    meta: {
      title: "采购管理",
      authId: "909",
      parentId: "1",
      cache: false
    }
  },
  90901: {
    path: "/purchaseOrder",
    name: "purchaseOrder",
    meta: {
      title: "采购订单",
      authId: "90901",
      parentId: "909",
      cache: false
    },
    auth: [
      {
        authId: "9090101",
        parentId: "90901",
        label: "创建采购",
        category: "Button",
        type: "primary",
        handle: "handleCreatePurchase"
        // addRoutePath: [
        //   {
        //     authId: "90902",
        //     name: "采购商城",
        //     parentId: "909"
        //   }
        // ]
      },
      {
        authId: "9090102",
        parentId: "90901",
        label: "查看",
        // category: "Button",
        // type: "primary",
        handle: "handleDetail"
      },
      {
        authId: "9090103",
        parentId: "90901",
        label: "取消",
        // category: "Button",
        // type: "primary",
        handle: "handleCancel",
        ruleObj: {
          attr: "status",
          rule: {
            1: "取消"
          }
        },
        color: "red"
      },
      {
        authId: "9090104",
        parentId: "90901",
        label: "入库",
        // category: "Button",
        // type: "primary",
        ruleObj: {
          attr: "deliveryStatus",
          rule: {
            2: "入库"
          }
        },
        handle: "handleWarehousing"
      },
      {
        authId: "9090105",
        parentId: "90901",
        label: "发货单",
        handle: "handleSendgoods"
      },
      {
        authId: "9090106",
        parentId: "90901",
        label: "导出",
        category: "Button",
        type: "primary",
        handle: "handleExport"
      }
    ],
    component: _import("purchase/purchaseOrder")
  },
  90902: {
    path: "/purchasingMall",
    name: "purchasingMall",
    meta: {
      title: "采购商城",
      authId: "90902",
      parentId: "90901",
      sideHidden: true,
      cache: false,
      activePath: "/purchaseOrder"
    },
    auth: [
      {
        authId: "9090201",
        parentId: "90902",
        label: "关联导流方",
        category: "Button",
        type: "primary",
        handle: "handleRelate"
      }
    ],
    component: _import("purchase/purchasingMall")
  },
  90903: {
    path: "/procurementReview",
    name: "procurementReview",
    role: "admin",
    meta: {
      title: "运营审核",
      authId: "90903",
      parentId: "909",
      cache: false
    },
    auth: [
      {
        authId: "9090302",
        parentId: "90903",
        label: "查看",
        // category: "Button",
        // type: "primary",
        handle: "handleDetail"
      },
      {
        authId: "9090303",
        parentId: "90903",
        label: "审核",
        // category: "Button",
        // type: "primary",
        ruleObj: {
          attr: "status",
          rule: {
            1: "审核"
          }
        },
        handle: "handleCheck"
      },
      {
        authId: "9090304",
        parentId: "90903",
        label: "驳回",
        ruleObj: {
          attr: "status",
          rule: {
            1: "驳回"
          }
        },
        handle: "handleReject"
      },
      {
        authId: "9090305",
        parentId: "90903",
        label: "导出",
        category: "Button",
        type: "primary",
        handle: "handleExport"
      }
    ],
    component: _import("purchase/procurementReview")
  },
  90904: {
    path: "/purchaseAndDelivery",
    name: "purchaseAndDelivery",
    role: "service",
    meta: {
      title: "采购发货",
      authId: "90904",
      parentId: "909",
      cache: false
    },
    auth: [
      {
        authId: "9090401",
        parentId: "90904",
        label: "查看",
        handle: "handleDetail"
      },
      {
        authId: "9090402",
        parentId: "90904",
        label: "发货",
        ruleObj: {
          attr: "deliveryStatus",
          rule: {
            1: "发货",
            3: "发货"
          }
        },
        handle: "handleDelivery"
      },
      {
        authId: "9090403",
        parentId: "90904",
        label: "驳回",
        handle: "handleReject"
      },
      {
        authId: "9090404",
        parentId: "90904",
        label: "分配",
        handle: "handleAllocat"
      },
      {
        authId: "9090405",
        parentId: "90904",
        label: "导出",
        category: "Button",
        type: "primary",
        handle: "handleExport"
      },
      {
        authId: "9090406",
        parentId: "90904",
        label: "结束",
        handle: "handleEnd"
      }
    ],
    component: _import("purchase/purchaseAndDelivery")
  },
  90905: {
    path: "/invoiceRecord",
    name: "invoiceRecord",
    meta: {
      title: "发货单",
      authId: "90905",
      parentId: "909",
      cache: false,
      activePath: "/invoiceRecord"
    },
    auth: [
      {
        authId: "9090501",
        parentId: "90905",
        label: "导出",
        category: "Button",
        type: "primary",
        handle: "handleExport"
      },
      {
        authId: "9090502",
        parentId: "90905",
        label: "查看",
        handle: "handleLook"
      },
      {
        authId: "9090503",
        parentId: "90905",
        label: "撤销",
        ruleObj: {
          attr: "putStatus",
          rule: {
            1: "撤销"
          }
        },
        handle: "handleRevoke"
      }
    ],
    component: _import("purchase/invoiceRecord")
  },
  90906: {
    path: "/procurementBusiness",
    name: "procurementBusiness",
    role: "admin",
    meta: {
      title: "商务审核",
      authId: "90906",
      parentId: "909",
      cache: false
    },
    auth: [
      {
        authId: "9090601",
        parentId: "90906",
        label: "查看",
        handle: "handleDetail"
      },
      {
        authId: "9090602",
        parentId: "90906",
        label: "审核",
        ruleObj: {
          attr: "status",
          rule: {
            2: "审核"
          }
        },
        handle: "handleCheck"
      },
      {
        authId: "9090603",
        parentId: "90906",
        label: "驳回",
        ruleObj: {
          attr: "status",
          rule: {
            2: "驳回"
          }
        },
        handle: "handleReject"
      },
      {
        authId: "9090605",
        parentId: "90906",
        label: "导出",
        category: "Button",
        type: "primary",
        handle: "handleExport"
      }
    ],
    component: _import("purchase/procurementBusiness")
  },
  90907: {
    path: "/factoryPurchaseAndDelivery",
    name: "factoryPurchaseAndDelivery",
    role: "service",
    meta: {
      title: "仓库/工厂发货",
      authId: "90907",
      parentId: "909",
      cache: false
    },
    auth: [
      {
        authId: "9090701",
        parentId: "90907",
        label: "查看",
        handle: "handleDetail"
      },
      {
        authId: "9090702",
        parentId: "90907",
        label: "发货",
        ruleObj: {
          attr: "deliveryStatus",
          rule: {
            1: "发货",
            3: "发货"
            // 2: "发货"
          }
        },
        handle: "handleDelivery"
      }
      // {
      //   authId: "9090703",
      //   parentId: "90907",
      //   label: "驳回",
      //   handle: "handleReject"
      // }
      // {
      //   authId: "9090404",
      //   parentId: "90907",
      //   label: "分配",
      //   handle: "hadleAllocat"
      // }
    ],
    component: _import("purchase/factoryPurchaseAndDelivery")
  }
}