main
张同海 1 year ago
parent 30f352da6a
commit 4dbc520784

@ -16,7 +16,7 @@
<div class="CsApplyList" v-if="ApplyList.Name">
<p>{{ ApplyList.Name }}</p>
<p>{{ ApplyList.socialCreditCode }}</p>
<p>{{ ApplyList.Phone }}</p>
<!-- <p>{{ ApplyList.Phone }}</p> -->
</div>
<el-button type="primary" @click="FnJsin" :disabled="ApplyList.id">
申请加入

@ -68,12 +68,14 @@
<el-select
v-model="form.carrierCode"
:style="{ width: '100%' }"
filterable
clearable
@change="ChangecarrierCode"
>
<el-option
v-for="item in store.state.Data.Carrierlist"
:key="item.code"
:label="item.name"
:label="item.WebShow"
:value="item.code"
/>
</el-select>
@ -88,8 +90,8 @@
clearable
@select="
(e) => {
console.log(e);
store.state.Data.portloadlist.forEach((i) => {
console.log(e, i);
if (e.code == i.code) {
form.portLoading = i.name;
}
@ -350,7 +352,12 @@
<el-col :span="8">
<el-form-item label="包装">
<!-- <el-input v-model="form.kindPkgs" /> -->
<el-select v-model="form.kindPkgs" :style="{ width: '100%' }">
<el-select
v-model="form.kindPkgs"
filterable
clearable
:style="{ width: '100%' }"
>
<el-option
v-for="item in store.state.Data.packagelist"
:key="item.code"
@ -394,9 +401,13 @@
<el-input v-model="form.cargoData.ventilationRate" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="湿度">
<el-input v-model="form.cargoData.humidity" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="温度单位">
<!-- <el-input v-model="form.cargoData.temperatureUnit" /> -->
<el-select
v-model="form.cargoData.temperatureUnit"
:style="{ width: '100%' }"
@ -491,6 +502,8 @@
<el-select
v-model="scope.row.ctnCode"
:style="{ width: '100%' }"
filterable
clearable
@change="
(e) => {
store.state.Data.Ctnlist.forEach((i) => {
@ -629,6 +642,15 @@ export default {
portLoading: "QINGDAO,CHINA",
portLoadingCode: "CNTAO",
});
const formDatatype = ref(false);
watch(
form,
(nowVal, oldVal) => {
console.log(nowVal, oldVal, formDatatype.value);
formDatatype.value = true;
},
{ deep: true }
);
const serviceItemList = ref([]);
store.state.Data.cobServiceItemTenantList.forEach((item) => {
if (item.defaultSelected == 1) {
@ -675,6 +697,13 @@ export default {
form.value.serviceItemList.forEach((item) => {
serviceItemList.value.push(item.code);
});
store.state.Data.portloadlist.forEach((item) => {
if (item.code == form.value.portLoadingCode) {
console.log(item);
form.value.portLoadingCode = item.WebShow;
}
});
fileList.value = [];
res.data.bookingFileList.forEach((item) => {
fileList.value.push({ ...item, name: item.fileName });
@ -685,6 +714,9 @@ export default {
}
});
}
setTimeout(() => {
formDatatype.value = false;
}, 500);
});
const handleClick = (data) => {
setTimeout(() => {
@ -699,6 +731,7 @@ export default {
const ClickSave = () => {
let ApiData = form.value;
ApiData.portLoadingCode = ApiData.portLoadingCode.split(";")[2];
// fileList
ApiData = {
...ApiData,
@ -712,6 +745,12 @@ export default {
type: "success",
});
form.value = res.data;
store.state.Data.portloadlist.forEach((item) => {
if (item.code == form.value.portLoadingCode) {
console.log(item);
form.value.portLoadingCode = item.WebShow;
}
});
form.value.cargoData = {
dangerClass: res.data.dangerClass,
dangerLable: res.data.dangerLable,
@ -731,6 +770,9 @@ export default {
},
});
}
setTimeout(() => {
formDatatype.value = false;
}, 500);
});
};
@ -805,12 +847,20 @@ export default {
};
const RefSendDialog = ref();
const ClicSend = () => {
bookingCustomInfo({ id: form.value.id }).then((res) => {
if (res.code == 200) {
console.log(res);
RefSendDialog.value.OpenDialog(res.data);
}
});
console.log(formDatatype.value);
if (!formDatatype.value) {
bookingCustomInfo({ id: form.value.id }).then((res) => {
if (res.code == 200) {
console.log(res);
RefSendDialog.value.OpenDialog(res.data);
}
});
} else {
ElMessage({
message: "数据变动,请先保存数据。",
type: "warning",
});
}
// bookingCustomSubmit({ id: form.value.id }).then((res) => {
// if (res.code == 200) {
// ElMessage({
@ -879,13 +929,14 @@ export default {
const results = queryString
? restaurants.filter((item) => {
return (
item.code.toLowerCase().indexOf(queryString.toLowerCase()) !== -1
item.WebShow.toLowerCase().indexOf(queryString.toLowerCase()) !==
-1
);
})
: restaurants;
let RData = [];
results.forEach((item) => {
RData.push({ ...item, value: item.code });
RData.push({ ...item, value: item.WebShow });
});
cb(RData);
};

@ -42,6 +42,11 @@ export default {
const DialogData = ref({});
const OpenDialog = (data) => {
DialogData.value = data;
console.log(DialogData.value.ctnList.length);
if (DialogData.value.ctnList.length == 0) {
DialogData.value.ctnList.push({});
}
console.log(DialogData.value.ctnList);
dialogVisible.value = true;
};
const OffDialog = () => {

@ -69,6 +69,8 @@ export default {
title: "船公司",
EType: "Select",
DName: "carrierCode",
filterable: true,
label: "WebShow",
SelectList: store.state.Data.Carrierlist,
},
{
@ -97,18 +99,22 @@ export default {
{
code: "0",
name: "已录入",
type: "primary",
},
{
code: "1",
name: "已审核",
type: "success",
},
{
code: "3",
name: "已提交",
type: "warning",
},
{
code: "4",
name: "已驳回",
type: "danger",
},
],
ClickOpen: true,

@ -41,12 +41,8 @@
<el-col :span="24">
<p><span> </span>基本信息</p>
</el-col>
<el-col :span="4">
<!-- <el-form-item label="委托方">
<el-input :disabled="true" v-model="DialogForm.weituo" />
</el-form-item> -->
</el-col>
<el-col :span="5">
<el-form-item label="船公司">
<el-input :disabled="true" v-model="DialogForm.carrier" />
</el-form-item>
@ -66,6 +62,11 @@
<el-input :disabled="true" v-model="DialogForm.hblNo" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="销售代码">
<el-input :disabled="true" v-model="DialogForm.sale" />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="船名">
<el-input :disabled="true" v-model="DialogForm.vessel" />
@ -94,12 +95,7 @@
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="销售代码">
<el-input :disabled="true" v-model="DialogForm.sale" />
</el-form-item>
</el-col>
<el-col :span="20">
<el-col :span="24">
<el-form-item label="备注">
<el-input
:disabled="false"
@ -1252,10 +1248,10 @@ export default {
prop: "containerTotalInfo",
},
{
label: "业务状态",
prop: "bizStatus",
StateType: "multiple",
StateChange: bizStatusData,
label: "货物状态",
prop: "goodStatus",
// StateType: "multiple",
// StateChange: bizStatusData,
},
// { label: "", prop: "createTime", width: "100" },

@ -79,6 +79,14 @@
placeholder="真实姓名"
/>
</el-form-item>
<el-form-item prop="email">
<el-input
class="CsPasswordI CsI2"
v-model="RegData.email"
size="large"
placeholder="邮箱"
/>
</el-form-item>
<el-form-item prop="phone">
<el-input
class="CsPasswordI CsI2"
@ -126,7 +134,7 @@
</el-button>
</div>
<div class="fromBox fromBox2" v-else>
<el-form :rules="rules" :model="PasData" ref="rulePasFormRef">
<el-form :model="PasData" ref="rulePasFormRef">
<el-form-item prop="phone">
<el-input
class="CsPasswordI CsI2"
@ -191,6 +199,7 @@ import {
UserReg,
UserGetLoginUser,
genRegisterCheckCode,
genPhoneCheckCode,
userForgetPasswordForm,
} from "@/api/Index";
import { ref, reactive } from "vue";
@ -252,7 +261,7 @@ export default {
if (!formEl) return;
await formEl.validate((valid, fields) => {
if (valid) {
console.log("通过");
console.log("通过", RegData.value);
UserReg(RegData.value).then((res) => {
console.log(res);
if (res.code == 200) {
@ -260,7 +269,9 @@ export default {
message: "注册成功!",
type: "success",
});
FnLogin();
LoginData["account"] = RegData.value.account;
LoginData["password"] = RegData.value.password;
Login();
}
});
} else {
@ -273,7 +284,7 @@ export default {
console.log(res);
if (res.code == 200) {
ElMessage({
message: "注册成功!",
message: "修改成功!",
type: "success",
});
FnLogin();
@ -318,6 +329,13 @@ export default {
trigger: "change",
},
],
email: [
{
required: true,
message: "请输入邮箱!",
trigger: "change",
},
],
phone: [
{
required: true,
@ -372,12 +390,12 @@ export default {
rulePasFormRef.value.validateField("phone", (errorMessage) => {
if (errorMessage) {
console.log();
// captchaSms({ phonenumber: RegData.value.phone }).then((res) => {
// captchaSms({ phonenumber: PasData.value.phone }).then((res) => {
// console.log(res);
// });
disabled.value = true;
btnText.value = "请稍候...";
genRegisterCheckCode({ phone: RegData.value.phone }).then((res) => {
genPhoneCheckCode({ phone: PasData.value.phone }).then((res) => {
console.log(res);
let i = 0;
@ -439,7 +457,7 @@ export default {
align-items: center;
justify-content: center;
width: 1140px;
height: 586px;
// height: 586px;
padding: 70px 75px;
box-sizing: border-box;
background: #ffffff;

@ -55,12 +55,7 @@
</el-tab-pane>
<el-tab-pane label="修改密码">
<div class="UnitBox">
<el-form
:model="form1"
label-width="120px"
class="ChangPhoneForm"
ref="ruleFormRef"
>
<el-form :model="form1" label-width="120px" class="ChangPhoneForm">
<el-form-item label="原密码">
<el-input v-model="form1.password" />
</el-form-item>
@ -78,6 +73,45 @@
</el-form>
</div>
</el-tab-pane>
<el-tab-pane label="修改邮箱">
<div class="UnitBox">
<el-form :model="form2" label-width="120px" class="ChangPhoneForm">
<el-form-item label="新邮箱">
<el-input v-model="form2.email" />
</el-form-item>
<el-form-item label="手机号">
{{ $store.state.User.userInfo.phone }}
<!-- <el-input v-model="form2.email" /> -->
</el-form-item>
<el-form-item label="手机验证码">
<div class="bind_code">
<el-input
v-model="form2.checkCode"
size="large"
placeholder="验证码"
/>
<el-button
@click="
bindforgetSendCode(
$store.state.User.userInfo.phone,
'Form2'
)
"
class="codebtn"
:disabled="Form2disabled"
>
{{ Form2btnText }}
</el-button>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmitChangeEmail">
更改
</el-button>
</el-form-item>
</el-form>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="Config">Config</el-tab-pane>
<el-tab-pane label="Role">Role</el-tab-pane>
<el-tab-pane label="Task">Task</el-tab-pane> -->
@ -88,20 +122,26 @@
import { ref } from "vue";
import {
UserChangPhone,
genRegisterCheckCode,
genPhoneCheckCode,
userChangPassword,
UserEmail,
} from "@/api/Index";
import { ElMessage } from "element-plus";
import { useStore } from "vuex";
export default {
name: "ViewUserinfo",
setup() {
const store = useStore();
const ruleFormRef = ref();
const form = ref({});
const form1 = ref({});
const form2 = ref({});
const disabled = ref(false);
const btnText = ref("获取验证码");
const newdisabled = ref(false);
const newbtnText = ref("获取验证码");
const Form2disabled = ref(false);
const Form2btnText = ref("获取验证码");
const bindforgetSendCode = (phoneData, type) => {
ruleFormRef.value.validateField("phone", (errorMessage) => {
if (errorMessage) {
@ -112,11 +152,14 @@ export default {
if (type == "new") {
newdisabled.value = true;
newbtnText.value = "发送中...";
} else if (type == "Form2") {
Form2disabled.value = true;
Form2btnText.value = "发送中...";
} else {
disabled.value = true;
btnText.value = "发送中...";
}
genRegisterCheckCode({ phone: phoneData }).then((res) => {
genPhoneCheckCode({ phone: phoneData }).then((res) => {
console.log(res);
let i = 0;
@ -126,6 +169,8 @@ export default {
++i;
if (type == "new") {
newbtnText.value = `${60 - i}s`;
} else if (type == "Form2") {
Form2btnText.value = `${60 - i}s`;
} else {
btnText.value = `${60 - i}s`;
}
@ -135,6 +180,9 @@ export default {
if (type == "new") {
newdisabled.value = false;
newbtnText.value = "获取验证码";
} else if (type == "Form2") {
Form2disabled.value = false;
Form2btnText.value = "获取验证码";
} else {
disabled.value = false;
btnText.value = "获取验证码";
@ -152,6 +200,12 @@ export default {
const onSubmit = () => {
UserChangPhone(form.value).then((res) => {
if (res.code == 200) {
store.commit("XGetUser", {
userInfo: {
...store.state.User.userInfo,
phone: form.value.newPhone,
},
});
ElMessage({
message: res.message,
type: "success",
@ -169,17 +223,31 @@ export default {
}
});
};
const onSubmitChangeEmail = () => {
UserEmail(form2.value).then((res) => {
if (res.code == 200) {
ElMessage({
message: res.message,
type: "success",
});
}
});
};
return {
ruleFormRef,
form,
form1,
form2,
disabled,
btnText,
newdisabled,
newbtnText,
Form2disabled,
Form2btnText,
bindforgetSendCode,
onSubmit,
onSubmitChangePas,
onSubmitChangeEmail,
};
},
};

@ -43,6 +43,39 @@
</el-table-column>
</el-table>
</el-dialog>
<el-dialog
v-model="dialogVisible"
:title="form2.type == 'ClickDelete' ? '移出同事' : '转让管理员'"
:before-close="dialogF"
width="600"
>
<el-form :model="form2" label-width="120px" class="ChangPhoneForm">
<el-form-item label="手机号">
{{ $store.state.User.userInfo.phone }}
</el-form-item>
<el-form-item label="手机验证码">
<div class="bind_code">
<el-input
v-model="form2.checkCode"
size="large"
placeholder="验证码"
/>
<el-button
@click="bindforgetSendCode($store.state.User.userInfo.phone)"
class="codebtn"
:Form2disabled="Form2disabled"
>
{{ Form2btnText }}
</el-button>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmitChange">
{{ form2.type == "ClickDelete" ? "移出" : "转让" }}
</el-button>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
@ -56,6 +89,7 @@ import {
TenantAdminRejectApplyJoin,
tenantUserTenantList,
TenantAdminChangeAdmin,
genPhoneCheckCode,
} from "@/api/Index";
import { ref, reactive } from "vue";
export default {
@ -68,7 +102,49 @@ export default {
console.log(res);
});
const dialogFormVisible = ref(false);
const dialogVisible = ref(false);
const Form2disabled = ref(false);
const Form2btnText = ref("获取验证码");
const form2 = ref({});
const onSubmitChange = () => {
if (form2.value.type == "ClickDelete") {
ClickDelete();
} else {
ClickTransfer();
}
};
const bindforgetSendCode = (phoneData) => {
Form2disabled.value = true;
Form2btnText.value = "发送中...";
genPhoneCheckCode({ phone: phoneData }).then((res) => {
console.log(res);
if (res.code == 200) {
let i = 0;
let time = () => {
if (i < 60) {
setTimeout(() => {
++i;
Form2btnText.value = `${60 - i}s`;
time();
}, 1000);
} else {
Form2disabled.value = false;
Form2btnText.value = "获取验证码";
}
};
time();
} else {
ElMessage({
message: "发送失败!",
type: "warning",
});
Form2disabled.value = false;
Form2btnText.value = "获取验证码";
}
});
};
const DialogForm = ref({});
const TypeData = [
{
code: "10",
@ -100,14 +176,14 @@ export default {
name: "移出",
ShowType: false,
Fn: (e) => {
ClickDelete(e);
OpenDialog(e, "ClickDelete");
},
},
{
name: "转让管理",
ShowType: false,
Fn: (e) => {
ClickTransfer(e);
OpenDialog(e, "ClickTransfer");
},
},
],
@ -131,6 +207,7 @@ export default {
tableData.value = res.data;
dialogFormVisible.value = true;
} else {
dialogFormVisible.value = false;
ElMessage({
message: "暂无申请信息!",
type: "warning",
@ -158,47 +235,66 @@ export default {
const ListApi = tenantAdminUserList;
const ClickSearch = (e = {}) => {
console.log(e.value);
dialogVisible.value = false;
form2.value = {};
TableBoxRef.value.Search(e.value);
};
const SearchOpen = (e) => {
TableBoxRef.value.height = e ? 450 : 562;
};
const ClickDelete = (e) => {
TenantAdminRemoveUser({ id: e.id }).then((res) => {
const OpenDialog = (e, type) => {
form2.value.id = e.id;
form2.value.type = type;
dialogVisible.value = true;
};
const ClickDelete = () => {
TenantAdminRemoveUser(form2.value).then((res) => {
if (res.code == 200) {
ClickSearch();
ElMessage({
message: res.message,
type: "success",
});
}
});
};
const ClickTransfer = (e) => {
TenantAdminChangeAdmin({ id: e.id }).then((res) => {
const ClickTransfer = () => {
TenantAdminChangeAdmin(form2.value).then((res) => {
if (res.code == 200) {
ClickSearch();
ElMessage({
message: res.message,
type: "success",
});
}
});
console.log(e);
};
const FnAgreeApply = (e) => {
TenantAdminAgreeApplyJoin({ id: e.id }).then((res) => {
console.log(res);
FnApplyList();
TableBoxRef.value.Search();
if (res.code == 200) {
FnApplyList();
TableBoxRef.value.Search();
}
});
};
const FnRejectApply = (e) => {
TenantAdminRejectApplyJoin({ id: e.id }).then((res) => {
console.log(res);
FnApplyList();
TableBoxRef.value.Search();
if (res.code == 200) {
FnApplyList();
TableBoxRef.value.Search();
}
});
};
return {
TypeData,
DialogForm,
form2,
dialogFormVisible,
dialogVisible,
Form2disabled,
Form2btnText,
onSubmitChange,
bindforgetSendCode,
TableBoxRef,
ClickSearch,
SearchOpen,
@ -223,4 +319,30 @@ export default {
display: flex;
flex-direction: column;
}
.ChangPhoneForm {
width: 500px;
.bind_code {
width: 100%;
position: relative;
}
.codebtn {
position: absolute;
top: 4px;
right: 1px;
font-size: 11px;
font-weight: 500;
font-family: PingFang SC-Medium, PingFang SC;
color: #1b3dd1;
height: 32px;
line-height: 32px;
cursor: pointer;
padding: 0 10px;
border: none;
border-left: 1px solid #1b3dd1;
border-radius: 0;
&:hover {
background: none;
}
}
}
</style>

@ -55,6 +55,28 @@ const UserChangPhone = (data) => {
},
});
};
// 户更换/设置邮箱(2023-11增加)
const UserEmail = (data) => {
return request({
data: {
url: "/api/bookingAip/user/userEmail",
method: "post",
data,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 获取验证码(2023-10增加除注册外其他位置使用)
const genPhoneCheckCode = (params) => {
return request({
data: {
url: "/api/bookingAip/user/genPhoneCheckCode",
method: "get",
params,
// headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 获取用户注册验证码
const genRegisterCheckCode = (params) => {
return request({
@ -562,6 +584,8 @@ export {
userChangPassword,
userForgetPasswordForm,
UserChangPhone,
UserEmail,
genPhoneCheckCode,
genRegisterCheckCode,
UserGetLoginUser,
bookingCustomList,

@ -38,13 +38,14 @@
class="ECs"
v-model="Data[item.DName]"
:placeholder="`请选择${item.title}`"
:filterable="item.filterable"
size="large"
clearable
>
<el-option
v-for="e in item.SelectList"
:key="e.code"
:label="e.name"
:label="item.label ? e[item.label] : e.name"
:value="e.code"
/>
</el-select>

@ -42,7 +42,7 @@
{{ RData(scope.row[item.prop], item) }}
</span>
<el-button
type="primary"
:type="item.type ? 'item.type' : 'primary'"
link
v-else
@click="OpenDialog(scope.row)"

@ -33,6 +33,7 @@ export default createStore({
let RData = [];
res.data.forEach((item) => {
item.name = item.cnName;
item.WebShow = `${item.code}-${item.cnName}`;
RData.push(item);
});
store.commit("XGetData", { Carrierlist: RData });
@ -44,6 +45,7 @@ export default createStore({
let RData = [];
res.data.forEach((item) => {
item.name = item.enName;
item.WebShow = `${item.cnName};${item.enName};${item.code}`;
RData.push(item);
});
store.commit("XGetData", { portloadlist: RData });

Loading…
Cancel
Save