mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
3f19b3f722
commit
aa20f8184a
@ -51,10 +51,10 @@
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addRepairSettingInfo.publicArea">
|
||||
<option selected disabled value="">
|
||||
{{vc.i18n('必填,请选择公共区域','addRepairSetting')}}
|
||||
{{vc.i18n('必填,请选择区域','addRepairSetting')}}
|
||||
</option>
|
||||
<option value="T">{{vc.i18n('是','addRepairSetting')}}</option>
|
||||
<option value="F">{{vc.i18n('否','addRepairSetting')}}</option>
|
||||
<option value="T">{{vc.i18n('非房屋','addRepairSetting')}}</option>
|
||||
<option value="F">{{vc.i18n('房屋','addRepairSetting')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,22 +1,18 @@
|
||||
(function (vc) {
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
callBackFunction: vc.propTypes.string //父组件监听方法
|
||||
},
|
||||
data: {
|
||||
addRepairSettingInfo: {
|
||||
settingId: '',
|
||||
repairTypeName: '',
|
||||
repairWay: '',
|
||||
repairSettingType: '',
|
||||
repairWay: '200',
|
||||
repairSettingType: '200',
|
||||
remark: '',
|
||||
publicArea: '',
|
||||
publicArea: 'F',
|
||||
payFeeFlag: 'F',
|
||||
priceScope: '',
|
||||
returnVisitFlag: '',
|
||||
isShow: '',
|
||||
notifyWay:'WECHAT'
|
||||
returnVisitFlag: '003',
|
||||
isShow: 'Y',
|
||||
notifyWay: 'WECHAT'
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -29,7 +25,7 @@
|
||||
methods: {
|
||||
addRepairSettingValidate() {
|
||||
return vc.validate.validate({
|
||||
addRepairSettingInfo: vc.component.addRepairSettingInfo
|
||||
addRepairSettingInfo: $that.addRepairSettingInfo
|
||||
}, {
|
||||
'addRepairSettingInfo.repairTypeName': [
|
||||
{
|
||||
@ -103,20 +99,14 @@
|
||||
if ($that.addRepairSettingInfo.payFeeFlag == 'F') {
|
||||
$that.addRepairSettingInfo.priceScope = '不收费';
|
||||
}
|
||||
if (!vc.component.addRepairSettingValidate()) {
|
||||
if (!$that.addRepairSettingValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.component.addRepairSettingInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
//不提交数据将数据 回调给侦听处理
|
||||
if (vc.notNull($props.callBackListener)) {
|
||||
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addRepairSettingInfo);
|
||||
$('#addRepairSettingModel').modal('hide');
|
||||
return;
|
||||
}
|
||||
$that.addRepairSettingInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'repair.saveRepairSetting',
|
||||
JSON.stringify(vc.component.addRepairSettingInfo),
|
||||
'/repair.saveRepairSetting',
|
||||
JSON.stringify($that.addRepairSettingInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
@ -126,7 +116,7 @@
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#addRepairSettingModel').modal('hide');
|
||||
vc.component.clearAddRepairSettingInfo();
|
||||
$that.clearAddRepairSettingInfo();
|
||||
vc.emit('repairSettingManage', 'listRepairSetting', {});
|
||||
vc.toast("添加成功,请记得绑定维修师傅!");
|
||||
return;
|
||||
@ -140,16 +130,18 @@
|
||||
});
|
||||
},
|
||||
clearAddRepairSettingInfo: function () {
|
||||
vc.component.addRepairSettingInfo = {
|
||||
$that.addRepairSettingInfo = {
|
||||
settingId: '',
|
||||
repairTypeName: '',
|
||||
repairWay: '',
|
||||
saveRepairSetting: '',
|
||||
repairWay: '200',
|
||||
repairSettingType: '200',
|
||||
remark: '',
|
||||
publicArea: '',
|
||||
publicArea: 'F',
|
||||
payFeeFlag: 'F',
|
||||
priceScope: '',
|
||||
returnVisitFlag: '',
|
||||
notifyWay:'WECHAT'
|
||||
returnVisitFlag: '003',
|
||||
isShow: 'Y',
|
||||
notifyWay: 'WECHAT'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,15 +48,15 @@
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">
|
||||
<vc:i18n name="公共区域" namespace="editRepairSetting"></vc:i18n>
|
||||
<vc:i18n name="区域" namespace="editRepairSetting"></vc:i18n>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editRepairSettingInfo.publicArea">
|
||||
<option selected disabled value="">
|
||||
{{vc.i18n('必填','editRepairSetting')}},请选择公共区域
|
||||
{{vc.i18n('必填,请选择区域','editRepairSetting')}}
|
||||
</option>
|
||||
<option value="T">{{vc.i18n('是','editRepairSetting')}}</option>
|
||||
<option value="F">{{vc.i18n('否','editRepairSetting')}}</option>
|
||||
<option value="T">{{vc.i18n('非房屋','editRepairSetting')}}</option>
|
||||
<option value="F">{{vc.i18n('房屋','editRepairSetting')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -67,7 +67,7 @@
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editRepairSettingInfo.isShow">
|
||||
<option selected disabled value="">
|
||||
{{vc.i18n('必填','editRepairSetting')}},请选择业主端是否展示
|
||||
{{vc.i18n('必填,请选择业主端是否展示','editRepairSetting')}}
|
||||
</option>
|
||||
<option value="Y">{{vc.i18n('是','editRepairSetting')}}</option>
|
||||
<option value="N">{{vc.i18n('否','editRepairSetting')}}</option>
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<select class="custom-select" v-model="repairSettingManageInfo.conditions.publicArea">
|
||||
<option selected value="">{{vc.i18n('请选择是否公共区域','repairSettingManage')}}</option>
|
||||
<option selected value="">{{vc.i18n('请选择区域','repairSettingManage')}}</option>
|
||||
<option v-for="(item,index) in repairSettingManageInfo.publicAreas" :key="index"
|
||||
:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
@ -91,7 +91,7 @@
|
||||
<vc:i18n name="派单方式" namespace="repairSettingManage"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="公共区域" namespace="repairSettingManage"></vc:i18n>
|
||||
<vc:i18n name="区域" namespace="repairSettingManage"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="业主端展示" namespace="repairSettingManage"></vc:i18n>
|
||||
@ -116,7 +116,7 @@
|
||||
<td class="text-center">{{repairSetting.repairTypeName}}</td>
|
||||
<td class="text-center">{{repairSetting.repairSettingTypeName}}</td>
|
||||
<td class="text-center">{{repairSetting.repairWayName}}</td>
|
||||
<td class="text-center">{{repairSetting.publicArea == 'T'?'是':'否'}}</td>
|
||||
<td class="text-center">{{repairSetting.publicArea == 'T'?'非房屋':'房屋'}}</td>
|
||||
<td class="text-center">{{repairSetting.isShow == 'Y'?'是':'否'}}</td>
|
||||
<td class="text-center">{{repairSetting.notifyWay == 'SMS'?'短信':'微信'}}</td>
|
||||
<td class="text-center">{{repairSetting.returnVisitFlagName}}</td>
|
||||
@ -150,9 +150,9 @@
|
||||
<div> 1、抢单 是员工(报修类型下的师傅)自主抢单 维修处理,比较实用于物业每单给维修是否提成的场景</div>
|
||||
<div> 2、指派 专门由客服派单员工(报修类型下的师傅)维修处理,一般物业的选择</div>
|
||||
<div> 3、轮训 由系统定时派单员工(报修类型下的师傅)维修处理</div>
|
||||
<div>公共区域:</div>
|
||||
<div> 小区、楼栋、单元 为公共区域 房屋为非公共区域</div>
|
||||
<div> 注意:一般业主房屋报修 我们必须要添加一个非公共区域的类型才能正常报修</div>
|
||||
<div>区域:</div>
|
||||
<div> 小区、楼栋、单元 为非房屋类区域 房屋为房屋类区域</div>
|
||||
<div> 注意:一般业主房屋报修 我们必须要添加一个房屋类区域的类型才能正常报修</div>
|
||||
</div>
|
||||
<div class="col-sm-3 float-right">
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user