mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化代码
This commit is contained in:
parent
91593ed82e
commit
7d45a78c90
@ -45,9 +45,9 @@
|
||||
<div class=" fr topbnt_right">
|
||||
<ul>
|
||||
<li><a href="/">控制台</a></li>
|
||||
<li><a href="/#/pages/property/reportDeadlineFee">费用到期提醒</a></li>
|
||||
<li><a href="/#/pages/report/feeRemind">费用到期提醒</a></li>
|
||||
<li><a href="/#/pages/property/reportRepair">报修汇总</a></li>
|
||||
<li><a href="/#/pages/property/reportPrePaymentFee">预交费提醒</a></li>
|
||||
<li><a href="/#/pages/report/feeRemind">预交费提醒</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('communityDataToIot', 'openCommunityDataToIotModal', function (_params) {
|
||||
vc.copyOBject(_params,$that.communityDataToIotInfo);
|
||||
vc.copyObject(_params,$that.communityDataToIotInfo);
|
||||
$('#communityDataToIotModel').modal('show');
|
||||
});
|
||||
},
|
||||
|
||||
@ -11,15 +11,15 @@
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<div class="form-group ">
|
||||
<input type="text" :placeholder="vc.i18n('请输入小区ID','communityManage')"
|
||||
v-model="communityManageInfo.conditions.communityId" class=" form-control">
|
||||
v-model="communityManageInfo.conditions.communityId" class=" form-control form-control-sm">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<div class="form-group ">
|
||||
<input type="text" :placeholder="vc.i18n('请输入小区名称','communityManage')"
|
||||
v-model="communityManageInfo.conditions.name" class=" form-control">
|
||||
v-model="communityManageInfo.conditions.name" class=" form-control form-control-sm">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
|
||||
@ -8,160 +8,182 @@
|
||||
<div class="ibox-tools" style="top:10px;"></div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='设备名称' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.machineName" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写设备名称','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='设备编码' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.machineCode" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写设备编码','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='重要等级' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="editEquipmentAccountInfo.importanceLevel">
|
||||
<option selected disabled value="">
|
||||
{{vc.i18n('必填,请选择重要等级','editEquipmentAccount')}}
|
||||
</option>
|
||||
<option v-for="(item,index) in editEquipmentAccountInfo.importanceLevels"
|
||||
:key="index" :value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='使用状态' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="editEquipmentAccountInfo.state">
|
||||
<option selected disabled value="">
|
||||
{{vc.i18n('必填,请选择使用状态','editEquipmentAccount')}}
|
||||
</option>
|
||||
<option v-for="(item,index) in editEquipmentAccountInfo.useStatus" :key="index"
|
||||
:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='设备品牌' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.brand" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写设备品牌','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='设备型号' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.model" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写设备型号','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='资产净值' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.netWorth" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写资产净值','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='位置详情' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.locationDetail" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写位置详情','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='首次启用时间' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="editEquipmentAccountInfo.firstEnableTime" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写首次启用时间','editEquipmentAccount')"
|
||||
class="form-control addFirstEnableTime">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='保修截止日期' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="editEquipmentAccountInfo.warrantyDeadline" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写保修截止日期','editEquipmentAccount')"
|
||||
class="form-control addWarrantyDeadlineE">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='使用年限(年)' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.usefulLife" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写使用年限(年)','editEquipmentAccount')"
|
||||
class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='采购价格' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.purchasePrice" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写采购价格','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name="使用人" namespace="editEquipmentAccount"></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.useUserName" type="text"
|
||||
:placeholder="vc.i18n('必填,请选择使用人','useUserName')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<vc:i18n name="责任人" namespace="editEquipmentAccount"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.chargeUseName" type="text"
|
||||
:placeholder="vc.i18n('必填,请选择责任人','chargeUseName')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span><vc:i18n name='备注' namespace='editEquipmentAccount'></vc:i18n></span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model.trim="editEquipmentAccountInfo.remark" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写备注','editEquipmentAccount')"
|
||||
class="form-control">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button"
|
||||
v-on:click="saveEquipmentAccountInfo()">
|
||||
<i class="fa fa-check"></i>
|
||||
<span><vc:i18n name="保存"></vc:i18n></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal" v-on:click="vc.goBack()">
|
||||
<span><vc:i18n name="取消"></vc:i18n></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='设备名称' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.machineName" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写设备名称','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='设备编码' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.machineCode" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写设备编码','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='重要等级' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="editEquipmentAccountInfo.importanceLevel">
|
||||
<option selected disabled value="">
|
||||
{{vc.i18n('必填,请选择重要等级','editEquipmentAccount')}}
|
||||
</option>
|
||||
<option v-for="(item,index) in editEquipmentAccountInfo.importanceLevels" :key="index"
|
||||
:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='使用状态' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="editEquipmentAccountInfo.state">
|
||||
<option selected disabled value="">
|
||||
{{vc.i18n('必填,请选择使用状态','editEquipmentAccount')}}
|
||||
</option>
|
||||
<option v-for="(item,index) in editEquipmentAccountInfo.useStatus" :key="index"
|
||||
:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='设备品牌' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.brand" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写设备品牌','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='设备型号' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.model" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写设备型号','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='资产净值' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.netWorth" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写资产净值','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='位置详情' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.locationDetail" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写位置详情','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='首次启用时间' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="editEquipmentAccountInfo.firstEnableTime" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写首次启用时间','editEquipmentAccount')"
|
||||
class="form-control addFirstEnableTime">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='保修截止日期' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model="editEquipmentAccountInfo.warrantyDeadline" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写保修截止日期','editEquipmentAccount')"
|
||||
class="form-control addWarrantyDeadlineE">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='使用年限(年)' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.usefulLife" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写使用年限(年)','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='采购价格' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.purchasePrice" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写采购价格','editEquipmentAccount')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name="使用人" namespace="editEquipmentAccount"></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.useUserName" type="text"
|
||||
:placeholder="vc.i18n('必填,请选择使用人','useUserName')" class="form-control">
|
||||
</div>
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<vc:i18n name="责任人" namespace="editEquipmentAccount"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<input v-model.trim="editEquipmentAccountInfo.chargeUseName" type="text"
|
||||
:placeholder="vc.i18n('必填,请选择责任人','chargeUseName')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label text-right">
|
||||
<span>
|
||||
<vc:i18n name='备注' namespace='editEquipmentAccount'></vc:i18n>
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model.trim="editEquipmentAccountInfo.remark" type="text"
|
||||
:placeholder="vc.i18n('选填,请填写备注','editEquipmentAccount')" class="form-control">
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveEquipmentAccountInfo()">
|
||||
<vc:i18n name="保存"></vc:i18n>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
@click="_goBack()">
|
||||
<vc:i18n name="取消"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -36,12 +36,12 @@
|
||||
_initMethod: function () {
|
||||
$that.editEquipmentAccountInfo.machineId = vc.getParam('machineId');
|
||||
vc.getDict('equipment_account', "importance_level", function (_data) {
|
||||
vc.component.editEquipmentAccountInfo.importanceLevels = _data;
|
||||
$that.editEquipmentAccountInfo.importanceLevels = _data;
|
||||
});
|
||||
vc.getDict('equipment_account', "state", function (_data) {
|
||||
vc.component.editEquipmentAccountInfo.useStatus = _data;
|
||||
$that.editEquipmentAccountInfo.useStatus = _data;
|
||||
});
|
||||
vc.component._initAddEquipmentAccountInfo();
|
||||
$that._initAddEquipmentAccountInfo();
|
||||
$that._listEquipmentAccounts();
|
||||
},
|
||||
_initEvent: function () {
|
||||
@ -61,7 +61,7 @@
|
||||
$('.addFirstEnableTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".addFirstEnableTime").val();
|
||||
vc.component.editEquipmentAccountInfo.firstEnableTime = value;
|
||||
$that.editEquipmentAccountInfo.firstEnableTime = value;
|
||||
});
|
||||
$('.addWarrantyDeadlineE').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
@ -75,13 +75,13 @@
|
||||
$('.addWarrantyDeadlineE').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".addWarrantyDeadlineE").val();
|
||||
vc.component.editEquipmentAccountInfo.warrantyDeadline = value;
|
||||
$that.editEquipmentAccountInfo.warrantyDeadline = value;
|
||||
});
|
||||
},
|
||||
|
||||
editEquipmentAccountValidate() {
|
||||
return vc.validate.validate({
|
||||
editEquipmentAccountInfo: vc.component.editEquipmentAccountInfo
|
||||
editEquipmentAccountInfo: $that.editEquipmentAccountInfo
|
||||
}, {
|
||||
'editEquipmentAccountInfo.machineName': [
|
||||
{
|
||||
@ -204,14 +204,14 @@
|
||||
});
|
||||
},
|
||||
saveEquipmentAccountInfo: function () {
|
||||
if (!vc.component.editEquipmentAccountValidate()) {
|
||||
if (!$that.editEquipmentAccountValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.component.editEquipmentAccountInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
$that.editEquipmentAccountInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/equipmentAccount.updateEquipmentAccount',
|
||||
JSON.stringify(vc.component.editEquipmentAccountInfo),
|
||||
JSON.stringify($that.editEquipmentAccountInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
@ -252,6 +252,9 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_goBack:function(){
|
||||
vc.goBack()
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user