|
@@ -21,7 +21,7 @@
|
|
|
ifShow:getTypeCheckPerm('account-productDelete'),
|
|
|
popConfirm: {
|
|
|
title: '是否删除?',
|
|
|
- confirm: handleDelete.bind(null, record),
|
|
|
+ confirm: handleQjDelete.bind(null, record),
|
|
|
placement: 'topLeft',
|
|
|
},
|
|
|
},
|
|
@@ -42,13 +42,13 @@
|
|
|
},
|
|
|
{
|
|
|
label: '下载',
|
|
|
- disabled:!(record.status == 1 || record.status == -2),
|
|
|
+ disabled:!(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
|
|
|
ifShow:getTypeCheckPerm('account-productDownload'),
|
|
|
onClick: handleDownload.bind(null, record),
|
|
|
},
|
|
|
{
|
|
|
label: '重算',
|
|
|
- disabled: record.status == 0,
|
|
|
+ disabled: record.status == 0|| (record.status == -2 && record.payStatus != 1),
|
|
|
ifShow:getTypeCheckPerm('account-productRerun'),
|
|
|
popConfirm: {
|
|
|
title: '是否重算?',
|
|
@@ -57,7 +57,7 @@
|
|
|
},
|
|
|
{
|
|
|
label: '复制',
|
|
|
- disabled:!(record.status == 1 || record.status == -2),
|
|
|
+ disabled:!(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
|
|
|
ifShow:getTypeCheckPerm('account-productCopy'),
|
|
|
onClick: handleCopy.bind(null, record),
|
|
|
},
|
|
@@ -112,6 +112,7 @@
|
|
|
operateSceneList,
|
|
|
sceneMove,
|
|
|
sceneDelete,
|
|
|
+ qjsceneDelete,
|
|
|
sceneReset,
|
|
|
sceneDownload,
|
|
|
checkDownLoad,
|
|
@@ -198,36 +199,29 @@
|
|
|
sceneCopy({ num: record.num })
|
|
|
.then(() => {
|
|
|
message.success({
|
|
|
- content: '删除成功',
|
|
|
+ content: '复制成功',
|
|
|
});
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- message.success({
|
|
|
- content: '删除失败',
|
|
|
- });
|
|
|
- });
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
+ async function handleQjDelete(record: Recordable) {
|
|
|
+ qjsceneDelete({ id: record.id })
|
|
|
+ .then(() => {
|
|
|
+ message.success({
|
|
|
+ content: '删除成功',
|
|
|
+ });
|
|
|
+ ViewReload();
|
|
|
+ })
|
|
|
+ }
|
|
|
async function handleDelete(record: Recordable) {
|
|
|
- console.log('handleDelete', record);
|
|
|
- // createConfirm({
|
|
|
- // title: '删除',
|
|
|
- // content: '确定要删除场景吗?',
|
|
|
- // onOk: async () => {
|
|
|
sceneDelete({ num: record.num })
|
|
|
.then(() => {
|
|
|
message.success({
|
|
|
content: '删除成功',
|
|
|
});
|
|
|
-
|
|
|
reload();
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- message.success({
|
|
|
- content: '删除失败',
|
|
|
- });
|
|
|
- });
|
|
|
}
|
|
|
async function handleMove(record: Recordable) {
|
|
|
openMoveModal(true, {
|
|
@@ -282,7 +276,6 @@
|
|
|
});
|
|
|
reload();
|
|
|
})
|
|
|
- .catch(() => {});
|
|
|
}
|
|
|
|
|
|
function getTypeCheckPerm(val){
|
|
@@ -293,6 +286,7 @@
|
|
|
registerTableViewKankan,
|
|
|
registerTable,
|
|
|
handleDelete,
|
|
|
+ handleQjDelete,
|
|
|
handleCopy,
|
|
|
handleMove,
|
|
|
handleDownload,
|