diff --git a/YLErpWeb/Views/clientblack/clientblackApproval.cshtml b/YLErpWeb/Views/clientblack/clientblackApproval.cshtml
new file mode 100644
index 00000000..566df422
--- /dev/null
+++ b/YLErpWeb/Views/clientblack/clientblackApproval.cshtml
@@ -0,0 +1,74 @@
+@{
+ ViewBag.Title = "黑名单客户审批";
+ Layout = "~/Views/Shared/_MainLayout.cshtml";
+ var pageObj = new
+ {
+ roles = UserBLL.GetRolesByUserId(CurUser.UserId).Select(x => x.Id)
+ };
+}
+@section CSS{
+
+
+}
+@section JS{
+
+}
+
+
+
+ @MyControls.SearchBtn()
+
+@Html.Raw(JqGridSimple.OutTable())
diff --git a/YLErpWeb/Views/clientblack/clientblackLogList.cshtml b/YLErpWeb/Views/clientblack/clientblackLogList.cshtml
new file mode 100644
index 00000000..6ccf41ad
--- /dev/null
+++ b/YLErpWeb/Views/clientblack/clientblackLogList.cshtml
@@ -0,0 +1,14 @@
+@model IEnumerable
+@{
+ ViewBag.Title = "黑名单操作历史";
+ Layout = "~/Views/Shared/_InfoLayout.cshtml";
+}
+
+ | 时间 | 操作人 | 操作内容 | 说明 |
+
+ @foreach (var item in Model ?? Enumerable.Empty())
+ {
+ | @item.OptDate.ToString("yyyy-MM-dd HH:mm:ss") | @item.OptName | @item.OptType | @item.Changes |
+ }
+
+
diff --git a/YLErpWeb/Views/clientblack/clientblackView.cshtml b/YLErpWeb/Views/clientblack/clientblackView.cshtml
new file mode 100644
index 00000000..1192edf4
--- /dev/null
+++ b/YLErpWeb/Views/clientblack/clientblackView.cshtml
@@ -0,0 +1,45 @@
+@using YLErp.Modules.ClientModule
+@model YLErp.Model.client_black
+@{
+ ViewBag.Title = "黑名单客户审批";
+ Layout = "~/Views/Shared/_InfoLayout.cshtml";
+ var process = new ClientBlackService(CurUser).ProcessList();
+ var currentNode = process.FirstOrDefault(x => x.order == Model?.ApprovalProcess);
+ var canAudit = currentNode != null && UserBLL.GetRolesByUserId(CurUser.UserId).Any(x => x.Id == currentNode.roleId);
+}
+@section JS {
+
+}
+
+
+
+
+ | 客户名称 | @Model?.Name |
+ | 黑名单备注 | @Model?.Remarks |
+ | 审批状态 | @Model?.State |
+ | 提交审批人 | @Model?.ApprovalOptName |
+ | 提交审批时间 | @Model?.ApprovalOptDate?.ToString("yyyy-MM-dd HH:mm:ss") |
+
+ | 审批说明 |
+ |
+
+
+
diff --git a/YLErpWeb/Views/clientblack/clientblacklist.cshtml b/YLErpWeb/Views/clientblack/clientblacklist.cshtml
index 7ab08bb0..d8821a20 100644
--- a/YLErpWeb/Views/clientblack/clientblacklist.cshtml
+++ b/YLErpWeb/Views/clientblack/clientblacklist.cshtml
@@ -51,10 +51,10 @@
var colModelGrid = [{
name: 'id', label: 'id', index: 'id', width: 0, hidden: true, optionHide: true
}, {
- name: 'opt', label: '操作', index: 'opt', width: 150, align: 'left', hidden: !page.canEdit, optionHide: !page.canEdit, sortable: false,
+ name: 'opt', label: '操作', index: 'opt', width: 200, align: 'left', hidden: !page.canEdit, optionHide: !page.canEdit, sortable: false,
formatter: function (cellValue, options, rowObject) {
if (page.canEdit) {
- var html = ("")
+ var html = ("")
.template(rowObject.id);
return html;
}
@@ -65,7 +65,9 @@
}, {
name: 'Name', label: '客户名称', index: 'Name', width: 260
}, {
- name: 'Remarks', label: '备注', index: 'Remarks', width: 500
+ name: 'Remarks', label: '备注', index: 'Remarks', width: 500
+ }, {
+ name: 'State', label: '状态', index: 'State', width: 120
}, {
name: 'OptName', label: '操作人', index: 'OptName', width: 150
}, {
@@ -146,7 +148,7 @@
function SearchClick(isSearchclick) {
var listGrid = $('#listGrid');
listGrid.appendPostData({ Name: $("#Name").val() });
- listGrid.appendPostData({ OptName: $("#OptName").val() });
+ listGrid.appendPostData({ ClientBlackStates: $("#ClientBlackStates").val()?.join(',') || '' });
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
//点击搜索时默认第一页
listGrid.jqGrid('setGridParam', {page: 1});
@@ -241,6 +243,19 @@
});
})
}
+ function ClientBlackSubmit() {
+ var ids = main.GetGridIds($('#listGrid'));
+ if (!ids.length) { main.message('请选择要提交的数据!'); return; }
+ main.post('/clientblack/clientblackSubmit', { ids: ids.toString() }).done(function () { SearchClick(); });
+ }
+ function ClientBlackWithdraw() {
+ var ids = main.GetGridIds($('#listGrid'));
+ if (!ids.length) { main.message('请选择要撤回的数据!'); return; }
+ main.post('/clientblack/clientblackWithdraw', { ids: ids.toString() }).done(function () { SearchClick(); });
+ }
+ function clientblackLogView(id) {
+ main.open('操作历史', '/clientblack/clientblackLogList?id=' + id, { area: ['1000px', '75%'] });
+ }
}
@@ -267,6 +282,7 @@
-@Html.Raw(JqGridSimple.OutTable())
\ No newline at end of file
+@Html.Raw(JqGridSimple.OutTable())
diff --git a/YLErpWeb/wwwroot/Scripts/app/system/Approvalprocess.js b/YLErpWeb/wwwroot/Scripts/app/system/Approvalprocess.js
index cff6d111..68c4b3a8 100644
--- a/YLErpWeb/wwwroot/Scripts/app/system/Approvalprocess.js
+++ b/YLErpWeb/wwwroot/Scripts/app/system/Approvalprocess.js
@@ -53,7 +53,8 @@ var app = new Vue({
{ text: '交易新增与修改', value: '2' },
{ text: '交易了结', value: '6' },
/* { text: '资信与授信', value: '3' },*/
- { text: '出金', value: '4' }
+ { text: '出金', value: '4' },
+ { text: '黑名单', value: '7' }
],
isOpen: false,
@@ -62,12 +63,14 @@ var app = new Vue({
isCredit: false,
isOutCash: false,
isClient: false,
+ isClientBlack: false,
openItems: [],
clientItems: [],
tradeItems: [],
closeItems: [],
creditItems: [],
outCashItems: [],
+ clientBlackItems: [],
openCounter: 0,
tradeCounter: 0,
creditCounter: 0,
@@ -140,6 +143,7 @@ var app = new Vue({
thisObj.isCredit = false;
thisObj.isOutCash = false;
thisObj.isClient = false;
+ thisObj.isClientBlack = false;
} else if (thisObj.selected === '2') {
thisObj.isOpen = false;
thisObj.isTrade = true;
@@ -147,6 +151,7 @@ var app = new Vue({
thisObj.isCredit = false;
thisObj.isOutCash = false;
thisObj.isClient = false;
+ thisObj.isClientBlack = false;
} else if (thisObj.selected === '6') { // 需求②:交易了结流程
thisObj.isOpen = false;
thisObj.isTrade = false;
@@ -154,6 +159,7 @@ var app = new Vue({
thisObj.isCredit = false;
thisObj.isOutCash = false;
thisObj.isClient = false;
+ thisObj.isClientBlack = false;
} else if (thisObj.selected === '3') {
thisObj.isOpen = false;
thisObj.isTrade = false;
@@ -161,6 +167,7 @@ var app = new Vue({
thisObj.isCredit = true;
thisObj.isOutCash = false;
thisObj.isClient = false;
+ thisObj.isClientBlack = false;
}
else if (thisObj.selected === '4') {
thisObj.isOpen = false;
@@ -169,6 +176,7 @@ var app = new Vue({
thisObj.isCredit = false;
thisObj.isOutCash = true;
thisObj.isClient = false;
+ thisObj.isClientBlack = false;
}
else if (thisObj.selected === '5') {
thisObj.isOpen = false;
@@ -177,6 +185,16 @@ var app = new Vue({
thisObj.isCredit = false;
thisObj.isOutCash = false;
thisObj.isClient = true;
+ thisObj.isClientBlack = false;
+ }
+ else if (thisObj.selected === '7') {
+ thisObj.isOpen = false;
+ thisObj.isTrade = false;
+ thisObj.isClose = false;
+ thisObj.isCredit = false;
+ thisObj.isOutCash = false;
+ thisObj.isClient = false;
+ thisObj.isClientBlack = true;
}
else {
thisObj.isOpen = false;
@@ -185,6 +203,7 @@ var app = new Vue({
thisObj.isCredit = false;
thisObj.isOutCash = false;
thisObj.isClient = false;
+ thisObj.isClientBlack = false;
}
thisObj.getProcess();
},
@@ -385,6 +404,18 @@ var app = new Vue({
thisObj.addCloseNode(index, child, node);
return;
}
+ else if (selectType === "7") { //黑名单
+ var item = {
+ Type: 'ClientBlackProcess',
+ Index: index + 1,
+ SelectValue: 0
+ };
+ thisObj.clientBlackItems.splice(index, 0, item);
+ thisObj.clientBlackItems.forEach(function (x, itemIndex) {
+ x.Index = itemIndex + 1;
+ });
+ return;
+ }
},
delProcess: function (openItem) {
@@ -417,6 +448,14 @@ var app = new Vue({
});
return;
}
+ else if (selectType === "7") {//黑名单
+ var index = thisObj.clientBlackItems.indexOf(openItem);
+ thisObj.clientBlackItems.splice(index, 1);
+ thisObj.clientBlackItems.forEach(function (x, itemIndex) {
+ x.Index = itemIndex + 1;
+ });
+ return;
+ }
},
addOpenProcess(index, child, node) {
var thisObj = this;
@@ -528,6 +567,10 @@ var app = new Vue({
thisObj.saveCloseProcess();
return;
}
+ else if (selectType === "7") { //黑名单
+ thisObj.clientBlackOk();
+ return;
+ }
},
openOk() {
var thisObj = this;
@@ -857,6 +900,38 @@ var app = new Vue({
});
}
},
+ clientBlackOk() {
+ var thisObj = this;
+ var items = thisObj.clientBlackItems;
+ for (var i = 0; i < items.length; i++) {
+ if (items[i].SelectValue === "" || items[i].SelectValue === 0) {
+ main.message('流程中断,请重新选择');
+ return;
+ }
+ for (var j = i + 1; j < items.length; j++) {
+ if (parseInt(items[i].SelectValue) === parseInt(items[j].SelectValue)) {
+ main.message('流程包含重复项,请重新选择');
+ return;
+ }
+ }
+ }
+
+ if (items.length > 0) {
+ main.confirm("确认修改黑名单审批流程?", function () {
+ main.post("/AccountOpeningProcess/AddProcess",
+ { type: "ClientBlackProcess", data: items },
+ { async: false }).done(function () {
+ thisObj.getProcess();
+ });
+ });
+ } else {
+ main.confirm("删除审批流程后,黑名单变更会直接生效,确认删除?", function () {
+ main.post("/AccountOpeningProcess/AddProcess",
+ { type: "ClientBlackProcess" },
+ { async: false });
+ });
+ }
+ },
getProcess() {
var thisObj = this;
thisObj.openItems = [];
@@ -865,6 +940,7 @@ var app = new Vue({
thisObj.creditItems = [];
thisObj.outCashItems = [];
thisObj.clientItems = [];
+ thisObj.clientBlackItems = [];
main.post("/AccountOpeningProcess/GetProcess",
{},
{ async: false }).done(
@@ -945,6 +1021,14 @@ var app = new Vue({
triggerCondition: value.triggerCondition
});
});
+ (res.ClientBlackProcess || []).forEach(function (value) {
+ thisObj.clientBlackItems.push({
+ id: value.id,
+ Type: value.processType,
+ Index: value.order,
+ SelectValue: value.roleId
+ });
+ });
// 需求①:加载后把 triggerCondition(JSON)解析为结构化对象供 UI 编辑
['openItems', 'tradeItems', 'closeItems', 'clientItems'].forEach(function (arr) {
thisObj[arr].forEach(function (item) {