|
|
@@ -1,64 +1,95 @@
|
|
|
<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 class="df aic jcsb">
|
|
|
+ <div class="df aic">
|
|
|
+ <el-button-group class="mr30">
|
|
|
+ <el-button
|
|
|
+ :type="status == 1 ? 'primary' : ''"
|
|
|
+ @click="(status = 1), getOrderList()"
|
|
|
+ >
|
|
|
+ 执行中
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ :type="status == 2 ? 'primary' : ''"
|
|
|
+ @click="(status = 2), getOrderList()"
|
|
|
+ >
|
|
|
+ 历史
|
|
|
+ </el-button>
|
|
|
+ </el-button-group>
|
|
|
+ <div class="df">
|
|
|
+ <el-date-picker
|
|
|
+ class="mr10"
|
|
|
+ v-model="createTime"
|
|
|
+ type="date"
|
|
|
+ placeholder="订单创建时间"
|
|
|
+ format="YYYY/MM/DD"
|
|
|
+ value-format="YYYY/MM/DD"
|
|
|
+ />
|
|
|
+ <el-button type="primary" @click="getOrderList">查询</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <el-button v-auth="'ADDROLELIST'" type="primary" @click="addRole">
|
|
|
- 添加职位
|
|
|
+ <el-button v-auth="'ADDORDER'" type="primary" @click="addOrder">
|
|
|
+ 创建订单
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div style="margin-top: 24px">
|
|
|
- <el-table :data="tableData" stripe style="width: 100%">
|
|
|
+ <el-table :data="tableData" stripe style="width: 100%" border>
|
|
|
<el-table-column
|
|
|
type="index"
|
|
|
label="序号"
|
|
|
- min-width="80"
|
|
|
+ width="60"
|
|
|
align="center"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="roleName"
|
|
|
- label="职位名称"
|
|
|
- min-width="100"
|
|
|
+ prop="code"
|
|
|
+ label="订单编号"
|
|
|
align="center"
|
|
|
+ min-width="140"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="departmentName"
|
|
|
- label="部门"
|
|
|
- min-width="100"
|
|
|
+ prop="contractSignStatus"
|
|
|
+ label="签单状态"
|
|
|
align="center"
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="createTime"
|
|
|
- label="创建时间"
|
|
|
- min-width="160"
|
|
|
+ prop="shipShipOwnerStatus"
|
|
|
+ label="船东船舶登记"
|
|
|
align="center"
|
|
|
- >
|
|
|
- <template v-slot="scope">
|
|
|
- {{ subTimeStr(scope.row.createTime) }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="depositPaymentStatus"
|
|
|
+ label="定金支付状态"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="voyageManageStatus"
|
|
|
+ label="航次管理状态"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="insurancePurchaseStatus"
|
|
|
+ label="保险购买状态"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="wayBillStatus"
|
|
|
+ label="运单上传状态"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column
|
|
|
- v-auth="'UPDATEROLELIST'"
|
|
|
- label="操作"
|
|
|
- min-width="120"
|
|
|
+ prop="invoiceStatus"
|
|
|
+ label="开票状态"
|
|
|
align="center"
|
|
|
- >
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="refundStatus"
|
|
|
+ label="回款状态"
|
|
|
+ align="center"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column v-auth="'ORDERDETAIL'" label="操作" align="center">
|
|
|
<template v-slot="scope">
|
|
|
- <el-button
|
|
|
- @click="roleDetail(scope.row.id)"
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- >
|
|
|
- 详情
|
|
|
+ <el-button @click="orderDetail(scope.row.id)" type="text">
|
|
|
+ 查看详情
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -82,23 +113,22 @@ 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");
|
|
|
+const createTime = ref("");
|
|
|
async function getOrderList() {
|
|
|
- let res = await api.getOrderList({
|
|
|
+ let { data } = 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;
|
|
|
+ if (data.status == 0) {
|
|
|
+ tableData.value = data.result;
|
|
|
+ total.value = data.total;
|
|
|
} else {
|
|
|
tableData.value = [];
|
|
|
total.value = 0;
|
|
|
@@ -110,15 +140,35 @@ function pageChange(e) {
|
|
|
getOrderList();
|
|
|
}
|
|
|
|
|
|
-function addRole() {
|
|
|
- router.push("/authManage/addRole");
|
|
|
+async function addOrder() {
|
|
|
+ ElMessageBox.confirm("确认添加订单?", "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(async () => {
|
|
|
+ let { data } = await api.addOrder({});
|
|
|
+ if (data.status === 0) {
|
|
|
+ ElNotification({
|
|
|
+ title: "成功",
|
|
|
+ message: "添加成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ getOrderList();
|
|
|
+ } else {
|
|
|
+ ElNotification({
|
|
|
+ title: "失败",
|
|
|
+ message: data.msg,
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
-function roleDetail(roleId) {
|
|
|
+function orderDetail(id) {
|
|
|
router.push({
|
|
|
- path: "/authManage/addRole",
|
|
|
+ path: "/orderManage/orderDetail",
|
|
|
query: {
|
|
|
- roleId,
|
|
|
+ id,
|
|
|
},
|
|
|
});
|
|
|
}
|