驳回时输入驳回原因

master
xiong_cl 8 months ago
parent 2091b9e156
commit 1dc5e2add1
  1. 60
      shandan-control/src/main/resources/static/js/directory/directory.js
  2. 61
      shandan-control/src/main/resources/static/js/directory/reviewDirectory.js

@ -129,29 +129,47 @@ function startRender() {
showErrorMsg("请至少选择一条数据!"); showErrorMsg("请至少选择一条数据!");
return false; return false;
} }
layer.confirm('是否确定驳回该数据?', {}, function (index) { layer.open({
layer.close(index); type: 1,
reviewData(); title: '驳回',
}) area: ['auto'],
function reviewData() { btn: ['确定', '取消'],
const ids = datas.map(data => data.directoryId); content: reviewLayerHtml,
let param = { success: function (_layer, index) {
ids: ids.join(','), reviewForm.render();
status: ReviewStatus.REJECTED, reviewForm.on('submit(reviewForm)', function ({elem, field}) {
opinion: '', const ids = datas.map(data => data.directoryId);
sendNotice: true, console.log(field);
}; let param = {
$.post(`${ctx}/business/review/directory/file/change`, param, function (res) { ids: ids.join(','),
if (res.flag) { status: ReviewStatus.REJECTED,
showOkMsg('驳回成功'); opinion: field.opinion,
refreshPermis().then(() => { sendNotice: true,
metaListTable.reloadTable(); };
}) $.post(`${ctx}/business/review/directory/file/change`, param, function (res) {
if (res.flag) {
showOkMsg('驳回成功');
layer.close(index);
refreshPermis().then(() => {
metaListTable.reloadTable();
})
} else {
layer.msg('驳回失败' + res.msg);
}
});
return false;
});
},
yes: function () {
let formData = reviewForm.val('reviewForm');
if (formData.status) {
$('#btn-submit').click();
} else { } else {
layer.msg('驳回失败' + res.msg); layer.msg('请选择审核操作选项!');
return false;
} }
}); }
} });
}) })
reviewForm.on('radio(statusRadio)', function (data) { reviewForm.on('radio(statusRadio)', function (data) {

@ -105,29 +105,48 @@ function startRender() {
showErrorMsg("请至少选择一条数据!"); showErrorMsg("请至少选择一条数据!");
return false; return false;
} }
layer.confirm('是否确定驳回该数据?', {}, function (index) { layer.open({
layer.close(index); type: 1,
reviewData(); title: '驳回',
}) area: ['auto'],
function reviewData() { btn: ['确定', '取消'],
const ids = datas.map(data => data.directoryId); content: reviewLayerHtml,
let param = { success: function (_layer, index) {
ids: ids.join(','), reviewForm.render();
status: ReviewStatus.REJECTED, reviewForm.on('submit(reviewForm)', function ({elem, field}) {
opinion: '', const ids = datas.map(data => data.directoryId);
sendNotice: true, console.log(field);
}; let param = {
$.post(`${ctx}/business/review/directory/file/change`, param, function (res) { ids: ids.join(','),
if (res.flag) { status: ReviewStatus.REJECTED,
showOkMsg('驳回成功'); opinion: field.opinion,
refreshPermis().then(() => { sendNotice: true,
metaListTable.reloadTable(); };
}) $.post(`${ctx}/business/review/directory/file/change`, param, function (res) {
if (res.flag) {
showOkMsg('驳回成功');
layer.close(index);
refreshPermis().then(() => {
metaListTable.reloadTable();
})
} else {
layer.msg('驳回失败' + res.msg);
}
});
return false;
});
},
yes: function () {
let formData = reviewForm.val('reviewForm');
if (formData.status) {
$('#btn-submit').click();
} else { } else {
layer.msg('驳回失败' + res.msg); layer.msg('请选择审核操作选项!');
return false;
} }
}); }
} });
}) })
reviewForm.on('radio(statusRadio)', function (data) { reviewForm.on('radio(statusRadio)', function (data) {