Selaa lähdekoodia

ToDo 订单管理

wzg 1 vuosi sitten
vanhempi
commit
4082db9fd2

+ 80 - 0
src/apis/fetch.js

@@ -480,4 +480,84 @@ export default {
   changeSubAccountEmail(data) {
     return $http("/user/proxy/update/email", data);
   },
+
+  // 添加订单(PC/小程序)
+  addOrder(data) {
+    return $http("/order/add", data);
+  },
+
+  // 订单详情-全部信息
+  getOrderDetail(data) {
+    return $http("/order/detail", data);
+  },
+
+  // 订单详情-签单-审核订单
+  auditOrder(data) {
+    return $http("/order/detail/audit", data);
+  },
+
+  // 订单详情-签单-上传支付定金回执
+  uploadReceipt(data) {
+    return $http("/order/detail/audit/receipt", data);
+  },
+
+  // 订单详情-签单-保存/修改合同信息
+  editOrderContract(data) {
+    return $http("/order/detail/edit/contract", data);
+  },
+
+  // 订单详情-签单-保存/修改船东船舶信息
+  editOrderShipOwner(data) {
+    return $http("/order/detail/edit/shipOwner", data);
+  },
+
+  // 订单详情-签单-审核信息
+  getAuditInfo(data) {
+    return $http("/order/detail/info/audit", data);
+  },
+
+  // 订单详情-签单-合同信息
+  getContractInfo(data) {
+    return $http("/order/detail/info/contract", data);
+  },
+
+  // 订单详情-签单-船东船舶信息
+  getShipOwnerInfo(data) {
+    return $http("/order/detail/info/shipowner", data);
+  },
+
+  // 订单详情-航次-装货信息
+  getOrderVoyageLoadInfo(data) {
+    return $http("/order/detail/info/voyage/load", data);
+  },
+
+  // 订单详情-航次-在途信息
+  getOrderVoyageTranInfo(data) {
+    return $http("/order/detail/info/voyage/tran", data);
+  },
+
+  // 订单详情-航次-卸货信息
+  getOrderVoyageUnloadInfo(data) {
+    return $http("/order/detail/info/voyage/unload", data);
+  },
+  // 订单详情-签单-保存/修改船东船舶信息-选择船东
+  getOrderShipOwnerSelect(data) {
+    return $http("/order/detail/select/shipOwner", data);
+  },
+
+  // 订单详情-签单-保存/修改船东船舶信息-新增船东银行卡
+  addShipOwnerBankCard(data) {
+    return $http("/order/detail/shipOwner/add/bankCard", data);
+  },
+
+  // 订单详情-签单-保存/修改船东船舶信息-查询船东银行卡及船舶信息
+
+  getShipOwnerBankCardShipInfo(data) {
+    return $http("/order/detail/shipOwner/bankCard/info", data);
+  },
+
+  // 订单列表(WEB端)
+  getOrderList(data) {
+    return $http("/order/web/list", data);
+  },
 };

+ 12 - 0
src/auth/menuData.js

@@ -38,6 +38,18 @@ let menuData = [
       },
     ],
   },
+  {
+    icon: "el-icon-s-data",
+    title: "订单管理",
+    code: "ORDERMANAGE",
+    items: [
+      {
+        path: "/orderManage/orderList",
+        name: "订单列表",
+        code: "ORDERLIST",
+      },
+    ],
+  },
   {
     icon: "el-icon-s-data",
     title: "船东管理",

+ 18 - 0
src/router/index.js

@@ -53,6 +53,24 @@ const router = createRouter({
       },
       component: VoyageList,
     },
+    {
+      path: "/orderManage/orderList",
+      name: "orderList",
+      meta: {
+        title: "订单列表",
+        code: "ORDERLIST",
+      },
+      component: () => import("../views/orderManage/orderList.vue"),
+    },
+    {
+      path: "/orderManage/orderDetail",
+      name: "orderDetail",
+      meta: {
+        title: "订单详情",
+        code: "ORDERDETAIL",
+      },
+      component: () => import("../views/orderManage/orderDetail.vue"),
+    },
     {
       path: "/accountManage/subAccountList",
       name: "subAccountList",

+ 14 - 0
src/views/orderManage/orderDetail.vue

@@ -0,0 +1,14 @@
+<template>
+  <div class="full-container-p24"></div>
+</template>
+
+<script setup>
+import api from "../../apis/fetch";
+import { ref, onMounted, reactive } from "vue";
+import { ElNotification, ElMessageBox } from "element-plus";
+import router from "../../router";
+import store from "../../store";
+import { subTimeStr } from "../../utils/utils";
+</script>
+
+<style scoped></style>

+ 147 - 0
src/views/orderManage/orderList.vue

@@ -0,0 +1,147 @@
+<template>
+  <div class="full-container-p24">
+    <div style="display: flex; justify-content: space-between">
+      <div style="display: flex">
+        <el-input
+          placeholder="请输入部门/职位名称"
+          prefix-icon="el-icon-search"
+          v-model="term"
+          clearable
+          style="height: 32px; width: 330px; line-height: 32px"
+          @keyup.enter="getOrderList"
+        ></el-input>
+        <div class="seach-btn" @click="getOrderList">查询</div>
+      </div>
+      <el-button v-auth="'ADDROLELIST'" type="primary" @click="addRole">
+        添加职位
+      </el-button>
+    </div>
+    <div style="margin-top: 24px">
+      <el-table :data="tableData" stripe style="width: 100%">
+        <el-table-column
+          type="index"
+          label="序号"
+          min-width="80"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="roleName"
+          label="职位名称"
+          min-width="100"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="departmentName"
+          label="部门"
+          min-width="100"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="createTime"
+          label="创建时间"
+          min-width="160"
+          align="center"
+        >
+          <template v-slot="scope">
+            {{ subTimeStr(scope.row.createTime) }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-auth="'UPDATEROLELIST'"
+          label="操作"
+          min-width="120"
+          align="center"
+        >
+          <template v-slot="scope">
+            <el-button
+              @click="roleDetail(scope.row.id)"
+              size="small"
+              type="primary"
+            >
+              详情
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="width: 100%; text-align: right; margin-top: 43px">
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :total="total"
+          @current-change="pageChange"
+        ></el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import api from "../../apis/fetch";
+import { ref, onMounted, reactive } from "vue";
+import { ElNotification, ElMessageBox } from "element-plus";
+import router from "../../router";
+import store from "../../store";
+import { subTimeStr } from "../../utils/utils";
+
+let tableData = ref([]);
+let currentPage = ref(1);
+let total = ref(0);
+let term = ref("");
+const status = ref(1);
+const createTime = ref("2023-12-12");
+async function getOrderList() {
+  let res = await api.getOrderList({
+    createTime: createTime.value,
+    status: status.value,
+    currentPage: currentPage.value,
+    size: 10,
+  });
+  if (res.data.status == 0) {
+    tableData.value = res.data.result;
+    total.value = res.data.total;
+  } else {
+    tableData.value = [];
+    total.value = 0;
+  }
+}
+
+function pageChange(e) {
+  currentPage.value = e;
+  getOrderList();
+}
+
+function addRole() {
+  router.push("/authManage/addRole");
+}
+
+function roleDetail(roleId) {
+  router.push({
+    path: "/authManage/addRole",
+    query: {
+      roleId,
+    },
+  });
+}
+
+onMounted(() => {
+  getOrderList();
+});
+</script>
+
+<style scoped>
+.seach-btn {
+  display: inline-block;
+  width: 60px;
+  height: 38px;
+  background: #0094fe;
+  border-radius: 2px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #ffffff;
+  text-align: center;
+  line-height: 38px;
+  margin-left: 10px;
+  cursor: pointer;
+}
+</style>