1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- angular.module('push')
- .controller('ImportEditCtrl', function ($scope,MyCollectionService,$ionicPopup,$ionicModal,$stateParams,CommonService,UserService){
- $scope.params=JSON.parse($stateParams.listparams)
- $scope.params.params.nodeId=localStorage.node
- $scope.params.params.uid=localStorage.uid
- // console.log($scope.params.params)
- $scope.tashow=["id","reqId","errorRemark","errorMsg"]
- $scope.sss=/1[3|4|5|7|8|9][0-9]{9}/
- MyCollectionService.postentrydetail( $scope.params.params).then(function (res) {
- // console.log(res)
- if(res.code==3350){
- $scope.tadata=res.data
- // console.log( $scope.tadata)
- }else {
- $ionicPopup.alert({
- title: '提示',
- template: res.message
- });
- }
- })
- //返回
- $scope.goback=function(){
- $scope.go('Import',{listparams:$scope.params.params.fileType});
- }
- //保存
- $scope.saveCompanyInfo=function () {
- // console.log(JSON.parse(JSON.stringify($scope.tadata)))
- var deal=JSON.parse(JSON.stringify($scope.tadata))
- deal.splice(0,1)
- var params= {
- basicInfos:deal,
- nodeId:UserService.node
- }
- // console.log(params)
- var urlparams=['entry/edit/basic',
- 'entry/edit/tax',
- 'entry/edit/patent',
- 'entry/edit/college/univers/res',
- 'entry/edit/financial',
- 'entry/edit/personnel',
- 'entry/edit/expert',
- 'entry/edit/policy']
- // console.log(urlparams[$scope.params.params.fileType-1])
- MyCollectionService.postentryEdit(urlparams[$scope.params.params.fileType-1],params).then(function (res) {
- // console.log(res)
- if(res.code==3350){
- CommonService.showMessage(res.message, $scope);
- setTimeout( function () {
- $scope.go('Import',{listparams:$scope.params.params.fileType});
- },1000)
- }else {
- $ionicPopup.alert({
- title: '提示',
- template: res.message
- });
- }
- })
- }
- })
|