update 修改驳回审核和增加分账,创建店铺补偿机制
This commit is contained in:
parent
75b4b128d8
commit
8a358f4121
588
public/im/im.js
588
public/im/im.js
@ -1,48 +1,57 @@
|
||||
var currentUser_id = 0
|
||||
|
||||
//扩展对象方法
|
||||
$.extend({
|
||||
//为对象新增ajaxPost方法
|
||||
request: function (ajaxOpts) {
|
||||
var opts = {
|
||||
type: "POST",
|
||||
dataType: "json",
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
timeout: 50000,
|
||||
loading: true,
|
||||
data: {
|
||||
typ: 'json'},
|
||||
success: function (data, status) {
|
||||
typ: 'json',
|
||||
},
|
||||
success: function (data, status) {},
|
||||
|
||||
error: function (err, status) {
|
||||
Public.tipMsg(__('操作无法成功,请稍后重试!'));
|
||||
Public.tipMsg(__('操作无法成功,请稍后重试!'))
|
||||
},
|
||||
|
||||
beforeSend: function (request) {
|
||||
// 规范写法 不可随意自定义
|
||||
if (localStorage.getItem("ukey")) {
|
||||
request.setRequestHeader("Authorization", "Bearer " + localStorage.getItem("ukey"));
|
||||
if (localStorage.getItem('ukey')) {
|
||||
request.setRequestHeader(
|
||||
'Authorization',
|
||||
'Bearer ' + localStorage.getItem('ukey')
|
||||
)
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
$.extend(true, opts, ajaxOpts);
|
||||
$.extend(true, opts, ajaxOpts)
|
||||
|
||||
if (opts.loading) { //loading
|
||||
if (opts.loading) {
|
||||
//loading
|
||||
//var $this = $(this);
|
||||
var loading;
|
||||
var loading
|
||||
//var myTimer;
|
||||
//var preventTooFast = 'ui-btn-dis';
|
||||
|
||||
$.extend(true, opts, {
|
||||
beforeSend: function (request) {
|
||||
// 规范写法 不可随意自定义
|
||||
if (localStorage.getItem("ukey")) {
|
||||
request.setRequestHeader("Authorization", "Bearer " + localStorage.getItem("ukey"));
|
||||
if (localStorage.getItem('ukey')) {
|
||||
request.setRequestHeader(
|
||||
'Authorization',
|
||||
'Bearer ' + localStorage.getItem('ukey')
|
||||
)
|
||||
}
|
||||
},
|
||||
complete: function () {
|
||||
//loading.close();
|
||||
}
|
||||
});
|
||||
},
|
||||
})
|
||||
|
||||
/*
|
||||
if ($this.hasClass(preventTooFast))
|
||||
@ -52,9 +61,8 @@ $.extend({
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
var successCallback = opts.success;
|
||||
var errorCallback = opts.error;
|
||||
var successCallback = opts.success
|
||||
var errorCallback = opts.error
|
||||
|
||||
opts.success = function (data, status) {
|
||||
/*if(data.status != 200){
|
||||
@ -67,94 +75,102 @@ $.extend({
|
||||
defaultPage.Public.tips({type:1, content:errorStr});
|
||||
return;
|
||||
}*/
|
||||
successCallback && successCallback(data, status);
|
||||
if (data && data.status == 200) {
|
||||
let _data = data.data
|
||||
currentUser_id = _data.user_info.user_id
|
||||
}
|
||||
successCallback && successCallback(data, status)
|
||||
}
|
||||
|
||||
opts.error = function (err, ms) {
|
||||
var content = __('服务端响应错误!')
|
||||
if (ms === 'timeout') {
|
||||
content = __('请求超时!');
|
||||
content = __('请求超时!')
|
||||
}
|
||||
|
||||
Public.tipMsg(content);
|
||||
errorCallback && errorCallback(err);
|
||||
Public.tipMsg(content)
|
||||
errorCallback && errorCallback(err)
|
||||
}
|
||||
|
||||
$.ajax(opts);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax(opts)
|
||||
},
|
||||
})
|
||||
|
||||
$.extend({
|
||||
//为对象新增ajaxPost方法
|
||||
send: function (url, data, callback, type) {
|
||||
// shift arguments if data argument was omitted
|
||||
if (jQuery.isFunction(data)) {
|
||||
type = type || callback;
|
||||
callback = data;
|
||||
data = undefined;
|
||||
type = type || callback
|
||||
callback = data
|
||||
data = undefined
|
||||
}
|
||||
|
||||
// The url can be an options object (which then must have .url)
|
||||
return $.request(jQuery.extend({
|
||||
return $.request(
|
||||
jQuery.extend(
|
||||
{
|
||||
url: url,
|
||||
type: 'GET',
|
||||
dataType: type,
|
||||
data: data,
|
||||
loading: false,
|
||||
success: callback
|
||||
}, jQuery.isPlainObject(url) && url));
|
||||
}
|
||||
});
|
||||
success: callback,
|
||||
},
|
||||
jQuery.isPlainObject(url) && url
|
||||
)
|
||||
)
|
||||
},
|
||||
})
|
||||
|
||||
var socket_connect = 0;//连接状态
|
||||
var socket_handle = null;
|
||||
var socket_connect = 0 //连接状态
|
||||
var socket_handle = null
|
||||
|
||||
var vid = 10001; //固定用户调试使用
|
||||
|
||||
if (localStorage.getItem("ukey")) {
|
||||
var vid = 10001 //固定用户调试使用
|
||||
|
||||
if (localStorage.getItem('ukey')) {
|
||||
} else {
|
||||
//临时用户
|
||||
vid = parseInt(Math.random() * (99999999999 - 10000000000 + 1) + 10000000000, 10);
|
||||
vid = parseInt(
|
||||
Math.random() * (99999999999 - 10000000000 + 1) + 10000000000,
|
||||
10
|
||||
)
|
||||
}
|
||||
|
||||
window.initIm = function () {
|
||||
//$.send(sprintf("%s/account.php?ctl=%s&met=%s&typ=json", SYS.CONFIG.base_url, 'Index', 'getConfig'), {uid:vid}, function (res)
|
||||
$.send(SYS.CONFIG.im_config, { uid: vid }, function (res) {
|
||||
|
||||
if (res.status == 200 && res.data.im_chat) {
|
||||
|
||||
var userInfo = res.data.user_info;
|
||||
var resourceSiteUrl = res.data.resource_site_url;
|
||||
var suid = res.data.suid;
|
||||
var puid = res.data.puid;
|
||||
var userInfo = res.data.user_info
|
||||
var resourceSiteUrl = res.data.resource_site_url
|
||||
var suid = res.data.suid
|
||||
var puid = res.data.puid
|
||||
|
||||
resourceSiteUrl = window.admin_url
|
||||
|
||||
function addCSS(url) {
|
||||
var link = document.createElement('link');
|
||||
link.type = 'text/css';
|
||||
link.rel = 'stylesheet';
|
||||
link.href = url;
|
||||
document.getElementsByTagName("head")[0].appendChild(link);
|
||||
var link = document.createElement('link')
|
||||
link.type = 'text/css'
|
||||
link.rel = 'stylesheet'
|
||||
link.href = url
|
||||
document.getElementsByTagName('head')[0].appendChild(link)
|
||||
}
|
||||
|
||||
addCSS(resourceSiteUrl + '/im/css/layui.css?v=' + SYS.VER);
|
||||
addCSS(resourceSiteUrl + '/im/css/layui.css?v=' + SYS.VER)
|
||||
|
||||
$.getScript(resourceSiteUrl + '/im/layui.js?v=' + SYS.VER, function () {
|
||||
$.getScript(
|
||||
resourceSiteUrl + '/im/layui.js?v=' + SYS.VER,
|
||||
function () {
|
||||
layui.config({
|
||||
base: resourceSiteUrl + '/im/', //你存放新模块的目录,注意,不是layui的模块目录
|
||||
dir: resourceSiteUrl + '/im/'
|
||||
}); //加载入口
|
||||
dir: resourceSiteUrl + '/im/',
|
||||
}) //加载入口
|
||||
|
||||
if (!/^http(s*):\/\//.test(location.href)) {
|
||||
alert('请部署到localhost上查看该演示');
|
||||
alert('请部署到localhost上查看该演示')
|
||||
}
|
||||
|
||||
|
||||
layui.use('layim', function (layim) {
|
||||
|
||||
//演示自动回复
|
||||
var autoReplay = [
|
||||
'您好,我现在有事不在,一会再和您联系。',
|
||||
@ -165,19 +181,17 @@ window.initIm = function () {
|
||||
'<(@ ̄︶ ̄@)>',
|
||||
'你要和我说话?你真的要和我说话?你确定自己想说吗?你一定非说不可吗?那你说吧,这是自动回复。',
|
||||
'face[黑线] 你慢慢说,别急……',
|
||||
'(*^__^*) face[嘻嘻] ,是贤心吗?'
|
||||
];
|
||||
'(*^__^*) face[嘻嘻] ,是贤心吗?',
|
||||
]
|
||||
|
||||
var config_data = {
|
||||
|
||||
//初始化接口
|
||||
init: {
|
||||
//url: sprintf("%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json", SYS.CONFIG.base_url, 'User_Friend', 'getFriendsInfo'),
|
||||
//url: SYS.CONFIG.friend_info_lists,
|
||||
url: SYS.CONFIG.im_config,
|
||||
data: {
|
||||
}
|
||||
}
|
||||
data: {},
|
||||
},
|
||||
|
||||
//或采用以下方式初始化接口
|
||||
/*
|
||||
@ -194,88 +208,92 @@ window.initIm = function () {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
//查看群员接口
|
||||
, members: {
|
||||
url: sprintf("%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json", SYS.CONFIG.base_url, 'User_Zone', 'getMembers')
|
||||
, data: {}
|
||||
}
|
||||
members: {
|
||||
url: sprintf(
|
||||
'%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json',
|
||||
SYS.CONFIG.base_url,
|
||||
'User_Zone',
|
||||
'getMembers'
|
||||
),
|
||||
data: {},
|
||||
},
|
||||
|
||||
//上传图片接口
|
||||
, uploadImage: {
|
||||
url: SYS.CONFIG.upload //(返回的数据格式见下文)
|
||||
, type: 'post' //默认post
|
||||
}
|
||||
uploadImage: {
|
||||
url: SYS.CONFIG.upload, //(返回的数据格式见下文)
|
||||
type: 'post', //默认post
|
||||
},
|
||||
|
||||
//上传文件接口
|
||||
, uploadFile: {
|
||||
url: SYS.CONFIG.upload //(返回的数据格式见下文)
|
||||
, type: 'post' //默认post
|
||||
}
|
||||
uploadFile: {
|
||||
url: SYS.CONFIG.upload, //(返回的数据格式见下文)
|
||||
type: 'post', //默认post
|
||||
},
|
||||
|
||||
, isAudio: true //开启聊天工具栏音频
|
||||
, isVideo: true //开启聊天工具栏视频
|
||||
isAudio: true, //开启聊天工具栏音频
|
||||
isVideo: true, //开启聊天工具栏视频
|
||||
|
||||
//扩展工具栏
|
||||
, tool: [{
|
||||
alias: 'code'
|
||||
, title: '代码'
|
||||
, icon: ''
|
||||
}]
|
||||
tool: [
|
||||
{
|
||||
alias: 'code',
|
||||
title: '代码',
|
||||
icon: '',
|
||||
},
|
||||
],
|
||||
|
||||
//,brief: true //是否简约模式(若开启则不显示主面板)
|
||||
|
||||
, title: '客服' //自定义主面板最小化时的标题
|
||||
, right: '0px' //主面板相对浏览器右侧距离
|
||||
title: '客服', //自定义主面板最小化时的标题
|
||||
right: '0px', //主面板相对浏览器右侧距离
|
||||
//,minRight: '90px' //聊天面板最小化时相对浏览器右侧距离
|
||||
, initSkin: '5.jpg' //1-5 设置初始背景
|
||||
initSkin: '5.jpg', //1-5 设置初始背景
|
||||
//,skin: ['aaa.jpg'] //新增皮肤
|
||||
//,isfriend: false //是否开启好友
|
||||
, isgroup: true //是否开启群组
|
||||
, min: true //是否始终最小化主面板,默认false
|
||||
, notice: true //是否开启桌面消息提醒,默认false
|
||||
isgroup: true, //是否开启群组
|
||||
min: true, //是否始终最小化主面板,默认false
|
||||
notice: true, //是否开启桌面消息提醒,默认false
|
||||
//,voice: false //声音提醒,默认开启,声音文件为:default.mp3
|
||||
|
||||
, msgbox: layui.cache.dir + 'css/modules/layim/html/msgbox.html' //消息盒子页面地址,若不开启,剔除该项即可
|
||||
, find: layui.cache.dir + 'css/modules/layim/html/find.html' //发现页面地址,若不开启,剔除该项即可
|
||||
, chatLog: layui.cache.dir + 'css/modules/layim/html/chatlog.html' //聊天记录页面地址,若不开启,剔除该项即可
|
||||
|
||||
};
|
||||
|
||||
msgbox: layui.cache.dir + 'css/modules/layim/html/msgbox.html', //消息盒子页面地址,若不开启,剔除该项即可
|
||||
find: layui.cache.dir + 'css/modules/layim/html/find.html', //发现页面地址,若不开启,剔除该项即可
|
||||
chatLog: layui.cache.dir + 'css/modules/layim/html/chatlog.html', //聊天记录页面地址,若不开启,剔除该项即可
|
||||
}
|
||||
|
||||
if (typeof ajaxCart != 'undefined') {
|
||||
config_data['right'] = '36px';
|
||||
config_data['right'] = '36px'
|
||||
}
|
||||
|
||||
if (userInfo) {
|
||||
} else {
|
||||
$.cookie('vid', vid);
|
||||
$.cookie('vid', vid)
|
||||
|
||||
config_data = {
|
||||
init: {
|
||||
//配置客户信息
|
||||
mine: {
|
||||
"username": "访客" //我的昵称
|
||||
, "id": puid || vid //我的ID
|
||||
, "user_id": vid //我的ID
|
||||
, "status": "online" //在线状态 online:在线、hide:隐身
|
||||
, "remark": "在深邃的编码世界,做一枚轻盈的纸飞机" //我的签名
|
||||
, "avatar": resourceSiteUrl + '/im/images/user_no_avatar.png' //我的头像
|
||||
}
|
||||
}
|
||||
, title: '客服' //自定义主面板最小化时的标题
|
||||
username: '访客', //我的昵称
|
||||
id: puid || vid, //我的ID
|
||||
user_id: vid, //我的ID
|
||||
status: 'online', //在线状态 online:在线、hide:隐身
|
||||
remark: '在深邃的编码世界,做一枚轻盈的纸飞机', //我的签名
|
||||
avatar: resourceSiteUrl + '/im/images/user_no_avatar.png', //我的头像
|
||||
},
|
||||
},
|
||||
title: '客服', //自定义主面板最小化时的标题
|
||||
|
||||
//开启客服模式
|
||||
, brief: true
|
||||
, isfriend: false //是否开启好友
|
||||
, isgroup: false //是否开启群组
|
||||
, min: true //是否始终最小化主面板,默认false
|
||||
, notice: true //是否开启桌面消息提醒,默认false
|
||||
brief: true,
|
||||
isfriend: false, //是否开启好友
|
||||
isgroup: false, //是否开启群组
|
||||
min: true, //是否始终最小化主面板,默认false
|
||||
notice: true, //是否开启桌面消息提醒,默认false
|
||||
}
|
||||
}
|
||||
|
||||
//基础配置
|
||||
layim.config(config_data);
|
||||
layim.config(config_data)
|
||||
|
||||
/*
|
||||
layim.chat({
|
||||
@ -292,44 +310,99 @@ window.initIm = function () {
|
||||
});
|
||||
layim.setChatMin();*/
|
||||
|
||||
//切换在线状态的方法
|
||||
var setonline = function () {
|
||||
socket_handle.send('_online_user_' + currentUser_id)
|
||||
}
|
||||
|
||||
//切换离线状态的方法
|
||||
var sethide = function () {
|
||||
console.log(currentUser_id)
|
||||
socket_handle.send('_leave_user_' + currentUser_id)
|
||||
}
|
||||
|
||||
//更新在线用户信息
|
||||
function updateOnlineStatus(arra) {
|
||||
//更新在线用户信息
|
||||
$(
|
||||
'div.layui-layim-main ul.layim-list-friend li ul.layui-layim-list li'
|
||||
).each(function () {
|
||||
//状态还原
|
||||
if (this.className != 'layim-null') {
|
||||
var span = $(this).find('span:first')
|
||||
var name = span.html()
|
||||
var loginName = this.className
|
||||
.replace('layim-friend', '')
|
||||
.trim()
|
||||
//alert(arra+"***"+loginName);
|
||||
if ((',' + arra + ',').indexOf(',' + loginName + ',') >= 0) {
|
||||
if (name.indexOf('(<font color="red">离线</font>)') >= 0) {
|
||||
span.replace(
|
||||
'(<font color="red">离线</font>)',
|
||||
'(<font color="green">在线</font>)'
|
||||
)
|
||||
} else if (
|
||||
name.indexOf('(<font color="green">在线</font>)') >= 0
|
||||
) {
|
||||
} else {
|
||||
span.html(name + '(<font color="green">在线</font>)')
|
||||
}
|
||||
} else {
|
||||
if (name.indexOf('(<font color="red">离线</font>)') >= 0) {
|
||||
} else if (
|
||||
name.indexOf('(<font color="green">在线</font>)') >= 0
|
||||
) {
|
||||
span.replace(
|
||||
'(<font color="green">在线</font>)',
|
||||
'(<font color="red">离线</font>)'
|
||||
)
|
||||
} else {
|
||||
span.html(name + '(<font color="red">离线</font>)')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//监听在线状态的切换事件
|
||||
layim.on('online', function (data) {
|
||||
//console.log(data);
|
||||
if (data == "online") {
|
||||
setonline(); //用户上线
|
||||
if (data == 'online') {
|
||||
setonline() //用户上线
|
||||
} else {
|
||||
sethide();//用户离线
|
||||
sethide() //用户离线
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
//监听签名修改
|
||||
layim.on('sign', function (value) {
|
||||
console.log(value);
|
||||
console.log(value)
|
||||
$.request({
|
||||
type: 'post',
|
||||
url: SYS.CONFIG.edit_sign,
|
||||
data: { user_sign: value },
|
||||
dataType: 'json',
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
});
|
||||
success: function (result) {},
|
||||
})
|
||||
})
|
||||
|
||||
//监听自定义工具栏点击,以添加代码为例
|
||||
layim.on('tool(code)', function (insert) {
|
||||
layer.prompt({
|
||||
title: __('插入代码')
|
||||
, formType: 2
|
||||
, shade: 0
|
||||
}, function (text, index) {
|
||||
layer.close(index);
|
||||
insert('[pre class=layui-code]' + text + '[/pre]'); //将内容插入到编辑器
|
||||
});
|
||||
});
|
||||
layer.prompt(
|
||||
{
|
||||
title: __('插入代码'),
|
||||
formType: 2,
|
||||
shade: 0,
|
||||
},
|
||||
function (text, index) {
|
||||
layer.close(index)
|
||||
insert('[pre class=layui-code]' + text + '[/pre]') //将内容插入到编辑器
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
//监听layim建立就绪
|
||||
layim.on('ready', function (res) {
|
||||
|
||||
//console.log(res.mine);
|
||||
/*
|
||||
layim.msgbox(5); //模拟消息盒子有新消息,实际使用时,一般是动态获得
|
||||
@ -373,13 +446,12 @@ window.initIm = function () {
|
||||
,content: "嗨,你好!欢迎体验LayIM。演示标记:"+ new Date().getTime()
|
||||
});
|
||||
*/
|
||||
|
||||
}, 3000);
|
||||
});
|
||||
}, 3000)
|
||||
})
|
||||
|
||||
//监听发送消息
|
||||
layim.on('sendMessage', function (data) {
|
||||
var To = data.to;//对方的信息
|
||||
var To = data.to //对方的信息
|
||||
//跨平台用户修正
|
||||
//data['to']['id'] = suid + '-' + data['to']['id'];
|
||||
//console.log(data);
|
||||
@ -387,27 +459,35 @@ window.initIm = function () {
|
||||
if (socket_connect === 1) {
|
||||
if (userInfo) {
|
||||
if (To.type === 'group') {
|
||||
var url = sprintf("%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json", SYS.CONFIG.base_url, 'User_Zone', 'addMessage');
|
||||
var url = sprintf(
|
||||
'%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json',
|
||||
SYS.CONFIG.base_url,
|
||||
'User_Zone',
|
||||
'addMessage'
|
||||
)
|
||||
|
||||
url = SYS.CONFIG.zonemsg_add_msg;
|
||||
url = SYS.CONFIG.zonemsg_add_msg
|
||||
} else {
|
||||
var url = sprintf("%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json", SYS.CONFIG.base_url, 'User_Message', 'add');
|
||||
url = SYS.CONFIG.msg_add;
|
||||
var url = sprintf(
|
||||
'%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json',
|
||||
SYS.CONFIG.base_url,
|
||||
'User_Message',
|
||||
'add'
|
||||
)
|
||||
url = SYS.CONFIG.msg_add
|
||||
}
|
||||
|
||||
console.info(data);
|
||||
console.info(data)
|
||||
|
||||
var params = {};
|
||||
params["user_other_id"] = data.to.friend_id
|
||||
params["message_content"] = data.mine.content
|
||||
params["item_id"] = 0
|
||||
params["length"] = 0
|
||||
params["w"] = 0
|
||||
params["h"] = 0
|
||||
var params = {}
|
||||
params['user_other_id'] = data.to.friend_id
|
||||
params['message_content'] = data.mine.content
|
||||
params['item_id'] = 0
|
||||
params['length'] = 0
|
||||
params['w'] = 0
|
||||
params['h'] = 0
|
||||
//params["type"] = text
|
||||
|
||||
|
||||
|
||||
$.request({
|
||||
type: 'get',
|
||||
//url: SYS.URL.user.msg_add,
|
||||
@ -416,8 +496,8 @@ window.initIm = function () {
|
||||
dataType: 'json',
|
||||
success: function (result) {
|
||||
if (result.status == 200) {
|
||||
var msgData = result.data;
|
||||
data['mine']['message_id'] = msgData.message_other_id;
|
||||
var msgData = result.data
|
||||
data['mine']['message_id'] = msgData.message_other_id
|
||||
|
||||
/*
|
||||
var e = socket.createEvent('send_msg');
|
||||
@ -426,18 +506,17 @@ window.initIm = function () {
|
||||
*/
|
||||
|
||||
//向服务器发送数据
|
||||
var text = JSON.stringify(data);
|
||||
socket_handle.send(text);
|
||||
var text = JSON.stringify(data)
|
||||
socket_handle.send(text)
|
||||
} else {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
})
|
||||
} else {
|
||||
//向服务器发送数据
|
||||
var text = JSON.stringify(data);
|
||||
socket_handle.send(text);
|
||||
|
||||
var text = JSON.stringify(data)
|
||||
socket_handle.send(text)
|
||||
}
|
||||
}
|
||||
|
||||
@ -470,16 +549,16 @@ window.initIm = function () {
|
||||
layim.getMessage(obj);
|
||||
}, 1000);
|
||||
*/
|
||||
});
|
||||
})
|
||||
|
||||
//监听查看群员
|
||||
layim.on('members', function (data) {
|
||||
//console.log(data);
|
||||
});
|
||||
})
|
||||
|
||||
//监听聊天窗口的切换
|
||||
layim.on('chatChange', function (res) {
|
||||
var type = res.data.type;
|
||||
var type = res.data.type
|
||||
console.log(res.data.id)
|
||||
if (type === 'friend') {
|
||||
//模拟标注好友状态
|
||||
@ -495,91 +574,87 @@ window.initIm = function () {
|
||||
});
|
||||
*/
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
var connentNode = function (data) {
|
||||
nodeSiteUrl = data.node_site_url;
|
||||
resourceSiteUrl = data.resource_site_url;
|
||||
nodeSiteUrl = data.node_site_url
|
||||
resourceSiteUrl = data.resource_site_url
|
||||
|
||||
|
||||
var script = document.createElement("script");
|
||||
script.type = "text/javascript";
|
||||
script.src = resourceSiteUrl + '/js/reconnecting-websocket.js?v=' + SYS.VER;
|
||||
document.body.appendChild(script);
|
||||
checkIO();
|
||||
var script = document.createElement('script')
|
||||
script.type = 'text/javascript'
|
||||
script.src =
|
||||
resourceSiteUrl + '/js/reconnecting-websocket.js?v=' + SYS.VER
|
||||
document.body.appendChild(script)
|
||||
checkIO()
|
||||
|
||||
function checkIO() {
|
||||
setTimeout(function () {
|
||||
if (typeof ReconnectingWebSocket === "function") {
|
||||
connect_node();
|
||||
if (typeof ReconnectingWebSocket === 'function') {
|
||||
connect_node()
|
||||
} else {
|
||||
checkIO();
|
||||
checkIO()
|
||||
}
|
||||
}, 500);
|
||||
}, 500)
|
||||
}
|
||||
|
||||
function connect_node() {
|
||||
var connect_url = nodeSiteUrl;
|
||||
var member = {};
|
||||
var connect_url = nodeSiteUrl
|
||||
var member = {}
|
||||
|
||||
|
||||
socket_connect = 0;//连接状态
|
||||
socket_handle = new ReconnectingWebSocket(connect_url);
|
||||
socket_connect = 0 //连接状态
|
||||
socket_handle = new ReconnectingWebSocket(connect_url)
|
||||
socket_handle.onopen = function (event) {
|
||||
socket_connect = 1;
|
||||
console.info('open');
|
||||
console.info(event);
|
||||
};
|
||||
socket_connect = 1
|
||||
console.info('open')
|
||||
console.info(event)
|
||||
}
|
||||
|
||||
socket_handle.onconnecting = function (event) {
|
||||
console.info(event);
|
||||
};
|
||||
console.info(event)
|
||||
}
|
||||
|
||||
socket_handle.onmessage = function (event) {
|
||||
console.info(event);
|
||||
console.info(event)
|
||||
|
||||
var msg_row = JSON.parse(event.data);
|
||||
var msg_row = JSON.parse(event.data)
|
||||
|
||||
|
||||
if (typeof msg_row.msg_type !== "undefined") {
|
||||
if (typeof msg_row.msg_type !== 'undefined') {
|
||||
if (msg_row.msg_type == 'text') {
|
||||
|
||||
} else if (msg_row.msg_type == 'voice') {
|
||||
msg_row.content = 'audio[' + msg_row.content + ']';
|
||||
|
||||
msg_row.content = 'audio[' + msg_row.content + ']'
|
||||
} else if (msg_row.msg_type == 'img') {
|
||||
msg_row.content = 'img[' + msg_row.content + ']';
|
||||
msg_row.content = 'img[' + msg_row.content + ']'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (msg_row.message_id) {
|
||||
//消息设置为已读
|
||||
var url = sprintf("%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json", SYS.CONFIG.base_url, 'User_Message', 'setRead');
|
||||
url = SYS.CONFIG.msg_set_read;
|
||||
var url = sprintf(
|
||||
'%s/account.php?mdu=sns&ctl=%s&met=%s&typ=json',
|
||||
SYS.CONFIG.base_url,
|
||||
'User_Message',
|
||||
'setRead'
|
||||
)
|
||||
url = SYS.CONFIG.msg_set_read
|
||||
|
||||
$.request({
|
||||
type: 'post',
|
||||
url: url,
|
||||
data: { message_id: msg_row.message_id },
|
||||
dataType: 'json',
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
|
||||
success: function (result) {},
|
||||
})
|
||||
}
|
||||
|
||||
layim.getMessage(msg_row);
|
||||
layim.getMessage(msg_row)
|
||||
}
|
||||
;
|
||||
|
||||
socket_handle.onerror = function (event) {
|
||||
console.info(event);
|
||||
};
|
||||
console.info(event)
|
||||
}
|
||||
socket_handle.onclose = function (event) {
|
||||
console.info(event);
|
||||
};
|
||||
console.info(event)
|
||||
}
|
||||
|
||||
//开始
|
||||
//结束
|
||||
@ -587,75 +662,54 @@ window.initIm = function () {
|
||||
|
||||
// 表情
|
||||
function update_chat_msg(msg) {
|
||||
if (typeof smilies_array !== "undefined") {
|
||||
msg = '' + msg;
|
||||
if (typeof smilies_array !== 'undefined') {
|
||||
msg = '' + msg
|
||||
for (var i in smilies_array[1]) {
|
||||
var s = smilies_array[1][i];
|
||||
var re = new RegExp("" + s[1], "g");
|
||||
var smilieimg = '<img title="' + s[6] + '" alt="' + s[6] + '" src="' + resourceSiteUrl + '/images/smilies/' + s[2] + '">';
|
||||
msg = msg.replace(re, smilieimg);
|
||||
var s = smilies_array[1][i]
|
||||
var re = new RegExp('' + s[1], 'g')
|
||||
var smilieimg =
|
||||
'<img title="' +
|
||||
s[6] +
|
||||
'" alt="' +
|
||||
s[6] +
|
||||
'" src="' +
|
||||
resourceSiteUrl +
|
||||
'/images/smilies/' +
|
||||
s[2] +
|
||||
'">'
|
||||
msg = msg.replace(re, smilieimg)
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
return msg
|
||||
}
|
||||
|
||||
//发送消息的方法
|
||||
function send(mine, To) {
|
||||
socket_handle.send(currentUser_id + "_msg_" + To.id + "_msg_" + mine.content + "_msg_" + mine.avatar + "_msg_" + To.type + "_msg_" + currentName + "_msg_NAN");
|
||||
};
|
||||
|
||||
//切换在线状态的方法
|
||||
function setonline() {
|
||||
socket_handle.send("_online_user_" + currentUser_id);
|
||||
};
|
||||
|
||||
//切换离线状态的方法
|
||||
function sethide() {
|
||||
socket_handle.send("_leave_user_" + currentUser_id);
|
||||
};
|
||||
|
||||
//更新在线用户信息
|
||||
function updateOnlineStatus(arra)//更新在线用户信息
|
||||
{
|
||||
$("div.layui-layim-main ul.layim-list-friend li ul.layui-layim-list li").each(function () {//状态还原
|
||||
if (this.className != 'layim-null') {
|
||||
var span = $(this).find("span:first");
|
||||
var name = span.html();
|
||||
var loginName = this.className.replace("layim-friend", "").trim();
|
||||
//alert(arra+"***"+loginName);
|
||||
if ((',' + arra + ",").indexOf(',' + loginName + ',') >= 0) {
|
||||
if (name.indexOf('(<font color="red">离线</font>)') >= 0) {
|
||||
span.replace('(<font color="red">离线</font>)', '(<font color="green">在线</font>)')
|
||||
} else if (name.indexOf('(<font color="green">在线</font>)') >= 0) {
|
||||
|
||||
} else {
|
||||
span.html(name + '(<font color="green">在线</font>)');
|
||||
}
|
||||
|
||||
} else {
|
||||
if (name.indexOf('(<font color="red">离线</font>)') >= 0) {
|
||||
} else if (name.indexOf('(<font color="green">在线</font>)') >= 0) {
|
||||
span.replace('(<font color="green">在线</font>)', '(<font color="red">离线</font>)')
|
||||
} else {
|
||||
span.html(name + '(<font color="red">离线</font>)');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
socket_handle.send(
|
||||
currentUser_id +
|
||||
'_msg_' +
|
||||
To.id +
|
||||
'_msg_' +
|
||||
mine.content +
|
||||
'_msg_' +
|
||||
mine.avatar +
|
||||
'_msg_' +
|
||||
To.type +
|
||||
'_msg_' +
|
||||
currentName +
|
||||
'_msg_NAN'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
connentNode(res.data);
|
||||
});
|
||||
|
||||
|
||||
}, true);
|
||||
connentNode(res.data)
|
||||
})
|
||||
},
|
||||
true
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
//登录后执行
|
||||
//initIm();
|
||||
|
||||
// initIm()
|
||||
|
||||
@ -55,7 +55,6 @@ export function getMerchApproval(params) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @name 发起合同签署
|
||||
* @api api_url + '/admin/shop/esign/sign-flow/create-by-file'
|
||||
@ -92,4 +91,38 @@ export function getCheckContractFile(params) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @name 创建店铺(补偿机制)
|
||||
* @api api_url + '/admin/shop/esign/signed/contract/file'
|
||||
* @param { mchMobile }
|
||||
* @returns
|
||||
*/
|
||||
|
||||
export function createShop(params) {
|
||||
return request({
|
||||
url: URL.shop.merch.createShop,
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @name 创建分账(补偿机制)
|
||||
* @api api_url + '/admin/shop/esign/signed/contract/file'
|
||||
* @param { mchMobile }
|
||||
* @returns
|
||||
*/
|
||||
|
||||
export function createSubAccount(params) {
|
||||
return request({
|
||||
url: URL.shop.merch.createSubAccount,
|
||||
method: 'post',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
@ -12,8 +12,7 @@ import BaiduMap from './../components/baidu_Map_xiufu'
|
||||
|
||||
Vue.use(BaiduMap, {
|
||||
// ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
|
||||
ak: 'chsSzRvFcU1uXYoDHAHlsF98NkTVbzvE',
|
||||
ak: 'it9e3OBa5JLwTT4V0YGyLUP02w3o1mml',
|
||||
})
|
||||
|
||||
|
||||
export default BaiduMap
|
||||
|
||||
@ -438,6 +438,10 @@ let url = {
|
||||
createByFile: api_url + '/admin/shop/esign/sign-flow/create-by-file',
|
||||
//查看商家签署合同
|
||||
checkContractFile: api_url + '/admin/shop/esign/signed/contract/file',
|
||||
//创建店铺(补偿机制)
|
||||
createShop: api_url + '/admin/shop/shop-store-base/mchinfo/to/storeinfo',
|
||||
//创建分账(补偿机制)
|
||||
createSubAccount: api_url + '/mobile/pay/lakala/ledger/applyLedgerMer',
|
||||
},
|
||||
activity: {
|
||||
lottery: {
|
||||
|
||||
@ -183,12 +183,12 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布版本详细说明" prop="description">
|
||||
<vab-quill
|
||||
ref="vab-quill"
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 10, maxRows: 20 }"
|
||||
placeholder="请输入内容"
|
||||
v-model="formDialog.description"
|
||||
:min-height="300"
|
||||
:options="vbOptions"
|
||||
/>
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="升级包开启状态" prop="is_force_update">
|
||||
<el-switch
|
||||
@ -630,9 +630,6 @@ export default {
|
||||
align-items: center;
|
||||
box-shadow: inset 0 -1px 0 #efefef;
|
||||
|
||||
.head-add-btn {
|
||||
}
|
||||
|
||||
.head-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@ -23,27 +23,27 @@ const addressInfo = [
|
||||
label: '详细地址',
|
||||
},
|
||||
{
|
||||
key:'storefrontImg',
|
||||
key: 'front_facade_image',
|
||||
label: '门脸图',
|
||||
},
|
||||
{
|
||||
key:'surroundingsImg',
|
||||
key: 'environment_image',
|
||||
label: '环境图',
|
||||
},
|
||||
]
|
||||
|
||||
const certificate = [
|
||||
// {
|
||||
// key: 'biz_license_company',
|
||||
// label: '公司名',
|
||||
// },
|
||||
// {
|
||||
// key:'biz_license_number',
|
||||
// label:'营业执照编号',
|
||||
// },
|
||||
{
|
||||
key:'biz_license_company',
|
||||
label:'公司名',
|
||||
},
|
||||
{
|
||||
key:'biz_license_number',
|
||||
label:'营业执照编号',
|
||||
},
|
||||
{
|
||||
key:'biz_license_image',
|
||||
label:'营业执照图片',
|
||||
key: 'businessLicenseOCR',
|
||||
label: '营业执照OCR识别',
|
||||
},
|
||||
{
|
||||
key: 'license_type',
|
||||
@ -57,64 +57,63 @@ const certificate = [
|
||||
key: 'license_image',
|
||||
label: '许可证图片',
|
||||
},
|
||||
// {
|
||||
// key: 'legal_person_mobile',
|
||||
// label: '法人手机号',
|
||||
// },
|
||||
{
|
||||
key:'legal_person_name',
|
||||
label:'法人姓名',
|
||||
},
|
||||
{
|
||||
key:'legal_person_mobile',
|
||||
label:'法人手机号',
|
||||
},
|
||||
{
|
||||
key:'legal_person_id_number',
|
||||
label:'法人身份证号码',
|
||||
},
|
||||
{
|
||||
key:'legal_person_id_images',
|
||||
label:'法人身份证正面图片',
|
||||
},
|
||||
{
|
||||
key:'legal_person_id_images2',
|
||||
label:'法人身份证反面图片',
|
||||
key: 'legalPersonOCR',
|
||||
label: '法人身份证OCR识别',
|
||||
},
|
||||
// {
|
||||
// key: 'legal_person_id_number',
|
||||
// label: '法人身份证号码',
|
||||
// },
|
||||
// {
|
||||
// key: 'legal_person_id_images',
|
||||
// label: '法人身份证正面图片',
|
||||
// },
|
||||
// {
|
||||
// key: 'legal_person_id_images2',
|
||||
// label: '法人身份证反面图片',
|
||||
// },
|
||||
]
|
||||
|
||||
|
||||
const certificate2 = [
|
||||
{
|
||||
key:'individual_id_number',
|
||||
label:'身份证号码',
|
||||
placeholder:'地图地址',
|
||||
},
|
||||
{
|
||||
key:'individual_id_images',
|
||||
label:'身份证正面图片',
|
||||
placeholder:'地图地址',
|
||||
},
|
||||
{
|
||||
key:'individual_id_images2',
|
||||
label:'身份证反面图片',
|
||||
key: 'personOCR',
|
||||
label: '身份证OCR',
|
||||
placeholder: '地图地址',
|
||||
},
|
||||
// {
|
||||
// key: 'individual_id_images',
|
||||
// label: '身份证正面图片',
|
||||
// placeholder: '地图地址',
|
||||
// },
|
||||
// {
|
||||
// key: 'individual_id_images2',
|
||||
// label: '身份证反面图片',
|
||||
// placeholder: '地图地址',
|
||||
// },
|
||||
]
|
||||
|
||||
const bankInfo = [
|
||||
{
|
||||
key:'bank_name',
|
||||
label:'开户银行',
|
||||
},
|
||||
{
|
||||
key:'bank_branch_name',
|
||||
label:'开户银行的支行名称',
|
||||
},
|
||||
{
|
||||
key:'account_number',
|
||||
label:'收款账户号码',
|
||||
},
|
||||
{
|
||||
key:'account_holder_name',
|
||||
label:'收款账户姓名',
|
||||
key: 'bankOCR',
|
||||
label: '银行OCR',
|
||||
},
|
||||
// {
|
||||
// key: 'bank_branch_name',
|
||||
// label: '开户银行的支行名称',
|
||||
// },
|
||||
// {
|
||||
// key: 'account_number',
|
||||
// label: '收款账户号码',
|
||||
// },
|
||||
// {
|
||||
// key: 'account_holder_name',
|
||||
// label: '收款账户姓名',
|
||||
// },
|
||||
]
|
||||
|
||||
const formConfig = [
|
||||
@ -249,7 +248,7 @@ const formConfig2=[
|
||||
{
|
||||
key: 'storefrontImg',
|
||||
label: '门脸图',
|
||||
placeholder:''
|
||||
placeholder: '',
|
||||
},
|
||||
{
|
||||
key: 'surroundingsImg',
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@ -77,7 +78,32 @@ export default {
|
||||
height: window.innerHeight - 220 - 150,
|
||||
},
|
||||
shopId: 0,
|
||||
approvalStatus: ['已通过', '未通过', '待审核'],
|
||||
approvalStatus:[
|
||||
{
|
||||
key:1,
|
||||
value:'已通过',
|
||||
},
|
||||
{
|
||||
key:2,
|
||||
value:'未通过',
|
||||
},
|
||||
{
|
||||
key:3,
|
||||
value:'待审核',
|
||||
},
|
||||
{
|
||||
key:4,
|
||||
value:'未申请过',
|
||||
},
|
||||
{
|
||||
key:5,
|
||||
value:'已提交拉卡拉审核',
|
||||
},
|
||||
{
|
||||
key:21,
|
||||
value:'拉卡拉审核未通过',
|
||||
},
|
||||
],
|
||||
signedStatus: [
|
||||
{
|
||||
index: -1,
|
||||
@ -109,6 +135,7 @@ export default {
|
||||
},
|
||||
],
|
||||
entityType: ['企业', '个人'],
|
||||
storeStatus : ['已创建','未创建'],
|
||||
tabColumn: [
|
||||
{
|
||||
prop: 'operation',
|
||||
@ -131,7 +158,7 @@ export default {
|
||||
label: '联系人',
|
||||
},
|
||||
{
|
||||
prop: '',
|
||||
prop: 'account_holder_name',
|
||||
label: '公司名称',
|
||||
},
|
||||
{
|
||||
@ -155,9 +182,17 @@ export default {
|
||||
label: '审批状态',
|
||||
},
|
||||
{
|
||||
prop: 'signed_status',
|
||||
label: '合同签署状态',
|
||||
prop: 'store_status',
|
||||
label: '店铺创建状态',
|
||||
},
|
||||
{
|
||||
prop: 'has_apply_split',
|
||||
label: '是否分账',
|
||||
},
|
||||
// {
|
||||
// prop: 'signed_status',
|
||||
// label: '合同签署状态',
|
||||
// },
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
@ -179,9 +214,18 @@ export default {
|
||||
if (res.data.items.length > 0) {
|
||||
res.data.items.forEach((item) => {
|
||||
if (item.approval_status) {
|
||||
item.approval_status =
|
||||
this.approvalStatus[item.approval_status - 1]
|
||||
|
||||
const found = this.approvalStatus.find(group => group.key == item.approval_status);
|
||||
item.approval_status = found ? found.value : 'Unknown Status';
|
||||
}
|
||||
if(item.store_status){
|
||||
item.store_status = this.storeStatus[item.store_status - 1]
|
||||
}
|
||||
|
||||
if(item.has_apply_split){
|
||||
item.has_apply_split = item.has_apply_split == 1 ? '是' : '否'
|
||||
}
|
||||
|
||||
if (item.signed_status != null) {
|
||||
this.signedStatus.forEach((group) => {
|
||||
if (group.index == item.signed_status) {
|
||||
@ -217,21 +261,26 @@ export default {
|
||||
if (row.approval_status == '已通过' && columnIndex == 10) {
|
||||
return 'status-pass'
|
||||
}
|
||||
if (row.approval_status == '未通过' && columnIndex == 10) {
|
||||
if (['拉卡拉审核未通过','未通过'].includes(row.approval_status) && columnIndex == 10) {
|
||||
return 'status-not-pass'
|
||||
}
|
||||
if (row.approval_status == '待审核' && columnIndex == 10) {
|
||||
if (['待审核','未申请过','已提交拉卡拉审核'].includes(row.approval_status) && columnIndex == 10) {
|
||||
return 'status-check-pass'
|
||||
}
|
||||
|
||||
if (row.signed_status == '' && columnIndex == 11) {
|
||||
if (row.store_status == '已创建' && columnIndex == 11) {
|
||||
return 'status-pass'
|
||||
}
|
||||
if (row.signed_status == '没签署' && columnIndex == 11) {
|
||||
if (row.store_status == '未创建' && columnIndex == 11) {
|
||||
return 'status-not-pass'
|
||||
}
|
||||
if (row.signed_status == '待审核' && columnIndex == 11) {
|
||||
return 'status-check-pass'
|
||||
|
||||
|
||||
if (row.has_apply_split == '是' && columnIndex == 12) {
|
||||
return 'status-pass'
|
||||
}
|
||||
if (row.has_apply_split == '否' && columnIndex == 12) {
|
||||
return 'status-not-pass'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -435,18 +435,18 @@
|
||||
:class="['item-input', 'approval-status']"
|
||||
:style="approvalStatusClass"
|
||||
>
|
||||
{{ approvalStatus[form.approval_status - 1] }}
|
||||
{{ formatApprovalStatus(form.approval_status) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-info">
|
||||
<div class="item-block">
|
||||
<div class="item-lable">合同签署状态</div>
|
||||
<div class="item-lable">店铺创建状态</div>
|
||||
<span
|
||||
:class="['item-input', 'approval-status']"
|
||||
:style="signedStatusClass"
|
||||
>
|
||||
{{ form.signedStatusName }}
|
||||
{{ storeStatus[form.store_status - 1] }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -540,7 +540,7 @@
|
||||
:key="index + item.key"
|
||||
:label="item.key"
|
||||
>
|
||||
{{ item.label }}
|
||||
{{ form.entity_type == 1 ? '银行' : item.label }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
@ -550,20 +550,12 @@
|
||||
<div class="btn-content" v-if="!showLoading">
|
||||
<el-button
|
||||
class="btn"
|
||||
style="width: 150px;"
|
||||
type="success"
|
||||
@click="getMerchApproval(1)"
|
||||
v-if="![1].includes(form.approval_status)"
|
||||
>
|
||||
通过审核
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn btn-hetong"
|
||||
type="success"
|
||||
@click="getCreateByFile()"
|
||||
v-if="![2].includes(form.signed_status)"
|
||||
:disabled="!form.signed_status <= 0 || form.approval_status != 1"
|
||||
>
|
||||
合同签署
|
||||
提交拉卡拉审核
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn"
|
||||
@ -576,6 +568,22 @@
|
||||
<!-- <el-button class="btn" type="danger" @click="getCheckContractFile()">
|
||||
查看商家签署合同
|
||||
</el-button> -->
|
||||
<el-button
|
||||
class="btn btn-hetong"
|
||||
type="success"
|
||||
@click="createShop()"
|
||||
v-if="form.store_status!=1 && form.approval_status == 1"
|
||||
>
|
||||
创建店铺
|
||||
</el-button>
|
||||
<el-button
|
||||
class="btn btn-hetong"
|
||||
type="success"
|
||||
@click="createSubAccount()"
|
||||
v-if=" form.has_apply_mer ==1 && form.has_apply_split != 1"
|
||||
>
|
||||
创建分账
|
||||
</el-button>
|
||||
<el-button class="btn" @click="close()">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -587,6 +595,8 @@ import {
|
||||
getMerchApproval,
|
||||
getCreateByFile,
|
||||
getCheckContractFile,
|
||||
createShop,
|
||||
createSubAccount
|
||||
} from '@/api/shopAudit/shopAudit'
|
||||
import city from './cityData.js'
|
||||
import config from './formConfig'
|
||||
@ -614,6 +624,7 @@ export default {
|
||||
contact_name: '',
|
||||
biz_category: 0,
|
||||
settlement_method: '',
|
||||
store_area:'',
|
||||
store_longitude: '',
|
||||
store_latitude: '',
|
||||
province_id: '',
|
||||
@ -647,11 +658,45 @@ export default {
|
||||
city_name: '',
|
||||
county_name: '',
|
||||
signed_status: 0,
|
||||
lkl_mer_cup_no:'', // 拉卡拉商户号
|
||||
lkl_term_no:'',// 拉卡拉终端号
|
||||
has_ec_signed:'' , // 是否签合同,1-是;2-否;
|
||||
has_apply_mer:'' ,// 是否进件成功,1-是;2-否;
|
||||
has_apply_split:'',// 是否申请分账业务,1-是;2-否;
|
||||
has_apply_receiver:'',// 是否申请创建分账接收方,1-是;2-否;,
|
||||
has_bind_receiver:''// 是否是否绑定分账接收方,1-是;2-否;
|
||||
},
|
||||
bizCategoryList: ['医疗用品', '生活用品'],
|
||||
entityType: ['企业', '个人'],
|
||||
approvalStatus: ['已通过', '未通过', '待审核'],
|
||||
// approvalStatus: ['已通过', '未通过', '待审核','未申请过','已提交拉卡拉审核','拉卡拉审核未通过'],
|
||||
approvalStatus:[
|
||||
{
|
||||
key:1,
|
||||
value:'已通过',
|
||||
},
|
||||
{
|
||||
key:2,
|
||||
value:'未通过',
|
||||
},
|
||||
{
|
||||
key:3,
|
||||
value:'待审核',
|
||||
},
|
||||
{
|
||||
key:4,
|
||||
value:'未申请过',
|
||||
},
|
||||
{
|
||||
key:5,
|
||||
value:'已提交拉卡拉审核',
|
||||
},
|
||||
{
|
||||
key:21,
|
||||
value:'拉卡拉审核未通过',
|
||||
},
|
||||
],
|
||||
licenseType: ['许可证', '特许证件', '其他证件'],
|
||||
storeStatus : ['已创建','未创建'],
|
||||
signedStatus: [
|
||||
{
|
||||
index: -1,
|
||||
@ -705,21 +750,12 @@ export default {
|
||||
return colorList[this.form.approval_status - 1]
|
||||
},
|
||||
signedStatusClass() {
|
||||
let colorList = [
|
||||
'color:#ffba00',
|
||||
'color:#ffba00',
|
||||
'color:#48c978',
|
||||
'color:red',
|
||||
'color:red',
|
||||
'color:red',
|
||||
'',
|
||||
'color:red',
|
||||
]
|
||||
|
||||
if (this.form.signed_status == -1) {
|
||||
return 'color:#ffba00'
|
||||
|
||||
if (this.form.store_status == 1) {
|
||||
return 'color:#48c978'
|
||||
} else {
|
||||
return colorList[this.form.signed_status]
|
||||
return 'color:red'
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -751,29 +787,44 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
this.cityData.provinceData.forEach((item) => {
|
||||
if (item.value == res.data.province_id) {
|
||||
this.form.province_nmae = item.label
|
||||
if(this.form.store_area){
|
||||
let areaArr = this.form.store_area.split('/');
|
||||
if(areaArr[0]){
|
||||
this.form.province_nmae = areaArr[0]
|
||||
}
|
||||
})
|
||||
|
||||
this.cityData.cityData.forEach((item) => {
|
||||
item.forEach((group) => {
|
||||
if (group.value == res.data.city_id) {
|
||||
this.form.city_name = group.label
|
||||
if(areaArr[1]){
|
||||
this.form.city_name = areaArr[1]
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this.cityData.areaData.forEach((item) => {
|
||||
item.forEach((group) => {
|
||||
group.forEach((group2) => {
|
||||
if (group2.value == res.data.county_id) {
|
||||
this.form.county_name = group2.label
|
||||
if(areaArr[2]){
|
||||
this.form.county_name = areaArr[2]
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// this.cityData.provinceData.forEach((item) => {
|
||||
// if (item.value == res.data.province_id) {
|
||||
// this.form.province_nmae = item.label
|
||||
// }
|
||||
// })
|
||||
|
||||
// this.cityData.cityData.forEach((item) => {
|
||||
// item.forEach((group) => {
|
||||
// if (group.value == res.data.city_id) {
|
||||
// this.form.city_name = group.label
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
|
||||
// this.cityData.areaData.forEach((item) => {
|
||||
// item.forEach((group) => {
|
||||
// group.forEach((group2) => {
|
||||
// if (group2.value == res.data.county_id) {
|
||||
// this.form.county_name = group2.label
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
|
||||
this.srcList1.push(res.data.front_facade_image)
|
||||
this.srcList2.push(res.data.environment_image)
|
||||
@ -818,7 +869,7 @@ export default {
|
||||
id: this.id,
|
||||
approvalStatus: status,
|
||||
approvalRemark: this.form.approvalRemark,
|
||||
approvalInvalidCol: this.checkboxList,
|
||||
approvalInvalidCol: this.checkboxList.filter(item => !['businessLicenseOCR', 'legalPersonOCR','personOCR','bankOCR'].includes(item)),
|
||||
}
|
||||
|
||||
let res = await getMerchApproval(parems)
|
||||
@ -882,7 +933,26 @@ export default {
|
||||
close() {
|
||||
this.$emit('close')
|
||||
},
|
||||
handlecheckbox() {},
|
||||
handlecheckbox(e) {
|
||||
|
||||
// 企业身份证驳回 <!-- 身份证号码,身份证正面图片,身份证反面图片--!>
|
||||
if(e.includes('legalPersonOCR')){
|
||||
this.checkboxList = ['legal_person_id_number','legal_person_id_images','legal_person_id_images2',...this.checkboxList ]
|
||||
}
|
||||
// 个人身份证驳回 <!-- 身份证号码,身份证正面图片,身份证反面图片--!>
|
||||
if(e.includes('personOCR')){
|
||||
this.checkboxList = ['individual_id_number','individual_id_images','individual_id_images2',...this.checkboxList]
|
||||
}
|
||||
//银行卡驳回 <!-- 银行卡上传图片,开户名称,银行卡号,开户银行 --!>
|
||||
if(e.includes('bankOCR')){
|
||||
this.checkboxList = ['bankcard_item','account_holder_name','account_number','branch_name',...this.checkboxList]
|
||||
}
|
||||
// 企业营业执照驳回
|
||||
if(e.includes('businessLicenseOCR')){
|
||||
this.checkboxList = ['biz_license_image','biz_license_company','legal_person_name','biz_license_number',...this.checkboxList]
|
||||
}
|
||||
|
||||
},
|
||||
handleCheckAllChange(val) {
|
||||
if (this.form.entity_type == 1) {
|
||||
this.checkboxList = val
|
||||
@ -909,6 +979,29 @@ export default {
|
||||
|
||||
this.isIndeterminate = false
|
||||
},
|
||||
formatApprovalStatus(status){
|
||||
|
||||
const found = this.approvalStatus.find(item => item.key == status);
|
||||
return found ? found.value : 'Unknown Status';
|
||||
},
|
||||
async createSubAccount(){
|
||||
let res = await createSubAccount({merCupNo:this.form.lkl_mer_cup_no})
|
||||
if(res && res.status == 200){
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '分账成功',
|
||||
})
|
||||
}
|
||||
},
|
||||
async createShop(){
|
||||
let res = await createShop({mchMobile:this.form.login_mobile})
|
||||
if(res && res.status == 200){
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '店铺创建成功',
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user