优化 业主反馈 问题处理

This commit is contained in:
java110 2022-08-21 18:19:21 +08:00
parent ce6c89f121
commit 736236b9ee
6 changed files with 240 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<div id="addNotepadDetailModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<h3 class="m-t-none m-b "><span><vc:i18n name="跟进" namespace="addNotepadDetail"></vc:i18n></span></h3>
<div class="ibox-content">
<div>
<div>
<div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name='状态' namespace='addNotepad'></vc:i18n></span></label>
<div class="col-sm-10">
<select class="custom-select" v-model="addNotepadDetailInfo.state">
<option selected disabled value="">{{vc.i18n('必填,请选择状态','addNotepadInfo')}}</option>
<option value="W">跟进中</option>
<option value="F">完成</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label"><span><vc:i18n name='跟进内容' namespace='addNotepadDetail'></vc:i18n></span></label>
<div class="col-sm-10">
<textarea v-model="addNotepadDetailInfo.content" rows="10" :placeholder="vc.i18n('必填,请填写跟进内容','addNotepadDetail')" class="form-control"></textarea>
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button" v-on:click="saveNotepadDetailInfo()"><i class="fa fa-check"></i>&nbsp;
<span><vc:i18n name="保存"></vc:i18n></span>
</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">
<span><vc:i18n name="取消"></vc:i18n></span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,86 @@
(function(vc) {
vc.extends({
propTypes: {
callBackListener: vc.propTypes.string, //父组件名称
callBackFunction: vc.propTypes.string //父组件监听方法
},
data: {
addNotepadDetailInfo: {
noteId: '',
content: '',
state: 'W',
}
},
_initMethod: function() {},
_initEvent: function() {
vc.on('addNotepadDetail', 'openAddNotepadModal', function(_param) {
vc.copyObject(_param, $that.addNotepadDetailInfo);
$('#addNotepadDetailModel').modal('show');
});
},
methods: {
addNotepadDetailValidate() {
return vc.validate.validate({
addNotepadDetailInfo: vc.component.addNotepadDetailInfo
}, {
'addNotepadDetailInfo.content': [{
limit: "required",
param: "",
errInfo: "内容不能为空"
}, ],
'addNotepadDetailInfo.noteId': [{
limit: "required",
param: "",
errInfo: "登记不能为空"
}],
});
},
saveNotepadDetailInfo: function() {
if (!vc.component.addNotepadDetailValidate()) {
vc.toast(vc.validate.errInfo);
return;
}
vc.component.addNotepadDetailInfo.communityId = vc.getCurrentCommunity().communityId;
//不提交数据将数据 回调给侦听处理
vc.http.apiPost(
'/notepad.saveNotepadDetail',
JSON.stringify(vc.component.addNotepadDetailInfo), {
emulateJSON: true
},
function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
$('#addNotepadDetailModel').modal('hide');
vc.component.clearAddNotepadDetailInfo();
vc.emit('notepadManage', 'listNotepad', {});
vc.emit('simplifyNotepadManage', 'listNotepad', {});
return;
}
vc.message(_json.msg);
},
function(errInfo, error) {
console.log('请求失败处理');
vc.message(errInfo);
});
},
clearAddNotepadDetailInfo: function() {
vc.component.addNotepadDetailInfo = {
noteId: '',
content: '',
state: 'W',
};
}
}
});
})(window.vc);

View File

@ -0,0 +1,36 @@
<div id="notepadDetailModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><span><vc:i18n name="跟进进度" namespace="notepadDetail"></vc:i18n></span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div>
<div>
<table class="table table-bordered">
<thead>
<tr>
<th scope="col"><span><vc:i18n name="序号" namespace="notepadDetail"></vc:i18n></span></th>
<th scope="col"><span><vc:i18n name="处理人" namespace="notepadDetail"></vc:i18n></span></th>
<th scope="col"><span><vc:i18n name="处理时间" namespace="notepadDetail"></vc:i18n></span></th>
<th scope="col"><span><vc:i18n name="处理内容" namespace="notepadDetail"></vc:i18n></span></th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in notepadDetailInfo.details">
<th scope="row">{{index+1}}</th>
<td>{{item.createUserName }}</td>
<td>{{item.createTime}}</td>
<td>{{item.content}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,52 @@
(function(vc, vm) {
vc.extends({
data: {
notepadDetailInfo: {
noteId: '',
details: []
}
},
_initMethod: function() {},
_initEvent: function() {
vc.on('notepadDetail', 'openNotepadDetailModal', function(_params) {
vc.component.refreshnotepadDetailInfo();
$('#notepadDetailModel').modal('show');
vc.copyObject(_params, vc.component.notepadDetailInfo);
$that._loadNotepadDetails();
});
},
methods: {
refreshnotepadDetailInfo: function() {
vc.component.notepadDetailInfo = {
noteId: '',
details: []
}
},
_loadNotepadDetails: function() {
let param = {
params: {
communityId: vc.getCurrentCommunity().communityId,
noteId: $that.notepadDetailInfo.noteId,
page: 1,
row: 50
}
};
//发送get请求
vc.http.apiGet('/notepad.listNotepadDetail',
param,
function(json, res) {
let _json = JSON.parse(json);
if (_json.code != '0') {
return;
}
$that.notepadDetailInfo.details = _json.data;
},
function(errInfo, error) {
console.log('请求失败处理');
}
);
}
}
});
})(window.vc, window.vc.component);

View File

@ -39,6 +39,9 @@
<th class="text-center"><span>
<vc:i18n name='联系电话' namespace='simplifyNotepadManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='状态' namespace='simplifyNotepadManage'></vc:i18n>
</span></th>
<th class="text-center"><span>
<vc:i18n name='记录时间' namespace='simplifyNotepadManage'></vc:i18n>
</span></th>
@ -59,10 +62,21 @@
<td class="text-center">{{notepad.roomName}}</td>
<td class="text-center">{{notepad.objName}}</td>
<td class="text-center">{{notepad.link}}</td>
<td class="text-center">{{notepad.state=='F'?'完成':'跟进中'}}</td>
<td class="text-center">{{notepad.createTime}}</td>
<td class="text-center">{{notepad.createUserName}}</td>
<td class="text-center">{{notepad.title}}</td>
<td class="text-center">
<div class="btn-group" v-if="notepad.state == 'W'">
<button class="btn-white btn btn-xs" v-on:click="_openAddNotepadDetailModal(notepad)"><span>
<vc:i18n name='跟进'></vc:i18n>
</span></button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openListNotepadDetailModal(notepad)"><span>
<vc:i18n name='进度'></vc:i18n>
</span></button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openEditNotepadModel(notepad)"><span>
<vc:i18n name='修改'></vc:i18n>
@ -107,4 +121,8 @@
<vc:create path="property/editNotepad"></vc:create>
<vc:create path="property/deleteNotepad"></vc:create>
<vc:create path="property/addNotepadDetail" callBackListener="" callBackFunction=""></vc:create>
<vc:create path="property/notepadDetail" callBackListener="" callBackFunction=""></vc:create>
</div>

View File

@ -20,6 +20,7 @@
objName: '',
createUserName: '',
state: '',
objId: ''
}
}
@ -29,6 +30,7 @@
let _ownerId = vc.getParam('ownerId');
$that.simplifyNotepadManageInfo.roomId = _roomId;
$that.simplifyNotepadManageInfo.ownerId = _ownerId;
$that.simplifyNotepadManageInfo.conditions.objId = _ownerId;
vc.component._listNotepads(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function() {
@ -73,6 +75,12 @@
ownerId: $that.simplifyNotepadManageInfo.ownerId
});
},
_openAddNotepadDetailModal: function(_notepad) {
vc.emit('addNotepadDetail', 'openAddNotepadModal', _notepad);
},
_openListNotepadDetailModal: function(_notepad) {
vc.emit('notepadDetail', 'openNotepadDetailModal', _notepad);
},
_openEditNotepadModel: function(_notepad) {
vc.emit('editNotepad', 'openEditNotepadModal', _notepad);
},