mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
ca4bbe4737
commit
29147a8a52
@ -10,7 +10,7 @@
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="商铺编号" namespace="bindOwnerShops"></vc:i18n></span>
|
||||
<vc:i18n name="商铺编号" namespace="bindOwnerShops"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="bindOwnerShopsInfo.shopsName" disabled="disabled"
|
||||
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="租户手机号" namespace="bindOwnerShops"></vc:i18n></span>
|
||||
<vc:i18n name="租户手机号" namespace="bindOwnerShops"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="bindOwnerShopsInfo.tel" @blur="_shopsLoadOwnerInfo" type="number"
|
||||
@ -29,25 +29,25 @@
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="租户姓名" namespace="bindOwnerShops"></vc:i18n></span>
|
||||
<vc:i18n name="租户姓名" namespace="bindOwnerShops"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="bindOwnerShopsInfo.ownerName" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写租户姓名','bindOwnerShops')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="bindOwnerShopsInfo.shopsState == '2006'">
|
||||
<div class="form-group row" v-show="bindOwnerShopsInfo.shopsState == '2006'">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="起租时间" namespace="bindOwnerShops"></vc:i18n></span>
|
||||
<vc:i18n name="起租时间" namespace="bindOwnerShops"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" :placeholder="vc.i18n('必填,请填写起租时间','bindOwnerShops')"
|
||||
class="form-control hireStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="bindOwnerShopsInfo.shopsState == '2006'">
|
||||
<div class="form-group row" v-show="bindOwnerShopsInfo.shopsState == '2006'">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="截租时间" namespace="bindOwnerShops"></vc:i18n></span>
|
||||
<vc:i18n name="截租时间" namespace="bindOwnerShops"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" :placeholder="vc.i18n('必填,请填写截租时间','bindOwnerShops')"
|
||||
@ -56,7 +56,7 @@
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<span><vc:i18n name="备注" namespace="bindOwnerShops"></vc:i18n></span>
|
||||
<vc:i18n name="备注" namespace="bindOwnerShops"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea v-model="bindOwnerShopsInfo.remark"
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('bindOwnerShops', 'bindOwnerShopsModel', function (_params) {
|
||||
vc.component.refreshAddShopsInfo();
|
||||
$that.refreshAddShopsInfo();
|
||||
$that.bindOwnerShopsInfo.roomId = _params.roomId;
|
||||
$that.bindOwnerShopsInfo.shopsState = _params.shopsState;
|
||||
if (_params.shopsState == '2007') {
|
||||
@ -40,13 +40,13 @@
|
||||
}
|
||||
$that.bindOwnerShopsInfo.shopsName = _params.floorNum + '-' + _params.roomNum;
|
||||
$('#bindOwnerShopsModel').modal('show');
|
||||
vc.component.bindOwnerShopsInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
$that.bindOwnerShopsInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
bindOwnerShopsValidate: function () {
|
||||
return vc.validate.validate({
|
||||
bindOwnerShopsInfo: vc.component.bindOwnerShopsInfo
|
||||
bindOwnerShopsInfo: $that.bindOwnerShopsInfo
|
||||
}, {
|
||||
'bindOwnerShopsInfo.roomId': [
|
||||
{
|
||||
@ -98,13 +98,13 @@
|
||||
});
|
||||
},
|
||||
bindOwnerShops: function () {
|
||||
if (!vc.component.bindOwnerShopsValidate()) {
|
||||
if (!$that.bindOwnerShopsValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.http.apiPost(
|
||||
'/room.saveOwnerShops',
|
||||
JSON.stringify(vc.component.bindOwnerShopsInfo), {
|
||||
JSON.stringify($that.bindOwnerShopsInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
@ -158,7 +158,7 @@
|
||||
);
|
||||
},
|
||||
refreshAddShopsInfo: function () {
|
||||
vc.component.bindOwnerShopsInfo = {
|
||||
$that.bindOwnerShopsInfo = {
|
||||
roomId: '',
|
||||
roomNum: '',
|
||||
shopsName: '',
|
||||
@ -174,4 +174,4 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc, window.vc.component);
|
||||
})(window.vc, window.$that);
|
||||
Loading…
Reference in New Issue
Block a user