mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化投诉建议编辑不刷新bug
This commit is contained in:
parent
416179de8b
commit
78cdb2ba7e
@ -1,4 +1,4 @@
|
||||
(function (vc, vm) {
|
||||
(function(vc, vm) {
|
||||
vc.extends({
|
||||
data: {
|
||||
editComplaintInfo: {
|
||||
@ -9,10 +9,9 @@
|
||||
context: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editComplaint', 'openEditComplaintModal', function (_params) {
|
||||
_initMethod: function() {},
|
||||
_initEvent: function() {
|
||||
vc.on('editComplaint', 'openEditComplaintModal', function(_params) {
|
||||
vc.component.refreshEditComplaintInfo();
|
||||
$('#editComplaintModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editComplaintInfo);
|
||||
@ -20,12 +19,11 @@
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
editComplaintValidate: function () {
|
||||
editComplaintValidate: function() {
|
||||
return vc.validate.validate({
|
||||
editComplaintInfo: vc.component.editComplaintInfo
|
||||
}, {
|
||||
'editComplaintInfo.typeCd': [
|
||||
{
|
||||
'editComplaintInfo.typeCd': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "投诉类型不能为空"
|
||||
@ -36,8 +34,7 @@
|
||||
errInfo: "投诉类型格式错误"
|
||||
},
|
||||
],
|
||||
'editComplaintInfo.complaintName': [
|
||||
{
|
||||
'editComplaintInfo.complaintName': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "投诉人不能为空"
|
||||
@ -48,8 +45,7 @@
|
||||
errInfo: "投诉人不能大于200位"
|
||||
},
|
||||
],
|
||||
'editComplaintInfo.tel': [
|
||||
{
|
||||
'editComplaintInfo.tel': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "投诉电话不能为空"
|
||||
@ -60,8 +56,7 @@
|
||||
errInfo: "投诉电话格式错误"
|
||||
},
|
||||
],
|
||||
'editComplaintInfo.context': [
|
||||
{
|
||||
'editComplaintInfo.context': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "投诉内容不能为空"
|
||||
@ -72,16 +67,14 @@
|
||||
errInfo: "投诉状态超过4000位"
|
||||
},
|
||||
],
|
||||
'editComplaintInfo.complaintId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "投诉ID不能为空"
|
||||
}
|
||||
]
|
||||
'editComplaintInfo.complaintId': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "投诉ID不能为空"
|
||||
}]
|
||||
});
|
||||
},
|
||||
editComplaint: function () {
|
||||
editComplaint: function() {
|
||||
if (!vc.component.editComplaintValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
@ -89,26 +82,26 @@
|
||||
vc.http.post(
|
||||
'editComplaint',
|
||||
'update',
|
||||
JSON.stringify(vc.component.editComplaintInfo),
|
||||
{
|
||||
JSON.stringify(vc.component.editComplaintInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if (res.status == 200) {
|
||||
//关闭model
|
||||
$('#editComplaintModel').modal('hide');
|
||||
vc.emit('complaintManage', 'listComplaint', {});
|
||||
vc.emit('myAuditComplaints', 'list', {});
|
||||
vc.toast("修改成功");
|
||||
return;
|
||||
}
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
refreshEditComplaintInfo: function () {
|
||||
refreshEditComplaintInfo: function() {
|
||||
vc.component.editComplaintInfo = {
|
||||
complaintId: '',
|
||||
typeCd: '',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user