Commit 47cfc2df authored by Mccoy Z Xia's avatar Mccoy Z Xia

calendar action 页面调整

parent bdd64e12
...@@ -148,7 +148,7 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA ...@@ -148,7 +148,7 @@ public class CalendarActionServiceImpl extends BaseService implements ICalendarA
CalendarActionExample actionExample = new CalendarActionExample(); CalendarActionExample actionExample = new CalendarActionExample();
actionExample.createCriteria().andStatusEqualTo((byte) 1); actionExample.createCriteria().andStatusEqualTo((byte) 1);
List<CalendarAction> actionList = calendarActionMapper.selectByExample(null); List<CalendarAction> actionList = calendarActionMapper.selectByExample(actionExample);
List<CalendarActionDto> actionDtoList = new ArrayList<>(); List<CalendarActionDto> actionDtoList = new ArrayList<>();
actionList.forEach(p -> { actionList.forEach(p -> {
......
...@@ -349,7 +349,8 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService ...@@ -349,7 +349,8 @@ public class CalendarServiceImpl extends BaseService implements ICalendarService
@Override @Override
public OperationResultDto getMaxConfigOrder() { public OperationResultDto getMaxConfigOrder() {
return new OperationResultDto(true, "", calendarExtMapper.getMaxConfigOrder() + 1); Integer index = calendarExtMapper.getMaxConfigOrder();
return new OperationResultDto(true, "", index != null ? index + 1 : 1);
} }
@Override @Override
......
...@@ -256,6 +256,7 @@ ...@@ -256,6 +256,7 @@
"TaxCalendarCofigHead":"税务日历设置", "TaxCalendarCofigHead":"税务日历设置",
"CalendarNumber":"日历编号", "CalendarNumber":"日历编号",
"Number":"编号", "Number":"编号",
"TaskName" : "名称",
"Company":"公司", "Company":"公司",
"CompanyName": "公司名称", "CompanyName": "公司名称",
"TaxEvent":"税务事项", "TaxEvent":"税务事项",
...@@ -331,6 +332,10 @@ ...@@ -331,6 +332,10 @@
"RelatedPerson": "相关人员", "RelatedPerson": "相关人员",
"ButtonConfirm": "确定",
"ButtonCancel": "取消",
"ButtonCreate": "新建",
"ButtonSave": "保存",
"~MustBeEndOneApp": "I Must be the End One, please!" "~MustBeEndOneApp": "I Must be the End One, please!"
} }
\ No newline at end of file
...@@ -3,12 +3,42 @@ ...@@ -3,12 +3,42 @@
'use strict'; 'use strict';
$scope.actionList = {}; $scope.actionList = {
jurisdictionDtoList: []
};
$scope.taskTypeList = {}; $scope.taskTypeList = {};
var refreshTaskTypeList = function () {
taxCalendarService.getTaskTypeList().success(function (result) {
if (result && result.result && result.data) {
$scope.taskTypeList = result.data;
}
resetEditBoxTag();
});
};
$scope.validateOption = {}; $scope.validateOption = {};
var triggerList = constant.trigger.triggerType;
var logicUnitList = constant.trigger.logicUnit;
$scope.getLogicUnitName = function (id) {
var temp = _.find(logicUnitList, { id: id });
return temp ? temp.name : "";
};
$scope.getTaskTypeName = function (id) {
var temp = _.find($scope.taskTypeList, { id: id });
return temp ? temp.name : "";
};
$scope.getTriggerName = function (id) {
var temp = _.find(triggerList, { id: id });
return temp ? temp.name : "";
};
var refreshActionList = function () { var refreshActionList = function () {
calendarActionService.getCalendarActionList().success(function (res) { calendarActionService.getCalendarActionList().success(function (res) {
if (res.result) { if (res.result) {
...@@ -147,15 +177,6 @@ ...@@ -147,15 +177,6 @@
}); });
}; };
var refreshTaskTypeList = function () {
taxCalendarService.getTaskTypeList().success(function (result) {
if (result && result.result && result.data) {
$scope.taskTypeList = result.data;
}
resetEditBoxTag();
});
};
//tagBox控件不可编辑时,隐藏X按钮 //tagBox控件不可编辑时,隐藏X按钮
var resetEditBoxTag = function () { var resetEditBoxTag = function () {
$timeout(function () { $timeout(function () {
...@@ -184,18 +205,30 @@ ...@@ -184,18 +205,30 @@
}); });
}; };
$scope.addAction = function () {
};
//action detail 弹框相关 //action detail 弹框相关
$scope.editAction = function (action, type) { $scope.editAction = function (action, type) {
var readOnly = false; $scope.actionReadOnly = false;
$scope.cancelActionText = textConfig.cancelText;
$scope.saveActionText = textConfig.createText;
var actionModel = {}; var actionModel = {};
if (type === "Edit") { if (type === "Edit") {
$scope.title = action ? "Edit Action" : "Add Action"; $scope.title = action ? "Edit Action" : "Add Action";
actionModel = angular.copy(action); actionModel = angular.copy(action);
$scope.saveActionText = textConfig.saveText;
} else if (type === "Show") { } else if (type === "Show") {
actionModel = angular.copy(action); actionModel = angular.copy(action);
$scope.title = "Action Details"; $scope.title = "Action Details";
readOnly = true; $scope.actionReadOnly = true;
$scope.cancelActionText = textConfig.confirmText;
} else if (type === "Add") {
actionModel = angular.copy(action);
$scope.title = "Create Action";
$scope.cancelActionText = textConfig.createText;
} else { } else {
return; return;
} }
...@@ -204,15 +237,9 @@ ...@@ -204,15 +237,9 @@
return; return;
} }
var triggerList = constant.trigger.triggerType;
var taskTypeList = $scope.taskTypeList;
var logicUnitList = constant.trigger.logicUnit;
$scope.formOptions = { $scope.formOptions = {
formData: actionModel, formData: actionModel,
readOnly: readOnly, readOnly: $scope.actionReadOnly,
items: [ items: [
{ {
colSpan: 2, colSpan: 2,
...@@ -221,7 +248,7 @@ ...@@ -221,7 +248,7 @@
items: [ items: [
{ {
dataField: "name", dataField: "name",
caption: "Action Item Name", label: { text: "Action Item Name"},
validationRules: [{ validationRules: [{
type: "required", type: "required",
message: "Type of Tasks is required" message: "Type of Tasks is required"
...@@ -229,7 +256,7 @@ ...@@ -229,7 +256,7 @@
}, },
{ {
dataField: "triggerId", dataField: "triggerId",
caption: "Trigger", label: { text: "Trigger"},
editorType: "dxSelectBox", editorType: "dxSelectBox",
editorOptions: { editorOptions: {
items: triggerList, items: triggerList,
...@@ -243,10 +270,10 @@ ...@@ -243,10 +270,10 @@
}, },
{ {
dataField: "taskTypeId", dataField: "taskTypeId",
caption: "Type of Tasks", label: { text: "Type of Tasks"},
editorType: "dxSelectBox", editorType: "dxSelectBox",
editorOptions: { editorOptions: {
items: taskTypeList, items: $scope.taskTypeList,
displayExpr: "name", displayExpr: "name",
valueExpr: "id" valueExpr: "id"
}, },
...@@ -265,20 +292,22 @@ ...@@ -265,20 +292,22 @@
tabPanelOptions: { tabPanelOptions: {
deferRendering: false deferRendering: false
}, },
scrollByContent: true,
showNavButtons: true,
tabs: [ tabs: [
{ {
title: "Hong Kong", title: "Hong Kong",
items: [ items: [
{ {
dataField: "jurisdictionDtoList[0].status", dataField: "jurisdictionDtoList[0].status",
caption: "Valid", label: { text: "Valid"},
editorType: "dxCheckBox" editorType: "dxCheckBox"
}, { }, {
dataField: "jurisdictionDtoList[0].logicNum", dataField: "jurisdictionDtoList[0].logicNum",
caption: "LogicNum" label: { text: "LogicNum"}
}, { }, {
dataField: "jurisdictionDtoList[0].logicUnit", dataField: "jurisdictionDtoList[0].logicUnit",
caption: "LogicUnit", label: { text: "LogicUnit"},
editorType: "dxSelectBox", editorType: "dxSelectBox",
editorOptions: { editorOptions: {
items: logicUnitList, items: logicUnitList,
...@@ -287,7 +316,7 @@ ...@@ -287,7 +316,7 @@
} }
}, { }, {
dataField: "jurisdictionDtoList[0].description", dataField: "jurisdictionDtoList[0].description",
caption: "Description", label: { text: "Description"},
editorType: "dxTextArea", editorType: "dxTextArea",
colSpan: 3, colSpan: 3,
editorOptions: { editorOptions: {
...@@ -300,14 +329,14 @@ ...@@ -300,14 +329,14 @@
items: [ items: [
{ {
dataField: "jurisdictionDtoList[1].status", dataField: "jurisdictionDtoList[1].status",
caption: "Valid", label: { text: "Valid"},
editorType: "dxCheckBox" editorType: "dxCheckBox"
}, { }, {
dataField: "jurisdictionDtoList[1].logicNum", dataField: "jurisdictionDtoList[1].logicNum",
caption: "LogicNum" label: { text: "LogicNum"}
}, { }, {
dataField: "jurisdictionDtoList[1].logicUnit", dataField: "jurisdictionDtoList[1].logicUnit",
caption: "LogicUnit", label: { text: "LogicUnit"},
editorType: "dxSelectBox", editorType: "dxSelectBox",
editorOptions: { editorOptions: {
items: logicUnitList, items: logicUnitList,
...@@ -316,7 +345,7 @@ ...@@ -316,7 +345,7 @@
} }
}, { }, {
dataField: "jurisdictionDtoList[1].description", dataField: "jurisdictionDtoList[1].description",
caption: "Description", label: { text: "Description"},
editorType: "dxTextArea", editorType: "dxTextArea",
colSpan: 3, colSpan: 3,
editorOptions: { editorOptions: {
...@@ -329,14 +358,14 @@ ...@@ -329,14 +358,14 @@
items: [ items: [
{ {
dataField: "jurisdictionDtoList[2].status", dataField: "jurisdictionDtoList[2].status",
caption: "Valid", label: { text: "Valid"},
editorType: "dxCheckBox" editorType: "dxCheckBox"
}, { }, {
dataField: "jurisdictionDtoList[2].logicNum", dataField: "jurisdictionDtoList[2].logicNum",
caption: "LogicNum" label: { text: "LogicNum"}
}, { }, {
dataField: "jurisdictionDtoList[2].logicUnit", dataField: "jurisdictionDtoList[2].logicUnit",
caption: "LogicUnit", label: { text: "LogicUnit"},
editorType: "dxSelectBox", editorType: "dxSelectBox",
editorOptions: { editorOptions: {
items: logicUnitList, items: logicUnitList,
...@@ -345,7 +374,7 @@ ...@@ -345,7 +374,7 @@
} }
}, { }, {
dataField: "jurisdictionDtoList[2].description", dataField: "jurisdictionDtoList[2].description",
caption: "Description", label: { text: "Description"},
editorType: "dxTextArea", editorType: "dxTextArea",
colSpan: 3, colSpan: 3,
editorOptions: { editorOptions: {
...@@ -396,6 +425,14 @@ ...@@ -396,6 +425,14 @@
$scope.refreshAll = {}; $scope.refreshAll = {};
var textConfig = {
confirmText: $translate.instant('ButtonConfirm'),
cancelText: $translate.instant('ButtonCancel'),
saveText: $translate.instant('ButtonSave'),
createText: $translate.instant('ButtonCreate')
};
(function () { (function () {
$scope.refreshAll = refreshAll(); $scope.refreshAll = refreshAll();
refreshAll(); refreshAll();
......
<div id="calendar-action"> <div id="calendar-action">
<div class="calendar-action-Head">{{'CalendarActionHead'|translate}}</div> <div class="calendar-action-Head">{{'CalendarActionHead'|translate}}</div>
<div ng-click="refreshAll()">Refresh</div>
<div class="calendar-action-container"> <div class="calendar-action-container">
<div id="data-grid-action"> <div id="data-grid-action">
<div> <div>
...@@ -14,7 +13,7 @@ ...@@ -14,7 +13,7 @@
<div id="editTaskType" ng-click="editTaskTypeList();">Edit</div> <div id="editTaskType" ng-click="editTaskTypeList();">Edit</div>
</th> </th>
<th colspan="9">Jurisdiction of Formation</th> <th colspan="9">Jurisdiction of Formation</th>
<th rowspan="3">Operation</th> <th rowspan="3" style="width: 120px;">Operation</th>
</tr> </tr>
<tr> <tr>
<th colspan="3">Hong Kong</th> <th colspan="3">Hong Kong</th>
...@@ -24,39 +23,43 @@ ...@@ -24,39 +23,43 @@
<tr> <tr>
<th>Valid</th> <th>Valid</th>
<th>Description</th> <th>Description</th>
<th>Logic</th> <th style="width: 150px;">Logic</th>
<th>valid</th> <th>valid</th>
<th>Description</th> <th>Description</th>
<th>Logic</th> <th style="width: 150px;">Logic</th>
<th>valid</th> <th>valid</th>
<th>Description</th> <th>Description</th>
<th>Logic</th> <th style="width: 150px;">Logic</th>
</tr> </tr>
</thead> </thead>
<tbody id="table-body"> <tbody id="table-body">
<tr ng-repeat="action in actionList"> <tr ng-repeat="action in actionList track by $index">
<td>{{action.name}}</td> <td>{{action.name}}</td>
<td>{{action.triggerId}}</td> <td>{{getTriggerName(action.triggerId)}}</td>
<td>{{action.taskTypeId}}</td> <td>{{getTaskTypeName(action.taskTypeId)}}</td>
<td>{{action.status}}</td>
<td>{{action.description}}</td> <td><div dx-check-box="{ value: {{action.jurisdictionDtoList[0].status == 1}}, readOnly:true}"/></td>
<td>{{action.jurisdictionDtoList[0].description}}</td>
<td> <td>
<span>{{action.logicNum}}</span> <div class="logic-num">{{action.jurisdictionDtoList[0].logicNum}}</div>
<span>{{action.logicUnitId}}</span> <div class="logic-unit">{{getLogicUnitName(action.jurisdictionDtoList[0].logicUnit)}}</div>
</td> </td>
<td>{{action.status}}</td>
<td>{{action.description}}</td> <td><div dx-check-box="{ value: {{action.jurisdictionDtoList[1].status == 1}}, readOnly:true}"/></td>
<td>{{action.jurisdictionDtoList[1].description}}</td>
<td> <td>
<span>{{action.logicNum}}</span> <div class="logic-num">{{action.jurisdictionDtoList[1].logicNum}}</div>
<span>{{action.logicUnitId}}</span> <div class="logic-unit">{{getLogicUnitName(action.jurisdictionDtoList[1].logicUnit)}}</div>
</td> </td>
<td>{{action.status}}</td>
<td>{{action.description}}</td> <td><div dx-check-box="{ value: {{action.jurisdictionDtoList[2].status == 1}}, readOnly:true}"/></td>
<td>{{action.jurisdictionDtoList[2].description}}</td>
<td> <td>
<span>{{action.logicNum}}</span> <div class="logic-num">{{action.jurisdictionDtoList[2].logicNum}}</div>
<span>{{action.logicUnitId}}</span> <div class="logic-unit">{{getLogicUnitName(action.jurisdictionDtoList[2].logicUnit)}}</div>
</td> </td>
<td>
<td class="operation-button">
<span ng-click="editAction(action, 'Show')">Detail</span> <span ng-click="editAction(action, 'Show')">Detail</span>
<span ng-click="editAction(action, 'Edit')">Edit</span> <span ng-click="editAction(action, 'Edit')">Edit</span>
<span ng-click="deleteAction(action)">Delete</span> <span ng-click="deleteAction(action)">Delete</span>
...@@ -136,7 +139,7 @@ ...@@ -136,7 +139,7 @@
<div class="modal-header"> <div class="modal-header">
<span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideEditActionPanel()">&times;</span> <span class="close" data-dismiss="modal" aria-hidden="true" ng-click="hideEditActionPanel()">&times;</span>
<div class="long-title"><h3>Action Details</h3></div> <div class="long-title"><h3>{{title}}</h3></div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
...@@ -148,8 +151,8 @@ ...@@ -148,8 +151,8 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button ng-click="hideEditActionPanel();" class="btn btn-default btn-gray">{{'Cancel' | translate}}</button> <button ng-click="hideEditActionPanel();" class="btn btn-default btn-gray">{{cancelActionText}}</button>
<button ng-click="saveAction();" class="btn btn-default btn-red">{{'NewTaxCalendar' | translate}}</button> <button ng-show="!actionReadOnly" ng-click="saveAction();" class="btn btn-default btn-red">{{saveActionText}}</button>
</div> </div>
</script> </script>
......
...@@ -44,6 +44,24 @@ ...@@ -44,6 +44,24 @@
text-align: center; text-align: center;
} }
#table-body .dx-checkbox-icon {
background: #bbb;
}
#table-body .logic-num {
border: 1px solid #bbb;
width: 40px;
border-radius: 4px;
display: inline-block;
}
#table-body .logic-unit {
border: 1px solid #bbb;
width: 95px;
border-radius: 4px;
display: inline-block;
}
#editTaskType { #editTaskType {
color: red; color: red;
font-size: smaller; font-size: smaller;
...@@ -51,8 +69,12 @@ ...@@ -51,8 +69,12 @@
outline: none; outline: none;
} }
.operation-button span {
color: red;
outline: none;
}
#edit-task-type-pop, #edit-task-type, #edit-action-type-pop { #edit-task-type-pop, #edit-task-type {
.form-title { .form-title {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
...@@ -86,7 +108,12 @@ ...@@ -86,7 +108,12 @@
} }
} }
#edit-action-type-pop { #edit-action-pop {
.modal-header {
height: 75px;
}
#form-container { #form-container {
margin: 10px; margin: 10px;
} }
...@@ -126,4 +153,4 @@ ...@@ -126,4 +153,4 @@
} }
} }
} }
\ No newline at end of file
...@@ -9,7 +9,12 @@ ...@@ -9,7 +9,12 @@
//设置页面标题-->查看,新建,编辑日历设置 //设置页面标题-->查看,新建,编辑日历设置
$scope.PageTitle = ($scope.calendarConfigId ? ($scope.isReadOnly ? $translate.instant('View') : $translate.instant('Edit')) : $translate.instant('NewTaxCalendar')) + $translate.instant('TaxCalendarSet'); $scope.PageTitle = ($scope.calendarConfigId ? ($scope.isReadOnly ? $translate.instant('View') : $translate.instant('Edit')) : $translate.instant('NewTaxCalendar')) + $translate.instant('TaxCalendarSet');
$scope.bhOptions = { $scope.bhOptions = {
readOnly: true readOnly: !!$scope.isReadOnly,
placeholder: $translate.instant('PleaseInput'),
validationRules: [{
type: "required",
message: $translate.instant('ValidDataRequired')
}]
}; };
$scope.companyOptions = { $scope.companyOptions = {
bindingOptions: { bindingOptions: {
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<div class="taxCalendarForm" id="taxCalendarConfigForm" dx-validation-group="{}"> <div class="taxCalendarForm" id="taxCalendarConfigForm" dx-validation-group="{}">
<div class="edit-line row"> <div class="edit-line row">
<div class="col-user-define-left col-padding"> <div class="col-user-define-left col-padding">
<span class="title-first-n">{{'Number' | translate}}:</span> <span class="title-first-n">{{'TaskName' | translate}}:</span>
<div class="form-box bh-box" ng-model="taxCalendarConfiguration.orderIndex" dx-text-box="bhOptions"></div> <div class="form-box bh-box" ng-model="taxCalendarConfiguration.taskName" dx-text-box="bhOptions"></div>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<div class="form-box" ng-model="taxCalendarConfiguration.status" dx-radio-group="statusOptions"></div> <div class="form-box" ng-model="taxCalendarConfiguration.status" dx-radio-group="statusOptions"></div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment