Commit 70375ec9 by 徐忆琳

Merge branch 'xuyl_dev_v3.7.0' into 'v3.7.0'

更新v3.7.0代码

See merge request !43
2 parents d9aae31c 19e49c93
...@@ -88,6 +88,18 @@ ...@@ -88,6 +88,18 @@
class="layui-input updateCircleAngle" /> class="layui-input updateCircleAngle" />
</div> </div>
</div> </div>
<div id="from" class="layui-inline">
<label class="layui-form-label">来源:</label>
<div class="layui-input-inline" style="width: 246px">
<select name="createdSource" id="searchfrom">
<option value="">全部</option>
<option value="1">账户中心</option>
<option value="2">SCRM</option>
<option value="3">生意助手</option>
<option value="4">门店助手</option>
</select>
</div>
</div>
<div class="layui-inline" style="float: right" pane> <div class="layui-inline" style="float: right" pane>
<button type="button" class="layui-btn layui-btn-normal exportInputBtn" id="employeeExport">导出</button> <button type="button" class="layui-btn layui-btn-normal exportInputBtn" id="employeeExport">导出</button>
<button id="employeeReset" class="layui-btn">重置</button> <button id="employeeReset" class="layui-btn">重置</button>
...@@ -143,6 +155,8 @@ ...@@ -143,6 +155,8 @@
{ field: 'statusName', title: '状态', align: 'center', width: 80 }, { field: 'statusName', title: '状态', align: 'center', width: 80 },
{ field: 'createdAccount', title: '创建者', align: 'center' }, { field: 'createdAccount', title: '创建者', align: 'center' },
{ field: 'merchantName', title: '商户名(商户号)', align: 'center', width: 160 }, { field: 'merchantName', title: '商户名(商户号)', align: 'center', width: 160 },
{ field: 'createdSourceStr', title: '来源', align: 'center', width: 160 ,templet: '#sourceTpl',},
{ field: 'createdTime', title: '创建时间', align: 'center', width: 160 },
{ field: 'updatedTime', title: '更新时间', align: 'center', width: 90 }, { field: 'updatedTime', title: '更新时间', align: 'center', width: 90 },
{ title: '操作', width: 160, align: 'center', toolbar: '#employeeBar' }, { title: '操作', width: 160, align: 'center', toolbar: '#employeeBar' },
{ field: 'statusName', title: '启用开关', width: 85, templet: '#switchTpl', unresize: true } { field: 'statusName', title: '启用开关', width: 85, templet: '#switchTpl', unresize: true }
...@@ -475,6 +489,7 @@ ...@@ -475,6 +489,7 @@
lay-filter="sexDemo" {{ d.status==0 ? 'checked' : '' }}> lay-filter="sexDemo" {{ d.status==0 ? 'checked' : '' }}>
</div> </div>
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -1017,7 +1017,32 @@ ...@@ -1017,7 +1017,32 @@
} else { } else {
params.status = 1 params.status = 1
} }
console.log(params)
verifyMerchantName(params.merchantName,params,loading)
layer.close(loading)
return false
})
function verifyDialog(params,loading){
// 验证商户名是否重复
layer.confirm('商户名称已经被使用,是否确定继续使用', {
title: "提示",
btn: ['取消', '确定'] //可以无限个按钮
,btn2: function(index, layero){
//按钮【按钮二】的回调
nextStepRequest(params,loading)
}
}, function(index, layero){
//按钮【按钮一】的回调
layer.close(index);
layer.close(loading)
})
}
function nextStepRequest(params,loading){
request(params, function (res) { request(params, function (res) {
if (res.code == '0') { if (res.code == '0') {
layer.close(loading) layer.close(loading)
...@@ -1050,12 +1075,25 @@ ...@@ -1050,12 +1075,25 @@
} }
}) })
} }
} else {
layer.close(loading)
} }
}) })
return false layer.close(loading)
}
function verifyMerchantName(name,paramsM,loading){
var params = {
method: 'merchants.api.merchant.checkMerchantNameRepeat',
merchantName: paramsM.merchantName
}
request(params, function (res) {
if(res && res.data == true){
return nextStepRequest(paramsM,loading)
}else if(res && res.data ==false){
return verifyDialog(paramsM,loading)
}
}) })
}
function findId(nodeList) { function findId(nodeList) {
var idList = [] var idList = []
......
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label required">商户名称:</label> <label class="layui-form-label required">商户名称:</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input class="layui-input disabled" maxlength="50" name="merchantName" disabled required lay-verify="required" placeholder="请输入商户名称" /> <input class="layui-input " maxlength="50" name="merchantName" required lay-verify="required" placeholder="请输入商户名称" />
</div> </div>
</div> </div>
</div> </div>
...@@ -970,6 +970,22 @@ ...@@ -970,6 +970,22 @@
params.status = 1 params.status = 1
} }
console.log(params) console.log(params)
verifyMerchantName(params.merchantName,params)
// request(params, function (res) {
// if (res.code == '0') {
// layer.msg('操作成功', {
// icon: 1
// })
// if (!functionClick) {
// go('merchant', 'index')
// }
// }
// })
return false
})
function nextStepRequest(params){
request(params, function (res) { request(params, function (res) {
if (res.code == '0') { if (res.code == '0') {
layer.msg('操作成功', { layer.msg('操作成功', {
...@@ -980,8 +996,39 @@ ...@@ -980,8 +996,39 @@
} }
} }
}) })
return false }
function verifyDialog(params){
// 验证商户名是否重复
layer.confirm('商户名称已经被使用,是否确定继续使用', {
title: "提示",
btn: ['取消', '确定'] //可以无限个按钮
,btn2: function(index, layero){
//按钮【按钮二】的回调
nextStepRequest(params)
}
}, function(index, layero){
//按钮【按钮一】的回调
layer.close(index);
layer.close(loading)
}) })
}
function verifyMerchantName(name,paramsM){
var params = {
method: 'merchants.api.merchant.checkMerchantNameRepeat',
merchantName: paramsM.merchantName
}
request(params, function (res) {
if(res && res.data == true){
return nextStepRequest(paramsM)
}else if(res && res.data ==false){
return verifyDialog(paramsM)
}
})
}
function findId(nodeList) { function findId(nodeList) {
var idList = [] var idList = []
......
...@@ -223,8 +223,10 @@ ...@@ -223,8 +223,10 @@
<div id="from" class="layui-inline"> <div id="from" class="layui-inline">
<label class="layui-form-label">来源:</label> <label class="layui-form-label">来源:</label>
<div class="layui-input-inline" style="width: 246px"> <div class="layui-input-inline" style="width: 246px">
<select name="merchantfrom" id="searchfrom"> <select name="createdSource" id="searchfrom">
<option value="">全部</option> <option value="">全部</option>
<option value="1">账户中心</option>
<option value="3">生意助手</option>
</select> </select>
</div> </div>
</div> </div>
...@@ -411,19 +413,19 @@ ...@@ -411,19 +413,19 @@
// width: 160 // width: 160
}, },
{ {
field: 'from', field: 'createdSourceStr',
title: '来源', title: '来源',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
field: 'creatPer', field: 'createdAccount',
title: '创建人', title: '创建人',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
field: 'creatTime', field: 'createdTime',
title: '创建时间', title: '创建时间',
align: 'center', align: 'center',
width: 120 width: 120
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!