Commit 4de28aa6 by cwq0219

修改有效期;展示上级商户

1 parent e6f783e7
......@@ -61,6 +61,10 @@
transform: translate3d(-50%, -50%, 0);
}
.edit-box .m-t-10 {
margin-top: 10px;
}
.edit-box .upload-img-wh {
width: 120px !important;
height: 80px;
......@@ -89,12 +93,13 @@
width: 16px;
border-radius: 50%;
}
.tips {
display: inline-block;
font-size: 14px;
color: #999;
margin-left: 160px;
}
font-size: 14px;
color: #999;
margin-left: 160px;
}
.edit-box #accountTypeEl .layui-form-checked span,
#accountTypeEl .layui-form-checked:hover span {
......@@ -267,20 +272,22 @@
</div>
</div>
<div class="layui-form-item">
<span class="tips" >图片格式仅支持JPG,PNG格式,大小1M以内</span>
<span class="tips">图片格式仅支持JPG,PNG格式,大小1M以内</span>
</div>
<p class="edit-title">账户基本信息</p>
<div id="subMerchantEl">
<div class="layui-form-item">
<label class="layui-form-label required">上级商户:</label>
<div class="layui-input-inline">
<input class="layui-input layui-btn-disabled" name="parentName" placeholder="请输入上级商户" disabled>
<!-- <input class="layui-input layui-btn-disabled" name="parentName" placeholder="请输入上级商户" disabled> -->
<div class="m-t-10" id="parentName"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label required">账户类型:</label>
<div class="layui-input-inline">
<input class="layui-input layui-btn-disabled" name="parentAccountTypeName" placeholder="请输入账户类型">
<!-- <input class="layui-input layui-btn-disabled" name="parentAccountTypeName" placeholder="请输入账户类型"> -->
<div class="m-t-10" id="parentAccountTypeName"></div>
</div>
</div>
</div>
......@@ -727,7 +734,7 @@
editLevel = qs('editLevel')
isFactory = (qs('isFactory') == 'true')
step = qs('step')
if (step == 1) {
treeIsShow(false)
} else {
......@@ -819,13 +826,17 @@
var data = res.data
parentInfo = {
parentId: data.id,
parentName: data.merchantName,
parentName: data.merchantName + '(' + data.merchantNo + ')',
parentAccountType: data.accountType,
parentAccountTypeName: data.accountTypeNames,
parentMerchantAccountLevel: data.merchantAccountLevel,
channelId: data.channelId,
effectiveTime: data.effectiveTime
}
var attrList = ['parentName', 'parentAccountTypeName']
$.each(attrList, function (index, item) {
$('#' + item).text(parentInfo[item])
})
form.val('merchantForm', parentInfo)
if (editLevel == 3) {
getMerchantInfo()
......
......@@ -318,7 +318,7 @@
fixed: false, //不固定
// maxmin: true,
btn: ['确定', '取消'],
content: 'validPeriodForm.html?id=' + row.id + '&effectiveTime=' + row.effectiveTime,
content: 'validPeriodForm.html?id=' + row.id + '&effectiveTime=' + row.effectiveTime + '&merchantAccountLevel=' + row.merchantAccountLevel + '&status=' + row.status,
yes: function (index, layero) {
var body = layer.getChildFrame('body', index)
helper.store.set('isRefresh', false)
......
......@@ -51,6 +51,10 @@
id: getQueryString('id'),
effectiveTime: getQueryString('effectiveTime')
}
// 1-工厂;2-省代;3-市代;4-门店
var merchantAccountLevel = getQueryString('merchantAccountLevel')
// 1-草稿;2-正常;3-注销;4-过期
var status = getQueryString('status')
getVaildPeriod()
......@@ -89,7 +93,31 @@
baseData.effectiveTimeList = res.data
var periodSelect = $('#periodSelect')
$.each(baseData.effectiveTimeList, function (index, item) {
periodSelect.append(new Option(item.dictLabel, item.dictValue))
// 工厂
if (merchantAccountLevel == 1) {
// 状态 - 正常
if (status == 2) {
// 永久有效
if (vaildData.effectiveTime == 0) {
if (item.dictValue == -1) {
periodSelect.append(new Option(item.dictLabel, item.dictValue))
}
} else if ((item.dictValue == 0) ||
(item.dictValue == -1) ||
(vaildData.effectiveTime < item.dictValue)) {
periodSelect.append(new Option(item.dictLabel, item.dictValue))
}
} else {
// 状态 - 过期/注销
if (vaildData.effectiveTime != item.dictValue) {
periodSelect.append(new Option(item.dictLabel, item.dictValue))
}
}
} else {
if ((item.dictValue == 0) || (item.dictValue == -1)) {
periodSelect.append(new Option(item.dictLabel, item.dictValue))
}
}
})
form.val('periodFilter', {
effectiveTime: vaildData.effectiveTime
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!