<!DOCTYPE html>
|
<html>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache">
|
<title>电子商务平台</title>
|
<link href="./css/main.css?v=20220425" rel="stylesheet">
|
<link href="../../css/frame.css?v=20220425" rel="stylesheet">
|
<link href="../../css/iconfont.css" rel="stylesheet">
|
<link href="../../css/control.css?v=20220425" rel="stylesheet">
|
<link href="../../css/page.css?v=20220425" rel="stylesheet">
|
<link href="../../js/vue/element-ui/lib/theme-chalk/index.css" rel="stylesheet">
|
<!-- <link href="//at.alicdn.com/t/font_2374495_0we9t7l9865.css" rel="stylesheet"> -->
|
<link href="//at.alicdn.com/t/font_2374495_3pwfivuhlev.css" rel="stylesheet">
|
|
<script src="../../data/data.js?v=20220526"></script>
|
<script src="../../js/vue/axios/dist/axios.min.js"></script>
|
<!-- <script src="../../data/lxc.js"></script>
|
<script src="../../data/wxy.js"></script> -->
|
<script src="../../js/jquery-3.5.1.min.js"></script>
|
<script src="../../jsnew/Sortable.js"></script>
|
|
<script src="../../js/vue/vue.js"></script>
|
<script src="../../js/vue/element-ui/lib/index.js"></script>
|
<script src="../../js/vue/elementDefault.js"></script>
|
<script src="../../js/vue/page.js?v=2022070402"></script>
|
<script src="../../js/myelement.js?v=20220731"></script>
|
<script src="../../js/foundation.js?v=20220705"></script>
|
<script src="../../js/control.js?v=20220425"></script>
|
|
<script src="../../jsnew/config.js"></script>
|
<script src="../../jsnew/loadJsCss.js"></script>
|
|
<!-- 水印 -->
|
<script src="../../js/shuiyin.js"></script>
|
</head>
|
|
<body>
|
<div id="hh_boby" style="overflow: hidden;">
|
<div class="client">
|
<div id="pnl_header" class="header">
|
<div id="btn_toggle" class="but_toggle">
|
<span class="iconfont icon-menulist" style="color: white; margin-left: 0px;"></span>
|
</div>
|
|
<div id="topMenu" style="margin-left: 60px; height: 100%;"></div>
|
|
<div class="bar_system" style="width: 190px">
|
<div id="SH_user" class="bar_btn" style="left: 0px; width: 110px" ><!-- onclick="togglePanel(pnl_account)" -->
|
<div style="margin-left: 5px; float: left; margin-top: 10px;height: 30px;width: 30px;">
|
<img id="picture_img" style="height: 30px;width: 30px; border-radius: 50%"/>
|
</div>
|
<div id="lbl_user" style="float: left; font-size: 14px; width: 60px; height: 100%; margin-left: 5px; overflow: hidden;" >无</div>
|
</div>
|
<div id="SH_message" class="bar_btn" style="left: 110px; width: 60px" align="center"><!-- onclick="togglePanel(pnl_message)" -->
|
<span class="iconfont icon-alert bar_btn_icon" style="font-size: 24px;"></span>
|
<div id="alert_num" class="alert-num"></div>
|
</div>
|
|
</div>
|
</div>
|
|
<aside id="leftbar" class="left">
|
<div class="logoArea" >
|
<div id="logoText" class="logoText">
|
<span class="close_logo">DDI</span>
|
<div style="float: left;display: flex;width: 20%;align-items: center;height: 100%;margin-right: 5px;">
|
<img src="../../img/kogo.png" style="width: 100%;">
|
</div>
|
<span id="lbl_title" class="open_logo">电子商务平台</span>
|
</div>
|
</div>
|
|
<div id="leftMenu" class="leftMenu scroll">
|
|
</div>
|
|
<div class="left-bottom">
|
<span class="period-icon iconfont icon-date"></span>
|
<span>当前期间 : </span><span id="time"></span>
|
</div>
|
</aside>
|
|
<div id="content" class="content">
|
|
<!-- <div class="indicator"></div> -->
|
<!-- <div class="content-body"> -->
|
<!-- <iframe id="content" width="100%" height="100%" style="overflow: hidden; border: none;"></iframe> -->
|
<!-- </div> -->
|
</div>
|
</div>
|
|
<div id="pnl_account" class="my-account">
|
<div class="my-account-info" align="center">
|
<div class="account_line">
|
<div style="width: 160px; display: inline-block;">
|
<table>
|
<tr>
|
<td style="width: 40px;" valign="top">姓名:</td>
|
<td><label id="lbl_employeeName"></label></td>
|
</tr>
|
<tr>
|
<td style="width: 40px;" valign="top">公司:</td>
|
<td><label id="lbl_org"></label></td>
|
</tr>
|
<tr>
|
<td style="width: 40px;" valign="top">部门:</td>
|
<td><label id="lbl_department"></label></td>
|
</tr>
|
</table>
|
<!-- <div >姓名:<label id="lbl_employeeName"></label></div>
|
<div >公司:<label id="lbl_org"></label></div>
|
<div >部门:<label id="lbl_department"></label></div> -->
|
</div>
|
<div class="picture">
|
<div class="static-picture">
|
<img id="picture_img_" onclick="changePicture()" width="64" height="64" style="border: 3px solid; border-radius: 50%">
|
|
</div>
|
|
<input type="file" id="btn_file" ref="btn_file" style="display: none;" @change="getFile($event)"/>
|
<!-- <div class="hover-picture">
|
<img src="./img/camera.png" >
|
</div> -->
|
|
</div>
|
|
</div>
|
|
<!-- <img src="../../img/portrait.jpg" width="64" style="border: 3px solid; border-radius: 50%"> -->
|
<!-- <div class="account_line">公司:<label id="lbl_org"></label></div>
|
<div class="account_line">部门:<label id="lbl_department"></label></div>
|
<div class="account_line">岗位:<label id="lbl_position"></label></div> -->
|
<!-- <div class="account_line">角色:<label id="lbl_role"></label></div> -->
|
<div class="account_line">
|
<table>
|
<tr>
|
<td style="width: 40px;" valign="top">角色:</td>
|
<td><label id="lbl_role"></label></td>
|
</tr>
|
|
</table>
|
</div>
|
<!-- <div class="account_line">
|
<div style="width: 50%; display: inline-block;">岗位:<label id="lbl_position"></label></div>
|
<div style="width: 30%; display: inline-block;">角色:<label id="lbl_role"></label></div>
|
</div> -->
|
|
</div>
|
<div class="my-account-bottom">
|
<div class="account-btn" style="float: left; margin-left: 10px;font-size:12px" onclick="changePw()">修改账号</div>
|
<div class="account-btn" style="float: right; margin-right: 10px;font-size:12px;" onclick="logout()">登出</div>
|
|
<div class="account-btn" style="float: right; margin-right: 10px;font-size:12px;" onclick="qianming()">我的签名</div>
|
<!-- <div class="account-btn" style="float: right; margin-right: 10px;font-size:12px;" onclick="aaaa()">测试</div> -->
|
</div>
|
</div>
|
|
<div id="pnl_message" class="my-panel">
|
<div class="pnl-header" align="center">工作看板</div>
|
<div id="app" class="pnl-board">
|
<el-collapse v-model="activeName" accordion>
|
<template v-for="(remind,k) in reminds" style="width: 100%;">
|
<el-badge :value="remind.children.length" :max="99" class="itembadge" v-if="remind.children.length > 0">
|
<el-collapse-item :name="k"><!-- :title="remind.name" -->
|
<template slot="title">
|
<span>{{remind.name}}</span>
|
</template>
|
<div v-for="(remindObj, kv) in remind.children" :key="kv" style="min-height: 30px;">
|
<el-row>
|
<el-col :span="18">
|
<span class="z_remind" @click="remindClick(remind.type, remindObj)">{{kv + 1}}.{{remindObj.content}}</span>
|
</el-col>
|
<span class="z_remind" style="margin-left: 10px;" style="background-color: #ff0000;" @click="remindListClick(remindObj)">标记已读</span>
|
</el-row>
|
</div>
|
</el-collapse-item>
|
</el-badge>
|
</template>
|
</el-collapse>
|
</div>
|
</div>
|
<div id="pnl_setting" class="my-panel">
|
<div class="pnl-header">系统设置</div>
|
</div>
|
</div>
|
|
</body>
|
<script type="text/javascript">
|
var alert_num, pnl_header, pnl_account, pnl_message, pnl_setting;
|
var userinfo, roleid_str, toolbar, treeMenu, tab;
|
var alertnum_ ;
|
var picture_url = "../../img/portrait.jpg"
|
var isShowAlertnum = false;
|
var isdistributor = false;
|
var distributorObj = {};
|
|
function logout() {
|
var param = {
|
userId: localStorage.getItem("id"),
|
isClientMode: false
|
}
|
window.onbeforeunload = function (e) {
|
var storage = window.localStorage;
|
storage.clear()
|
}
|
|
Server.call("root/client/logout?userId=" + localStorage.getItem("id"), param, function(result) {
|
if (result.success) {
|
//alert("刷新成功");
|
console.log("delCache");
|
}
|
});
|
|
util.pageTo("../../login.html");
|
}
|
|
function qianming() {
|
Root.popupParames = {
|
width: "60vw",
|
height: "80vh",
|
url: "../api_qianming_jquery/qianming.html",
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
Root.showPopup(Root.popupParames);
|
}
|
|
/* function aaaa() {
|
var me = this;
|
var param = {
|
empCode: localStorage.getItem("emp_code")
|
};
|
Server.call("stock_post/token/create", param, function(result) {
|
if (result.success) {
|
//alert("刷新成功");
|
console.log("delCache");
|
var token_ = result.data;
|
if (token_) {
|
toJsp(token_);
|
}
|
}
|
});
|
}
|
|
function toJsp(token_) {
|
var ip_ = "http://oaqas01.jemincare.com:88";
|
var jsp_ = "/workflow/request/RequestType.jsp";
|
//jsp_ = "/workflow/search/wfTabFrame.jsp?offical=&officalType=-1&method=reqeustbywfidNode&workflowid=7303&nodeids=&complete=0&viewcondition=0&wftypes=&viewScope=doing&numberType=flowAll&flowAll=8&flowNew=0&flowResponse=0&flowOut=0&flowSup=0";
|
//jsp_ = "/workflow/search/wfTabNewFrame.jsp?offical=&officalType=-1&method=reqeustbywfid&workflowid=7303&complete=2&viewcondition=0&date2during=0&viewType=2&wftypes=&viewScope=done&numberType=flowAll";
|
var url_ = ip_ + jsp_;
|
var param_ = {
|
ecToken: token_
|
};
|
|
var url = SplicingGetUrlToStr(url_, param_);
|
window.open(url);
|
} */
|
|
function changePicture(){
|
Root.popupParames = {
|
width: "400px",
|
height: "580px",
|
url: "./picture.html",
|
callback: function(obj, callback) {
|
//me.saveRowTable_popup(obj);
|
if (callback) {
|
$("#picture_img")[0].src = obj.url
|
$("#picture_img_")[0].src = obj.url
|
callback();
|
}
|
}
|
};
|
Root.showPopup(Root.popupParames);
|
//document.getElementById("btn_file").click()
|
}
|
|
function hidePanel() {
|
togglePanel(pnl_account, false);
|
togglePanel(pnl_message, false);
|
togglePanel(pnl_setting, false);
|
}
|
|
function togglePanel(panel, visible) {
|
event.stopPropagation();
|
if (!panel) { return; }
|
panel.visible = (visible == undefined) ? !panel.visible : visible;
|
|
if (panel.visible) {
|
panel.show();
|
}
|
else {
|
panel.hide();
|
}
|
}
|
|
function refreshDataObjectMeta() {
|
Server.call("root/system/refreshData", function(result) {
|
if (result.success) {
|
alert("刷新成功");
|
}
|
});
|
}
|
|
function getPeroid() {
|
Server.call("root/system/getPeroid", function(result) {
|
if (result.success) {
|
setLocalData("year", result.year);
|
setLocalData("month", result.month);
|
}
|
});
|
}
|
|
function changePw() {
|
Root.popupParames = {
|
width: "500px",
|
height: "380px",
|
url: "./password.html",
|
callback: function(obj, callback) {
|
//me.saveRowTable_popup(obj);
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
Root.showPopup(Root.popupParames);
|
/* Win.popup({
|
url: "./password.html",
|
}); */
|
}
|
|
function popTab() {
|
var option = {};
|
option.icon = "icon-item";
|
option.id = "AB-3-1";
|
option.img = null;
|
option.level = 2;
|
option.lineindex = 0;
|
option.lineno = 1;
|
option.nodetype = "leaf";
|
option.orderno = 1;
|
option.parentid = null;
|
option.text = "终端画像";
|
option.url = "root/page/portrait/portrait.html";
|
tab.open(option);
|
}
|
|
function showMsg() {
|
vue.$message({
|
message: '恭喜你,这是一条成功消息',
|
type: 'success'
|
});
|
}
|
|
function setPopupWH(width, height, monkey) {
|
if (!monkey) {
|
monkey = $("#main_popup_page1");
|
}
|
else {
|
monkey = $(monkey);
|
}
|
if (width) {
|
monkey.css("width", width);
|
}
|
if (height) {
|
monkey.css("height", height);
|
}
|
};
|
|
function hidePopup(monkey) {
|
if (!monkey) {
|
monkey = $("#main_popup1");
|
}
|
else {
|
monkey = $(monkey);
|
}
|
//监听animation动画结束方法
|
monkey.animate({"margin-left": "-100%"}, 300, function(){
|
if (monkey[0].id == "main_popup1") {
|
Root.popup.zno = 0;
|
}
|
monkey.remove();
|
});
|
|
Root.popupParames = {};
|
};
|
</script>
|
|
<script type="text/javascript">
|
vue = new Vue({
|
el: "#app",//"#",
|
data: {
|
userId: "",
|
user: {},
|
userinfo: {},
|
activeName: '0',
|
messageNum:0,
|
reminds: [],
|
config:{
|
url:"../../page/order/sorder/sorder_list.html",
|
icon: "icon-product",
|
text: "销售订单",
|
id: "27234836934557696",
|
},
|
pictureUrl_: "../../img/ok1.png",
|
token:""
|
},
|
|
created() {
|
var aa = 0;
|
this.getToken();
|
},
|
|
mounted() {
|
setTopButtonsConfig();
|
//var roleList = localStorage.getItem("roleList");
|
},
|
|
methods:{
|
userInit() {
|
this.userId = localStorage.getItem("id");
|
var me = this;
|
var url = "root/client/getUser?userId=" + this.userId;
|
|
var param = {
|
id: me.userId,
|
isClientMode: false
|
}
|
Server.call(url, param, function(result) {
|
let userinfo_ = result.data;
|
userinfo = window.top.userinfo = userinfo_;
|
me.userinfo = userinfo;
|
me.user = userinfo.user;
|
let param = {
|
isClientMode: false,
|
filter:"md_code = '" + userinfo.employee.code +"'",
|
dataname:"VEmployee"
|
}
|
//水印
|
var el_body = document.getElementById("hh_boby");
|
var watermark_txt_ = userinfo.employee.code + " " + userinfo.employee.name;
|
watermark({el: el_body, "watermark_txt": watermark_txt_});
|
|
Server.call("root/data/getEntitySet", param, function(result) {
|
if(result && result.data && result.data.entityset) {
|
let hierarchyNodes_ = result.data.entityset;
|
let hierarchyNodeStr_ = ""
|
var hierarchyNodes_obj = {}
|
hierarchyNodes_.map(e=>{
|
if (hierarchyNodes_obj[e.dep_name]) {
|
|
}else {
|
hierarchyNodes_obj[e.dep_name] = e;
|
hierarchyNodeStr_ += e.dep_name + " ";
|
}
|
});
|
|
/* 部门 */
|
var hierarchysObj = hierarchyNodes_[0];
|
if (hierarchysObj && hierarchysObj.id) {
|
localStorage.setItem("hierarchy_id", hierarchysObj.id);
|
localStorage.setItem("hierarchy_name", hierarchysObj.dep_name);
|
localStorage.setItem("hierarchy_code", hierarchysObj.dep_code);
|
}
|
|
$("#lbl_department").html(hierarchyNodeStr_);
|
//岗位
|
$("#lbl_position").html(hierarchyNodeStr_);
|
userinfo.employee.hierarchyNodesStr = hierarchyNodeStr_;
|
}
|
me.showUserInfo(userinfo_);
|
//util.pageTo("../../page/order/sorder/sorder_editApprove.html");
|
}, function(result) {
|
me.$message({
|
type:"warning",
|
message:"没有查询到部门信息"
|
})
|
me.showUserInfo(userinfo_);
|
});
|
}, function(result) {
|
util.pageTo("../../login.html");
|
});
|
|
},
|
|
|
showUserInfo(userinfo) {
|
let me = this;
|
if (!userinfo) {
|
return;
|
}
|
|
var userObj = userinfo.user;
|
var employeeObj = userinfo.employee;
|
var orgObj = userinfo.org;
|
//公司
|
$("#lbl_org").html(orgObj.name);
|
//部门
|
/* var hierarchyNodes_ = "";
|
if(employeeObj.hierarchyNodes && employeeObj.hierarchyNodes.length) {
|
var hierarchyNodes_obj = {}
|
employeeObj.hierarchyNodes.map(e=>{
|
if (hierarchyNodes_obj[e.name]) {
|
|
}else {
|
hierarchyNodes_obj[e.name] = e;
|
hierarchyNodes_ += e.name + " ";
|
}
|
|
});
|
userinfo.employee.hierarchyNodesStr = hierarchyNodes_;
|
}
|
$("#lbl_department").html(hierarchyNodes_);
|
//岗位
|
$("#lbl_position").html(hierarchyNodes_); */
|
//角色
|
var lbl_role_ = "";
|
if(userObj.roleList && userObj.roleList.length) {
|
userObj.roleList.map(e=>{
|
lbl_role_ += e.name + " ";
|
});
|
}
|
$("#lbl_role").html(lbl_role_);
|
|
$("#lbl_employeeName").html(employeeObj ? employeeObj.name : userObj.name);
|
$("#lbl_user").html(employeeObj ? employeeObj.name : userObj.name);
|
$("#lbl_user").attr("title", employeeObj ? employeeObj.name : userObj.name);
|
|
/* 公司 */
|
localStorage.setItem("orgcode", orgObj.code);
|
localStorage.setItem("orgname", orgObj.name);
|
|
/* 人员 */
|
localStorage.setItem("emp_id", employeeObj.id);
|
localStorage.setItem("emp_name", employeeObj.name);
|
localStorage.setItem("emp_code", employeeObj.code);
|
|
/* 用户 */
|
localStorage.setItem("id", userObj.id);
|
localStorage.setItem("username", userObj.name);
|
localStorage.setItem("password", userObj.password);
|
localStorage.removeItem("actpassword");
|
if (userObj.actPassword) {
|
localStorage.setItem("actpassword", userObj.actPassword);
|
}
|
|
if(userObj.roleList.length) {
|
var rolecode_ = "";
|
var rolename_ = "";
|
var roleid_ = "";
|
var isDistributor_ = false;
|
userObj.roleList.map(e=>{
|
|
if (e.id == "2" || e.code == "dealer") {
|
isDistributor_ = true;
|
}
|
|
if (roleid_ == "") {
|
roleid_ = e.id;
|
// rolecode_ = e.code;
|
// rolename_ = e.name;
|
}
|
else {
|
roleid_ += ";" + e.id;
|
// rolecode_ += ";" + e.code;
|
// rolename_ += ";" + e.name;
|
}
|
});
|
|
window.top.roleid_str = roleid_;
|
// localStorage.setItem("rolecode", rolecode_);
|
// localStorage.setItem("rolename", rolename_);
|
if (isDistributor_) {
|
me.getDistributor(employeeObj.code, roleid_);
|
}
|
|
else {
|
if(localStorage.getItem("isdistributor")) {
|
localStorage.removeItem("isdistributor");
|
localStorage.removeItem("distributor_uscc");
|
localStorage.removeItem("distributor_code");
|
localStorage.removeItem("distributor_name");
|
localStorage.removeItem("distributor_id");
|
}
|
me.getRole(roleid_);
|
}
|
|
}
|
else {
|
util.pageTo("./login.html");
|
}
|
},
|
getToken() {
|
if (window.location.href.indexOf("token") != -1 ){
|
let params = getGetParams(window.location.href);
|
console.log(window.location.href);
|
if(params && params.token) {
|
let token = params.token;
|
console.log(token);
|
this.loadOaKeyMain(token);
|
}
|
}
|
else {
|
this.userInit();
|
}
|
},
|
loadOaKeyMain(token) {
|
|
var me = this;
|
var url_ = window.top.RootSetting.url_stock + "OA/token/" + token;
|
axios.get(url_, {
|
})
|
.then(data => {
|
console.log(data.data);
|
if (data.data.success){
|
var param = {
|
code:data.data.data,
|
}
|
axios.post(window.top.RootSetting.url + "api/loginByEmployeeCode", {
|
code:data.data.data,
|
})
|
.then(data => {
|
console.log(data.data);
|
loginObj = data.data.data.data;
|
localStorage.setItem("id", loginObj.id);
|
console.log(loginObj.id);
|
if (data.data.success && loginObj && loginObj.id) {
|
me.userInit();
|
}
|
else {
|
console.log("1");
|
}
|
})
|
.catch( (error) => {
|
console.log(error);
|
});
|
}else{
|
console.log(data.data.data.message);
|
}
|
|
})
|
.catch( (error) => {
|
console.log(error);
|
});
|
|
},
|
|
getDistributor(emp_code, roleid_) {
|
var me = this;
|
var code_ = "";
|
if(emp_code.substring(0, 2) == "CT") {
|
code_ = emp_code.substring(2);
|
}else
|
code_ = emp_code
|
|
if (code_) {
|
var params = {
|
dataname: "vCustomer",
|
isClientMode: false,
|
filter: " md_code ='" + code_ + "'"
|
}
|
Server.call("root/data/getEntitySet", params, function(result) {
|
console.log(result);
|
if (result.data && result.data.entityset && result.data.entityset.length) {
|
distributorObj = result.data.entityset[0];
|
isdistributor = true;
|
localStorage.setItem("isdistributor", "1");
|
localStorage.setItem("distributor_uscc", distributorObj.uscc);
|
localStorage.setItem("distributor_id", distributorObj.id);
|
localStorage.setItem("distributor_code", distributorObj.md_code);
|
localStorage.setItem("distributor_name", distributorObj.md_description);
|
me.getRole(roleid_);
|
}
|
else {
|
if(localStorage.getItem("isdistributor")) {
|
localStorage.removeItem("isdistributor");
|
localStorage.removeItem("distributor_uscc");
|
localStorage.removeItem("distributor_code");
|
localStorage.removeItem("distributor_name");
|
localStorage.removeItem("distributor_id");
|
}
|
me.$message({
|
type: 'warning',
|
message: '没有商业信息'
|
})
|
util.pageTo("./login.html");
|
}
|
})
|
|
}
|
else {
|
if(localStorage.getItem("isdistributor")) {
|
localStorage.removeItem("isdistributor");
|
localStorage.removeItem("distributor_uscc");
|
localStorage.removeItem("distributor_code");
|
localStorage.removeItem("distributor_name");
|
localStorage.removeItem("distributor_id");
|
}
|
me.$message({
|
type: 'warning',
|
message: '商业编号不对'
|
})
|
util.pageTo("./login.html");
|
}
|
},
|
|
getRole(roleid_) {
|
var me = this;
|
var roleid = roleid_.replace(/;/g,"','");
|
var params = {
|
dataname: "sysRole",
|
isClientMode: false,
|
filter: " id in ('"+ roleid +"')"
|
}
|
|
Server.call("root/data/getEntitySet", params, function(result) {
|
console.log(result);
|
if (result && result.data.entityset) {
|
|
var roleid_ = "";
|
var rolecode_ = "";
|
|
var rolename_ = "";
|
result.data.entityset.map(e=>{
|
if (rolecode_ == "") {
|
roleid_ = e.id;
|
rolecode_ = e.code;
|
rolename_ = e.name;
|
}
|
else {
|
roleid_ += ";" + e.id;
|
rolecode_ += ";" + e.code;
|
rolename_ += ";" + e.name;
|
}
|
});
|
localStorage.setItem("roleid", roleid_);
|
localStorage.setItem("rolecode", rolecode_);
|
localStorage.setItem("rolename", rolename_);
|
}
|
|
me.ready_();
|
//window.top.tab.open(me.config);
|
});
|
},
|
|
ready_() {
|
|
var date = new Date();
|
var me = this;
|
|
this.token = clone(localStorage.getItem("hdtoken"));
|
|
pnl_header = $("#pnl_header");
|
pnl_account = $("#pnl_account");
|
pnl_message = $("#pnl_message");
|
pnl_setting = $("#pnl_setting");
|
|
tab = new Tab({
|
element: "content"
|
});
|
|
Root = new RootClass({
|
userInfo: {
|
token: this.token
|
},
|
"tab": tab
|
})
|
|
toolbar = new Toolbar({
|
element: "topMenu",
|
css: {
|
item: "main-menu",
|
itemSelected: "main-menu-selected",
|
itemIcon: "main-menu-icon",
|
itemText: "main-menu-text"
|
},
|
style: "C",
|
selectable: true
|
});
|
|
treeMenu = new TreeMenu({
|
element: "leftMenu",
|
css: {
|
item: "left-menu",
|
openItem: "left-menu-active",
|
itemArrow: "icon-down",
|
openItemArrow: "icon-up"
|
},
|
onSelect: function(item, option_) {
|
let option = clone(option_);
|
if (option && option.url) {
|
if (option.text.length > 4) {
|
option.title = clone(option.text);
|
option.text = option.text.substr(0, 4) + "...";
|
}
|
if (RootSetting.isClientMode && !option.isURLParsed) {
|
option.url = toClientURL(option.url);
|
}
|
tab.open(option);
|
}
|
}
|
});
|
|
Server.call("root/dict/getDictList", {isClientMode: false}, function(result) {
|
console.log(result);
|
dataRoot.database.dictList = result.data.data;
|
var data_ = {};
|
result.data.data.map(e=>{
|
if (e.items.length) {
|
data_[e.code] = e.items;
|
}
|
})
|
Dictionary.load(data_);
|
|
var newdata_ = clone(result.data.data);
|
newdata_.map(d_=>{
|
if (d_.items && d_.items.length) {
|
d_.items.map(d_item=>{
|
d_item.code = d_item.value
|
d_item.value = d_item.label
|
})
|
}
|
|
})
|
newDictionary.load(newdata_);
|
});
|
|
$("#SH_user").mouseover(function (){
|
pnl_account.show();
|
});
|
pnl_account.mouseover(function (){
|
pnl_account.show();
|
});
|
pnl_account.mouseout(function (){
|
pnl_account.hide();
|
});
|
$("#SH_user").mouseout(function (){
|
pnl_account.hide();
|
});
|
|
$("#SH_message").mouseover(function (){
|
pnl_message.show();
|
});
|
pnl_message.mouseover(function (){
|
pnl_message.show();
|
});
|
pnl_message.mouseout(function (){
|
pnl_message.hide();
|
});
|
$("#SH_message").mouseout(function (){
|
pnl_message.hide();
|
});
|
$("#time").text(createDate());
|
$("#lbl_title").text(dataRoot.setting.title);
|
|
//$("#bodyArea").html('<iframe id="firstPage" src="../../page/order/sorder/sorder_list.html" width="100%" height="100%" frameborder="0"></iframe>');
|
|
/* $("#btn_toggle").click(function(){
|
if ($("#leftbar").css) {
|
|
}
|
}); */
|
|
|
$("#btn_toggle").toggle(function() {
|
//控制菜单隐藏
|
$("#leftbar").css("width", "0px");
|
$("#pnl_header").css("left", "0px");
|
$("#content").css("left", "0px");
|
$("#lbl_title").text("");
|
}, function() {
|
//控制菜单显示
|
$("#leftbar").css("width", "15%");
|
$("#pnl_header").css("left", "15%");
|
$("#content").css("left", "15%");
|
$("#lbl_title").text(dataRoot.setting.title);
|
});
|
let param_ = {
|
dataname: "user",
|
filter: "id ='" + this.userId+"'",
|
}
|
|
Server.call("root/data/getEntity", param_, function(result_) {
|
console.log(result_);
|
if (result_ && result_.data.entity.avatar) {
|
$("#picture_img")[0].src = getDownloadFileUrl(result_.data.entity.avatar)
|
$("#picture_img_")[0].src = getDownloadFileUrl(result_.data.entity.avatar)
|
|
}else{
|
$("#picture_img")[0].src = me.pictureUrl_;
|
$("#picture_img_")[0].src = me.pictureUrl_;
|
}
|
});
|
|
me.getMenu();
|
|
Root.init_vue();
|
},
|
|
getMenu() {
|
var me = this;
|
var params = {
|
dataname: "menu",
|
isClientMode: false,
|
userId: this.userId
|
}
|
|
Server.call("root/data/getEntitySet", params, function(result) {
|
console.log(result);
|
if (result && result.data.entityset) {
|
var url_ = "";
|
var menulist_old = result.data.entityset;
|
me.getpnl_message(function(messageObj) {
|
var menulist_ = [];
|
//判断此菜单下需要添加红点标记
|
menulist_ = me.setMenuBadge(menulist_old, messageObj);
|
let entitytree = ArrayToTree(menulist_, "text", "parent_id");
|
for (var i = 0; i < entitytree.length; i++) {
|
var root = entitytree[i];
|
toolbar.addItem({
|
z_badge: root.z_badge,
|
text: root.text,
|
icon: root.icon,
|
menuTree: root,
|
onSelect: function(item, option) {
|
var item_ = treeMenu.load(option.menuTree.children);
|
if (item_) {
|
me.openOneMenuPage(item_[0].childNodes[0], option.menuTree.children[0]);//item_.childNodes
|
}
|
}
|
});
|
}
|
|
if (entitytree.length) {
|
toolbar.selectByIndex(0);
|
/*
|
{
|
url:"../../page/order/sorder/sorder_list.html",
|
icon: "icon-product",
|
text: "销售订单",
|
id: "27234836934557696",
|
}
|
*/
|
//window.top.tab.open(me.config);
|
//$("#bodyArea").html('<iframe id="firstPage" src="../../page/order/sorder/sorder_list.html" width="100%" height="100%" frameborder="0"></iframe>');
|
}
|
|
});
|
|
}
|
});
|
},
|
|
setMenuBadge(menulist_old, messageObj) {
|
var me = this;
|
var menulist_ = [];
|
var menulist_obj = {};
|
menulist_old.map(mo=>{
|
menulist_obj[mo.id] = mo;
|
});
|
menulist_old.map(m=>{
|
if (messageObj[m.id]) {
|
m.z_badge = messageObj[m.id];
|
menulist_obj[m.id] = m;
|
|
me.setRootMenuBadge(m, menulist_obj, function(menulist_obj_) {
|
menulist_obj = menulist_obj_;
|
});
|
}
|
})
|
|
for (var id in menulist_obj) {
|
menulist_.push(menulist_obj[id]);
|
}
|
|
return menulist_;
|
},
|
|
setRootMenuBadge(rootmenu, menulist_obj, callback) {
|
var me = this;
|
if(rootmenu.parent_id) {
|
menulist_obj[rootmenu.parent_id].z_badge = true;
|
me.setRootMenuBadge(menulist_obj[rootmenu.parent_id], menulist_obj, callback);
|
}
|
|
else {
|
callback(menulist_obj);
|
}
|
},
|
|
// 菜单中的小红点数据刷新
|
setMenuBadgeByMenuid(menuid, type_) {
|
// var type_ = ""
|
// if (menuid == "A4-31") {
|
// type_ = "recordSyzc";
|
// }
|
param_table = {
|
isClientMode: false,
|
dataname: "getShouldApproveCnt",
|
emp_code: localStorage.getItem("emp_code"),
|
filter: "business_type in ('" + type_ + "') ",
|
returnType: "entityset"
|
}
|
Server.call("jeminact/root/data/procedure", param_table, function(result) {
|
console.log(result);
|
if (result.data.entityset && result.data.entityset.length) {
|
window.top.$("#badge_menu_" + menuid).html(result.data.entityset[0].cnt);
|
// window.top.$("#badge_menu_" + menuid).html(10);
|
}
|
});
|
},
|
|
getpnl_message(callback){
|
let me = this;
|
var params = {
|
dataname: "notificationType",
|
}
|
|
Server.call("root/data/getEntitySet", params, function(result) {
|
console.log(result);
|
if (result && result.data.entityset) {
|
me.reminds = result.data.entityset;
|
for(var i=0;i<me.reminds.length;i++ ){
|
me.reminds[i].children = [];
|
}
|
var params_ = {
|
dataname: "notification",
|
|
filter: "to_user = '" + localStorage.getItem("emp_id")+"' and readed = '0'",
|
}
|
|
Server.call("root/data/getEntitySet", params_, function(result1) {
|
console.log(result1);
|
var data_ = [];
|
var messageObj = {};
|
if (result1 && result1.data.entityset) {
|
data_ = result1.data.entityset;
|
alertnum_ = data_.length > 99 ? "99+" : data_.length;
|
isShowAlertnum = data_.length > 0 ? true :false;
|
me.messageNum = data_.length
|
alert_num = $("#alert_num");
|
if(!isShowAlertnum){
|
alertnum_ = "";
|
|
alert_num.attr("style","display:none;");
|
}
|
alert_num.html(alertnum_);
|
|
var reminds_ = clone(me.reminds);
|
for(var i = 0;i<data_.length;i++){
|
for(var j=0; j<reminds_.length;j++){
|
if(data_[i].type == reminds_[j].type){
|
data_[i].page_id = reminds_[j].page_id;
|
reminds_[j].children.push(data_[i]);
|
|
if (reminds_[j].menu_id) {
|
if (!messageObj[reminds_[j].menu_id]) {
|
messageObj[reminds_[j].menu_id] = 1;
|
}
|
else {
|
messageObj[reminds_[j].menu_id] += 1;
|
}
|
}
|
|
}
|
}
|
}
|
me.reminds = reminds_;
|
/* me.checkAlreadyApproval(reminds_); */
|
}
|
|
if (callback) {
|
//获取指定菜单的待处理数
|
me.getBadgeNumByMenu(function(messageObj_menu) {
|
for(var pageid in messageObj_menu) {
|
messageObj[pageid] = messageObj_menu[pageid];
|
}
|
|
callback(messageObj);
|
});
|
|
}
|
});
|
}
|
});
|
},
|
|
getBadgeNumByMenu(callback) {
|
var menuNumSQL = [
|
// {menu_name: "发货主体清单", menu_id: "A8-3", sqlname: "getCntCustomerDeliveryByEmp"},
|
// //{menu_name: "政策备案", menu_id: "A4-1", sqlname: "getCntAgreementLineByEmp"},
|
|
// {menu_name: "政策备案审批", menu_id: "A4-7",type:"agreement",sqlname: "getAgreementApproveInfo"},
|
// {menu_name: "备案变更审批", menu_id: "A4-6",type:"agreement",sqlname: "getAgreementApproveInfo"},
|
// {menu_name: "销售订单审批", menu_id: "A0-6",type:"sales','proxy_sales','proxyFactorySales"},
|
// {menu_name: "退货单审批", menu_id: "A0-7",type:"revocation"},
|
// {menu_name: "生产计划审批", menu_id: "A2-1-2",type:"product_plan"},
|
// {menu_name: "纯销计划审批", menu_id: "A2-2-2",type:"puresale_plan"},
|
// {menu_name: "全产品目录审批", menu_id: "A2-5-1",type:"product_summary"},
|
// {menu_name: "退货单审批", menu_id: "A0-7",type:"revocation"},
|
|
// {menu_name: "基础信息审批", menu_id: "A8-2-1",type:"accountCustomer"},
|
// {menu_name: "商业审批", menu_id: "A8-2",type:"accountCustomerDelivery','deliveryFreeze"},
|
// {menu_name: "资质材料审批", menu_id: "A8-4",type:"accountCustomerCertification"},
|
|
{menu_name: "商业政策审批", menu_id: "A4-31", type:"recordSyzc"},
|
{menu_name: "二次议价审批", menu_id: "A4-32", type:"recordEcyj"},
|
{menu_name: "分销政策审批", menu_id: "A4-33", type:"recordFxzc"},
|
{menu_name: "前台费用审批", menu_id: "A4-34", type:"recordQtfy"},
|
{menu_name: "赠药政策审批", menu_id: "A4-35", type:"recordZyzc"},
|
{menu_name: "上海GPO政策审批", menu_id: "A10163", type:"recordGPO"},
|
{menu_name: "流向政策审批", menu_id: "A10312", type:"recordLxzc"},
|
|
{menu_name: "赠药申请审批", menu_id: "A10-22", type:"grantOrder"},
|
{menu_name: "票折调价申请审批", menu_id: "A10-12", type:"adjustOrder"},
|
{menu_name: "开票申请审批", menu_id: "A10-62", type:"openInvoice"},
|
];
|
|
var messageObj_menu = {};
|
|
this.doGetBadgeNumByMenu(menuNumSQL, messageObj_menu, function(messageObj_menu_) {
|
messageObj_menu = messageObj_menu_;
|
callback(messageObj_menu);
|
});
|
},
|
|
doGetBadgeNumByMenu(menuNumSQL, messageObj_menu, callback) {
|
var me = this;
|
if(menuNumSQL.length > 0) { // && 1 != 1
|
var menuSQL = menuNumSQL[0];
|
|
let param_table = {};
|
if(menuSQL.sqlname){
|
if(menuSQL.menu_id == "A8-3")
|
param_table = {
|
isClientMode: false,
|
dataname: menuSQL.sqlname,
|
empname: localStorage.getItem("emp_name"),
|
empcode: localStorage.getItem("emp_code"),
|
returnType: "entityset",
|
//filter: "uscc= '" + this.selectedrow.uscc + "'"
|
}
|
else if(menuSQL.menu_id == "A4-7")
|
param_table = {
|
isClientMode: false,
|
dataname: menuSQL.sqlname,
|
emp_code: localStorage.getItem("emp_code"),
|
filter: "old_id is null and emp_code = '" + localStorage.getItem("emp_code") +"' and status ='working'",
|
returnType: "entityset"
|
}
|
else if(menuSQL.menu_id == "A4-6")
|
param_table = {
|
isClientMode: false,
|
dataname: menuSQL.sqlname,
|
emp_code: localStorage.getItem("emp_code"),
|
filter: "old_id is not null and emp_code = '" + localStorage.getItem("emp_code") +"' and status ='working'",
|
returnType: "entityset"
|
}
|
}else{
|
param_table = {
|
isClientMode: false,
|
dataname: "getShouldApproveCnt",
|
emp_code: localStorage.getItem("emp_code"),
|
filter: "business_type in ('" + menuSQL.type + "') ",
|
returnType: "entityset"
|
}
|
}
|
Server.call("jeminact/root/data/procedure", param_table, function(result) {
|
console.log(result);
|
if (result.data.entityset && result.data.entityset.length) {
|
messageObj_menu[menuSQL.menu_id] = result.data.entityset[0].cnt;
|
menuNumSQL.remove(menuSQL);
|
me.doGetBadgeNumByMenu(menuNumSQL, messageObj_menu, callback);
|
}
|
});
|
|
}
|
else {
|
callback(messageObj_menu);
|
}
|
},
|
|
openOneMenuPage(item_, option) {
|
item_.click();
|
if (option.children && option.children.length) {
|
var item = item_.parentNode.getElementsByClassName("left-menu");
|
if (item.length) {
|
this.openOneMenuPage(item[1], option.children[0]);
|
}
|
}
|
},
|
|
remindListClick(row) {
|
var me = this;
|
var param = row;
|
param.readed = "1";
|
Server.call("root/data/updateEntity/notification", param, function(result) {
|
let reminds_ = me.reminds;
|
for(var i = 0;i<reminds_.length;i++){
|
if(row.type == reminds_[i].type){
|
reminds_[i].children.remove(row);
|
alert_num = $("#alert_num");
|
let alertnum_ = me.messageNum-1 > 99 ? "99+" : me.messageNum-1;
|
alert_num.html(alertnum_);
|
if (alert_num.html() == 0) {
|
alert_num.attr("style","display:none;");
|
}
|
//alertnum_ = "";
|
//alert_num.attr("style","display:none;");
|
|
|
}
|
}
|
me.reminds = reminds_;
|
});
|
},
|
|
remindClick(type, row) {
|
var me = this;
|
var param = row;
|
param.readed = "1";
|
Server.call("root/data/updateEntity/notification", param, function(result) {
|
let reminds_ = me.reminds;
|
for(var i = 0;i<reminds_.length;i++){
|
if(row.type == reminds_[i].type){
|
reminds_[i].children.remove(row);
|
alert_num = $("#alert_num");
|
let alertnum_ = me.messageNum-1 > 99 ? "99+" : me.messageNum-1;
|
alert_num.html(alertnum_);
|
if (alert_num.html() == 0) {
|
alert_num.attr("style","display:none;");
|
}
|
}
|
}
|
|
me.reminds = reminds_;
|
});
|
let scenetype_ = "browse"
|
if(row.to_type == "approval") {
|
scenetype_ = "approval"
|
}
|
|
if(row.flow_id) {
|
var flowid = row.flow_id;
|
this.loadOaKey(flowid, type);
|
}
|
if(row.page_id) {
|
let param_ = {
|
dataname: "resourcePage",
|
filter: "id = '" + row.page_id + "'"
|
}
|
Server.call("root/data/getEntity",param_ ,function(result) {
|
if(result && result.data.entity) {
|
let url = result.data.entity.url.replace("root","../..")
|
var config_ = {
|
path: url,//"../../page/order/sorder/sorder_list.html",
|
id: row.business_id,//
|
act_type: type,
|
scenetype: scenetype_,
|
page_id:row.page_id
|
};
|
me.topageByPath(config_);
|
}
|
|
});
|
}
|
else if(row.lookup_page_path) {
|
|
}else{
|
Root.message({
|
type: 'warning',
|
message: '未设置相关信息'
|
})
|
}
|
},
|
|
loadOaKey(flowid, type) {
|
var me = this;
|
var url = window.top.RootSetting.url_act + "flows/checkFlowData/"+flowid;
|
|
axios.post(url, {
|
isClientMode: false,
|
type:"user",
|
nodeId: localStorage.getItem("emp_code")
|
})
|
.then(data => {
|
console.log(data.data.data);
|
me.empcode = data.data.data.empCode;
|
var flows = data.data.data;
|
|
var scenetype_ = "approval";
|
if (!flows) {
|
me.remindWarning("", "1");
|
return
|
}
|
else if (!flows.canApprove) {
|
//me.remindWarning("", "2");
|
scenetype_ = "browse";
|
var config_ = {
|
path: flows.path,//"../../page/order/sorder/sorder_list.html",
|
id: flows.businessId,//
|
canApprove: flows.canApprove,
|
flow_id: flows.id,
|
act_type: type,
|
scenetype: scenetype_
|
};
|
me.topageByPath(config_);
|
|
}
|
else {
|
var config_ = {
|
path: flows.path,//"../../page/order/sorder/sorder_list.html",
|
id: flows.businessId,//
|
canApprove: flows.canApprove,
|
flow_id: flows.id,
|
act_type: type,
|
scenetype: scenetype_
|
};
|
me.topageByPath(config_);
|
//me.openPage(type, row);
|
}
|
})
|
.catch( (error) => {
|
console.log(errorresult.message);
|
me.remindWarning("erroe", "3");
|
});
|
|
/* var param = {
|
isClientMode: false,
|
type:"user",
|
nodeId: localStorage.getItem("emp_code")
|
}
|
|
Server.call(url, param, function(result) {
|
console.log(result.data);
|
me.empcode = result.data.empCode;
|
var flows = result.data.flows;
|
|
var scenetype_ = "approval";
|
if (!flows) {
|
me.remindWarning("", "1");
|
return
|
}
|
else if (!flows.canApprove) {
|
//me.remindWarning("", "2");
|
scenetype_ = "browse";
|
var config_ = {
|
path: flows.path,//"../../page/order/sorder/sorder_list.html",
|
id: flows.businessId,//
|
canApprove: flows.canApprove,
|
flow_id: flows.id,
|
act_type: type,
|
scenetype: scenetype_
|
};
|
me.topageByPath(config_);
|
|
}
|
else {
|
var config_ = {
|
path: flows.path,//"../../page/order/sorder/sorder_list.html",
|
id: flows.businessId,//
|
canApprove: flows.canApprove,
|
flow_id: flows.id,
|
act_type: type,
|
scenetype: scenetype_
|
};
|
me.topageByPath(config_);
|
//me.openPage(type, row);
|
}
|
|
},function(errorresult) {
|
console.log(errorresult.message);
|
me.remindWarning("erroe", "3");
|
}); */
|
},
|
|
topageByPath(config) {
|
var me = this;
|
var sceneCode_ = "approval";
|
var filter_ = " 1<>1";
|
var dataname_ = "";
|
var delta = {}
|
var paramObjBydefault = {};
|
if (config.act_type == "accountCustomer") {//商业变更
|
sceneCode_ = "versionapproval";
|
filter_ = "customer.id='" + config.id + "'";
|
dataname_ = "approveCustomer";
|
|
paramObjBydefault = {
|
empCode: localStorage.getItem("emp_code")//"040679"//localStorage.getItem("emp_code")
|
}
|
}
|
else if (config.act_type == "accountCustomerDelivery") {//发货主体审批
|
sceneCode_ = "approval";
|
filter_ = "cdm.id='" + config.id + "'";
|
dataname_ = "customerDeliveryApprove";
|
}
|
else if (config.act_type == "deliveryFreeze") {//发货主体冻/结激活审批
|
sceneCode_ = "approval";
|
filter_ = "cdm.id='" + config.id + "'";
|
dataname_ = "customerDeliveryApprove";
|
}
|
else if (config.act_type == "accountCustomerCertification") {//资质审批
|
sceneCode_ = "approval";
|
filter_ = "customer_delivery_certification_mapping.id='" + config.id + "'";
|
dataname_ = "getCertificationApproveList";
|
}
|
else if (config.act_type == "poxyCertification") {//资质审批
|
sceneCode_ = "approval";
|
filter_ = "customer_delivery_certification_mapping.id='" + config.id + "'";
|
dataname_ = "getCertificationApproveList";
|
}
|
else if (config.act_type == "sales") {//销售订单审批
|
sceneCode_ = "approval";
|
filter_ = "sales_order.id='" + config.id + "'";
|
dataname_ = "getSalesOrderAndHasgsp";
|
}
|
else if (config.act_type == "agreement" && config.page_id == "agreementApprove") {//政策备案审批
|
sceneCode_ = "approval";
|
filter_ = "agreement_line.id='" + config.id + "'";
|
dataname_ = "agreementLine";
|
}
|
else if (config.act_type == "agreement" && config.page_id == "agreementTransApprove") {//政策备案变更审批
|
sceneCode_ = "approval";
|
filter_ = "agreement_line.id='" + config.id + "'";
|
dataname_ = "getUpdateAgreementLine";
|
}
|
else if (config.act_type == "revocation") {//政策备案变更审批
|
sceneCode_ = "approval";
|
filter_ = "revocation_order.id='" + config.id + "'";
|
dataname_ = "revocationOrder";
|
delta = {type:"old_id"};
|
}else if (config.act_type == "product_plan") {//生产计划审批
|
sceneCode_ = "approval";
|
filter_ = "id='" + config.id + "'";
|
dataname_ = "producePlanApproval";
|
}else if (config.act_type == "puresale_plan") {//纯销计划审批
|
sceneCode_ = "approval";
|
filter_ = "plan_puresale.id='" + config.id + "'";
|
dataname_ = "puresalePlanApproval";
|
}else if (config.act_type == "product_summary") {//全产品目录审批
|
sceneCode_ = "approval";
|
filter_ = "product_link.id='" + config.id + "'";
|
dataname_ = "productSummaryApproval";
|
}
|
let param_ = {
|
isClientMode: false,
|
dataname: dataname_,
|
filter: filter_,
|
}
|
|
if (paramObjBydefault != {}) {
|
for(var k in paramObjBydefault) {
|
let k_val = paramObjBydefault[k];
|
param_[k] = k_val;
|
}
|
}
|
|
Server.call("root/data/getEntitySet", param_, function(result) {
|
console.log(result);
|
if (result && result.data && result.data.entityset && result.data.entityset.length>0) {
|
var data_ = result.data.entityset[0];
|
if(data_.flow_id) {
|
if(data_.status == "working") {
|
let param_message = {
|
dataname:'flowNodeEmp',
|
filter: "flow_id = '" + data_.flow_id + "' and emp_code = '" + userinfo.employee.code + "'"
|
}
|
Server.call("root/data/getEntitySet", param_message, function(result_flow) {
|
if(result_flow && result_flow.data.entityset && result_flow.data.entityset.length > 0) {
|
|
}else {
|
sceneCode_ = "browse"
|
}
|
if (data_.create_operate_code.indexOf("CT") > -1) {
|
config.path = "../order/sorder/sorder_business_edit.html"
|
}else if(data_.proxy_order) {
|
config.path = "../order/sorder/sorder_proxy_edit.html"
|
}
|
me.doPopupConfig(data_, sceneCode_, config,delta);
|
},function(result) {
|
me.$message({
|
type:"warning",
|
message:result.message
|
})
|
})
|
}else {
|
sceneCode_ = "browse"
|
me.doPopupConfig(data_, sceneCode_, config,delta);
|
}
|
|
}else {
|
me.$message({
|
type:"warning",
|
message:"没有查询到流程id"
|
})
|
}
|
}
|
else {
|
me.$message({
|
type:"warning",
|
message:"没有查询到该消息对应业务数据"
|
})
|
}
|
},function(result) {
|
me.$message({
|
type:"warning",
|
message:result.message
|
})
|
})
|
},
|
|
doPopupConfig(row, sceneCode, config_,delta){
|
var config = {
|
totab: true,
|
icon: "icon-product",
|
text: "通知",
|
id: "sys_main",
|
url: config_.path,//"../md/customer/customer_licence.html",
|
sceneCode: sceneCode,
|
data: row,
|
delta: delta,
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
|
this.doPopupByPublic(config);
|
},
|
doPopupByPublic(config) {
|
config.title = clone(config.text);
|
if (config.totab) {
|
if (config.url) {
|
if (config.text.length > 4) {
|
config.text = config.text.substr(0, 4) + "...";
|
}
|
config.url = toClientURL(config.url);
|
}
|
|
var callback_ = config.callback;
|
var parames = {
|
totab: true,
|
url: config.url,
|
title: config.title,
|
id:"sys_main",
|
sceneCode: config.sceneCode,
|
data: config.data,
|
delta: config.delta,
|
disabled: config.disabled,
|
disabledone: config.disabledone,
|
operationtype: config.operationtype,
|
parentOption: null,
|
callback: function(obj, callback) {
|
if (callback_) {
|
callback_(obj);
|
}
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
Root.popupParames = parames;
|
|
window.top.tab.open(config,true);
|
}
|
else {
|
this.doPopup(config);
|
}
|
},
|
remindWarning(type, code) {
|
Root.message({
|
type: 'warning',
|
message: '此数据已读' + code
|
})
|
},
|
|
// openPage(type, row) {
|
// let me = this;
|
// Root.popupParames = {
|
// width: "1000px",
|
// //height: "580px",
|
// callback: function(obj, callback) {
|
// //me.saveRowTable_popup(obj);
|
// if (callback) {
|
// callback();
|
// }
|
// }
|
// };
|
// let url_ = "";
|
// var param = row;
|
// param.readed = "1";
|
// Server.call("root/data/" + "updateEntity" + "/" + "notification", param, function(result) {
|
// me.getpnl_message();;
|
// });
|
// if (type == "sales") {
|
// if (row) {
|
// url_ = "../order/sorder/sorder_edit.html";
|
// }
|
|
// }else if (type == "revocation") {
|
// if (row) {
|
// url_ = "../logistics/return/return_edit.html";
|
// }
|
// }
|
|
// /* else if (type == "remind_hk") {
|
// if (row) {
|
// url_ = "../finance/receipt/receipt_edit.html";
|
// }
|
// else {
|
// url_ = "../remind/popup/popup_makeCollectionsList.html";//回款提醒列表
|
// }
|
// }
|
// */
|
// if (row) {
|
// Root.popupParames.data = row;
|
// Root.popupParames.sceneCode = "main";
|
// }
|
// Root.popupParames.url = url_;
|
// Root.showPopup(Root.popupParames);
|
// }
|
|
}
|
});
|
|
</script>
|
|
<style>
|
.el-collapse-item__header {
|
background-color: #4f5b61;
|
color: #FFF;
|
border-bottom: 1px solid #fff;
|
}
|
.el-collapse-item__wrap {
|
max-height: 200px;
|
background-color: #5c6a71;
|
color: #FFF;
|
border-bottom: 1px solid #fff;
|
}
|
.el-collapse-item__content {
|
color: #FFF;
|
padding-bottom: 15px;
|
}
|
.el-collapse {
|
border-top: 0px solid #fff;
|
}
|
.el-badge__content.is-fixed {
|
left: -20px;
|
right: auto;
|
}
|
.itembadge {
|
width: 100%;
|
}
|
.z_remind:hover {
|
cursor: pointer;
|
color: #e7e7e7;
|
}
|
.picture {
|
width: 40%;
|
display: inline-block;
|
}
|
.static-picture {
|
opacity: 1;
|
cursor: pointer;
|
|
position: absolute;
|
top: 20px;
|
right: 20px;
|
}
|
.hover-picture {
|
opacity: 1;
|
|
}
|
.picture:hover .static-picture {
|
opacity: 0.5;
|
|
}
|
.picture:hover .hover-picture {
|
opacity: 1;
|
width: 40%;
|
|
}
|
|
</style>
|
</html>
|