Showing
11 changed files
with
45 additions
and
1184 deletions
| ... | @@ -8,28 +8,6 @@ export function fclInit() { | ... | @@ -8,28 +8,6 @@ export function fclInit() { |
| 8 | }); | 8 | }); |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | -// 获取用户详细信息 | ||
| 12 | -export function getInfo() { | ||
| 13 | - return request({ | ||
| 14 | - url: "/manager-server/user/getUser", | ||
| 15 | - method: "get", | ||
| 16 | - }); | ||
| 17 | -} | ||
| 18 | -// 登录界面查询用户,可用不要token | ||
| 19 | -export function getUserNotoken() { | ||
| 20 | - return request({ | ||
| 21 | - url: "/icleartw/auth/getUser", | ||
| 22 | - method: "get", | ||
| 23 | - }); | ||
| 24 | -} | ||
| 25 | -// 根据账号获取用户信息 | ||
| 26 | -export function getUserByAccNo(data) { | ||
| 27 | - return request({ | ||
| 28 | - url: "/icleartw/auth/getUserByAccNo/" + data, | ||
| 29 | - method: "get", | ||
| 30 | - }); | ||
| 31 | -} | ||
| 32 | - | ||
| 33 | // 退出 | 11 | // 退出 |
| 34 | export function logout() { | 12 | export function logout() { |
| 35 | return request({ | 13 | return request({ |
| ... | @@ -37,46 +15,3 @@ export function logout() { | ... | @@ -37,46 +15,3 @@ export function logout() { |
| 37 | method: "post", | 15 | method: "post", |
| 38 | }); | 16 | }); |
| 39 | } | 17 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 40 | -// 注册账号 | ||
| 41 | -export function addUser(data) { | ||
| 42 | - return request({ | ||
| 43 | - url: "/icleartw/auth/addUser", | ||
| 44 | - method: "post", | ||
| 45 | - data: data, | ||
| 46 | - }); | ||
| 47 | -} | ||
| 48 | -// 登录 | ||
| 49 | -export function userLogin(accNo, password, rememberMe) { | ||
| 50 | - const data = { | ||
| 51 | - accNo, | ||
| 52 | - password, | ||
| 53 | - rememberMe, | ||
| 54 | - }; | ||
| 55 | - return request({ | ||
| 56 | - url: "/icleartw/auth/login", | ||
| 57 | - method: "post", | ||
| 58 | - data: data, | ||
| 59 | - }); | ||
| 60 | -} | ||
| 61 | -// 根据用户账号发送修改密码邮件 | ||
| 62 | -export function updPwd(data) { | ||
| 63 | - return request({ | ||
| 64 | - url: "/icleartw/auth/updPwd/" + data, | ||
| 65 | - method: "get", | ||
| 66 | - }); | ||
| 67 | -} | ||
| 68 | -// 重置密碼 | ||
| 69 | -export function resetPwd(data) { | ||
| 70 | - return request({ | ||
| 71 | - url: "/icleartw/auth/resetPwd", | ||
| 72 | - method: "post", | ||
| 73 | - data: data, | ||
| 74 | - }); | ||
| 75 | -} | ||
| 76 | -// 根据用户账号发送修改密码邮件 | ||
| 77 | -export function verifyResetPwd(data) { | ||
| 78 | - return request({ | ||
| 79 | - url: "/icleartw/auth/verifyResetPwd/" + data, | ||
| 80 | - method: "get", | ||
| 81 | - }); | ||
| 82 | -} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | -import { praseStrEmpty } from "@/utils/FedEx"; | ||
| 3 | 2 | ||
| 4 | -// 查询用户列表 | 3 | +// 获取用户详细信息 |
| 5 | -/** | 4 | +export function getInfo() { |
| 6 | - * @param page 页码 * | ||
| 7 | - * @param size 数据长度 * | ||
| 8 | - * @param isValid 用户状态 | ||
| 9 | - * @param username 用户名 | ||
| 10 | - * @param phone 手机号码 | ||
| 11 | - */ | ||
| 12 | -export function listUser(data) { | ||
| 13 | - return request({ | ||
| 14 | - url: '/sysUser/getUserList', | ||
| 15 | - method: 'post', | ||
| 16 | - data: data | ||
| 17 | - }) | ||
| 18 | -} | ||
| 19 | - | ||
| 20 | -// 查询用户详细 | ||
| 21 | -/** | ||
| 22 | - * @param id 用户id * | ||
| 23 | - */ | ||
| 24 | -export function detailUser(userId) { | ||
| 25 | - return request({ | ||
| 26 | - url: '/sysUser/detailUser?id=' + praseStrEmpty(userId), | ||
| 27 | - method: 'get' | ||
| 28 | - }) | ||
| 29 | -} | ||
| 30 | - | ||
| 31 | -// 新增用户 | ||
| 32 | -/** | ||
| 33 | - * @param loginName 员工号 * | ||
| 34 | - * @param username 用户姓名 * | ||
| 35 | - * @param phone 手机号 | ||
| 36 | - * @param email 电子邮箱 | ||
| 37 | - * @param portName 所属口岸 * | ||
| 38 | - * @param roleIds 所属角色 * | ||
| 39 | - * @param remark 备注 | ||
| 40 | - */ | ||
| 41 | -export function addOrUpdateUser(data) { | ||
| 42 | - return request({ | ||
| 43 | - url: '/sysUser/addOrUpdateUser', | ||
| 44 | - method: 'post', | ||
| 45 | - data: data | ||
| 46 | - }) | ||
| 47 | -} | ||
| 48 | - | ||
| 49 | -// 修改用户状态 | ||
| 50 | -/** | ||
| 51 | - * @param id 用户id * | ||
| 52 | - * @param loginName 员工号 * | ||
| 53 | - * @param username 用户姓名 * | ||
| 54 | - * @param phone 手机号 | ||
| 55 | - * @param email 电子邮箱 | ||
| 56 | - * @param portName 所属口岸 * | ||
| 57 | - * @param roleIds 所属角色 * | ||
| 58 | - * @param remark 备注 | ||
| 59 | - */ | ||
| 60 | -export function updateUserStatus(data) { | ||
| 61 | - return request({ | ||
| 62 | - url: '/sysUser/updateUserStatus', | ||
| 63 | - method: 'post', | ||
| 64 | - data: data | ||
| 65 | - }) | ||
| 66 | -} | ||
| 67 | - | ||
| 68 | -//菜单信息 | ||
| 69 | -/** | ||
| 70 | - * @param | ||
| 71 | - */ | ||
| 72 | -export function getAllAuth() { | ||
| 73 | - return request({ | ||
| 74 | - url: '/sysMenu/getAllAuth', | ||
| 75 | - method: 'get' | ||
| 76 | - }) | ||
| 77 | -} | ||
| 78 | - | ||
| 79 | -//菜单开启关闭 | ||
| 80 | -/** | ||
| 81 | - * @param id 菜单id * | ||
| 82 | - * @param status 菜单状态 * | ||
| 83 | - */ | ||
| 84 | -export function updateStatus(data) { | ||
| 85 | - return request({ | ||
| 86 | - url: '/sysMenu/updateStatus', | ||
| 87 | - method: 'post', | ||
| 88 | - data: data | ||
| 89 | - }) | ||
| 90 | -} | ||
| 91 | - | ||
| 92 | -//角色列表 | ||
| 93 | -/** | ||
| 94 | - * @param name 角色名称 | ||
| 95 | - * @param size 数据长度 * | ||
| 96 | - * @param page 页码 * | ||
| 97 | - * @param createStart 创建开始时间 | ||
| 98 | - * @param createEnd 创建结束时间 | ||
| 99 | - * @param valid 角色状态 | ||
| 100 | - */ | ||
| 101 | -export function getRoleList(data) { | ||
| 102 | return request({ | 5 | return request({ |
| 103 | - url: '/role/getRoleList', | 6 | + url: "/manager-server/user/getUser", |
| 104 | - method: 'post', | 7 | + method: "get", |
| 105 | - data: data | 8 | + }); |
| 106 | - }) | ||
| 107 | -} | ||
| 108 | - | ||
| 109 | -//角色详情 | ||
| 110 | -/** | ||
| 111 | - * @param id 角色id * | ||
| 112 | - */ | ||
| 113 | -export function detailRole(id) { | ||
| 114 | - return request({ | ||
| 115 | - url: '/role/detailRole?id=' + id, | ||
| 116 | - method: 'get', | ||
| 117 | - }) | ||
| 118 | -} | ||
| 119 | - | ||
| 120 | -//新增修改角色 | ||
| 121 | -/** | ||
| 122 | - * @param id 角色id * | ||
| 123 | - * @param name 角色名 * | ||
| 124 | - * @param remark 角色描述 | ||
| 125 | - * @param menuIds 角色权限 | ||
| 126 | - * @param valid 角色状态 | ||
| 127 | - */ | ||
| 128 | -export function addOrUpdateRole(data) { | ||
| 129 | - return request({ | ||
| 130 | - url: '/role/addOrUpdateRole', | ||
| 131 | - method: 'post', | ||
| 132 | - data: data | ||
| 133 | - }) | ||
| 134 | -} | ||
| 135 | - | ||
| 136 | -//角色状态修改 | ||
| 137 | -/** | ||
| 138 | - * @param id 角色id * | ||
| 139 | - * @param valid 角色状态 * | ||
| 140 | - */ | ||
| 141 | -export function updateRoleStatus(data) { | ||
| 142 | - return request({ | ||
| 143 | - url: '/role/updateRoleStatus', | ||
| 144 | - method: 'post', | ||
| 145 | - data: data | ||
| 146 | - }) | ||
| 147 | -} | ||
| 148 | - | ||
| 149 | -//口岸列表 | ||
| 150 | -/** | ||
| 151 | - * @param | ||
| 152 | - */ | ||
| 153 | -export function portNameList() { | ||
| 154 | - return request({ | ||
| 155 | - url: '/dictionary/port', | ||
| 156 | - method: 'get', | ||
| 157 | - }) | ||
| 158 | -} | ||
| 159 | - | ||
| 160 | -//口岸变更 | ||
| 161 | -/** | ||
| 162 | - * @param | ||
| 163 | - */ | ||
| 164 | -export function changeCurrentPort(data) { | ||
| 165 | - return request({ | ||
| 166 | - url: '/sysUser/changeCurrentPort', | ||
| 167 | - method: 'post', | ||
| 168 | - data: data | ||
| 169 | - }) | ||
| 170 | -} | ||
| 171 | - | ||
| 172 | -//获取用户设置表头 | ||
| 173 | -/** | ||
| 174 | - * @param tableName 表名 * | ||
| 175 | - */ | ||
| 176 | -export function getHeaderOrder(data) { | ||
| 177 | - return request({ | ||
| 178 | - url: '/table/getHeaderOrder?' + data, | ||
| 179 | - method: 'get', | ||
| 180 | - }) | ||
| 181 | } | 9 | } |
| 182 | 10 | ||
| 183 | -//保存用户设置表头 | 11 | +// 修改用户提示状态 |
| 184 | /** | 12 | /** |
| 185 | - * @param tableName 表名 * | 13 | + * @param addFlag1 * 标致1 |
| 186 | - * @param idList 显示表头集合 * | 14 | + * @param addFlag2 * 标志2 |
| 187 | */ | 15 | */ |
| 188 | -export function saveTableHeader(data) { | 16 | +export function uploadUserTipFlag(data) { |
| 189 | return request({ | 17 | return request({ |
| 190 | - url: '/table/saveTableHeader', | 18 | + url: '/manager-server/user/updateAddFlag', |
| 191 | method: 'post', | 19 | method: 'post', |
| 192 | data: data | 20 | data: data |
| 193 | }) | 21 | }) | ... | ... |
web/src/api/waybillInquiry.js
0 → 100644
| 1 | +import request from "@/utils/request"; | ||
| 2 | + | ||
| 3 | +// 运单查询 | ||
| 4 | +/** | ||
| 5 | + * @param createTimeFrom | ||
| 6 | + * @param createTimeTo | ||
| 7 | + * @param consignmentCode | ||
| 8 | + * @param sort | ||
| 9 | + * @param curPage * 页数 | ||
| 10 | + * @param pageSize * 页长 | ||
| 11 | + */ | ||
| 12 | +export function getwaybillData(data) { | ||
| 13 | + return request({ | ||
| 14 | + url: "/biz-customer/consignment/query/list", | ||
| 15 | + method: "post", | ||
| 16 | + data: data | ||
| 17 | + }); | ||
| 18 | +} |
| ... | @@ -86,7 +86,7 @@ export default { | ... | @@ -86,7 +86,7 @@ export default { |
| 86 | onlineDeclare: "線上申報平臺帳號登錄", | 86 | onlineDeclare: "線上申報平臺帳號登錄", |
| 87 | registerNumber: "register a fedex.com account", | 87 | registerNumber: "register a fedex.com account", |
| 88 | userInfo: "用戶信息維護", | 88 | userInfo: "用戶信息維護", |
| 89 | - logOut: "log out", | 89 | + logOut: "logout", |
| 90 | logOutDia: "Are you sure to log out and exit the system?", | 90 | logOutDia: "Are you sure to log out and exit the system?", |
| 91 | }, | 91 | }, |
| 92 | // 申报输入 | 92 | // 申报输入 | ... | ... |
| ... | @@ -43,7 +43,7 @@ import tableHeaders from "@/assets/languages/tableHeaders"; | ... | @@ -43,7 +43,7 @@ import tableHeaders from "@/assets/languages/tableHeaders"; |
| 43 | import dictLabels from "@/assets/languages/dictLabels.js"; | 43 | import dictLabels from "@/assets/languages/dictLabels.js"; |
| 44 | import settings from "./settings.js"; | 44 | import settings from "./settings.js"; |
| 45 | import * as filters from "./utils/filters.js"; | 45 | import * as filters from "./utils/filters.js"; |
| 46 | -import { toHead, numberRound, base64ConvertFile, b64ToBlob, titleCase } from "@/utils/index"; | 46 | +import { toHead, numberRound, base64ConvertFile, b64ToBlob, titleCase, formatDate } from "@/utils/index"; |
| 47 | 47 | ||
| 48 | // 全局方法挂载 | 48 | // 全局方法挂载 |
| 49 | Vue.prototype.parseTime = parseTime; | 49 | Vue.prototype.parseTime = parseTime; |
| ... | @@ -66,6 +66,7 @@ Vue.prototype.numberRound = numberRound | ... | @@ -66,6 +66,7 @@ Vue.prototype.numberRound = numberRound |
| 66 | Vue.prototype.base64ConvertFile = base64ConvertFile | 66 | Vue.prototype.base64ConvertFile = base64ConvertFile |
| 67 | Vue.prototype.b64ToBlob = b64ToBlob | 67 | Vue.prototype.b64ToBlob = b64ToBlob |
| 68 | Vue.prototype.titleCase = titleCase | 68 | Vue.prototype.titleCase = titleCase |
| 69 | +Vue.prototype.formatDate = formatDate | ||
| 69 | Vue.prototype.msgSuccess = function (msg) { | 70 | Vue.prototype.msgSuccess = function (msg) { |
| 70 | this.$message({ showClose: true, message: msg, type: "success" }); | 71 | this.$message({ showClose: true, message: msg, type: "success" }); |
| 71 | }; | 72 | }; | ... | ... |
| ... | @@ -46,7 +46,6 @@ const permission = { | ... | @@ -46,7 +46,6 @@ const permission = { |
| 46 | return new Promise((resolve) => { | 46 | return new Promise((resolve) => { |
| 47 | // 向后端请求路由数据 | 47 | // 向后端请求路由数据 |
| 48 | getRouters().then((res) => { | 48 | getRouters().then((res) => { |
| 49 | - console.log(res); | ||
| 50 | const sdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))); | 49 | const sdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))); |
| 51 | const rdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))); | 50 | const rdata = JSON.parse(JSON.stringify(routeItemInfo(res.data))); |
| 52 | const sidebarRoutes = filterAsyncRouter(sdata); | 51 | const sidebarRoutes = filterAsyncRouter(sdata); | ... | ... |
| 1 | -import { userLogin, logout, getInfo } from "@/api/login"; | 1 | +import { userLogin, logout } from "@/api/login"; |
| 2 | +import { getInfo } from "@/api/system/user.js" | ||
| 2 | import { getToken, setToken, removeToken } from "@/utils/auth"; | 3 | import { getToken, setToken, removeToken } from "@/utils/auth"; |
| 3 | import { MessageBox } from "element-ui"; | 4 | import { MessageBox } from "element-ui"; |
| 4 | 5 | ... | ... |
| ... | @@ -58,7 +58,7 @@ service.interceptors.response.use( | ... | @@ -58,7 +58,7 @@ service.interceptors.response.use( |
| 58 | const code = Number(res.data.code) || 200; | 58 | const code = Number(res.data.code) || 200; |
| 59 | // 获取错误信息 | 59 | // 获取错误信息 |
| 60 | const msg = errorCode[code] || res.data.msg || errorCode["default"]; | 60 | const msg = errorCode[code] || res.data.msg || errorCode["default"]; |
| 61 | - if (code === 301) { | 61 | + if (code === 10004) { |
| 62 | MessageBox.alert( | 62 | MessageBox.alert( |
| 63 | "The login status has expired. You can continue to stay on this page or log in again.", | 63 | "The login status has expired. You can continue to stay on this page or log in again.", |
| 64 | "System prompt", | 64 | "System prompt", | ... | ... |
| 1 | -<template> | ||
| 2 | - <div class="loginForm"> | ||
| 3 | - <FedexAlert | ||
| 4 | - v-if="errorTip.length > 0" | ||
| 5 | - class="mb20" | ||
| 6 | - :tipList="errorTip" | ||
| 7 | - @close="errorTipClose" | ||
| 8 | - /> | ||
| 9 | - <div v-if="loginType == 'login'"> | ||
| 10 | - <div class="form-title">{{ $t("login.userTitle") }}</div> | ||
| 11 | - <el-form | ||
| 12 | - class="fedexFormStyle" | ||
| 13 | - style="margin-top: 100px" | ||
| 14 | - ref="loginFormRef" | ||
| 15 | - :model="loginForm" | ||
| 16 | - :rules="loginRules" | ||
| 17 | - label-position="top" | ||
| 18 | - > | ||
| 19 | - <Formitem :label="$t('login.userNum')" prop="accNo"> | ||
| 20 | - <el-input | ||
| 21 | - type="text" | ||
| 22 | - :id="'inputInner--accNo'" | ||
| 23 | - v-model="loginForm.accNo" | ||
| 24 | - auto-complete="off" | ||
| 25 | - ></el-input> | ||
| 26 | - </Formitem> | ||
| 27 | - <Formitem :label="$t('login.passWord')" prop="password"> | ||
| 28 | - <el-input | ||
| 29 | - type="password" | ||
| 30 | - :id="'inputInner--password'" | ||
| 31 | - v-model="loginForm.password" | ||
| 32 | - show-password | ||
| 33 | - auto-complete="off" | ||
| 34 | - ></el-input> | ||
| 35 | - </Formitem> | ||
| 36 | - <el-checkbox class="mt10" v-model="loginForm.rememberMe">{{ | ||
| 37 | - $t("login.checkPassWord") | ||
| 38 | - }}</el-checkbox> | ||
| 39 | - </el-form> | ||
| 40 | - <div class="form-option"> | ||
| 41 | - <el-button | ||
| 42 | - class="entrySaveButton entrySaveButton-background" | ||
| 43 | - :loading="loading" | ||
| 44 | - size="medium" | ||
| 45 | - type="primary" | ||
| 46 | - @click.native.prevent="handleLogin" | ||
| 47 | - > | ||
| 48 | - <span v-if="!loading">{{ $t("login.loginBtn") }}</span> | ||
| 49 | - <span v-else>{{ $t("login.loggingBtn") }}</span> | ||
| 50 | - </el-button> | ||
| 51 | - </div> | ||
| 52 | - </div> | ||
| 53 | - <div v-else-if="loginType == 'rePassword'"> | ||
| 54 | - <div class="form-title">{{ $t("login.resetPassWord") }}</div> | ||
| 55 | - <div class="form-tip">{{ $t("login.resetTip") }}</div> | ||
| 56 | - <el-form | ||
| 57 | - class="fedexFormStyle" | ||
| 58 | - ref="rePassword" | ||
| 59 | - :model="rePasswordForm" | ||
| 60 | - :rules="rePasswordFormRules" | ||
| 61 | - label-position="top" | ||
| 62 | - > | ||
| 63 | - <Formitem :label="$t('login.userNum')" type="rePassword" prop="accNo"> | ||
| 64 | - <el-input | ||
| 65 | - type="text" | ||
| 66 | - :id="'inputInner-rePassword-accNo'" | ||
| 67 | - v-model="rePasswordForm.accNo" | ||
| 68 | - ></el-input> | ||
| 69 | - </Formitem> | ||
| 70 | - </el-form> | ||
| 71 | - <div class="form-option"> | ||
| 72 | - <el-button | ||
| 73 | - class="entrySaveButton entrySaveButton-background" | ||
| 74 | - size="medium" | ||
| 75 | - type="primary" | ||
| 76 | - @click="rePassword" | ||
| 77 | - >{{ $t("login.resetPassWordBtn") }}</el-button | ||
| 78 | - > | ||
| 79 | - <el-button | ||
| 80 | - class="entrySaveButton" | ||
| 81 | - size="medium" | ||
| 82 | - type="primary" | ||
| 83 | - @click="loginType = 'login'" | ||
| 84 | - >{{ $t("common.goBack") }}</el-button | ||
| 85 | - > | ||
| 86 | - </div> | ||
| 87 | - </div> | ||
| 88 | - | ||
| 89 | - <div v-else-if="loginType == 'create'"> | ||
| 90 | - <div class="form-title">{{ $t("login.createUserNum") }}</div> | ||
| 91 | - <div class="form-tip"></div> | ||
| 92 | - <el-form | ||
| 93 | - class="fedexFormStyle" | ||
| 94 | - ref="createUserRef" | ||
| 95 | - :model="createUserForm" | ||
| 96 | - :rules="createUserRules" | ||
| 97 | - label-position="top" | ||
| 98 | - > | ||
| 99 | - <el-row :gutter="10"> | ||
| 100 | - <el-col :span="12"> | ||
| 101 | - <Formitem :label="$t('login.userNum')" type="create" prop="accNo"> | ||
| 102 | - <el-input | ||
| 103 | - type="text" | ||
| 104 | - :id="'inputInner-create-accNo'" | ||
| 105 | - v-model="createUserForm.accNo" | ||
| 106 | - oninput="value = value.replace(/\s+/g,'')" | ||
| 107 | - auto-complete="off" | ||
| 108 | - ></el-input> | ||
| 109 | - </Formitem> | ||
| 110 | - </el-col> | ||
| 111 | - <el-col :span="12"> | ||
| 112 | - <Formitem | ||
| 113 | - :label="$t('login.userName')" | ||
| 114 | - type="create" | ||
| 115 | - prop="userName" | ||
| 116 | - > | ||
| 117 | - <el-input | ||
| 118 | - type="text" | ||
| 119 | - :id="'inputInner-create-userName'" | ||
| 120 | - v-model="createUserForm.userName" | ||
| 121 | - autocomplete="new-password" | ||
| 122 | - ></el-input> | ||
| 123 | - </Formitem> | ||
| 124 | - </el-col> | ||
| 125 | - </el-row> | ||
| 126 | - <el-row :gutter="10"> | ||
| 127 | - <el-col :span="12"> | ||
| 128 | - <Formitem | ||
| 129 | - :label="$t('login.passWord')" | ||
| 130 | - type="create" | ||
| 131 | - prop="password" | ||
| 132 | - > | ||
| 133 | - <el-input | ||
| 134 | - type="text" | ||
| 135 | - :id="'inputInner-create-password'" | ||
| 136 | - v-model="createUserForm.password" | ||
| 137 | - show-password | ||
| 138 | - autocomplete="new-password" | ||
| 139 | - ></el-input> | ||
| 140 | - </Formitem> | ||
| 141 | - </el-col> | ||
| 142 | - <el-col :span="12"> | ||
| 143 | - <Formitem | ||
| 144 | - :label="$t('login.confirmPassWord')" | ||
| 145 | - type="create" | ||
| 146 | - prop="password2" | ||
| 147 | - > | ||
| 148 | - <el-input | ||
| 149 | - type="text" | ||
| 150 | - :id="'inputInner-create-password2'" | ||
| 151 | - v-model="createUserForm.password2" | ||
| 152 | - show-password | ||
| 153 | - auto-complete="off" | ||
| 154 | - ></el-input> | ||
| 155 | - </Formitem> | ||
| 156 | - </el-col> | ||
| 157 | - </el-row> | ||
| 158 | - <el-row :gutter="10"> | ||
| 159 | - <el-col :span="12"> | ||
| 160 | - <Formitem | ||
| 161 | - :label="$t('login.fedexNum')" | ||
| 162 | - type="create" | ||
| 163 | - prop="fedexAccNo" | ||
| 164 | - > | ||
| 165 | - <el-input | ||
| 166 | - type="text" | ||
| 167 | - :id="'inputInner-create-fedexAccNo'" | ||
| 168 | - v-model="createUserForm.fedexAccNo" | ||
| 169 | - auto-complete="off" | ||
| 170 | - ></el-input> | ||
| 171 | - </Formitem> | ||
| 172 | - </el-col> | ||
| 173 | - <el-col :span="12"> | ||
| 174 | - <Formitem | ||
| 175 | - :label="$t('login.confirmFedexNum')" | ||
| 176 | - type="create" | ||
| 177 | - prop="fedexAccNo2" | ||
| 178 | - > | ||
| 179 | - <el-input | ||
| 180 | - type="text" | ||
| 181 | - :id="'inputInner-create-fedexAccNo2'" | ||
| 182 | - v-model="createUserForm.fedexAccNo2" | ||
| 183 | - auto-complete="off" | ||
| 184 | - ></el-input> | ||
| 185 | - </Formitem> | ||
| 186 | - </el-col> | ||
| 187 | - </el-row> | ||
| 188 | - <el-row :gutter="10"> | ||
| 189 | - <el-col :span="12"> | ||
| 190 | - <Formitem :label="$t('login.emailNum')" type="create" prop="email"> | ||
| 191 | - <el-input | ||
| 192 | - type="text" | ||
| 193 | - :id="'inputInner-create-email'" | ||
| 194 | - v-model="createUserForm.email" | ||
| 195 | - auto-complete="off" | ||
| 196 | - ></el-input> | ||
| 197 | - </Formitem> | ||
| 198 | - </el-col> | ||
| 199 | - <el-col :span="12"> | ||
| 200 | - <Formitem :label="$t('login.phone')" type="create" prop="phone"> | ||
| 201 | - <el-input | ||
| 202 | - type="text" | ||
| 203 | - :id="'inputInner-create-phone'" | ||
| 204 | - maxlength="40" | ||
| 205 | - v-model="createUserForm.phone" | ||
| 206 | - auto-complete="off" | ||
| 207 | - ></el-input> | ||
| 208 | - </Formitem> | ||
| 209 | - </el-col> | ||
| 210 | - </el-row> | ||
| 211 | - <el-row :gutter="10"> | ||
| 212 | - <el-col :span="12"> | ||
| 213 | - <Formitem | ||
| 214 | - :label="$t('login.company')" | ||
| 215 | - type="create" | ||
| 216 | - prop="companyName" | ||
| 217 | - > | ||
| 218 | - <el-input | ||
| 219 | - type="text" | ||
| 220 | - :id="'inputInner-create-companyName'" | ||
| 221 | - v-model="createUserForm.companyName" | ||
| 222 | - auto-complete="off" | ||
| 223 | - ></el-input> | ||
| 224 | - </Formitem> | ||
| 225 | - </el-col> | ||
| 226 | - <el-col :span="12"> | ||
| 227 | - <Formitem | ||
| 228 | - :label="$t('login.unifyNum')" | ||
| 229 | - type="create" | ||
| 230 | - prop="unifiedBusinessNum" | ||
| 231 | - > | ||
| 232 | - <el-input | ||
| 233 | - type="text" | ||
| 234 | - :id="'inputInner-create-unifiedBusinessNum'" | ||
| 235 | - maxlength="10" | ||
| 236 | - oninput="value = value.replace(/\s+/g, '')" | ||
| 237 | - v-model="createUserForm.unifiedBusinessNum" | ||
| 238 | - auto-complete="off" | ||
| 239 | - ></el-input> | ||
| 240 | - </Formitem> | ||
| 241 | - </el-col> | ||
| 242 | - </el-row> | ||
| 243 | - <el-row :gutter="10"> | ||
| 244 | - <el-col :span="12"> | ||
| 245 | - <Formitem | ||
| 246 | - :label="$t('login.customsNum')" | ||
| 247 | - type="create" | ||
| 248 | - prop="customsSerialNum" | ||
| 249 | - > | ||
| 250 | - <el-input | ||
| 251 | - type="text" | ||
| 252 | - :id="'inputInner-create-customsSerialNum'" | ||
| 253 | - v-model="createUserForm.customsSerialNum" | ||
| 254 | - auto-complete="off" | ||
| 255 | - ></el-input> | ||
| 256 | - </Formitem> | ||
| 257 | - </el-col> | ||
| 258 | - </el-row> | ||
| 259 | - <el-checkbox | ||
| 260 | - class="mt10" | ||
| 261 | - v-model="createUserForm.policyFlag" | ||
| 262 | - style="margin-right: 0px" | ||
| 263 | - >{{ $t("login.checkAgree1") }}</el-checkbox | ||
| 264 | - ><a @click="openPrivacy">{{ $t("login.policy1") }}</a> | ||
| 265 | - <el-checkbox v-model="createUserForm.clauseFlag">{{ | ||
| 266 | - $t("login.checkAgree2_1") | ||
| 267 | - }}</el-checkbox> | ||
| 268 | - <span>{{ $t("login.policy2") }}</span> | ||
| 269 | - <span>{{ $t("login.checkAgree2_2") }}</span | ||
| 270 | - ><a @click="openTermPdf">{{ $t("login.policy3") }}</a | ||
| 271 | - ><span>{{ $t("login.checkAgree2_3") }}</span> | ||
| 272 | - </el-form> | ||
| 273 | - <div class="form-option"> | ||
| 274 | - <el-button | ||
| 275 | - class="entrySaveButton entrySaveButton-background" | ||
| 276 | - size="medium" | ||
| 277 | - type="primary" | ||
| 278 | - @click="createUser" | ||
| 279 | - >{{ $t("common.submitBtn") }}</el-button | ||
| 280 | - > | ||
| 281 | - <el-button | ||
| 282 | - class="entrySaveButton" | ||
| 283 | - size="medium" | ||
| 284 | - type="primary" | ||
| 285 | - @click="loginType = 'login'" | ||
| 286 | - >{{ $t("common.goBack") }}</el-button | ||
| 287 | - > | ||
| 288 | - </div> | ||
| 289 | - </div> | ||
| 290 | - <div v-else-if="loginType == 'reset'"> | ||
| 291 | - <div class="form-title">忘記了您的用户密碼?</div> | ||
| 292 | - <div class="form-tip">提供您的用戶帳號</div> | ||
| 293 | - <div class="form-option"> | ||
| 294 | - <el-button | ||
| 295 | - class="entrySaveButton entrySaveButton-background" | ||
| 296 | - size="medium" | ||
| 297 | - type="primary" | ||
| 298 | - @click="loginType = 'rePassword'" | ||
| 299 | - >重置密码</el-button | ||
| 300 | - > | ||
| 301 | - <el-button | ||
| 302 | - class="entrySaveButton" | ||
| 303 | - size="medium" | ||
| 304 | - type="primary" | ||
| 305 | - @click="loginType = 'login'" | ||
| 306 | - >{{ $t("common.goBack") }}</el-button | ||
| 307 | - > | ||
| 308 | - </div> | ||
| 309 | - </div> | ||
| 310 | - <!-- 修改密码 --> | ||
| 311 | - <div v-else-if="loginType == 'resetPwd'"> | ||
| 312 | - <div class="form-title"> | ||
| 313 | - {{ $t("login.loginPassword.resetPassword.title") }} | ||
| 314 | - </div> | ||
| 315 | - <div class="form-tip"> | ||
| 316 | - {{ $t("login.loginPassword.resetPassword.tip") }} | ||
| 317 | - </div> | ||
| 318 | - <el-form | ||
| 319 | - class="fedexFormStyle" | ||
| 320 | - ref="resetPassword" | ||
| 321 | - :model="resetPasswordForm" | ||
| 322 | - :rules="resetPasswordRules" | ||
| 323 | - label-position="top" | ||
| 324 | - > | ||
| 325 | - <Formitem | ||
| 326 | - :label="$t('login.loginPassword.resetPassword.loginNameLabel')" | ||
| 327 | - type="reset" | ||
| 328 | - prop="loginName" | ||
| 329 | - > | ||
| 330 | - <el-input | ||
| 331 | - type="text" | ||
| 332 | - :id="'inputInner-reset-loginName'" | ||
| 333 | - v-model="resetPasswordForm.loginName" | ||
| 334 | - disabled | ||
| 335 | - autocomplete="new-password" | ||
| 336 | - ></el-input> | ||
| 337 | - </Formitem> | ||
| 338 | - <div class="formTitle" style="font-size: 16px; margin-top: 30px"> | ||
| 339 | - {{ $t("login.loginPassword.resetPassword.password") | ||
| 340 | - }}<span class="tip">{{ | ||
| 341 | - $t("login.loginPassword.resetPassword.passwordTip") | ||
| 342 | - }}</span> | ||
| 343 | - </div> | ||
| 344 | - <Formitem | ||
| 345 | - :label="$t('login.loginPassword.resetPassword.newPassword')" | ||
| 346 | - type="reset" | ||
| 347 | - prop="password" | ||
| 348 | - > | ||
| 349 | - <el-input | ||
| 350 | - type="password" | ||
| 351 | - :id="'inputInner-reset-password'" | ||
| 352 | - v-model="resetPasswordForm.password" | ||
| 353 | - show-password | ||
| 354 | - autocomplete="new-password" | ||
| 355 | - ></el-input> | ||
| 356 | - </Formitem> | ||
| 357 | - <Formitem | ||
| 358 | - :label="$t('login.loginPassword.resetPassword.confirmPassword')" | ||
| 359 | - type="reset" | ||
| 360 | - prop="confirmPassword" | ||
| 361 | - > | ||
| 362 | - <el-input | ||
| 363 | - type="password" | ||
| 364 | - :id="'inputInner-reset-confirmPassword'" | ||
| 365 | - show-password | ||
| 366 | - v-model="resetPasswordForm.confirmPassword" | ||
| 367 | - autocomplete="new-password" | ||
| 368 | - ></el-input> | ||
| 369 | - </Formitem> | ||
| 370 | - </el-form> | ||
| 371 | - <div class="form-option"> | ||
| 372 | - <el-button | ||
| 373 | - class="entrySaveButton entrySaveButton-background" | ||
| 374 | - size="medium" | ||
| 375 | - type="primary" | ||
| 376 | - :loading="loading" | ||
| 377 | - @click="resetPasswordSubmit" | ||
| 378 | - >{{ $t("common.submitBtn") }}</el-button | ||
| 379 | - > | ||
| 380 | - <el-button | ||
| 381 | - class="entrySaveButton" | ||
| 382 | - size="medium" | ||
| 383 | - type="primary" | ||
| 384 | - @click="loginType = 'login'" | ||
| 385 | - >{{ $t("common.goBack") }}</el-button | ||
| 386 | - > | ||
| 387 | - </div> | ||
| 388 | - </div> | ||
| 389 | - </div> | ||
| 390 | -</template> | ||
| 391 | - | ||
| 392 | -<script> | ||
| 393 | -import { | ||
| 394 | - addUser, | ||
| 395 | - getUserByAccNo, | ||
| 396 | - updPwd, | ||
| 397 | - resetPwd, | ||
| 398 | - verifyResetPwd, | ||
| 399 | -} from "@/api/login.js"; | ||
| 400 | -export default { | ||
| 401 | - props: { | ||
| 402 | - loginType: { | ||
| 403 | - type: String, | ||
| 404 | - default: "login", | ||
| 405 | - }, | ||
| 406 | - loginName: { | ||
| 407 | - type: String, | ||
| 408 | - default: "", | ||
| 409 | - }, | ||
| 410 | - }, | ||
| 411 | - data() { | ||
| 412 | - return { | ||
| 413 | - linkList: { | ||
| 414 | - privacy: process.env.VUE_APP_PRIVACT_POLICY, | ||
| 415 | - term: process.env.VUE_APP_EXPRESS_FREIGHT_TERM, | ||
| 416 | - }, | ||
| 417 | - loginForm: { | ||
| 418 | - accNo: "", | ||
| 419 | - password: "", | ||
| 420 | - rememberMe: false, | ||
| 421 | - }, | ||
| 422 | - createUserForm: { | ||
| 423 | - accNo: "", | ||
| 424 | - userName: "", | ||
| 425 | - password: "", | ||
| 426 | - password2: "", | ||
| 427 | - fedexAccNo: "", | ||
| 428 | - fedexAccNo2: "", | ||
| 429 | - email: "", | ||
| 430 | - phone: "", | ||
| 431 | - companyName: "", | ||
| 432 | - unifiedBusinessNum: "", | ||
| 433 | - customsSerialNum: "", | ||
| 434 | - policyFlag: false, | ||
| 435 | - clauseFlag: false, | ||
| 436 | - }, | ||
| 437 | - rePasswordForm: { | ||
| 438 | - username: "", | ||
| 439 | - }, //重置密码数据 | ||
| 440 | - resetPasswordForm: { | ||
| 441 | - loginName: "", | ||
| 442 | - password: null, | ||
| 443 | - confirmPassword: null, | ||
| 444 | - }, | ||
| 445 | - rePasswordData: null, | ||
| 446 | - loginRules: { | ||
| 447 | - accNo: [ | ||
| 448 | - { | ||
| 449 | - required: true, | ||
| 450 | - trigger: "blur", | ||
| 451 | - message: "User account cannot be empty.", | ||
| 452 | - }, | ||
| 453 | - ], | ||
| 454 | - password: [ | ||
| 455 | - { | ||
| 456 | - required: true, | ||
| 457 | - trigger: "blur", | ||
| 458 | - message: "Password cannot be empty.", | ||
| 459 | - }, | ||
| 460 | - ], | ||
| 461 | - }, | ||
| 462 | - rePasswordFormRules: { | ||
| 463 | - accNo: [ | ||
| 464 | - { | ||
| 465 | - required: true, | ||
| 466 | - trigger: "blur", | ||
| 467 | - message: "User account cannot be empty.", | ||
| 468 | - }, | ||
| 469 | - ], | ||
| 470 | - }, | ||
| 471 | - createUserRules: { | ||
| 472 | - accNo: [ | ||
| 473 | - { | ||
| 474 | - required: true, | ||
| 475 | - trigger: "blur", | ||
| 476 | - message: "User account cannot be empty.", | ||
| 477 | - }, | ||
| 478 | - { | ||
| 479 | - validator: (rule, value, callback) => { | ||
| 480 | - if (this.regExp.pattern.test(value)) { | ||
| 481 | - callback( | ||
| 482 | - "The username does not allow special characters or spaces!" | ||
| 483 | - ); | ||
| 484 | - } else { | ||
| 485 | - getUserByAccNo(value) | ||
| 486 | - .then((res) => { | ||
| 487 | - if (res.code == 200) { | ||
| 488 | - callback("The username already exists, please change it"); | ||
| 489 | - } else { | ||
| 490 | - callback(res.message); | ||
| 491 | - } | ||
| 492 | - }) | ||
| 493 | - .catch((err) => { | ||
| 494 | - console.log(err); | ||
| 495 | - }); | ||
| 496 | - } | ||
| 497 | - }, | ||
| 498 | - trigger: "blur", | ||
| 499 | - }, | ||
| 500 | - ], | ||
| 501 | - userName: [ | ||
| 502 | - { required: true, trigger: "blur", message: "姓名不能為空" }, | ||
| 503 | - { | ||
| 504 | - validator: (rule, value, callback) => { | ||
| 505 | - if (this.regExp.pattern.test(value)) { | ||
| 506 | - callback("姓名不允許存在特殊字符以及空格!"); | ||
| 507 | - } else { | ||
| 508 | - callback(); | ||
| 509 | - } | ||
| 510 | - }, | ||
| 511 | - trigger: "blur", | ||
| 512 | - }, | ||
| 513 | - ], | ||
| 514 | - password: [ | ||
| 515 | - { required: true, trigger: "blur", message: "密碼不能為空" }, | ||
| 516 | - { | ||
| 517 | - validator: (rule, value, callback) => { | ||
| 518 | - if (!this.regExp.passwordExp.test(value)) { | ||
| 519 | - callback("大小寫字母加數字的組合,至少8位!"); | ||
| 520 | - } else { | ||
| 521 | - callback(); | ||
| 522 | - } | ||
| 523 | - }, | ||
| 524 | - trigger: "blur", | ||
| 525 | - }, | ||
| 526 | - ], | ||
| 527 | - password2: [ | ||
| 528 | - { required: true, trigger: "blur", message: "確認密碼不能為空" }, | ||
| 529 | - { | ||
| 530 | - validator: (rule, value, callback) => { | ||
| 531 | - if (value != this.createUserForm.password) { | ||
| 532 | - callback("確認密碼必須和新密碼相同!"); | ||
| 533 | - } else { | ||
| 534 | - callback(); | ||
| 535 | - } | ||
| 536 | - }, | ||
| 537 | - trigger: "blur", | ||
| 538 | - }, | ||
| 539 | - ], | ||
| 540 | - fedexAccNo: [ | ||
| 541 | - { required: true, trigger: "blur", message: "FedEx帳戶不能為空" }, | ||
| 542 | - { | ||
| 543 | - validator: (rule, value, callback) => { | ||
| 544 | - if (value.length != 9) { | ||
| 545 | - callback("FedEx帳戶必須為9位!"); | ||
| 546 | - } else { | ||
| 547 | - callback(); | ||
| 548 | - } | ||
| 549 | - }, | ||
| 550 | - trigger: "blur", | ||
| 551 | - }, | ||
| 552 | - ], | ||
| 553 | - fedexAccNo2: [ | ||
| 554 | - { required: true, trigger: "blur", message: "確認FedEx帳戶不能為空" }, | ||
| 555 | - { | ||
| 556 | - validator: (rule, value, callback) => { | ||
| 557 | - if (value != this.createUserForm.fedexAccNo) { | ||
| 558 | - callback("兩次輸入的FedEx賬戶不一致!"); | ||
| 559 | - } else { | ||
| 560 | - callback(); | ||
| 561 | - } | ||
| 562 | - }, | ||
| 563 | - trigger: "blur", | ||
| 564 | - }, | ||
| 565 | - ], | ||
| 566 | - email: [ | ||
| 567 | - { required: true, trigger: "blur", message: "郵箱不能為空" }, | ||
| 568 | - { | ||
| 569 | - validator: (rule, value, callback) => { | ||
| 570 | - if (!this.regExp.email.test(value)) { | ||
| 571 | - callback("郵箱格式不正確!"); | ||
| 572 | - } else if (this.regExp.emailPattern.test(value)) { | ||
| 573 | - callback("郵箱地址不允許存在特殊字符以及空格!"); | ||
| 574 | - } else { | ||
| 575 | - callback(); | ||
| 576 | - } | ||
| 577 | - }, | ||
| 578 | - trigger: "blur", | ||
| 579 | - }, | ||
| 580 | - ], | ||
| 581 | - phone: [ | ||
| 582 | - { required: true, trigger: "blur", message: "聯系電話不能為空" }, | ||
| 583 | - { | ||
| 584 | - validator: (rule, value, callback) => { | ||
| 585 | - if (this.regExp.pattern.test(value)) { | ||
| 586 | - callback("電話不允許存在特殊字符以及空格!"); | ||
| 587 | - } else { | ||
| 588 | - callback(); | ||
| 589 | - } | ||
| 590 | - }, | ||
| 591 | - trigger: "blur", | ||
| 592 | - }, | ||
| 593 | - ], | ||
| 594 | - companyName: [ | ||
| 595 | - { required: true, trigger: "blur", message: "公司名稱不能為空" }, | ||
| 596 | - ], | ||
| 597 | - unifiedBusinessNum: [ | ||
| 598 | - { | ||
| 599 | - required: true, | ||
| 600 | - trigger: "blur", | ||
| 601 | - message: "請您輸入貨物輸出人統一編號", | ||
| 602 | - }, | ||
| 603 | - { | ||
| 604 | - validator: (rule, value, callback) => { | ||
| 605 | - if (!this.regExp.expNumExp.test(value)) { | ||
| 606 | - callback("貨物輸出統一編號必須是8-10位纯數字"); | ||
| 607 | - } else { | ||
| 608 | - callback(); | ||
| 609 | - } | ||
| 610 | - // if (value) { | ||
| 611 | - // if (value.length < 8 || value.length > 10) { | ||
| 612 | - // callback("貨物輸出統一編號必須是8-10位!"); | ||
| 613 | - // } else { | ||
| 614 | - // callback(); | ||
| 615 | - // } | ||
| 616 | - // } else { | ||
| 617 | - // callback(); | ||
| 618 | - // } | ||
| 619 | - }, | ||
| 620 | - trigger: "blur", | ||
| 621 | - }, | ||
| 622 | - ], | ||
| 623 | - }, | ||
| 624 | - resetPasswordRules: { | ||
| 625 | - loginName: [ | ||
| 626 | - { | ||
| 627 | - required: true, | ||
| 628 | - trigger: "blur", | ||
| 629 | - message: this.$t("login.loginPassword.formCheck.resetloginName"), | ||
| 630 | - }, | ||
| 631 | - ], | ||
| 632 | - password: [ | ||
| 633 | - { | ||
| 634 | - required: true, | ||
| 635 | - trigger: "blur", | ||
| 636 | - message: this.$t( | ||
| 637 | - "login.loginPassword.formCheck.resetPasswordPassword" | ||
| 638 | - ), | ||
| 639 | - }, | ||
| 640 | - { | ||
| 641 | - validator: (rule, value, callback) => { | ||
| 642 | - if (!this.regExp.passwordExp.test(value)) { | ||
| 643 | - callback( | ||
| 644 | - this.$t("login.loginPassword.resetPassword.passwordTip") | ||
| 645 | - ); | ||
| 646 | - } else { | ||
| 647 | - callback(); | ||
| 648 | - } | ||
| 649 | - }, | ||
| 650 | - trigger: "blur", | ||
| 651 | - }, | ||
| 652 | - ], | ||
| 653 | - confirmPassword: [ | ||
| 654 | - { | ||
| 655 | - required: true, | ||
| 656 | - trigger: "blur", | ||
| 657 | - message: this.$t( | ||
| 658 | - "login.loginPassword.formCheck.resetPasswordConfirmPassword1" | ||
| 659 | - ), | ||
| 660 | - }, | ||
| 661 | - { | ||
| 662 | - validator: (rule, value, callback) => { | ||
| 663 | - if (value != this.resetPasswordForm.password) { | ||
| 664 | - callback( | ||
| 665 | - this.$t( | ||
| 666 | - "login.loginPassword.formCheck.resetPasswordConfirmPassword2" | ||
| 667 | - ) | ||
| 668 | - ); | ||
| 669 | - } else { | ||
| 670 | - callback(); | ||
| 671 | - } | ||
| 672 | - }, | ||
| 673 | - trigger: "blur", | ||
| 674 | - }, | ||
| 675 | - ], | ||
| 676 | - }, | ||
| 677 | - loading: false, | ||
| 678 | - redirect: undefined, | ||
| 679 | - errorTip: [], | ||
| 680 | - }; | ||
| 681 | - }, | ||
| 682 | - created() { | ||
| 683 | - if (localStorage.getItem("rememberMe")) { | ||
| 684 | - this.loginForm = { | ||
| 685 | - accNo: localStorage.getItem("accNo"), | ||
| 686 | - password: localStorage.getItem("passwordItem"), | ||
| 687 | - rememberMe: JSON.parse(localStorage.getItem("rememberMe")), | ||
| 688 | - }; | ||
| 689 | - } | ||
| 690 | - }, | ||
| 691 | - watch: { | ||
| 692 | - $route: { | ||
| 693 | - handler: function (route) { | ||
| 694 | - this.redirect = route.query && route.query.redirect; | ||
| 695 | - if (route.query.changePasswordType) { | ||
| 696 | - // route.query.changePasswordType == 'resetPwd' ? | ||
| 697 | - // this.resetPasswordForm.loginName = route.query.loginname : this.resetPasswordForm.loginName = ''; | ||
| 698 | - if ( | ||
| 699 | - route.query.changePasswordType == "resetPwd" && | ||
| 700 | - route.query.loginname | ||
| 701 | - ) { | ||
| 702 | - verifyResetPwd(route.query.loginname).then((res) => { | ||
| 703 | - if (res.code == 200) { | ||
| 704 | - this.rePasswordData = res; | ||
| 705 | - this.resetPasswordForm.loginName = res.data; | ||
| 706 | - } else { | ||
| 707 | - this.$alert(res.msg, "提示", { | ||
| 708 | - dangerouslyUseHTMLString: true, | ||
| 709 | - type: "error", | ||
| 710 | - }); | ||
| 711 | - this.resetPasswordForm.loginName = ""; | ||
| 712 | - } | ||
| 713 | - }); | ||
| 714 | - } | ||
| 715 | - } | ||
| 716 | - }, | ||
| 717 | - immediate: true, | ||
| 718 | - }, | ||
| 719 | - }, | ||
| 720 | - methods: { | ||
| 721 | - handleLogin() { | ||
| 722 | - this.$refs.loginFormRef.validate((valid) => { | ||
| 723 | - if (valid) { | ||
| 724 | - this.loading = true; | ||
| 725 | - if (this.loginForm.rememberMe) { | ||
| 726 | - localStorage.setItem("accNo", this.loginForm.accNo, { | ||
| 727 | - expires: 30, | ||
| 728 | - }); | ||
| 729 | - localStorage.setItem("passwordItem", this.loginForm.password, { | ||
| 730 | - expires: 30, | ||
| 731 | - }); | ||
| 732 | - localStorage.setItem("rememberMe", this.loginForm.rememberMe, { | ||
| 733 | - expires: 30, | ||
| 734 | - }); | ||
| 735 | - } else { | ||
| 736 | - localStorage.removeItem("accNo"); | ||
| 737 | - localStorage.removeItem("passwordItem"); | ||
| 738 | - localStorage.removeItem("rememberMe"); | ||
| 739 | - } | ||
| 740 | - this.$store | ||
| 741 | - .dispatch("Login", this.loginForm) | ||
| 742 | - .then(() => { | ||
| 743 | - this.$router.push({ name: "WaybillInquiry" }).catch(() => { | ||
| 744 | - this.loading = false; | ||
| 745 | - }); | ||
| 746 | - }) | ||
| 747 | - .catch(() => { | ||
| 748 | - this.loading = false; | ||
| 749 | - }); | ||
| 750 | - } | ||
| 751 | - }); | ||
| 752 | - }, | ||
| 753 | - createUser() { | ||
| 754 | - this.errorTip = []; | ||
| 755 | - if (this.createUserForm.policyFlag && this.createUserForm.clauseFlag) { | ||
| 756 | - this.$refs.createUserRef.validate((valid) => { | ||
| 757 | - if (valid) { | ||
| 758 | - addUser(this.createUserForm) | ||
| 759 | - .then((res) => { | ||
| 760 | - if (res.code == "200") { | ||
| 761 | - this.$alert("註冊成功", "提示", { | ||
| 762 | - dangerouslyUseHTMLString: true, | ||
| 763 | - type: "success", | ||
| 764 | - }) | ||
| 765 | - .then(() => { | ||
| 766 | - this.loginType = "login"; | ||
| 767 | - }) | ||
| 768 | - .catch(() => { | ||
| 769 | - this.loginType = "login"; | ||
| 770 | - }); | ||
| 771 | - } else { | ||
| 772 | - this.errorTip = [res.msg]; | ||
| 773 | - } | ||
| 774 | - }) | ||
| 775 | - .catch((err) => { | ||
| 776 | - console.log(err); | ||
| 777 | - }); | ||
| 778 | - } | ||
| 779 | - }); | ||
| 780 | - } else { | ||
| 781 | - this.errorTip = ["请先確認相关协议政策后在进行提交!"]; | ||
| 782 | - } | ||
| 783 | - }, | ||
| 784 | - rePassword() { | ||
| 785 | - this.$refs.rePassword.validate((valid) => { | ||
| 786 | - if (valid) { | ||
| 787 | - //根据用户账号发送修改密码邮件 | ||
| 788 | - updPwd(this.rePasswordForm.accNo) | ||
| 789 | - .then((res) => { | ||
| 790 | - if (res.code == 200) { | ||
| 791 | - this.$alert( | ||
| 792 | - this.$t("login.loginPassword.resetPassword.sendEmail"), | ||
| 793 | - "提示", | ||
| 794 | - { | ||
| 795 | - dangerouslyUseHTMLString: true, | ||
| 796 | - type: "success", | ||
| 797 | - } | ||
| 798 | - ).then(() => { | ||
| 799 | - this.loginType = "login"; | ||
| 800 | - }); | ||
| 801 | - } else { | ||
| 802 | - this.$alert(res.msg, "提示", { | ||
| 803 | - dangerouslyUseHTMLString: true, | ||
| 804 | - type: "warning", | ||
| 805 | - }); | ||
| 806 | - } | ||
| 807 | - }) | ||
| 808 | - .catch((err) => { | ||
| 809 | - console.log(err); | ||
| 810 | - }); | ||
| 811 | - } | ||
| 812 | - }); | ||
| 813 | - }, | ||
| 814 | - errorTipClose() { | ||
| 815 | - this.errorTip = []; | ||
| 816 | - }, | ||
| 817 | - openPrivacy() { | ||
| 818 | - window.open(this.linkList.privacy); | ||
| 819 | - }, | ||
| 820 | - openTermPdf() { | ||
| 821 | - window.open(this.linkList.term); | ||
| 822 | - }, | ||
| 823 | - //重置密码 | ||
| 824 | - resetPasswordSubmit() { | ||
| 825 | - this.$refs.resetPassword.validate((valid) => { | ||
| 826 | - if (valid) { | ||
| 827 | - // verifyResetPwd(this.resetPasswordForm.loginName).then(res => { | ||
| 828 | - if (this.rePasswordData.code == 200) { | ||
| 829 | - resetPwd({ | ||
| 830 | - accNo: this.rePasswordData.data, | ||
| 831 | - newPwd: this.resetPasswordForm.password, | ||
| 832 | - newPwd2: this.resetPasswordForm.confirmPassword, | ||
| 833 | - }).then((res1) => { | ||
| 834 | - if (res1.code == 200) { | ||
| 835 | - this.$alert(res1.msg, "提示", { | ||
| 836 | - dangerouslyUseHTMLString: true, | ||
| 837 | - type: "success", | ||
| 838 | - }).then(() => { | ||
| 839 | - location.href = "/ImpPer/#/login"; | ||
| 840 | - this.loginType = "login"; | ||
| 841 | - }); | ||
| 842 | - } else { | ||
| 843 | - this.$alert(res1.msg, "提示", { | ||
| 844 | - dangerouslyUseHTMLString: true, | ||
| 845 | - type: "warning", | ||
| 846 | - }); | ||
| 847 | - } | ||
| 848 | - }); | ||
| 849 | - } else { | ||
| 850 | - this.$alert(this.rePasswordData.msg, "提示", { | ||
| 851 | - dangerouslyUseHTMLString: true, | ||
| 852 | - type: "warning", | ||
| 853 | - }); | ||
| 854 | - } | ||
| 855 | - // }) | ||
| 856 | - } | ||
| 857 | - }); | ||
| 858 | - }, | ||
| 859 | - errorTipClose() { | ||
| 860 | - this.errorTip = []; | ||
| 861 | - }, | ||
| 862 | - }, | ||
| 863 | -}; | ||
| 864 | -</script> | ||
| 865 | - | ||
| 866 | -<style rel="stylesheet/scss" lang="scss"> | ||
| 867 | -@import "@/assets/styles/variables.scss"; | ||
| 868 | - | ||
| 869 | -.loginForm { | ||
| 870 | - max-width: 970px; | ||
| 871 | - height: auto; | ||
| 872 | - margin: 0 auto; | ||
| 873 | - padding-top: 6rem; | ||
| 874 | - padding-bottom: 50px; | ||
| 875 | - | ||
| 876 | - .form-title { | ||
| 877 | - font-size: 40px; | ||
| 878 | - font-weight: 400; | ||
| 879 | - color: #000; | ||
| 880 | - text-align: center; | ||
| 881 | - margin-bottom: 10px; | ||
| 882 | - } | ||
| 883 | - | ||
| 884 | - .form-tip { | ||
| 885 | - text-align: center; | ||
| 886 | - font-size: 14px; | ||
| 887 | - font-weight: 600; | ||
| 888 | - margin-bottom: 60px; | ||
| 889 | - } | ||
| 890 | - | ||
| 891 | - .buttonType { | ||
| 892 | - cursor: pointer; | ||
| 893 | - color: $fedexButton; | ||
| 894 | - } | ||
| 895 | - | ||
| 896 | - .fedexFormStyle { | ||
| 897 | - width: 70%; | ||
| 898 | - margin: 0 auto; | ||
| 899 | - | ||
| 900 | - a { | ||
| 901 | - font-size: 12px; | ||
| 902 | - color: $fedexButton; | ||
| 903 | - } | ||
| 904 | - | ||
| 905 | - span { | ||
| 906 | - font-size: 12px; | ||
| 907 | - color: #606266; | ||
| 908 | - } | ||
| 909 | - } | ||
| 910 | - | ||
| 911 | - .form-option { | ||
| 912 | - text-align: center; | ||
| 913 | - margin-top: 100px; | ||
| 914 | - | ||
| 915 | - .el-button { | ||
| 916 | - min-width: 120px; | ||
| 917 | - height: 60px; | ||
| 918 | - font-size: 16px; | ||
| 919 | - } | ||
| 920 | - | ||
| 921 | - .rePassword { | ||
| 922 | - font-size: 14px; | ||
| 923 | - font-weight: 600; | ||
| 924 | - margin-top: 15px; | ||
| 925 | - } | ||
| 926 | - } | ||
| 927 | -} | ||
| 928 | -</style> |
| ... | @@ -96,7 +96,6 @@ | ... | @@ -96,7 +96,6 @@ |
| 96 | v-else | 96 | v-else |
| 97 | style="width: 100%; height: calc(100% - 75px); background-color: #fff" | 97 | style="width: 100%; height: calc(100% - 75px); background-color: #fff" |
| 98 | > | 98 | > |
| 99 | - <loginForm :loginType="loginType"></loginForm> | ||
| 100 | </div> | 99 | </div> |
| 101 | <div class="footer" v-if="!login"> | 100 | <div class="footer" v-if="!login"> |
| 102 | <span>FedEx Online Declaration Platform</span> | 101 | <span>FedEx Online Declaration Platform</span> |
| ... | @@ -113,7 +112,6 @@ | ... | @@ -113,7 +112,6 @@ |
| 113 | 112 | ||
| 114 | <script> | 113 | <script> |
| 115 | import { Navbar } from "@/layout/components"; | 114 | import { Navbar } from "@/layout/components"; |
| 116 | -import loginForm from "./fedexLogin/loginForm.vue"; | ||
| 117 | import { getToken, setToken, removeToken } from "@/utils/auth"; | 115 | import { getToken, setToken, removeToken } from "@/utils/auth"; |
| 118 | import { fclInit } from "@/api/login.js"; | 116 | import { fclInit } from "@/api/login.js"; |
| 119 | 117 | ||
| ... | @@ -121,7 +119,6 @@ export default { | ... | @@ -121,7 +119,6 @@ export default { |
| 121 | name: "Login", | 119 | name: "Login", |
| 122 | components: { | 120 | components: { |
| 123 | Navbar, | 121 | Navbar, |
| 124 | - loginForm, | ||
| 125 | }, | 122 | }, |
| 126 | data() { | 123 | data() { |
| 127 | return { | 124 | return { |
| ... | @@ -246,7 +243,7 @@ export default { | ... | @@ -246,7 +243,7 @@ export default { |
| 246 | localStorage.setItem("impPreHost", location.origin); | 243 | localStorage.setItem("impPreHost", location.origin); |
| 247 | this.fclLoginAddr = `http://192.168.1.251/time.html?replaceUrl=${ | 244 | this.fclLoginAddr = `http://192.168.1.251/time.html?replaceUrl=${ |
| 248 | location.origin | 245 | location.origin |
| 249 | - }/ImpPer/#/redjrectLogin&loginUrl=/icleartw/auth/login&d=${new Date().getTime()}`; | 246 | + }&loginUrl=/manager-server/auth/wlgnForward&d=${new Date().getTime()}`; |
| 250 | } else { | 247 | } else { |
| 251 | this.fclLoginAddr = res.data; | 248 | this.fclLoginAddr = res.data; |
| 252 | } | 249 | } | ... | ... |
-
Please register or login to post a comment