驳回时输入驳回原因

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

@ -129,21 +129,27 @@ 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: ['确定', '取消'],
content: reviewLayerHtml,
success: function (_layer, index) {
reviewForm.render();
reviewForm.on('submit(reviewForm)', function ({elem, field}) {
const ids = datas.map(data => data.directoryId); const ids = datas.map(data => data.directoryId);
console.log(field);
let param = { let param = {
ids: ids.join(','), ids: ids.join(','),
status: ReviewStatus.REJECTED, status: ReviewStatus.REJECTED,
opinion: '', opinion: field.opinion,
sendNotice: true, sendNotice: true,
}; };
$.post(`${ctx}/business/review/directory/file/change`, param, function (res) { $.post(`${ctx}/business/review/directory/file/change`, param, function (res) {
if (res.flag) { if (res.flag) {
showOkMsg('驳回成功'); showOkMsg('驳回成功');
layer.close(index);
refreshPermis().then(() => { refreshPermis().then(() => {
metaListTable.reloadTable(); metaListTable.reloadTable();
}) })
@ -151,7 +157,19 @@ function startRender() {
layer.msg('驳回失败' + res.msg); layer.msg('驳回失败' + res.msg);
} }
}); });
return false;
});
},
yes: function () {
let formData = reviewForm.val('reviewForm');
if (formData.status) {
$('#btn-submit').click();
} else {
layer.msg('请选择审核操作选项!');
return false;
} }
}
});
}) })
reviewForm.on('radio(statusRadio)', function (data) { reviewForm.on('radio(statusRadio)', function (data) {

@ -105,21 +105,27 @@ 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: ['确定', '取消'],
content: reviewLayerHtml,
success: function (_layer, index) {
reviewForm.render();
reviewForm.on('submit(reviewForm)', function ({elem, field}) {
const ids = datas.map(data => data.directoryId); const ids = datas.map(data => data.directoryId);
console.log(field);
let param = { let param = {
ids: ids.join(','), ids: ids.join(','),
status: ReviewStatus.REJECTED, status: ReviewStatus.REJECTED,
opinion: '', opinion: field.opinion,
sendNotice: true, sendNotice: true,
}; };
$.post(`${ctx}/business/review/directory/file/change`, param, function (res) { $.post(`${ctx}/business/review/directory/file/change`, param, function (res) {
if (res.flag) { if (res.flag) {
showOkMsg('驳回成功'); showOkMsg('驳回成功');
layer.close(index);
refreshPermis().then(() => { refreshPermis().then(() => {
metaListTable.reloadTable(); metaListTable.reloadTable();
}) })
@ -127,7 +133,20 @@ function startRender() {
layer.msg('驳回失败' + res.msg); layer.msg('驳回失败' + res.msg);
} }
}); });
return false;
});
},
yes: function () {
let formData = reviewForm.val('reviewForm');
if (formData.status) {
$('#btn-submit').click();
} else {
layer.msg('请选择审核操作选项!');
return false;
}
} }
});
}) })
reviewForm.on('radio(statusRadio)', function (data) { reviewForm.on('radio(statusRadio)', function (data) {