Commit fd460514 authored by 王万里's avatar 王万里

fix: 台账转换

parent 9b6d0b8c
...@@ -14,6 +14,17 @@ ...@@ -14,6 +14,17 @@
/* /*
* String controller * String controller
*/ */
let shareformKey = ""
let nodeIdParams = ""
let exeCount = true
let schemaListObj = {}
window.share && window.share.event.on("editCurrentNodeForm", (params)=> {
shareformKey = params
})
window.share && window.share.event.on("editCurrentNodeId", (paramsId)=>{
nodeIdParams = paramsId
})
angular.module('flowableModeler').controller('FlowableStringPropertyCtrl', [ '$scope', function ($scope) { angular.module('flowableModeler').controller('FlowableStringPropertyCtrl', [ '$scope', function ($scope) {
...@@ -101,7 +112,6 @@ angular.module('flowableModeler').controller('FlowableTextPropertyCtrl', [ '$sco ...@@ -101,7 +112,6 @@ angular.module('flowableModeler').controller('FlowableTextPropertyCtrl', [ '$sco
$scope.property.mode = 'read'; $scope.property.mode = 'read';
}, 0); }, 0);
}); });
// Open the dialog // Open the dialog
_internalCreateModal(opts, $modal, $scope); _internalCreateModal(opts, $modal, $scope);
}]); }]);
...@@ -109,7 +119,6 @@ angular.module('flowableModeler').controller('FlowableTextPropertyCtrl', [ '$sco ...@@ -109,7 +119,6 @@ angular.module('flowableModeler').controller('FlowableTextPropertyCtrl', [ '$sco
angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['$scope', function($scope) { angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['$scope', function($scope) {
$scope.save = function() { $scope.save = function() {
console.log($scope.property)
$scope.updatePropertyInModel($scope.property); $scope.updatePropertyInModel($scope.property);
$scope.close(); $scope.close();
}; };
...@@ -120,28 +129,133 @@ angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', [' ...@@ -120,28 +129,133 @@ angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['
}; };
}]); }]);
angular.module('flowableModeler').controller('HuiqianPopupCtrl', ['$scope','$http', function($scope, $http) { angular.module('flowableModeler').controller('FieldReadConfigPopupCtrl', ['$rootScope','$scope', '$http', function($rootScope, $scope, $http) {
$http.get(FLOWABLE.APP_URL.getStaffList()) window.share && window.share.event.on("editCurrentNodeId", (params)=>{
.success(function(res){ nodeIdParams = params
console.log(res.data.getMe) })
let arr = []
res.data.getMe.forEach((item,index)=>{ if (nodeIdParams && shareformKey) {
if (item.LevelCode.indexOf('1-24')) { $http.get(FLOWABLE.APP_URL.GetColumnConfig(nodeIdParams, shareformKey))
item.userList.forEach((childItem)=>{ .success((res)=>{
arr.push({ console.log("进入。。。。。。。。。。///////////")
loginName: childItem.loginName, if (res.FieldConfigList && res.FieldConfigList.length > 0) {
userName: childItem.userName, res.FieldConfigList.forEach((item)=>{
userID: childItem.userID $scope.property.properties.forEach((pItem)=>{
if (item.FieldCode === pItem.key) {
pItem.defaultUnit = item.Unit
pItem.defaultValue = item.Type
pItem.defaultChecked = item.IsShow === "1" ? true : false
}
}) })
}) })
// $rootScope.curField = $scope.property
// $scope.childFieldObj = $rootScope.curField
schemaListObj = $scope.property
console.log(schemaListObj, "schemaListObj......schemaListObj.......")
$scope.childFieldObj = schemaListObj
} else {
$scope.property.properties.forEach(el => {
el.defaultValue = ""
el.defaultChecked = true
el.defaultUnit = ""
});
} }
}) })
$scope.userList = arr }
// if ($rootScope.currentReadResourceId) {
// $http.get(FLOWABLE.APP_URL.GetColumnConfig($rootScope.currentReadResourceId, shareformKey))
// .success((res)=>{
// if (res.FieldConfigList && res.FieldConfigList.length > 0) {
// res.FieldConfigList.forEach((item)=>{
// $scope.property.properties.forEach((pItem)=>{
// if (item.FieldCode === pItem.key) {
// pItem.defaultUnit = item.Unit
// pItem.defaultValue = item.Type
// pItem.defaultChecked = item.IsShow === "1" ? true : false
// }
// })
// })
// $rootScope.curField = $scope.property
// $scope.childFieldObj = $rootScope.curField
// console.log($scope.childFieldObj, "$scope.childFieldObj......$scope.childFieldObj.......")
// } else {
// $scope.property.properties.forEach(el => {
// el.defaultValue = ""
// el.defaultChecked = true
// el.defaultUnit = ""
// });
// }
// })
// } else {
// $scope.property.properties.forEach(el => {
// el.defaultValue = ""
// el.defaultChecked = true
// el.defaultUnit = ""
// });
// }
// $scope.property.properties.forEach(el => {
// el.defaultValue = ""
// el.defaultChecked = true
// el.defaultUnit = ""
// });
// $rootScope.curField = $scope.property
// $scope.childFieldObj = $rootScope.curField
// $scope.childFieldObj = schemaListObj
// console.log($scope.childFieldObj, "$scope.childFieldObj$scope.childFieldObj")
$scope.isShow = true
$scope.toggleTable=function() {
$scope.isShow = !$scope.isShow
}
$scope.changeValue = function(params) {
const data = {
ActID: $rootScope.currentReadResourceId,
Config: "",
FieldCode: params.key,
FieldName: params.title,
FieldType: params.type,
FormKey: shareformKey,
IsShow: params.defaultChecked ? 1: 0,
Type: params.defaultValue,
Unit: params.defaultUnit
}
$http({method: 'POST', url: FLOWABLE.APP_URL.SaveFieldConfig(), data: data})
.success(function(res) {
console.log(res)
}) })
}
}]);
angular.module('flowableModeler').controller('FieldWriteConfigPopupCtrl', ['$scope','$modal', '$timeout','$http', function($scope, $modal, $timeout, $http) {
$scope.toggleTable=function() {
$scope.isShow = !$scope.isShow
}
$scope.changeValue=function() {
}
}]);
angular.module('flowableModeler').controller('FieldTextPopup', ['$rootScope','$scope', function($rootScope,$scope) {
$scope.childFieldObj = $rootScope.curField
console.log($scope.childFieldObj)
$scope.save = function() { $scope.save = function() {
console.log($scope.property)
$scope.updatePropertyInModel($scope.property); $scope.updatePropertyInModel($scope.property);
$scope.close(); $scope.close();
}; };
...@@ -150,4 +264,8 @@ angular.module('flowableModeler').controller('HuiqianPopupCtrl', ['$scope','$htt ...@@ -150,4 +264,8 @@ angular.module('flowableModeler').controller('HuiqianPopupCtrl', ['$scope','$htt
$scope.property.mode = 'read'; $scope.property.mode = 'read';
$scope.$hide(); $scope.$hide();
}; };
$scope.changeValue = function() {
console.log($scope)
}
}]); }]);
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
let resourceIdList = []
angular.module('flowableModeler').controller('FlowableFormReferenceDisplayCtrl', angular.module('flowableModeler').controller('FlowableFormReferenceDisplayCtrl',
[ '$scope', '$modal', '$http', function($scope, $modal, $http) { [ '$scope', '$modal', '$http', function($scope, $modal, $http) {
...@@ -43,6 +45,7 @@ angular.module('flowableModeler').controller('FlowableFormReferenceCtrl', ...@@ -43,6 +45,7 @@ angular.module('flowableModeler').controller('FlowableFormReferenceCtrl',
angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl', angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl',
[ '$rootScope', '$scope', '$http', '$location', 'editorManager', function($rootScope, $scope, $http, $location, editorManager) { [ '$rootScope', '$scope', '$http', '$location', 'editorManager', function($rootScope, $scope, $http, $location, editorManager) {
$scope.state = {'loadingForms' : true, 'formError' : false}; $scope.state = {'loadingForms' : true, 'formError' : false};
$scope.popup = {'state' : 'formReference'}; $scope.popup = {'state' : 'formReference'};
...@@ -93,6 +96,9 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl', ...@@ -93,6 +96,9 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl',
'name' : modelName, 'name' : modelName,
'key' : modelKey 'key' : modelKey
}; };
// resourceIdList.push($scope.property.value)
window.share && window.share.event.emit("currentNodeForm", $scope.property.value);
// $rootScope.currentFormData = $scope.property.value
$scope.updatePropertyInModel($scope.property); $scope.updatePropertyInModel($scope.property);
$scope.close(); $scope.close();
}) })
...@@ -295,16 +301,6 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl', ...@@ -295,16 +301,6 @@ angular.module('flowableModeler').controller('FlowableFormReferencePopupCtrl',
function(response) { function(response) {
$scope.state.loadingForms = false; $scope.state.loadingForms = false;
$scope.state.formError = false; $scope.state.formError = false;
// var arr = []
// response.getMe[0].data.forEach(item => {
// if (item.key.indexOf("&#") > -1) {
// item.key = $scope.decoder(item.key)
// }
// if (item.name.indexOf("&#") > -1) {
// item.name = $scope.decoder(item.name)
// }
// arr.push(item)
// });
$scope.forms = response.getMe[0].data; $scope.forms = response.getMe[0].data;
}) })
.error( .error(
......
...@@ -203,5 +203,9 @@ FLOWABLE.PROPERTY_CONFIG = ...@@ -203,5 +203,9 @@ FLOWABLE.PROPERTY_CONFIG =
"huiqian" : { "huiqian" : {
"readModeTemplateUrl": "editor-app/configuration/properties/huiqian-read-template.html", "readModeTemplateUrl": "editor-app/configuration/properties/huiqian-read-template.html",
"writeModeTemplateUrl": "editor-app/configuration/properties/huiqian-write-template.html" "writeModeTemplateUrl": "editor-app/configuration/properties/huiqian-write-template.html"
},
"fieldconfig":{
"readModeTemplateUrl": "editor-app/configuration/properties/form-field-read-config.html",
"writeModeTemplateUrl": "editor-app/configuration/properties/form-field-write-config.html"
} }
}; };
<!-- <div class="modal" ng-controller="FieldTextPopup">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="close()">&times;</button>
<h3>{{property.title | translate}}</h3>
</div>
<div class="modal-body">
<div ng-repeat="child in childFieldObj.properties">
<input type="checkbox" ng-model="child.key" ng-change="changeValue()"/>
<span>{{child.title}}</span>
<select name="" id="">
<option value="">本人</option>
<option value="">本部门</option>
<option value="">部门主管</option>
<option value="">编码</option>
</select>
</div>
</div>
<div class="modal-footer">
<button ng-click="save()" class="btn btn-primary" translate >ACTION.SAVE</button>
</div>
</div>
</div>
</div> -->
\ No newline at end of file
<!-- <div ng-controller="FieldReadConfigPopupCtrl" style="line-height: 38px;">
<div ng-click="clickCurField()">
<input type="checkbox" ng-model="property.value" ng-change="changeValue()"/>
</div>
</div> -->
<div ng-controller="FieldReadConfigPopupCtrl">
<div style="height: 30px;line-height: 30px;margin: 2px 0;">
<span style="margin: 0 5px;font-size: 12px;">{{property.title}}</span>
<span class="caret" ng-click="toggleTable()"></span>
</div>
<table class="table" ng-if="isShow">
<tr>
<th></th>
<th>字段</th>
<th>默认值</th>
<th>单位</th>
</tr>
<tr ng-repeat="child in childFieldObj.properties">
<td style="width: 20px;">
<input type="checkbox" ng-model="child.defaultChecked" ng-change="changeValue(child)"/>
</td>
<td class="active">{{child.title}}</td>
<td class="active">
<select ng-model="child.defaultValue" ng-change="changeValue(child)">
<option value="无"></option>
<option value="本人">本人</option>
<option value="本部门">本部门</option>
<option value="部门主管">部门主管</option>
<option value="财务">财务</option>
</select>
</td>
<td class="active">
<select ng-model="child.defaultUnit" ng-change="changeValue(child)">
<option value="无"></option>
<option value="个"></option>
<option value="本"></option>
<option value="元"></option>
<option value="万元">万元</option>
</select>
</td>
</tr>
</table>
</div>
<div ng-controller="FieldWriteConfigPopupCtrl">
<table class="table" ng-if="isShow">
<tr ng-repeat="child in childFieldObj.properties">
<td><input type="checkbox" ng-model="child.key" ng-change="changeValue()"/></td>
<td class="active">active</td>
<td class="success">success</td>
<td class="warning">warning</td>
<td class="danger">danger</td>
</tr>
</table>
</div>
...@@ -146,13 +146,18 @@ ...@@ -146,13 +146,18 @@
<div class="selected-item-body"> <div class="selected-item-body">
<div> <div>
<div class="property-row" ng-repeat="property in selectedItem.properties" ng-click="propertyClicked($index)" ng-class="{'clear' : $index%2 == 0}"> <div class="property-row" ng-repeat="property in selectedItem.properties" ng-click="propertyClicked($index)" ng-class="{'clear' : $index%2 == 0}">
<span class="title" ng-if="!property.hidden" title="{{ property.description | translate}}">{{ property.title | translate }}&nbsp;:</span> <div ng-if="property.type === 'wangwanli'">
<ng-include src="getPropertyReadModeTemplateUrl($index)"></ng-include>
</div>
<!-- <div ng-if="property.type !== 'wangwanli'"> -->
<span class="title" ng-if="!property.hidden && property.type !== 'wangwanli'" title="{{ property.description | translate}}">{{ property.title | translate }}&nbsp;:</span>
<span class="title-removed" ng-if="property.hidden"><i>{{ property.title }}&nbsp;({{'PROPERTY.REMOVED' | translate}})&nbsp;:</i></span> <span class="title-removed" ng-if="property.hidden"><i>{{ property.title }}&nbsp;({{'PROPERTY.REMOVED' | translate}})&nbsp;:</i></span>
<span class="value"> <span class="value" ng-if="property.type !== 'wangwanli'">
<ng-include src="getPropertyTemplateUrl($index)" ng-if="!property.hasReadWriteMode"></ng-include> <ng-include src="getPropertyTemplateUrl($index)" ng-if="!property.hasReadWriteMode"></ng-include>
<ng-include src="getPropertyReadModeTemplateUrl($index)" ng-if="property.hasReadWriteMode && property.mode == 'read'"></ng-include> <ng-include src="getPropertyReadModeTemplateUrl($index)" ng-if="property.hasReadWriteMode && property.mode == 'read'"></ng-include>
<ng-include src="getPropertyWriteModeTemplateUrl($index)" ng-if="property.hasReadWriteMode && property.mode == 'write'"></ng-include> <ng-include src="getPropertyWriteModeTemplateUrl($index)" ng-if="property.hasReadWriteMode && property.mode == 'write'"></ng-include>
</span> </span>
<!-- </div> -->
</div> </div>
</div> </div>
</div> </div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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