浏览代码

1.文件上传接口

ytf 3 年之前
父节点
当前提交
c6823beb9f

+ 1 - 1
krock-core-eureka-server/src/main/resources/application.yml

@@ -9,4 +9,4 @@ eureka:
9 9
     fetch-registry: false     #false表示自己端就是注册中心,我的职责就是维护服务实例,并不需要去检索服务
10 10
     service-url:
11 11
       #单机就是7001自己
12
-      defaultZone: http://localhost:16000/eureka/
12
+      defaultZone: http://127.0.0.1:16000/eureka/

+ 1 - 1
krock-jcebid-cp/krock-web-cp-all/src/main/resources/application.yml

@@ -16,7 +16,7 @@ server:
16 16
 eureka:
17 17
   client:
18 18
     serviceUrl:
19
-      defaultZone: http://192.168.1.249:16000/eureka/
19
+      defaultZone: http://127.0.0.1:16000/eureka/
20 20
     fetch-registry: true
21 21
     register-with-eureka: true
22 22
 spring:

+ 5 - 80
krock-jcebid-cp/krock-web-cp-all/src/main/resources/static/view_cp_pm/pm/verify/bdw_verify.html

@@ -163,7 +163,8 @@
163 163
                             }
164 164
                         },{
165 165
                             xtype:"container"
166
-                        },{
166
+                        }
167
+                        /*,{
167 168
                             xtype : 'button',
168 169
                             tooltip : '查看标的物上传图片',
169 170
                             icon : jcapp.getIcon("vcard.png"),
@@ -174,16 +175,16 @@
174 175
                                 if(bid_file_id == undefined){
175 176
                                     Ext.Msg.alert("提示", "没有相关信息!");
176 177
                                 }else{
177
-                                    /*var array = bid_file_id.split(",");
178
+                                    /!*var array = bid_file_id.split(",");
178 179
                                     var nums = [];
179 180
                                     for(var i = 0 ; i < array.length ;i++){
180 181
                                         nums.push(parseInt(array[i]));
181 182
                                         window.open(getServerHttp()+"/img_pm/img/"+array[i]);
182
-                                    }*/
183
+                                    }*!/
183 184
                                     enlarge(bid_file_id);
184 185
                                 }
185 186
                             }
186
-                        }
187
+                        }*/
187 188
                     ]
188 189
                 }
189 190
             ],
@@ -231,82 +232,6 @@
231 232
             });
232 233
         }
233 234
 
234
-        var imgIndex = 0;
235
-        var operationIndex = ''; //up 上一页 down 下一页
236
-        var imgSize = 0;
237
-        function enlarge(bid_file_id){
238
-            var array = bid_file_id.split(",");
239
-            var html = '<div style="width:100%;height:100%;">' ;
240
-            imgSize = array.length-1;
241
-            for(var i = 0 ; i < array.length ;i++){
242
-                var str = getServerHttp()+"/img_pm/img/"+array[i];
243
-                html += '<img id="videoSource'+i+'" style="width:100%;height:100%;display:none;"  src="'+str+'" />' ;
244
-            }
245
-            html += '<div>';
246
-            songPlayer.show();
247
-            Ext.getCmp("playerPanel").body.update(html);
248
-            showIndex();
249
-        }
250
-        function showIndex(){
251
-            if(operationIndex == 'down'){
252
-                if(imgIndex == imgSize){
253
-                    Ext.Msg.alert("操作","最后一张无法下一页");
254
-                    return;
255
-                }
256
-                document.getElementById("videoSource"+imgIndex).style.display="none";
257
-                imgIndex++;
258
-                console.log(imgIndex);
259
-                document.getElementById("videoSource"+imgIndex).style.display="block";
260
-            }else if(operationIndex == 'up'){
261
-                if(imgIndex == 0){
262
-                    Ext.Msg.alert("操作","第一张无法上一页");
263
-                    return;
264
-                }
265
-                document.getElementById("videoSource"+imgIndex).style.display="none";
266
-                imgIndex--;
267
-                console.log(imgIndex);
268
-                document.getElementById("videoSource"+imgIndex).style.display="block";
269
-            }else{
270
-                document.getElementById("videoSource"+imgIndex).style.display="block";
271
-            }
272
-        }
273
-        var playerForm=new Ext.Panel({
274
-            xtype : 'panel',
275
-            id : 'playerPanel',
276
-            width:600,
277
-            height:600,
278
-            html:""
279
-        })
280
-        var songPlayer = new Ext.Window({
281
-            layout : 'fit',
282
-            width:600,
283
-            height:600,
284
-            modal : true,
285
-            frame: true,
286
-            closable : false,
287
-            items : [playerForm]  ,
288
-            buttons: [{
289
-                text: '上一页',
290
-                handler: function() {
291
-                    operationIndex = 'up';
292
-                    showIndex();
293
-                }
294
-            },{
295
-                text: '下一页',
296
-                handler: function() {
297
-                    operationIndex = 'down';
298
-                    showIndex();
299
-                }
300
-            },{
301
-                text: '关闭',
302
-                handler: function() {
303
-                    Ext.getCmp('playerPanel').html ="";
304
-                    Ext.getCmp("playerPanel").body.update("");
305
-                    songPlayer.hide();
306
-                }
307
-            }]
308
-        });
309
-
310 235
     </script>
311 236
 </head>
312 237
 <body>

+ 129 - 21
krock-jcebid-cp/krock-web-cp-all/src/main/resources/static/view_cp_pm/pm/verify/select.js

@@ -93,22 +93,36 @@
93 93
 					labelWidth : 130,
94 94
 					editable : false,
95 95
 				},{
96
-					fieldLabel : "竞买协议",
97
-					name : "price_guarantee",
98
-					labelWidth : 130,
99
-					editable : false,
100
-					renderer : function(val){
101
-						return "<div><button onclick=\"getInfo('"+val+"')\">查看</button><button onclick=\"editInfo('price_guarantee')\">编辑</button></div>";
96
+					xtype : 'button',
97
+					text : '竞买协议',
98
+					name : "bidding_agreement_path",
99
+					labelWidth : 50,
100
+					tooltip : '查看详情',
101
+					icon : jcapp.getIcon("user_magnify.png"),
102
+					handler : function() {
103
+						getPriceInfo(0);
102 104
 					}
103 105
 				},{
104
-					fieldLabel : "竞买规则",
106
+					xtype : 'button',
107
+					text : '竞买规则',
105 108
 					name : "bidding_rules_path",
106
-					labelWidth : 130,
107
-					editable : false,
108
-					renderer : function(val){
109
-						return "<div><button onccclick=\"getInfo('"+val+"')\">查看</button><button onclick=\"editInfo('bidding_rules_path')\">编辑</button></div>";
109
+					labelWidth : 50,
110
+					tooltip : '查看详情',
111
+					icon : jcapp.getIcon("user_magnify.png"),
112
+					handler : function(val) {
113
+						getPriceInfo(1);
110 114
 					}
111
-				},
115
+				},{
116
+					xtype : 'button',
117
+					text : '查看标的物上传图片',
118
+					name : "bid_file_id",
119
+					labelWidth : 50,
120
+					tooltip : '查看详情',
121
+					icon : jcapp.getIcon("user_magnify.png"),
122
+					handler : function(val) {
123
+						enlarge();
124
+					}
125
+				}
112 126
 			]
113 127
 		});
114 128
 
@@ -120,15 +134,24 @@
120 134
 			closeAction : "hide",
121 135
 			items : edit_form_panel
122 136
 		});
123
-
124
-function getInfo(url){
125
-		window.location.href = url;
126
-}
127
-function editInfo(type){
128
-	var editKid =edit_form_panel.getForm().findField("kid").getValue();
129
-	console.log(editKid+"  "+type);
137
+var urls = ["",""]
138
+function getPriceInfo(jumpType){
139
+	var jumpUrl = urls[jumpType];
140
+	console.log(jumpUrl);
141
+	if (isEmpty(jumpUrl)){
142
+		Ext.Msg.alert("提示", "竞买文档为空!");
143
+		return;
144
+	}
145
+	window.open(jumpUrl)
130 146
 }
131 147
 
148
+ function isEmpty(obj){
149
+	 if(obj == "undefined" || obj == null || obj == ""){
150
+		 return true;
151
+	 }else{
152
+		 return false;
153
+	 }
154
+ }
132 155
 function details(kid){
133 156
 	
134 157
 	Ext.Ajax.request({
@@ -143,11 +166,96 @@ function details(kid){
143 166
 					var dateStr1 = getSmpFormatDateByLong(json.time_opening);
144 167
 					edit_form_panel.getForm().findField("time_opening").setValue(dateStr1); 
145 168
 					var dateStr2 = getSmpFormatDateByLong(json.time_end);
146
-					edit_form_panel.getForm().findField("time_end").setValue(dateStr2); 
169
+					edit_form_panel.getForm().findField("time_end").setValue(dateStr2);
170
+					urls[0]=""+json.bidding_agreement_path;
171
+					urls[1]=""+json.bidding_rules_path;
172
+					bid_file_id = ""+json.bid_file_id;
147 173
 					edit_form_panel_win.show();
148 174
 				},
149 175
 				failure : function(response) {
150 176
 					Ext.Msg.alert("提示", "操作失败!");
151 177
 				}
152 178
 			});
153
-}
179
+}
180
+
181
+ var imgIndex = 0;
182
+ var operationIndex = ''; //up 上一页 down 下一页
183
+ var imgSize = 0;
184
+ var bid_file_id = "";
185
+ function enlarge(){
186
+ 	console.log(bid_file_id);
187
+	 if (isEmpty(bid_file_id)){
188
+		 Ext.Msg.alert("提示", "标的图片为空!");
189
+		 return;
190
+	 }
191
+	 var array = bid_file_id.indexOf("2") != -1 ? bid_file_id.split(","):bid_file_id;
192
+	 var html = '<div style="width:100%;height:100%;">' ;
193
+	 imgSize = array.length-1;
194
+	 for(var i = 0 ; i < array.length ;i++){
195
+		 var str = getServerHttp()+"/img_pm/img/"+array[i];
196
+		 html += '<img id="videoSource'+i+'" style="width:100%;height:100%;display:none;"  src="'+str+'" />' ;
197
+	 }
198
+	 html += '<div>';
199
+	 songPlayer.show();
200
+	 Ext.getCmp("playerPanel").body.update(html);
201
+	 showIndex();
202
+ }
203
+ function showIndex(){
204
+	 if(operationIndex == 'down'){
205
+		 if(imgIndex == imgSize){
206
+			 Ext.Msg.alert("操作","最后一张无法下一页");
207
+			 return;
208
+		 }
209
+		 document.getElementById("videoSource"+imgIndex).style.display="none";
210
+		 imgIndex++;
211
+		 console.log(imgIndex);
212
+		 document.getElementById("videoSource"+imgIndex).style.display="block";
213
+	 }else if(operationIndex == 'up'){
214
+		 if(imgIndex == 0){
215
+			 Ext.Msg.alert("操作","第一张无法上一页");
216
+			 return;
217
+		 }
218
+		 document.getElementById("videoSource"+imgIndex).style.display="none";
219
+		 imgIndex--;
220
+		 console.log(imgIndex);
221
+		 document.getElementById("videoSource"+imgIndex).style.display="block";
222
+	 }else{
223
+		 document.getElementById("videoSource"+imgIndex).style.display="block";
224
+	 }
225
+ }
226
+ var playerForm=new Ext.Panel({
227
+	 xtype : 'panel',
228
+	 id : 'playerPanel',
229
+	 width:600,
230
+	 height:600,
231
+	 html:""
232
+ })
233
+ var songPlayer = new Ext.Window({
234
+	 layout : 'fit',
235
+	 width:600,
236
+	 height:600,
237
+	 modal : true,
238
+	 frame: true,
239
+	 closable : false,
240
+	 items : [playerForm]  ,
241
+	 buttons: [{
242
+		 text: '上一页',
243
+		 handler: function() {
244
+			 operationIndex = 'up';
245
+			 showIndex();
246
+		 }
247
+	 },{
248
+		 text: '下一页',
249
+		 handler: function() {
250
+			 operationIndex = 'down';
251
+			 showIndex();
252
+		 }
253
+	 },{
254
+		 text: '关闭',
255
+		 handler: function() {
256
+			 Ext.getCmp('playerPanel').html ="";
257
+			 Ext.getCmp("playerPanel").body.update("");
258
+			 songPlayer.hide();
259
+		 }
260
+	 }]
261
+ });

+ 1 - 1
krock-pm/krock-web-pm/src/main/resources/application.yml

@@ -7,7 +7,7 @@ server:
7 7
 eureka:
8 8
   client:
9 9
     serviceUrl:
10
-      defaultZone: http://192.168.1.249:16000/eureka/
10
+      defaultZone: http://127.0.0.1:16000/eureka/
11 11
 spring:
12 12
   application:
13 13
     name: web-pm