整理代码!
This commit is contained in:
parent
bee1061e20
commit
7dbd48152f
@ -32,10 +32,10 @@ CREATE OR REPLACE PACKAGE BODY telsale_archievement_pkg IS
|
||||
a_end_date);
|
||||
|
||||
FOR caller_record IN (SELECT *
|
||||
FROM 车非每日保费_t)
|
||||
FROM desktop_archievement_admin.车非每日保费_t)
|
||||
LOOP
|
||||
BEGIN
|
||||
DELETE 车非每日保费 cf
|
||||
DELETE desktop_archievement_admin.车非每日保费 cf
|
||||
WHERE cf.签单日期 = caller_record.签单日期
|
||||
AND cf.部门 = caller_record.部门
|
||||
AND cf.经办人n = caller_record.经办人n
|
||||
@ -45,7 +45,7 @@ CREATE OR REPLACE PACKAGE BODY telsale_archievement_pkg IS
|
||||
NULL;
|
||||
END;
|
||||
|
||||
INSERT INTO 车非每日保费
|
||||
INSERT INTO desktop_archievement_admin.车非每日保费
|
||||
VALUES caller_record;
|
||||
|
||||
END LOOP;
|
||||
@ -62,9 +62,9 @@ CREATE OR REPLACE PACKAGE BODY telsale_archievement_pkg IS
|
||||
a_end_date IN DATE
|
||||
) IS
|
||||
BEGIN
|
||||
EXECUTE IMMEDIATE 'truncate table 车非每日保费_t';
|
||||
EXECUTE IMMEDIATE 'truncate table desktop_archievement_admin.车非每日保费_t';
|
||||
|
||||
INSERT INTO 车非每日保费_t
|
||||
INSERT INTO desktop_archievement_admin.车非每日保费_t
|
||||
WITH aa AS
|
||||
(SELECT to_char(t.signature_date,
|
||||
'yyyy-mm-dd') 签单日期,
|
||||
|
@ -22,6 +22,7 @@ module.exports = {
|
||||
extends:["eslint:recommended",],
|
||||
rules:{
|
||||
indent: ["warn", 4,],
|
||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-unused-vars": "warn",
|
||||
@ -73,7 +74,7 @@ module.exports = {
|
||||
],
|
||||
rules: {
|
||||
indent: ["warn", 4,],
|
||||
// "space-in-parens": ["error", "always", { exceptions: ["empty",], },],
|
||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-unused-vars": "warn",
|
||||
@ -136,7 +137,7 @@ module.exports = {
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
],
|
||||
rules: {
|
||||
"space-in-parens": ["error", "always", { exceptions: ["empty",], },],
|
||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"@typescript-eslint/indent": ["error", 4,],
|
||||
|
@ -12,7 +12,13 @@
|
||||
<span class="company-name">CPIC</span>
|
||||
<div class="version-wrapper">
|
||||
<span>测试版</span>
|
||||
<span>3.6.7 x64 Build 202208301257</span>
|
||||
<span>Build-202303251257</span>
|
||||
</div>
|
||||
<div class="button-wrapper">
|
||||
<component
|
||||
:is="'user'"
|
||||
class="icons"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-15 09:25:52
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-03-23 16:32:01
|
||||
* @LastEditTime: 2023-03-24 14:34:52
|
||||
* @FilePath: /task_schedule/src/main.js
|
||||
* @Description:
|
||||
*
|
||||
|
@ -11,7 +11,7 @@
|
||||
import { type AxiosResponse } from "axios";
|
||||
import { service as instance } from "./api/request.js";
|
||||
import { API_URL } from "./api/config.js";
|
||||
import { cleanStaffInfo } from "./api/localStorage.js";
|
||||
import { cleanStaffInfo, clearCallerInfo } from "./api/localStorage.js";
|
||||
|
||||
// @ts-expect-error 之后再补充类型文件
|
||||
import { router } from "../router/index.js";
|
||||
@ -38,6 +38,7 @@ async function login( data: LoginInfo ): Promise<AxiosResponse<any, any>>
|
||||
function logout(): void
|
||||
{
|
||||
cleanStaffInfo();
|
||||
clearCallerInfo();
|
||||
|
||||
void router.push( "/login" );
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
import { StaffInfo } from "@/data/cpicxim/StaffInfo.js";
|
||||
|
||||
const STUFF_ITEM = "stuff_info";
|
||||
const CALLER_ITEM = "call_info";
|
||||
const USER_TYPE_ITEM = "user_type";
|
||||
|
||||
function loadStaffInfo(): StaffInfo
|
||||
@ -61,10 +62,28 @@ function getUserType(): string
|
||||
return userType;
|
||||
}
|
||||
|
||||
function saveCallerInfo( callerCode: string ): void
|
||||
{
|
||||
window.localStorage.setItem( CALLER_ITEM, callerCode );
|
||||
}
|
||||
|
||||
function getCallerInfo(): string
|
||||
{
|
||||
return window.localStorage.getItem( CALLER_ITEM ) ?? "";
|
||||
}
|
||||
|
||||
function clearCallerInfo(): void
|
||||
{
|
||||
window.localStorage.removeItem( CALLER_ITEM );
|
||||
}
|
||||
|
||||
export {
|
||||
loadStaffInfo,
|
||||
saveStaffInfo,
|
||||
cleanStaffInfo,
|
||||
saveUserType,
|
||||
getUserType
|
||||
getUserType,
|
||||
saveCallerInfo,
|
||||
getCallerInfo,
|
||||
clearCallerInfo
|
||||
};
|
||||
|
@ -58,7 +58,7 @@
|
||||
<script lang="ts">
|
||||
import { computed, reactive, onBeforeMount } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { loadStaffInfo } from "@/utils/api/localStorage.js";
|
||||
import { getCallerInfo } from "@/utils/api/localStorage.js";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { type Archievement, queryDepartmentArchievement } from "@/utils/archievement.js";
|
||||
import ArchievementChart from "@/components/ArchievementChartComponent.vue";
|
||||
@ -78,7 +78,7 @@ export default {
|
||||
setup()
|
||||
{
|
||||
const router = useRouter();
|
||||
const staffInfo = loadStaffInfo();
|
||||
const callerInfo = getCallerInfo();
|
||||
const ui = reactive({
|
||||
chartData: [0,], // 业绩表
|
||||
totalArchievement: 0, // 总业绩
|
||||
@ -129,7 +129,7 @@ export default {
|
||||
};
|
||||
|
||||
// 检查存储的登录信息,不存在则返回登录页面
|
||||
if (staffInfo.P13UID === "")
|
||||
if ( callerInfo === "" )
|
||||
{
|
||||
ElMessage({
|
||||
message: "登录信息失效,请重新登录!",
|
||||
|
@ -67,7 +67,7 @@
|
||||
<script lang="ts">
|
||||
import { reactive, onBeforeMount } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { loadStaffInfo, saveStaffInfo, getUserType, saveUserType } from "@/utils/api/localStorage";
|
||||
import { loadStaffInfo, saveStaffInfo, getUserType, saveUserType, getCallerInfo, saveCallerInfo } from "@/utils/api/localStorage";
|
||||
import { login } from "@/utils/account";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { StaffInfo } from "@/data/cpicxim/StaffInfo";
|
||||
@ -96,6 +96,9 @@ export default {
|
||||
window.localStorage.setItem( "stuff_account", ui.account );
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const onLogin = () =>
|
||||
{
|
||||
// 保存用户类型
|
||||
@ -159,25 +162,34 @@ export default {
|
||||
else if ( ui.currentMenu === "tele_saler" )
|
||||
{
|
||||
// 坐席
|
||||
saveCallerInfo( ui.account );
|
||||
|
||||
// 跳转路由
|
||||
router.push( "/desktop_archievement" );
|
||||
}
|
||||
};
|
||||
|
||||
onBeforeMount(() =>
|
||||
{
|
||||
const staffInfo = loadStaffInfo();
|
||||
const staffType = getUserType();
|
||||
|
||||
// 判断已登录的信息是坐席还是内勤
|
||||
if ( staffType === "tele_saler" )
|
||||
{
|
||||
const callInfo = getCallerInfo();
|
||||
|
||||
// 判断是否已经记录了P13账号,有则提示已登录,然后跳转路由
|
||||
if (staffInfo.P13UID !== "")
|
||||
if ( callInfo !== "" )
|
||||
{
|
||||
ElMessage({
|
||||
message: `已登录账号:${staffInfo.stuffName}`,
|
||||
message: `已登录账号:${callInfo}`,
|
||||
type: "success",
|
||||
center: true,
|
||||
});
|
||||
|
||||
// 跳转路由
|
||||
// router.push("/desktop_archievement");
|
||||
router.push( "/desktop_archievement" );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user