Commit 7d659e51 by 前端

Merge branch 'v2.12.0' into 'develop'

V2.12.0

See merge request !36
2 parents fc12e787 37ace8ca
...@@ -122,6 +122,10 @@ ...@@ -122,6 +122,10 @@
xm-select>.xm-body .scroll-body { xm-select>.xm-body .scroll-body {
width: 360px; width: 360px;
} }
xm-select:hover {
border: 1px solid #5850ff !important;
}
</style> </style>
</head> </head>
...@@ -221,6 +225,53 @@ ...@@ -221,6 +225,53 @@
class="layui-input" /> class="layui-input" />
</div> </div>
</div> </div>
<div class="layui-form-item">
<label class="layui-form-label">所属部门:</label>
<div class="layui-input-block">
<select name="department" id="departmentAuth">
<option value="1">销售部</option>
<option value="2">售后部</option>
<option value="3">客服部</option>
<option value="4">续保部</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">员工标签:</label>
<div class="layui-input-block">
<div id="tagAuth" name="staffLabel" class="xm-select-demo"></div>
<!-- <select name="staffLabel" id="tagAuth" xm-select="selectId">
<option value="0">1.0新车权益销售</option>
<option value="1">1.1次新车精品升级</option>
<option value="2">1.2次新车线上转化</option>
<option value="3">1.3存量用户众筹</option>
</select> -->
</div>
</div>
<div class="layui-form-item hide" id="wechatNick">
<label class="layui-form-label">微信昵称:</label>
<div class="layui-input-block">
<input type="text" name="weChatNickName" readonly
class="layui-input" />
</div>
</div>
<div class="layui-form-item hide" id="wechatPhone">
<label class="layui-form-label">微信手机号:</label>
<div class="layui-input-block">
<input type="text" name="weChatPhone" readonly
class="layui-input" />
</div>
</div>
<div class="layui-form-item hide" id="wechatId">
<label class="layui-form-label">微信openid:</label>
<div class="layui-input-block">
<input type="text" name="weChatOpenId" readonly
class="layui-input" />
</div>
</div>
<div class="footer-close"> <div class="footer-close">
<button class="layui-btn" lay-submit lay-filter="employeeSubmit">确定</button> <button class="layui-btn" lay-submit lay-filter="employeeSubmit">确定</button>
<button type="reset" class="layui-btn" id="return">取消</button> <button type="reset" class="layui-btn" id="return">取消</button>
...@@ -249,6 +300,9 @@ ...@@ -249,6 +300,9 @@
var pwd = $('#password') // 密码输入框 var pwd = $('#password') // 密码输入框
var resetpsw = $('#resetpsw') var resetpsw = $('#resetpsw')
var roleAuth = $('#roleAuth') var roleAuth = $('#roleAuth')
var wechatNick = $('#wechatNick')
var wechatPhone = $('#wechatPhone')
var wechatId = $('#wechatId')
var merchantName = $('#merchantName') var merchantName = $('#merchantName')
var merchantId = '' var merchantId = ''
var visibleMerchant = {} var visibleMerchant = {}
...@@ -268,6 +322,45 @@ ...@@ -268,6 +322,45 @@
} }
} }
// 员工标签
var tagAuth = xmSelect.render({
el: '#tagAuth',
prop: {
name: 'name',
value: 'value'
},
// layVerify: `${qs('channel') ? '' : 'required'}`,
// model: {
// label: {
// type: 'text',
// text: {}
// }
// },
name: 'staffLabel',
selected: true,
data: [
{
name: '1.0新车权益销售',
value: '0'
},
{
name: '1.1次新车精品升级',
value: '1'
},
{
name: '1.2次新车线上转化',
value: '2'
},
{
name: '1.3存量用户众筹',
value: '3'
}
],
on: function (data) {
staffLabel = data.change[0].value
}
})
var merchantNameSelect = xmSelect.render({ var merchantNameSelect = xmSelect.render({
el: '#merchantNameSelect', el: '#merchantNameSelect',
...@@ -288,7 +381,6 @@ ...@@ -288,7 +381,6 @@
radio: true, radio: true,
data: [], data: [],
on: function (data) { on: function (data) {
console.log(data)
merchantId = data.change[0].id merchantId = data.change[0].id
getList(merchantId) getList(merchantId)
} }
...@@ -310,6 +402,12 @@ ...@@ -310,6 +402,12 @@
// 判断是否是编辑 // 判断是否是编辑
resetpsw.removeClass('hide') resetpsw.removeClass('hide')
resetpsw.addClass('show') resetpsw.addClass('show')
wechatNick.removeClass('hide')
wechatNick.addClass('show')
wechatPhone.removeClass('hide')
wechatPhone.addClass('show')
wechatId.removeClass('hide')
wechatId.addClass('show')
merchantId = encodeURI(qs('merchantId')) merchantId = encodeURI(qs('merchantId'))
$('#merchantIdText').text(decodeURIComponent(qs('merchantName'))) $('#merchantIdText').text(decodeURIComponent(qs('merchantName')))
$('#merchantIdText').removeClass('hide') $('#merchantIdText').removeClass('hide')
...@@ -490,7 +588,6 @@ ...@@ -490,7 +588,6 @@
function getVisibleMerchant(merchantId) { function getVisibleMerchant(merchantId) {
var visibleMerchantParams = { id: merchantId, method: 'merchants.api.merchant.findMerchantTree' } var visibleMerchantParams = { id: merchantId, method: 'merchants.api.merchant.findMerchantTree' }
request(visibleMerchantParams, function (res) { request(visibleMerchantParams, function (res) {
console.log(res)
if (res.code == '0') { if (res.code == '0') {
const data = res.data const data = res.data
if (id) { if (id) {
...@@ -529,7 +626,6 @@ ...@@ -529,7 +626,6 @@
} }
function createMerchant(arr, data) { function createMerchant(arr, data) {
console.log(arr, data)
visibleMerchant = tree.create('visibleInferiorMerTree', data, null, { visibleMerchant = tree.create('visibleInferiorMerTree', data, null, {
check: { check: {
enable: true, enable: true,
...@@ -598,7 +694,15 @@ ...@@ -598,7 +694,15 @@
// visibleInferiorMer: "1", // visibleInferiorMer: "1",
roleIds: data.roleIds ? +data.roleIds.join('') : '', roleIds: data.roleIds ? +data.roleIds.join('') : '',
staffEmail: data.staffEmail, staffEmail: data.staffEmail,
staffJob: data.staffJob staffJob: data.staffJob,
department: data.department,
weChatNickName: data.weChatNickName,
weChatPhone: data.weChatPhone,
weChatOpenId: data.weChatOpenId
}
if (data.staffLabel) {
var item = data.staffLabel.split(','.toString())
tagAuth.setValue(item)
} }
if (data.merchantFileResponse) { if (data.merchantFileResponse) {
merchantFileRequest = { fileName: data.merchantFileResponse.fileName, fileUrl: data.merchantFileResponse.fileUrl } merchantFileRequest = { fileName: data.merchantFileResponse.fileName, fileUrl: data.merchantFileResponse.fileUrl }
......
...@@ -172,6 +172,36 @@ ...@@ -172,6 +172,36 @@
<div class="layui-form-mid layui-word-aux" id="createdAccount"></div> <div class="layui-form-mid layui-word-aux" id="createdAccount"></div>
</div> </div>
</div> </div>
<div class="layui-form-item">
<label class="layui-form-label">所属部门:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux" id="department"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">员工标签:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux" id="staffLabel"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">微信昵称:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux" id="weChatNickName"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">微信手机号:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux" id="weChatPhone"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">微信openid:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux" id="weChatOpenId"></div>
</div>
</div>
</div> </div>
<div class="topmidwrap"> <div class="topmidwrap">
<div class="grayLine"></div> <div class="grayLine"></div>
...@@ -232,7 +262,7 @@ ...@@ -232,7 +262,7 @@
var table = layui.table var table = layui.table
var laypage = layui.laypage var laypage = layui.laypage
var merchantId = qs('merchantId') var merchantId = qs('merchantId')
var basicArr = ['staffName', 'staffPhone', 'entmicroName', 'staffJob', 'roleName', 'roleCode', 'merchantName', 'createdAccount'] var basicArr = ['staffName', 'staffPhone', 'entmicroName', 'staffJob', 'roleName', 'roleCode', 'merchantName', 'createdAccount', 'department', 'staffLabel', 'weChatNickName', 'weChatPhone', 'weChatOpenId']
var employeeData = {} var employeeData = {}
var visibleInferiorMerName = $('#visibleInferiorMerName') var visibleInferiorMerName = $('#visibleInferiorMerName')
...@@ -340,6 +370,51 @@ ...@@ -340,6 +370,51 @@
for (var i in basicArr) { for (var i in basicArr) {
$('#' + [basicArr[i]]).text(employeeData[basicArr[i]] ? employeeData[basicArr[i]] : '无') $('#' + [basicArr[i]]).text(employeeData[basicArr[i]] ? employeeData[basicArr[i]] : '无')
} }
// 所属部门
if (employeeData.department) {
switch(employeeData.department) {
case 1 :
$('#department').text('销售部')
break;
case 2 :
$('#department').text('售后部')
break;
case 3 :
$('#department').text('客服部')
break;
case 4 :
$('#department').text('续保部')
break;
default:
$('#department').text('无')
}
}
// 员工标签
if (employeeData.staffLabel) {
employeeData.staffLabel = employeeData.staffLabel.split(',')
console.log(employeeData.staffLabel, '0');
employeeData.staffLabel.map((item,index) => {
switch(item) {
case '0' :
employeeData.staffLabel[index] = '1.0新车权益销售'
break;
case '1' :
employeeData.staffLabel[index] = '1.1次新车精品升级'
break;
case '2' :
employeeData.staffLabel[index] = '1.2次新车线上转化'
break;
case '3' :
employeeData.staffLabel[index] = '1.3存量用户众筹'
break;
default:
employeeData.staffLabel[index] = '无'
}
})
console.log(employeeData.staffLabel.join(','), '1');
$('#staffLabel').text(employeeData.staffLabel.join(','))
}
if (employeeData.visibleInferiorMerName) { if (employeeData.visibleInferiorMerName) {
var visibleName = employeeData.visibleInferiorMerName.split(',') var visibleName = employeeData.visibleInferiorMerName.split(',')
$.each(visibleName, function (idx, i) { $.each(visibleName, function (idx, i) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @LastEditTime: 2022-03-29 18:53:12 * @LastEditTime: 2022-03-29 18:53:12
* @FilePath: \account\js\load.js * @FilePath: \account\js\load.js
*/ */
; (function load() { ;(function load() {
loadLayConfig() loadLayConfig()
loadConfig() loadConfig()
loadHeaderFooter() loadHeaderFooter()
...@@ -17,20 +17,21 @@ ...@@ -17,20 +17,21 @@
* 跳转方法 TODO * 跳转方法 TODO
*/ */
function go(module, page, params, blank) { function go(module, page, params, blank) {
var _p = (!params || layui.$.isEmptyObject(params)) ? '' : genurl(params) var _p = !params || layui.$.isEmptyObject(params) ? '' : genurl(params)
var href = '/html/' + module + '/' + page + '.html' var href = '/html/' + module + '/' + page + '.html'
if (blank) { if (blank) {
window.open(href, '_blank') window.open(href, '_blank')
} else { } else {
window.location.href = _p ? href + '?' + _p : href window.location.href = _p ? href + '?' + _p : href
} }
} }
function loadLayConfig() { function loadLayConfig() {
layui.config({ layui
.config({
base: '/js/' base: '/js/'
}).extend({ })
.extend({
xmSelect: 'xm-select' xmSelect: 'xm-select'
}) })
} }
...@@ -38,9 +39,11 @@ function loadHeaderFooter() { ...@@ -38,9 +39,11 @@ function loadHeaderFooter() {
layui.use(['store'], function () { layui.use(['store'], function () {
var isExternal = isAppend() var isExternal = isAppend()
var store = layui.store var store = layui.store
if (isExternal) { //运营平台外部系统 if (isExternal) {
//运营平台外部系统
append() append()
} else {//嵌入运营平台 或者是登录页面 } else {
//嵌入运营平台 或者是登录页面
if (qs('sessionId')) { if (qs('sessionId')) {
// SCRM 系统 // SCRM 系统
store.set('accountInfo', { store.set('accountInfo', {
...@@ -51,7 +54,8 @@ function loadHeaderFooter() { ...@@ -51,7 +54,8 @@ function loadHeaderFooter() {
store.set('token', qs('sessionId')) store.set('token', qs('sessionId'))
} else { } else {
// 运营平台 // 运营平台
if (isLoginPage()) { //如果是登陆页面 直接返回 登录成功会设置token if (isLoginPage()) {
//如果是登陆页面 直接返回 登录成功会设置token
return return
} }
var t = qs('t') //运营平台子系统从 父系统的iframe src获取 TGT. var t = qs('t') //运营平台子系统从 父系统的iframe src获取 TGT.
...@@ -69,7 +73,6 @@ function append() { ...@@ -69,7 +73,6 @@ function append() {
$(header).load('/html/components/header.html') $(header).load('/html/components/header.html')
$(footer).load('/html/components/footer.html') $(footer).load('/html/components/footer.html')
$('main').before(header).after(footer) $('main').before(header).after(footer)
} }
function isAppend() { function isAppend() {
...@@ -90,8 +93,8 @@ function loadConfig() { ...@@ -90,8 +93,8 @@ function loadConfig() {
} }
var ajax = layui.$.ajax var ajax = layui.$.ajax
ajax({ ajax({
url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config', // url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config',
// url: 'http://oss-config.dev.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config', url: 'http://oss-config.dev.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config',
async: false, async: false,
success: function (res) { success: function (res) {
store.setEx('external', res.external, 10 * 60 * 1000) store.setEx('external', res.external, 10 * 60 * 1000)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!