jiejuewuye tigong wenti

This commit is contained in:
java110 2021-03-05 17:35:26 +08:00
parent ae45d06fb1
commit 0dabe11177
12 changed files with 527 additions and 22 deletions

View File

@ -1,4 +1,16 @@
<div>
<div class="row margin-top">
<div class="col-lg-10 text-right">
</div>
<div class="col-lg-2 text-right" v-if="simplifyOwnerComplaintInfo.roomId != ''">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openAddComplaintModal()">
<i class="fa fa-plus"></i>
投诉
</button>
</div>
</div>
<div>
<table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px" data-page-size="10">
<thead>

View File

@ -6,7 +6,8 @@
simplifyOwnerComplaintInfo: {
complaints: [],
ownerId: '',
roomId: ''
roomId: '',
roomName: ''
}
},
_initMethod: function () {
@ -16,14 +17,14 @@
//切换 至费用页面
vc.on('simplifyOwnerComplaint', 'switch', function (_param) {
if(_param.roomId == ''){
return ;
if (_param.roomId == '') {
return;
}
$that.clearSimplifyOwnerComplaintInfo();
vc.copyObject(_param, $that.simplifyOwnerComplaintInfo)
$that._listSimplifyOwnerComplaint(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('simplifyOwnerComplaint','paginationPlus', 'page_event',
vc.on('simplifyOwnerComplaint', 'paginationPlus', 'page_event',
function (_currentPage) {
$that._listSimplifyOwnerComplaint(_currentPage, DEFAULT_ROWS);
});
@ -49,7 +50,7 @@
vc.component.simplifyOwnerComplaintInfo.total = _complaintManageInfo.total;
vc.component.simplifyOwnerComplaintInfo.records = _complaintManageInfo.records;
vc.component.simplifyOwnerComplaintInfo.complaints = _complaintManageInfo.complaints;
vc.emit('simplifyOwnerComplaint','paginationPlus', 'init', {
vc.emit('simplifyOwnerComplaint', 'paginationPlus', 'init', {
total: vc.component.simplifyOwnerComplaintInfo.records,
currentPage: _page
});
@ -93,7 +94,11 @@
ownerId: '',
roomId: ''
}
}
},
_openAddComplaintModal: function () {
//vc.emit('addComplaint', 'openAddComplaintModal', {});
vc.jumpToPage("/admin.html#/pages/common/addRoomComplaint?roomId=" + $that.simplifyOwnerComplaintInfo.roomId)
},
}

View File

@ -25,6 +25,7 @@
<th data-hide="phone">联系方式</th>
<th data-hide="phone">创建员工</th>
<th data-hide="phone">备注</th>
<th v-for="(item,index) in simplifyOwnerMemberInfo.listColumns">{{item}}</th>
<th class="text-center">操作</th>
</tr>
</thead>
@ -58,6 +59,9 @@
<td>
{{owner.remark}}
</td>
<td v-for="item in owner.listValues">
{{item}}
</td>
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openEditOwnerModel(owner)">修改</button>

View File

@ -5,24 +5,27 @@
data: {
simplifyOwnerMemberInfo: {
members: [],
ownerId: ''
ownerId: '',
listColumns: []
}
},
_initMethod: function () {
$that._getSimplifyOwnerMemberColumns(function () {
});
},
_initEvent: function () {
//切换 至费用页面
vc.on('simplifyOwnerMember', 'switch', function (_param) {
if(_param.ownerId == ''){
return ;
if (_param.ownerId == '') {
return;
}
$that.clearSimplifyOwnerMemberInfo();
vc.copyObject(_param, $that.simplifyOwnerMemberInfo)
$that._listSimplifyOwnerMember(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('simplifyOwnerMember', 'listOwnerData',function (_param){
vc.on('simplifyOwnerMember', 'listOwnerData', function (_param) {
$that._listSimplifyOwnerMember(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event',
@ -45,8 +48,9 @@
'list',
param,
function (json) {
let _memberInfo = JSON.parse(json);
$that.simplifyOwnerMemberInfo.members = _memberInfo.owners;
let _simplifyOwnerMemberInfo = JSON.parse(json);
$that.simplifyOwnerMemberInfo.members = _simplifyOwnerMemberInfo.owners;
$that.dealSimplifyOwnerMemberAttr(_simplifyOwnerMemberInfo.owners);
}, function () {
console.log('请求失败处理');
});
@ -64,10 +68,55 @@
vc.emit('editOwner', 'openEditOwnerModal', _member);
},
clearSimplifyOwnerMemberInfo: function () {
let _listColumns = $that.simplifyOwnerMemberInfo.listColumns;
$that.simplifyOwnerMemberInfo = {
members: [],
ownerId: ''
ownerId: '',
listColumns: _listColumns
}
},
dealSimplifyOwnerMemberAttr: function (owners) {
owners.forEach(item => {
$that._getSimplifyOwnerMemberColumnsValue(item);
});
},
_getSimplifyOwnerMemberColumnsValue: function (_owner) {
_owner.listValues = [];
if (!_owner.hasOwnProperty('ownerAttrDtos') || _owner.ownerAttrDtos.length < 1) {
$that.simplifyOwnerMemberInfo.listColumns.forEach(_value => {
_owner.listValues.push('');
})
return;
}
let _ownerAttrDtos = _owner.ownerAttrDtos;
$that.simplifyOwnerMemberInfo.listColumns.forEach(_value => {
let _tmpValue = '';
_ownerAttrDtos.forEach(_attrItem => {
if (_value == _attrItem.specName) {
_tmpValue = _attrItem.valueName;
}
})
_owner.listValues.push(_tmpValue);
})
},
_getSimplifyOwnerMemberColumns: function (_call) {
console.log('_getColumns');
$that.simplifyOwnerMemberInfo.listColumns = [];
vc.getAttrSpec('building_owner_attr', function (data) {
$that.simplifyOwnerMemberInfo.listColumns = [];
data.forEach(item => {
if (item.listShow == 'Y') {
$that.simplifyOwnerMemberInfo.listColumns.push(item.specName);
}
});
_call();
});
}
}

View File

@ -1,4 +1,16 @@
<div>
<div class="row margin-top">
<div class="col-lg-10 text-right">
</div>
<div class="col-lg-2 text-right" v-if="simplifyOwnerRepairInfo.roomId != ''">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openAddOwnerRepairModal()">
<i class="fa fa-plus"></i>
电话报修
</button>
</div>
</div>
<div>
<table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px" data-page-size="10">
<thead>

View File

@ -6,7 +6,8 @@
simplifyOwnerRepairInfo: {
repairs: [],
ownerId: '',
roomId: ''
roomId: '',
roomName: ''
}
},
_initMethod: function () {
@ -15,15 +16,15 @@
_initEvent: function () {
//切换 至费用页面
vc.on('simplifyOwnerRepair', 'switch', function (_param) {
if(_param.roomId == ''){
return ;
if (_param.roomId == '') {
return;
}
$that.clearSimplifyOwnerRepairInfo();
vc.copyObject(_param, $that.simplifyOwnerRepairInfo)
$that._listSimplifyOwnerRepair(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('simplifyOwnerRepair','paginationPlus', 'page_event',
vc.on('simplifyOwnerRepair', 'paginationPlus', 'page_event',
function (_currentPage) {
$that._listSimplifyOwnerRepair(_currentPage, DEFAULT_ROWS);
});
@ -49,7 +50,7 @@
vc.component.simplifyOwnerRepairInfo.total = _repairPoolManageInfo.total;
vc.component.simplifyOwnerRepairInfo.records = _repairPoolManageInfo.records;
vc.component.simplifyOwnerRepairInfo.repairs = _repairPoolManageInfo.data;
vc.emit('simplifyOwnerRepair','paginationPlus', 'init', {
vc.emit('simplifyOwnerRepair', 'paginationPlus', 'init', {
total: vc.component.simplifyOwnerRepairInfo.records,
currentPage: _page
});
@ -66,8 +67,12 @@
$that.simplifyOwnerRepairInfo = {
repairs: [],
ownerId: '',
roomId: ''
roomId: '',
roomName: ''
}
},
_openAddOwnerRepairModal: function () {
vc.jumpToPage("/admin.html#/pages/common/addRoomRepair?roomId=" + $that.simplifyOwnerRepairInfo.roomId + "&roomName=" + $that.simplifyOwnerRepairInfo.roomName)
}
}

View File

@ -81,7 +81,8 @@
vc.toast('处理成功');
//关闭model
vc.jumpToPage("/admin.html#/pages/common/complaintManage?" + vc.objToGetParam(JSON.parse(json)));
//vc.jumpToPage("/admin.html#/pages/common/complaintManage?" + vc.objToGetParam(JSON.parse(json)));
vc.goBack();
return;
}
vc.toast(json);

View File

@ -0,0 +1,60 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>登记投诉建议</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="form-group row">
<label class="col-sm-2 col-form-label">投诉类型</label>
<div class="col-sm-10">
<select class="custom-select" v-model="addRoomComplaintInfo.typeCd">
<option selected disabled value="">必填,请选择投诉类型</option>
<option value="809001">投诉</option>
<option value="809002">建议</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">投诉人</label>
<div class="col-sm-10">
<input v-model="addRoomComplaintInfo.complaintName" type="text" placeholder="必填,请填写投诉人"
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">投诉电话</label>
<div class="col-sm-10">
<input v-model="addRoomComplaintInfo.tel" type="text" placeholder="必填,请填写投诉电话"
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">投诉内容</label>
<div class="col-sm-10">
<textarea placeholder="必填,请填写投诉内容" class="form-control"
v-model="addRoomComplaintInfo.context"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10"></div>
<div class="col-md-2 " style="margin-bottom:10px; text-align:right">
<button type="button" class="btn btn-warning" style="margin-left:10px;" v-on:click="_goBack()">返回
</button>
<button type="button" class="btn btn-primary" style="margin-left:10px;"
v-on:click="saveAddComplainInfo()">提交
</button>
</div>
</div>
</div>

View File

@ -0,0 +1,115 @@
/**
入驻小区
**/
(function (vc) {
vc.extends({
data: {
addRoomComplaintInfo: {
flowComponent: 'addComplainView',
typeCd: '',
complaintName: '',
tel: '',
context: '',
roomId:''
}
},
_initMethod: function () {
$that.addRoomComplaintInfo.roomId = vc.getParam('roomId')
},
_initEvent: function () {
},
methods: {
addComplainValidate: function () {
return vc.validate.validate({
addRoomComplaintInfo: vc.component.addRoomComplaintInfo
}, {
'addRoomComplaintInfo.typeCd': [
{
limit: "required",
param: "",
errInfo: "投诉类型不能为空"
},
{
limit: "num",
param: "",
errInfo: "投诉类型格式错误"
},
],
'addRoomComplaintInfo.complaintName': [
{
limit: "required",
param: "",
errInfo: "投诉人不能为空"
},
{
limit: "maxLength",
param: "200",
errInfo: "投诉人不能大于200位"
},
],
'addRoomComplaintInfo.tel': [
{
limit: "required",
param: "",
errInfo: "投诉电话不能为空"
},
{
limit: "phone",
param: "",
errInfo: "投诉电话格式错误"
},
],
'addRoomComplaintInfo.context': [
{
limit: "required",
param: "",
errInfo: "投诉内容不能为空"
},
{
limit: "maxLength",
param: "4000",
errInfo: "投诉状态超过4000位"
},
],
});
},
saveAddComplainInfo: function () {
vc.component.addRoomComplaintInfo.communityId = vc.getCurrentCommunity().communityId;
if (!vc.component.addComplainValidate()) {
//侦听回传
vc.toast("请选择或填写必选信息");
return;
}
vc.http.post(
'addComplaintStepBinding',
'binding',
JSON.stringify(vc.component.addRoomComplaintInfo),
{
emulateJSON: true
},
function (json, res) {
if (res.status == 200) {
vc.toast('处理成功');
//关闭model
//vc.jumpToPage("/admin.html#/pages/common/complaintManage?" + vc.objToGetParam(JSON.parse(json)));
vc.goBack();
return;
}
vc.toast(json);
},
function (errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
},
_goBack:function(){
vc.goBack();
}
}
});
})(window.vc);

View File

@ -0,0 +1,67 @@
<div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>电话报修</h5>
<div class="ibox-tools" style="top:10px;">
</div>
</div>
<div class="ibox-content">
<div class="form-group row">
<label class="col-sm-2 col-form-label">报修类型</label>
<div class="col-sm-10">
<select class="custom-select" v-model="addRoomRepairInfo.repairType">
<option selected disabled value="">必填,请选择报修类型</option>
<option v-for="(item,index) in addRoomRepairInfo.repairSettings"
:value="item.repairType">{{item.repairTypeName}}
</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">报修人</label>
<div class="col-sm-10">
<input v-model="addRoomRepairInfo.repairName" type="text" placeholder="必填,请填写报修人"
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">联系方式</label>
<div class="col-sm-10">
<input v-model="addRoomRepairInfo.tel" type="number" placeholder="必填,请填写联系方式"
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">预约时间</label>
<div class="col-sm-10">
<input v-model="addRoomRepairInfo.appointmentTime" type="text"
placeholder="必填,请填写预约时间" class="form-control addAppointmentTime">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">报修内容</label>
<div class="col-sm-10">
<textarea placeholder="必填,请填写报修内容" cols="15" class="form-control"
v-model="addRoomRepairInfo.context"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-10"></div>
<div class="col-md-2 " style="margin-bottom:10px; text-align:right">
<button type="button" class="btn btn-warning" style="margin-left:10px;" v-on:click="_goBack()">返回
</button>
<button type="button" class="btn btn-primary" style="margin-left:10px;"
v-on:click="saveOwnerRepairInfo()">提交
</button>
</div>
</div>
</div>

View File

@ -0,0 +1,174 @@
(function (vc) {
vc.extends({
data: {
addRoomRepairInfo: {
repairId: '',
repairType: '',
repairName: '',
tel: '',
appointmentTime: '',
context: '',
repairObjType: '004',
repairObjId: '',
repairObjName: '',
repairSettings: []
}
},
_initMethod: function () {
vc.component._initAddOwnerRepairInfo();
$that._listRepairSettings(1, 50, 'F')
$that.addRoomRepairInfo.repairObjId = vc.getParam('roomId')
$that.addRoomRepairInfo.repairObjName = vc.getParam('roomName')
},
_initEvent: function () {
},
methods: {
addOwnerRepairValidate() {
return vc.validate.validate({
addRoomRepairInfo: vc.component.addRoomRepairInfo
}, {
'addRoomRepairInfo.repairType': [
{
limit: "required",
param: "",
errInfo: "报修类型不能为空"
},
{
limit: "maxin",
param: "2,50",
errInfo: "报修类型错误"
},
],
'addRoomRepairInfo.repairName': [
{
limit: "required",
param: "",
errInfo: "报修人不能为空"
},
{
limit: "maxin",
param: "2,50",
errInfo: "报修人名称必须在2至50字符之间"
},
],
'addRoomRepairInfo.tel': [
{
limit: "required",
param: "",
errInfo: "联系方式不能为空"
},
{
limit: "phone",
param: "",
errInfo: "联系方式格式不正确"
},
],
'addRoomRepairInfo.repairObjId': [
{
limit: "required",
param: "",
errInfo: "报修对象不能为空"
}
],
'addRoomRepairInfo.appointmentTime': [
{
limit: "required",
param: "",
errInfo: "预约时间不能为空"
},
{
limit: "dateTime",
param: "",
errInfo: "预约时间格式错误"
},
],
'addRoomRepairInfo.context': [
{
limit: "required",
param: "",
errInfo: "报修内容不能为空"
},
{
limit: "maxLength",
param: "2000",
errInfo: "报修内容不能超过2000"
},
],
});
},
saveOwnerRepairInfo: function () {
if (!vc.component.addOwnerRepairValidate()) {
vc.toast(vc.validate.errInfo);
return;
}
vc.component.addRoomRepairInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.post(
'addOwnerRepair',
'save',
JSON.stringify(vc.component.addRoomRepairInfo),
{
emulateJSON: true
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
let _json = JSON.parse(json);
if (_json.code == 0) {
$that._goBack();
return;
}
vc.toast(json.msg);
},
function (errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
},
_initAddOwnerRepairInfo: function () {
vc.component.addRoomRepairInfo.appointmentTime = vc.dateTimeFormat(new Date().getTime());
$('.addAppointmentTime').datetimepicker({
language: 'zh-CN',
fontAwesome: 'fa',
format: 'yyyy-mm-dd hh:ii:ss',
initTime: true,
initialDate: new Date(),
autoClose: 1,
todayBtn: true
});
$('.addAppointmentTime').datetimepicker()
.on('changeDate', function (ev) {
var value = $(".addAppointmentTime").val();
vc.component.addRoomRepairInfo.appointmentTime = value;
});
},
_listRepairSettings: function (_page, _rows, _publicArea) {
var param = {
params: {
page: _page,
row: _rows,
communityId: vc.getCurrentCommunity().communityId,
publicArea: _publicArea
}
};
//发送get请求
vc.http.apiGet('repair.listRepairSettings',
param,
function (json, res) {
var _repairSettingManageInfo = JSON.parse(json);
vc.component.addRoomRepairInfo.repairSettings = _repairSettingManageInfo.data;
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_goBack: function () {
vc.goBack();
}
}
});
})(window.vc);

View File

@ -156,7 +156,8 @@
$that.simplifyAcceptanceInfo._currentTab = _tab;
vc.emit(_tab, 'switch', {
ownerId: $that.simplifyAcceptanceInfo.ownerId,
roomId: $that.simplifyAcceptanceInfo.roomId
roomId: $that.simplifyAcceptanceInfo.roomId,
roomName: $that.simplifyAcceptanceInfo.roomName,
})
},
errorLoadImg: function () {