@layout("/common/_container.html"){
|
<div class="ibox float-e-margins">
|
<div class="ibox-content">
|
<div class="form-horizontal" id="formId">
|
<input type="hidden" id="id" value="${id}">
|
<div class="form-group">
|
<label class="col-sm-3 control-label">
|
<span style="color: red;">*</span>冻结情况
|
</label>
|
<div style="display: inline-block">
|
<div class="" id="state" ></div>
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">
|
<span style="color: red;">*</span>冻结原因
|
</label>
|
<div class="col-sm-9">
|
<textarea name="remark" id="remark" class="form-control"></textarea>
|
</div>
|
</div>
|
|
<div class="row btn-group-m-t">
|
<div class="col-sm-10 text-center">
|
<#button btnCss="info" name="确认" id="ensure" icon="fa-check" clickFun="DialogInfo.addSubmit()"/>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<script>
|
var DialogInfo = {
|
$parent: window.parent.MemMerchant,
|
|
validFields: {
|
state: Feng.def_valid_info( true), // 不能为空
|
days: Feng.def_valid_info( true), // 不能为空
|
remark: Feng.def_valid_info( true), // 不能为空
|
}
|
}
|
DialogInfo.get = function( key) {
|
return $( "#" + key).val();
|
}
|
DialogInfo.close = function () {
|
this.$parent.search();
|
window.parent.layer.close( this.$parent.layerIndex);
|
}
|
|
DialogInfo.get_submit_data = function() {
|
return {
|
ids: this.get( "id"),
|
state: this.stateRadio.getValue(),
|
days: this.get( "days"),
|
remark: this.get( "remark")
|
}
|
}
|
// 提交
|
DialogInfo.addSubmit = function () {
|
if ( !Feng.check_form( "formId")) { return; }
|
var submitData = this.get_submit_data();
|
|
if ( submitData.state == 2) {
|
if (!submitData.days || submitData.days <= 0) {
|
return Feng.error( "冻结时间不能为空或小于0!");
|
}
|
}
|
|
Feng.base_ajax( "/memMerchant/lockMemMerchant", submitData, function ( data) {
|
Feng.success( "冻结成功");
|
DialogInfo.close();
|
});
|
}
|
|
$(function () {
|
|
Feng.initValidator( "formId", DialogInfo.validFields);
|
DialogInfo.stateRadio = Feng.i_checks_radio_init( $("#state"), "state",
|
[
|
{ checked: true, name: "永久冻结", value: 4,
|
others: function() { return "<span style='font-size: .6em'>永久冻结将扣除现有米粒,并且不能退回</span>"}},
|
{ checked: false, name: "临时冻结 ", value: 2,
|
others: function() { return "<span>" +
|
"冻结时间 <input type='number' disabled style='width: 120px;display: inline-block' name='days' id='days' class='form-control'> 天" +
|
"</span>"}}
|
], function( val) {
|
if ( val.value == 2) {
|
return $('#days').attr("disabled",false);
|
} return $( "#days").val( "").attr("disabled",true);
|
});
|
})
|
</script>
|
@}
|