main
张同海 1 year ago
parent f14194deca
commit 76a5c3eb7c

@ -0,0 +1,105 @@
<template>
<div class="ApplyForJView">
<p>创建/加入企业</p>
<p>
如果您所在企业已经在海管家创建了企业您可以申请加入企业如果还没那就创建新企业
</p>
<div class="main">
<div>
<p>创建新企业</p>
<p> 上传清晰加盖企业红章的营业执照</p>
<p> 企业创建后您将成为企业管理主</p>
<p> 每个用户最多可拥有1家企业</p>
<el-button class="Button" type="primary" @click="GoForj">
创建企业
</el-button>
</div>
<div>
<p>加入已有企业</p>
<p> 申请加入后请等待企业管理员审核</p>
<p> 加入企业后可共享企业资产和服务</p>
<p> 账号不能同时加入同名企业</p>
<el-button class="Button" type="primary" @click="GoJoin">
加入企业
</el-button>
</div>
</div>
</div>
</template>
<script>
import { useRouter } from "vue-router";
export default {
name: "ForJBox",
setup() {
const router = useRouter();
const GoForj = () => {
router.push("/ApplyJoinFound");
};
const GoJoin = () => {
router.push("/ApplyJoinJoin");
};
return {
GoForj,
GoJoin,
};
},
};
</script>
<style lang="scss" scoped>
.ApplyForJView {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
> p {
&:nth-child(1) {
color: #1d2129;
font-size: 20px;
font-weight: 600;
text-align: center;
margin-top: 60px;
}
&:nth-child(2) {
color: #7a8699;
font-size: 14px;
margin-top: 8px;
margin-bottom: 40px;
text-align: center;
}
}
.main {
display: flex;
> div {
display: flex;
flex-direction: column;
align-items: center;
background-color: #fff;
border-radius: 4px;
box-sizing: border-box;
// min-height: 375px;
padding: 20px 16px;
width: 300px;
margin: 12px;
p {
width: 100%;
margin: 12px 0;
// padding-left: 26px;
position: relative;
color: #7a8699;
font-size: 14px;
text-align: left;
&:nth-child(1) {
color: #1d2129;
font-size: 16px;
font-weight: 600;
text-align: center;
}
}
.Button {
margin-top: 28px;
}
}
}
}
</style>

@ -0,0 +1,141 @@
<template>
<div class="ApplyFoundView">
<el-form :model="DialogForm" :label-width="150" class="mainBox">
<el-row>
<el-col :span="24">
<el-form-item label="营业执照:">
<el-upload
v-model:file-list="fileList"
class="upload-demo"
:limit="1"
:http-request="uploadApi"
:on-preview="handlePreview"
>
<el-button type="primary">
<el-icon><UploadFilled /></el-icon>
上传文件
</el-button>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="企业名称/租户名称:">
<el-input v-model="DialogForm.name" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="社会信用代码:">
<el-input v-model="DialogForm.socialCreditCode" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item>
<el-button type="primary" @click="dialogS"></el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</template>
<script>
import { useRouter } from "vue-router";
import { ref } from "vue";
import {
tenantRegister,
tenantUploaderFile,
tenantDownFile,
} from "@/api/Index";
import { ElMessage } from "element-plus";
export default {
name: "FoundBox",
setup() {
const router = useRouter();
const fileList = ref([]);
const DialogForm = ref({});
const dialogS = () => {
let type = true;
console.log(fileList.value);
if (fileList.value.length == 0) {
type = false;
}
if (type) {
let ApiData = {
...DialogForm.value,
businessLicenseUrl: fileList.value[0].filePath,
};
tenantRegister(ApiData).then((res) => {
if (res.code == 200) {
ElMessage({
message: "创建成功",
type: "success",
});
router.push("/ApplyJoin");
}
});
} else {
ElMessage({
message: "请补全信息",
type: "warning",
});
}
};
const uploadApi = (param) => {
let formData = new FormData();
formData.append("file", param.file);
console.log(fileList.value);
tenantUploaderFile(formData).then((res) => {
fileList.value[0] = { ...fileList.value[0], ...res.data };
console.log(fileList.value);
});
};
const handlePreview = (uploadFile) => {
console.log(uploadFile);
tenantDownFile({
businessLicenseUrl: uploadFile.filePath,
}).then((res) => {
console.log(res);
const blob = new Blob([res]);
// for IE
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
const fileName = uploadFile.fileName;
window.navigator.msSaveOrOpenBlob(blob, fileName);
} else {
// for Non-IE (chrome, firefox etc.)
const fileName = uploadFile.fileName;
const elink = document.createElement("a");
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href);
document.body.removeChild(elink);
}
});
// console.log(uploadFile);
};
return {
DialogForm,
dialogS,
uploadApi,
handlePreview,
};
},
};
</script>
<style lang="scss" scoped>
.ApplyFoundView {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
.mainBox {
width: 400px;
padding: 30px 20px;
margin-top: -70px;
background: #f9f9f9;
}
}
</style>

@ -0,0 +1,126 @@
<template>
<div class="ApplyFoundView">
<div class="mainBox">
<p class="CsTitle">加入企业</p>
<span class="CsTips">
你可以输入企业名称我们帮您匹配出相关企业,在确认公司信息后选择您要加入公司
</span>
<el-input
class="CsSearch"
size="large"
v-model="ApplyName"
@input="InputName"
>
<template #prepend>企业名称</template>
</el-input>
<div class="CsApplyList" v-if="ApplyList.Name">
<p>{{ ApplyList.Name }}</p>
<p>{{ ApplyList.socialCreditCode }}</p>
<p>{{ ApplyList.Phone }}</p>
</div>
<el-button type="primary" @click="FnJsin" :disabled="ApplyList.id">
申请加入
</el-button>
</div>
</div>
</template>
<script>
import { useRouter } from "vue-router";
import { ref } from "vue";
import { tenantNameQuery, TenantApplyJoin } from "@/api/Index";
// import { ElMessage } from "element-plus";
import { useStore } from "vuex";
export default {
name: "FoundBox",
setup() {
const router = useRouter();
const ApplyName = ref("");
const ApplyList = ref({});
const store = useStore();
const InputName = (e) => {
console.log(e);
if (e) {
tenantNameQuery({ name: e }).then((res) => {
if (res.code == 200) {
ApplyList.value = res.data;
}
});
}
};
const FnJsin = () => {
console.log(ApplyList.value);
let ApiData = {
joinTenantId: ApplyList.value.Id,
userId: store.state.User.userInfo.id,
};
TenantApplyJoin(ApiData).then((res) => {
console.log(res);
router.push("/ApplyJoin");
});
};
return {
ApplyName,
ApplyList,
InputName,
FnJsin,
};
},
};
</script>
<style lang="scss" scoped>
.ApplyFoundView {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: #fff;
.mainBox {
display: flex;
flex-direction: column;
align-items: center;
width: 600px;
padding: 30px 20px;
margin-top: -70px;
background: #f9f9f9;
.CsTitle {
font-size: 24px;
font-weight: bold;
margin-bottom: 16px;
}
.CsTips {
font-size: 14px;
color: #c9c9c9;
}
.CsSearch {
width: 400px;
margin-top: 14px;
margin-bottom: 14px;
}
.CsApplyList {
width: 400px;
background-color: #fff;
border: 1px solid #d7dbe0;
border-radius: 4px;
padding: 20px;
box-sizing: border-box;
cursor: pointer;
margin-bottom: 14px;
p {
height: 24px;
line-height: 24px;
font-size: 12px;
color: #7a8699;
&:nth-child(1) {
color: #1d2129;
font-size: 16px;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
}
</style>

@ -0,0 +1,388 @@
<template>
<div class="BookingMain">
<div class="ButtonBox">
<el-button type="primary" @click="GoForj">/</el-button>
</div>
<div class="mainBox">
<div class="mainBoxT">
<p class="mainBoxText">{{ JoinType ? "当前公司" : "申请中" }}</p>
<p class="mainBoxTname">
{{ UserTenantList.Name }}
<el-button
class="CxButton"
type="danger"
size="small"
@click="WithdrawalApplication"
v-if="!JoinType"
>
撤销
</el-button>
</p>
<el-row>
<el-col :span="8" class="mainBoxTunit">
<p>
<span>创建人</span>
<span>{{ UserTenantList.CreatedUserName }}</span>
</p>
</el-col>
<el-col :span="8" class="mainBoxTunit">
<p>
<span>社会信用代码</span>
<span>{{ UserTenantList.socialCreditCode }}</span>
</p>
</el-col>
<el-col :span="8" class="mainBoxTunit">
<p>
<span>企业ID</span>
<span>{{ UserTenantList.Id }}</span>
</p>
</el-col>
<el-col :span="8" class="mainBoxTunit">
<p>
<span>电子邮箱</span>
<span>{{ UserTenantList.Email }}</span>
</p>
</el-col>
<el-col :span="8" class="mainBoxTunit">
<p>
<span>电话</span>
<span>{{ UserTenantList.Phone }}</span>
</p>
</el-col>
<el-col :span="8" class="mainBoxTunit">
<p>
<span>{{ JoinType ? "创建时间" : "申请时间" }}</span>
<span>{{ UserTenantList.CreatedTime }}</span>
</p>
</el-col>
</el-row>
</div>
<div></div>
</div>
</div>
</template>
<script>
import { useRouter } from "vue-router";
// import SearchBox from "@/components/SearchBox.vue";
// import TableBox from "@/components/TableBox.vue";
import { Plus } from "@element-plus/icons-vue";
import {
tenantUserTenantList,
applyJoinList,
tenantRegister,
tenantUploaderFile,
tenantDownFile,
bookingTemplateDelete,
TenantCancelApplyJoin,
} from "@/api/Index";
import { ref, reactive } from "vue";
export default {
name: "ViewBooking",
components: {
// SearchBox,
// TableBox,
},
setup() {
const JoinType = ref(true);
const UserTenantList = ref({});
const router = useRouter();
const init = () => {
tenantUserTenantList().then((res) => {
if (res.data.length) {
UserTenantList.value = res.data[0];
JoinType.value = true;
} else {
applyJoinList().then((res) => {
if (res.data.length) {
// UserTenantList.value = res.data[0];
UserTenantList.value = {
CreatedUserName: res.data[0].AdminName,
CreatedTime: res.data[0].applyTime,
Name: res.data[0].name,
socialCreditCode: res.data[0].socialCreditCode,
Id: res.data[0].tenantId,
id: res.data[0].id,
};
JoinType.value = false;
} else {
router.push("/ApplyJoinForJ");
}
});
}
});
};
init();
const dialogFormVisible = ref(false);
const DialogForm = ref({});
const fileList = ref([]);
const TypeData = [
{
code: "10",
name: "收货人",
},
{
code: "20",
name: "发货人",
},
{
code: "30",
name: "通知人",
},
{
code: "40",
name: "第二通知人",
},
];
const SearchBoxData = reactive([
{
title: "类型",
EType: "Select",
DName: "type",
SelectList: TypeData,
},
{
title: "代码",
EType: "Input",
DName: "title",
},
{
title: "名称",
EType: "Input",
DName: "name",
},
{
title: "地址",
EType: "Input",
DName: "addr",
},
{
title: "模板内容",
EType: "Input",
DName: "content",
},
]);
const GoForj = () => {
router.push("/ApplyJoinForJ");
};
const ClickAdd = () => {
dialogFormVisible.value = true;
};
const ClickEdit = (e) => {
dialogFormVisible.value = true;
let R = [];
e.type.split("[").forEach((a) => {
if (a) {
a.split("]").forEach((b) => {
if (b) {
R.push(b);
}
});
}
});
return { ...e, type: R };
};
const TableData = reactive([
{
label: "类型",
prop: "type",
StateType: "multiple",
StateChange: TypeData,
},
{ label: "代码", prop: "title" },
{ label: "名称", prop: "name" },
{ label: "地址", prop: "addr" },
{ label: "国家", prop: "countryName" },
{ label: "备注", prop: "remark" },
{ label: "电话", prop: "tel" },
{
label: "操作",
prop: "operate",
operateData: [
{
name: "编辑",
Fn: (e) => {
DialogForm.value = ClickEdit(e);
},
},
{
name: "删除",
Fn: (e) => {
ClickDelete(e);
},
},
],
},
]);
const SearchData = {
currentPage: 1,
pageSize: 10,
total: 0,
// ReportState: "0",
// MBLNO: "",
};
const ButtonData = [
{ text: "新建", type: "primary", icon: Plus, FnName: "ClickAdd" },
];
const TableBoxRef = ref();
const ClickSearch = (e = {}) => {
console.log(e.value);
TableBoxRef.value.Search(e.value);
};
const SearchOpen = (e) => {
TableBoxRef.value.height = e ? 450 : 562;
};
const ClickDelete = (e) => {
bookingTemplateDelete({ id: e.id }).then((res) => {
if (res.code == 200) {
ClickSearch();
}
});
};
const dialogF = () => {
dialogFormVisible.value = false;
DialogForm.value = {};
};
const dialogS = () => {
let ApiData = {
...DialogForm.value,
businessLicenseUrl: fileList.value[0].filePath,
};
tenantRegister(ApiData).then((res) => {
if (res.code == 200) {
dialogF();
ClickSearch();
}
});
};
const uploadApi = (param) => {
let formData = new FormData();
formData.append("file", param.file);
tenantUploaderFile(formData).then((res) => {
console.log(res.data);
console.log(fileList.value);
let Data = [];
fileList.value.forEach((item) => {
if (item.name == res.data.fileName) {
item = { ...item, ...res.data };
console.log(item);
}
Data.push(item);
});
fileList.value = Data;
console.log(fileList.value);
});
};
const handlePreview = (uploadFile) => {
console.log(uploadFile);
tenantDownFile({
businessLicenseUrl: uploadFile.filePath,
}).then((res) => {
console.log(res);
const blob = new Blob([res]);
// for IE
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
const fileName = uploadFile.fileName;
window.navigator.msSaveOrOpenBlob(blob, fileName);
} else {
// for Non-IE (chrome, firefox etc.)
const fileName = uploadFile.fileName;
const elink = document.createElement("a");
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href);
document.body.removeChild(elink);
}
});
// console.log(uploadFile);
};
const WithdrawalApplication = () => {
TenantCancelApplyJoin({ id: UserTenantList.value.id }).then((res) => {
console.log(res);
init();
});
};
return {
JoinType,
UserTenantList,
fileList,
TypeData,
DialogForm,
dialogFormVisible,
SearchBoxData,
TableBoxRef,
ClickSearch,
SearchOpen,
TableData,
SearchData,
ButtonData,
ClickAdd,
ClickDelete,
dialogF,
dialogS,
uploadApi,
handlePreview,
GoForj,
WithdrawalApplication,
};
},
};
</script>
<style lang="scss" scoped>
.ButtonBox {
background: #fff;
margin-bottom: 16px;
padding: 16px 20px 20px;
box-sizing: border-box;
}
.BookingMain {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.mainBox {
width: 100%;
background: #fff;
.mainBoxT {
padding: 16px 20px 20px;
position: relative;
.mainBoxText {
position: absolute;
top: 0;
right: 0;
background: orange;
padding: 3px 10px;
color: #fff;
font-size: 14px;
}
.mainBoxTname {
color: #1d2129;
font-size: 16px;
font-weight: 600;
margin-bottom: 20px;
.CxButton {
margin-left: 30px;
}
}
.mainBoxTunit {
span {
padding: 8px;
text-align: left;
font-size: 14px;
display: inline-block;
&:nth-child(1) {
width: 90px;
color: #7a8699;
}
&:nth-child(2) {
}
}
}
}
}
}
</style>

@ -0,0 +1,19 @@
let cargoIdData = [
{
name: "S 普通货",
code: "S",
},
{
name: "R 冻柜",
code: "R",
},
{
name: "D 危险品",
code: "D",
},
{
name: "O 超限箱",
code: "O",
},
];
export { cargoIdData };

@ -0,0 +1,112 @@
<template>
<div class="BookingMain">
<TableBox
ref="TableBoxRef"
:TableData="TableData"
:ListApi="ListApi"
:SearchData="SearchData"
@ClickExamine="ClickExamine"
/>
</div>
<el-dialog
v-model="dialogVisible"
title="企业审核"
width="30%"
:before-close="handleClose"
>
<el-input
v-model="auditOpinion"
:rows="3"
type="textarea"
placeholder="审核意见"
/>
<template #footer>
<span class="dialog-footer">
<el-button type="success" @click="ClickExamineOk(1)"> </el-button>
<el-button type="danger" @click="ClickExamineOk(2)"> </el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import TableBox from "@/components/TableBox.vue";
import { tenantWaitAuditTenantList, TenantAudit } from "@/api/Index";
import { ref, reactive } from "vue";
export default {
name: "ViewBooking",
components: {
TableBox,
},
setup() {
const dialogVisible = ref(false);
const TableBoxRef = ref();
const auditOpinion = ref();
const ListApi = tenantWaitAuditTenantList;
const ClickExamineData = ref({});
const ClickExamine = (e) => {
dialogVisible.value = true;
ClickExamineData.value = e;
};
const ClickExamineOk = (auditStatus) => {
console.log(ClickExamineData.value.Id);
TenantAudit({
id: ClickExamineData.value.Id,
auditStatus,
auditOpinion: auditOpinion.value,
}).then((res) => {
TableBoxRef.value.Search();
dialogVisible.value = false;
ClickExamineData.value = {};
auditOpinion.value = "";
console.log(res);
});
};
const TableData = reactive([
{ label: "管理员名称", prop: "AdminName" },
{ label: "公司名称", prop: "Name" },
{ label: "电子邮箱", prop: "Email" },
{ label: "电话", prop: "Phone" },
{ label: "社会信用代码", prop: "socialCreditCode" },
{ label: "营业执照", prop: "businessLicenseUrl" },
{
label: "操作",
prop: "operate",
operateData: [
{
name: "审核",
Fn: (e) => {
ClickExamine(e);
},
},
],
},
]);
const SearchData = {
currentPage: 1,
pageSize: 10,
total: 0,
// ReportState: "0",
// MBLNO: "",
};
return {
dialogVisible,
TableBoxRef,
auditOpinion,
TableData,
ClickExamine,
ClickExamineOk,
SearchData,
ListApi,
};
},
};
</script>
<style lang="scss" scoped>
.BookingMain {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
</style>

@ -0,0 +1,19 @@
let cargoIdData = [
{
name: "S 普通货",
code: "S",
},
{
name: "R 冻柜",
code: "R",
},
{
name: "D 危险品",
code: "D",
},
{
name: "O 超限箱",
code: "O",
},
];
export { cargoIdData };

@ -10,12 +10,17 @@
>
复制
</el-button>
<el-button type="primary" plain> 存为模板 </el-button>
<el-button type="primary" plain> 状态历史 </el-button>
<!-- <el-button type="primary" plain> 存为模板 </el-button> -->
<!-- <el-button type="primary" plain> 状态历史 </el-button> -->
<el-button type="danger" v-if="viweType == 'Edit'" @click="ClicDelete">
删除
</el-button>
<el-button type="primary" plain v-if="viweType == 'Edit'">
<el-button
type="primary"
plain
v-if="viweType == 'Edit'"
@click="ClicSend"
>
发送订舱
</el-button>
</div>
@ -496,20 +501,20 @@
<el-icon><Plus /></el-icon>
</el-button>
</el-col>
<!-- <el-col :span="5">
<el-col :span="5">
<el-upload
v-model:file-list="fileList"
class="upload-demo"
multiple
:limit="3"
:http-request="uploadApi"
:on-preview="handlePreview"
>
<el-button type="primary">
<el-icon><UploadFilled /></el-icon>
上传文件
</el-button>
</el-upload>
</el-col> -->
</el-col>
</el-row>
</el-col>
</el-row>
@ -521,8 +526,10 @@ import { onMounted, ref } from "vue";
import {
bookingCustomSave,
bookingCustomInfo,
Uploader,
bookingCustomUploaderFile,
bookingCustomDownFile,
bookingCustomDelete,
bookingCustomSubmit,
} from "@/api/Index";
import { useRouter } from "vue-router";
import { ElMessage } from "element-plus";
@ -538,6 +545,7 @@ export default {
console.log("setup");
const store = useStore();
const router = useRouter();
const fileList = ref([]);
const form = ref({
name: "",
region: "",
@ -568,6 +576,11 @@ export default {
if (query.type == "Edit" || query.type == "Copy") {
bookingCustomInfo({ id: query.id }).then((res) => {
form.value = { ...res.data };
fileList.value = [];
res.data.bookingFileList.forEach((item) => {
fileList.value.push({ ...item, name: item.fileName });
});
if (query.type == "Copy") {
delete form.value.id;
}
@ -586,10 +599,16 @@ export default {
form.value.ctnList.push({});
}, 100);
};
const ClickSave = () => {
console.log(form.value);
let ApiData = form.value;
ApiData = { ...ApiData, ...form.value.cargoData };
// fileList
ApiData = {
...ApiData,
...form.value.cargoData,
bookingFileList: fileList.value,
};
bookingCustomSave(ApiData).then((res) => {
if (res.code == 200) {
console.log(res);
@ -601,14 +620,51 @@ export default {
}
});
};
const fileList = ref([]);
const uploadApi = (param) => {
let formData = new FormData();
formData.append("file", param.file);
Uploader(formData).then((res) => {
bookingCustomUploaderFile(formData).then((res) => {
console.log(res.data);
console.log(fileList.value);
let Data = [];
fileList.value.forEach((item) => {
if (item.name == res.data.fileName) {
item = { ...item, ...res.data };
console.log(item);
}
Data.push(item);
});
fileList.value = Data;
console.log(fileList.value);
});
};
const handlePreview = (uploadFile) => {
bookingCustomDownFile({
fileName: uploadFile.fileName,
filePath: uploadFile.filePath,
}).then((res) => {
console.log(res);
const blob = new Blob([res]);
// for IE
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
const fileName = uploadFile.fileName;
window.navigator.msSaveOrOpenBlob(blob, fileName);
} else {
// for Non-IE (chrome, firefox etc.)
const fileName = uploadFile.fileName;
const elink = document.createElement("a");
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href);
document.body.removeChild(elink);
}
});
// console.log(uploadFile);
};
const ClickCopy = () => {
delete form.value.id;
viweType.value = "Copy";
@ -625,6 +681,17 @@ export default {
}
});
};
const ClicSend = () => {
bookingCustomSubmit({ id: form.value.id }).then((res) => {
if (res.code == 200) {
ElMessage({
message: "发送成功",
type: "success",
});
router.push("/Booking");
}
});
};
const ChangeCargoId = () => {
form.value.cargoData = {};
};
@ -665,9 +732,11 @@ export default {
ClickSave,
fileList,
uploadApi,
handlePreview,
viweType,
ClickCopy,
ClicDelete,
ClicSend,
cargoIdData,
ChangeCargoId,
ChangecarrierCode,

@ -1,7 +1,7 @@
<template>
<div class="BookingMain">
<SearchBox
ref="SearchBox"
ref="SearchBoxRef"
:SearchData="SearchBoxData"
@ClickSearch="ClickSearch"
@SearchOpen="SearchOpen"
@ -16,6 +16,8 @@
@ClickAdd="ClickAdd"
@ClickDelete="ClickDelete"
@ClickCopy="ClickCopy"
@ClickSend="ClickSend"
@ClickCancelSend="ClickCancelSend"
/>
</div>
</template>
@ -23,7 +25,12 @@
import SearchBox from "@/components/SearchBox.vue";
import TableBox from "@/components/TableBox.vue";
import { Plus } from "@element-plus/icons-vue";
import { bookingCustomList, bookingCustomDelete } from "@/api/Index";
import {
bookingCustomList,
bookingCustomDelete,
bookingCustomSubmit,
bookingCustomCancelSubmit,
} from "@/api/Index";
import { useRouter } from "vue-router";
import { ref, reactive } from "vue";
import { ElMessage } from "element-plus";
@ -144,12 +151,19 @@ export default {
const ButtonData = [
{ text: "新建", type: "primary", icon: Plus, FnName: "ClickAdd" },
{ text: "复制", type: "primary", plain: true, FnName: "ClickCopy" },
{ text: "导入", type: "primary", plain: true },
{ text: "模板", type: "primary", plain: true },
// { text: "", type: "primary", plain: true },
// { text: "", type: "primary", plain: true },
{ text: "删除", type: "danger", FnName: "ClickDelete" },
{ text: "发送订舱", type: "primary", plain: true },
{ text: "发送订舱", type: "primary", plain: true, FnName: "ClickSend" },
{
text: "取消发送",
type: "primary",
plain: true,
FnName: "ClickCancelSend",
},
];
const TableBoxRef = ref();
const SearchBoxRef = ref();
const router = useRouter();
const ClickAdd = () => {
router.push({
@ -174,7 +188,7 @@ export default {
if (e) {
bookingCustomDelete({ id: e.id }).then((res) => {
if (res.data == 200) {
ClickSearch();
SearchBoxRef.value.Search();
}
});
} else {
@ -183,7 +197,7 @@ export default {
table.forEach((item) => {
bookingCustomDelete({ id: item.id }).then((res) => {
if (res.data == 200) {
ClickSearch();
SearchBoxRef.value.Search();
}
});
});
@ -212,9 +226,50 @@ export default {
});
}
};
const ClickSend = (e) => {
console.log(e);
let table = TableBoxRef.value.$refs.Table.getSelectionRows();
if (table.length == 1) {
bookingCustomSubmit({ id: table[0].id }).then((res) => {
if (res.code == 200) {
ElMessage({
message: "发送成功",
type: "success",
});
SearchBoxRef.value.Search();
}
});
} else {
ElMessage({
message: "请选择一条数据",
type: "warning",
});
}
};
const ClickCancelSend = (e) => {
console.log(e);
let table = TableBoxRef.value.$refs.Table.getSelectionRows();
if (table.length == 1) {
bookingCustomCancelSubmit({ id: table[0].id }).then((res) => {
if (res.code == 200) {
ElMessage({
message: "取消发送成功",
type: "success",
});
SearchBoxRef.value.Search();
}
});
} else {
ElMessage({
message: "请选择一条数据",
type: "warning",
});
}
};
return {
SearchBoxData,
TableBoxRef,
SearchBoxRef,
ClickSearch,
SearchOpen,
TableData,
@ -224,6 +279,8 @@ export default {
ClickAdd,
ClickDelete,
ClickCopy,
ClickSend,
ClickCancelSend,
};
},
};

@ -30,10 +30,10 @@
@close="handleClose"
router
>
<el-menu-item index="/About">
<!-- <el-menu-item index="/About">
<el-icon><setting /></el-icon>
<span>About</span>
</el-menu-item>
</el-menu-item> -->
<el-menu-item index="/Booking">
<el-icon><setting /></el-icon>
<span>客户订舱</span>
@ -46,6 +46,18 @@
<el-icon><setting /></el-icon>
<span>收发通模板</span>
</el-menu-item>
<el-menu-item index="/ApplyJoin">
<el-icon><setting /></el-icon>
<span>我的企业</span>
</el-menu-item>
<el-menu-item index="/Workmate">
<el-icon><setting /></el-icon>
<span>同事管理</span>
</el-menu-item>
<el-menu-item index="/ApplyJoinOperate">
<el-icon><setting /></el-icon>
<span>企业审核运营</span>
</el-menu-item>
</el-menu>
</el-aside>
<el-main class="IndexMain">

@ -0,0 +1,201 @@
<template>
<div class="BookingMain">
<TableBox
ref="TableBoxRef"
:TableData="TableData"
:ListApi="ListApi"
:SearchData="SearchData"
:ButtonData="ButtonData"
@FnApplyList="FnApplyList"
@ClickDelete="ClickDelete"
/>
<el-dialog
v-model="dialogFormVisible"
title="申请列表"
:before-close="dialogF"
width="40%"
>
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="account" label="账号" />
<el-table-column prop="name" label="姓名" />
<el-table-column prop="email" label="邮箱" width="140" />
<el-table-column prop="phone" label="手机" width="120" />
<el-table-column prop="applyTime" label="申请时间" width="160" />
<el-table-column fixed="right" label="操作" width="120">
<template #default="scope">
<el-button
link
type="primary"
size="small"
@click="FnAgreeApply(scope.row)"
>
通过
</el-button>
<el-button
link
type="primary"
size="small"
@click="FnRejectApply(scope.row)"
>
驳回
</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { ElMessage } from "element-plus";
import TableBox from "@/components/TableBox.vue";
import {
tenantAdminUserList,
TenantAdminRemoveUser,
tenantWaitAdminApplyJoinList,
TenantAdminAgreeApplyJoin,
TenantAdminRejectApplyJoin,
} from "@/api/Index";
import { ref, reactive } from "vue";
export default {
name: "ViewBooking",
components: {
TableBox,
},
setup() {
const dialogFormVisible = ref(false);
const DialogForm = ref({});
const TypeData = [
{
code: "10",
name: "收货人",
},
{
code: "20",
name: "发货人",
},
{
code: "30",
name: "通知人",
},
{
code: "40",
name: "第二通知人",
},
];
const TableData = reactive([
{ label: "姓名", prop: "name" },
{ label: "账号", prop: "account" },
{ label: "邮箱", prop: "email" },
{ label: "手机", prop: "phone" },
{
label: "操作",
prop: "operate",
operateData: [
{
name: "移出",
Fn: (e) => {
ClickDelete(e);
},
},
],
},
]);
const SearchData = {
currentPage: 1,
pageSize: 10,
total: 0,
// ReportState: "0",
// MBLNO: "",
};
const ButtonData = [
{ text: "申请列表", type: "primary", FnName: "FnApplyList" },
];
const tableData = ref([]);
const FnApplyList = () => {
tenantWaitAdminApplyJoinList().then((res) => {
console.log(res);
if (res.data.length) {
tableData.value = res.data;
dialogFormVisible.value = true;
} else {
ElMessage({
message: "暂无申请信息!",
type: "warning",
});
}
});
};
// const ClickEdit = (e) => {
// dialogFormVisible.value = true;
// let R = [];
// e.type.split("[").forEach((a) => {
// if (a) {
// a.split("]").forEach((b) => {
// if (b) {
// R.push(b);
// }
// });
// }
// });
// return { ...e, type: R };
// };
const TableBoxRef = ref();
const ListApi = tenantAdminUserList;
const ClickSearch = (e = {}) => {
console.log(e.value);
TableBoxRef.value.Search(e.value);
};
const SearchOpen = (e) => {
TableBoxRef.value.height = e ? 450 : 562;
};
const ClickDelete = (e) => {
TenantAdminRemoveUser({ id: e.id }).then((res) => {
if (res.code == 200) {
ClickSearch();
}
});
};
const FnAgreeApply = (e) => {
TenantAdminAgreeApplyJoin({ id: e.id }).then((res) => {
console.log(res);
FnApplyList();
TableBoxRef.value.Search();
});
};
const FnRejectApply = (e) => {
TenantAdminRejectApplyJoin({ id: e.id }).then((res) => {
console.log(res);
FnApplyList();
TableBoxRef.value.Search();
});
};
return {
TypeData,
DialogForm,
dialogFormVisible,
TableBoxRef,
ClickSearch,
SearchOpen,
TableData,
SearchData,
ButtonData,
ListApi,
FnApplyList,
tableData,
ClickDelete,
FnAgreeApply,
FnRejectApply,
};
},
};
</script>
<style lang="scss" scoped>
.BookingMain {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
</style>

@ -0,0 +1,19 @@
let cargoIdData = [
{
name: "S 普通货",
code: "S",
},
{
name: "R 冻柜",
code: "R",
},
{
name: "D 危险品",
code: "D",
},
{
name: "O 超限箱",
code: "O",
},
];
export { cargoIdData };

@ -65,6 +65,56 @@ const bookingCustomSave = (data) => {
},
});
};
// 发送提交
const bookingCustomSubmit = (data) => {
return request({
data: {
url: "/api/bookingAip/bookingCustom/submit",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 取消提交订舱
const bookingCustomCancelSubmit = (data) => {
return request({
data: {
url: "/api/bookingAip/bookingCustom/cancelSubmit",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 上传订单附件
const bookingCustomUploaderFile = (data) => {
return request({
data: {
url: "/api/bookingAip/bookingCustom/uploaderFile",
method: "post",
data,
headers: {
// Authorization: localStorage.getItem("token"),
"Content-Type": "multipart/form-data",
},
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 获取附件
const bookingCustomDownFile = (params) => {
return request({
data: {
url: "/api/bookingAip/bookingCustom/downFile",
method: "get",
params,
responseType: "blob",
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 查询客户订单详情
const bookingCustomInfo = (params) => {
return request({
@ -257,6 +307,176 @@ const cobServiceItemTenantList = (params) => {
},
});
};
// 申请加入企业列表(用于申请人自己查询申请列表)
const applyJoinList = (params) => {
return request({
data: {
url: "/api/bookingAip/tenant/applyJoinList",
method: "get",
params,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 创建企业
const tenantRegister = (data) => {
return request({
data: {
url: "/api/bookingAip/tenant/register",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 上传营业执照
const tenantUploaderFile = (data) => {
return request({
data: {
url: "/api/bookingAip/tenant/uploaderFile",
method: "post",
data,
headers: {
// Authorization: localStorage.getItem("token"),
"Content-Type": "multipart/form-data",
},
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 获取营业执照
const tenantDownFile = (params) => {
return request({
data: {
url: "/api/bookingAip/tenant/downFile",
method: "get",
params,
responseType: "blob",
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 输入企业名称查询企业详情
const tenantNameQuery = (params) => {
return request({
data: {
url: "/api/bookingAip/tenant/nameQuery",
method: "get",
params,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 申请加入企业
const TenantApplyJoin = (data) => {
return request({
data: {
url: "/api/bookingAip/tenant/applyJoin",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 查询用户所属的企业
const tenantUserTenantList = (params) => {
return request({
data: {
url: "/api/bookingAip/tenant/userTenantList",
method: "get",
params,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 管理员查询员工列表(用于企业管理员查询同事列表)
const tenantAdminUserList = (params) => {
return request({
data: {
url: "/api/bookingAip/tenant/adminUserList",
method: "get",
params,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 查询待审核企业列表(运营使用)
const tenantWaitAuditTenantList = (params) => {
return request({
data: {
url: "/api/bookingAip/tenant/waitAuditTenantList",
method: "get",
params,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 审核企业(运营使用)
const TenantAudit = (data) => {
return request({
data: {
url: "/api/bookingAip/tenant/audit",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 申请加入企业列表(用于企业管理员查询申请列表)
const tenantWaitAdminApplyJoinList = (params) => {
return request({
data: {
url: "/api/bookingAip/tenant/adminApplyJoinList",
method: "get",
params,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 管理员同意申请
const TenantAdminAgreeApplyJoin = (data) => {
return request({
data: {
url: "/api/bookingAip/tenant/adminAgreeApplyJoin",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 管理员驳回申请
const TenantAdminRejectApplyJoin = (data) => {
return request({
data: {
url: "/api/bookingAip/tenant/adminRejectApplyJoin",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 管理员移出员工
const TenantAdminRemoveUser = (data) => {
return request({
data: {
url: "/api/bookingAip/tenant/adminRemoveUser",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 申请加入企业(撤销),用于申请人自己撤销操作
const TenantCancelApplyJoin = (data) => {
return request({
data: {
url: "/api/bookingAip/tenant/cancelApplyJoin",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
export {
UserLogin,
@ -265,6 +485,10 @@ export {
UserGetLoginUser,
bookingCustomList,
bookingCustomSave,
bookingCustomSubmit,
bookingCustomCancelSubmit,
bookingCustomUploaderFile,
bookingCustomDownFile,
bookingCustomInfo,
Uploader,
bookingCustomDelete,
@ -282,4 +506,19 @@ export {
Getvessellist,
Getpackagelist,
cobServiceItemTenantList,
applyJoinList,
tenantRegister,
tenantUploaderFile,
tenantDownFile,
tenantNameQuery,
TenantApplyJoin,
tenantUserTenantList,
tenantAdminUserList,
tenantWaitAuditTenantList,
TenantAudit,
tenantWaitAdminApplyJoinList,
TenantAdminAgreeApplyJoin,
TenantAdminRejectApplyJoin,
TenantAdminRemoveUser,
TenantCancelApplyJoin,
};

@ -13,11 +13,11 @@
{{ item.text }}
</el-button>
</div>
<div>
<!-- <div>
<el-button type="primary" link>
<el-icon><RefreshRight /></el-icon>
</el-button>
</div>
</div> -->
</div>
<el-table
:data="TData"
@ -85,8 +85,16 @@ export default {
loading.value = true;
props.ListApi(ApiData).then((res) => {
if (res.code == 200) {
TData.value = res.data.list;
search_data.total = res.data.pagination.total;
if (res.data.list) {
TData.value = res.data.list;
} else {
TData.value = res.data;
}
if (res.data.pagination) {
search_data.total = res.data.pagination.total;
}
loading.value = false;
}
});

@ -5,6 +5,12 @@ import Booking from "../Views/Booking";
import AddBooking from "../Views/Booking/AddBooking.vue";
import BookingTemplate from "../Views/BookingTemplate";
import BookingOrder from "../Views/BookingOrder";
import ApplyJoin from "../Views/ApplyJoin";
import ApplyJoinFound from "../Views/ApplyJoin/Found.vue";
import ApplyJoinJoin from "../Views/ApplyJoin/Join.vue";
import ApplyJoinForJ from "../Views/ApplyJoin/ForJ.vue";
import ApplyJoinOperate from "../Views/ApplyJoinOperate";
import Workmate from "../Views/workmate";
import About from "../Views/About.vue";
const router = createRouter({
@ -19,6 +25,12 @@ const router = createRouter({
{ path: "/AddBooking", component: AddBooking },
{ path: "/BookingTemplate", component: BookingTemplate },
{ path: "/BookingOrder", component: BookingOrder },
{ path: "/ApplyJoin", component: ApplyJoin },
{ path: "/ApplyJoinFound", component: ApplyJoinFound },
{ path: "/ApplyJoinJoin", component: ApplyJoinJoin },
{ path: "/ApplyJoinForJ", component: ApplyJoinForJ },
{ path: "/Workmate", component: Workmate },
{ path: "/ApplyJoinOperate", component: ApplyJoinOperate },
],
},
{ path: "/login", component: Login },

Loading…
Cancel
Save