index.html
4.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html ng-app="myApp">
<head lang="en" >
    <meta charset="UTF-8">
    <title></title>
    <link href="../spm_modules/bootstrap-css/1.0.0/bootstrap.css" rel="stylesheet">
    <link href="../spm_modules/xn-icon-common/1.0.0/iconfont.css" rel="stylesheet">
    <link href="../demo/base.css" rel="stylesheet">
    <link href="../directive/style.css" rel="stylesheet">
    <script type="text/javascript" src="../spm_modules/jquery/1.7.2/jquery.js"></script>
    <script type="text/javascript" src="../spm_modules/angular/1.3.9/angular.js"></script>
    <script type="text/javascript" src="../spm_modules/angular-ui/1.0.0/bootstraptpls.js"></script>
    <script type="text/javascript" src="../spm_modules/xn-filter-common/1.0.0/filter/commons.js"></script>
    <script type="text/javascript" src="../spm_modules/xn-service-common/1.0.0/service/commons.js"></script>
    <script type="text/javascript" src="../spm_modules/xn-service-foundation/1.0.0/service/foundations.js"></script>
    <script type="text/javascript" src="../directive/attachments.js"></script>
</head>
<body ng-controller="MyController">
<div xn-attachment-box  ng-Model="attachmentPopup"  data-is-open="isOpen"></div>
{{attachmentPopup}}
<div ng-click="isOpen=true">上传文件</div>
<div xn-file-edit ng-model="file"  data-type="{{parameter.type}}" data-max-size="{{parameter.size}}"></div>
<div xn-file-view ng-model="file"></div>
<div class="clearfix"></div>
<h4 >相关证明材料上传</h4>
<div xn-attachment-edit ng-model="attachmentUp"></div>
<h4 >相关证明材料查看</h4>
<div  xn-attachment-view  ng-model = "attachmentView"></div>
<h4 >单个文件上传</h4>
<ul class="xn-upload-img clearfix" >
    <li class="clearfix">
        <div xn-att-single-edit  ng-model="attachmentRegisterNumber" ></div>
    </li>
</ul>
<h4 >单个文件查看111111111111</h4>
        <div xn-att-single-view  ng-model="attachmentRegisterNumber" ></div>
<textarea xn-img-paste class="form-control" id="description;" placeholder="" name="description" xn-attachment="attachment" ng-model="feedback.description" rows="5"></textarea>
<label  class="xn-feedback-label" >附件列表</label>
<div xn-attachment-edit ng-model ="attachment"></div>
<script type="text/javascript">
    angular.module("myApp", ["ui.bootstrap","xn.filter.common","xn.service.common","xn.service.foundation","xn.directive.attachment"])
            .controller("MyController", ["$scope","$location","toolsService", function($scope,$location,toolsService) {
                $scope.attachmentPopup={
                    idList:[],
                    attachmentList:[]
                };
                $scope.isOpen=false;
                $scope.file={
                     ids:["560337874059661312","560335186471292928","560332393962409984"]
                };
                $scope.parameter={
                    type:"image",
                    size:"1"
                };
                $scope.isOpen=false;
                $scope.attachmentUp = {
                    type:"document",
                    size:"1",
                    businessId:"561002190383484928",
                    businessType : "EMPLOYEE",
                    businessCategory : "COMMON",
                    list:[]
                };
                $scope.attachmentView = {
                    businessId:"561002190383484928",
                    pageType:toolsService.parameter("pageType", $location.absUrl()),
                    businessType : "EMPLOYEE",
                    businessCategory : "COMMON",
                    list:[]
                };
                $scope.attachmentRegisterNumber = {
                    type:"image",
                    size:"1",
                    title:"上传营业执照",
                    businessId:toolsService.parameter("id", $location.absUrl()),
                    businessType : "CUSTOMER",
                    businessCategory : "REGISTER_NUMBER",
                    defaultPath:"/sales/images/attachment_default.png"
                };
                $scope.attachment={
                    businessId:toolsService.parameter("id", $location.absUrl()),
                    pageType:toolsService.parameter("pageType", $location.absUrl()),
                    businessType : "EMPLOYEE",
                    businessCategory : "COMMON",
                    list:[]
                }
            }]);
</script>
</body>
</html>