123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <%@ page language="java" contentType="text/html; charset=UTF-8"
- pageEncoding="UTF-8"%>
-
- <script type="text/javascript">
- function checkedAllqytz(){
- if($('#checkAllqytz').prop("checked")){
- $("input[name='qytzid']").each(function() {
- $(this).prop("checked", true);
- });
- }else{
- $("input[name='qytzid']").each(function() {
- $(this).prop("checked", false);
- });
- }
- clickqytz();
- }
- function clickqytz(){
- var objName= document.getElementsByName("qytzid");
- var qytzids = [];
- for (i=0; i<objName.length; i++){
- if (objName[i].type=="checkbox" && objName[i].checked){
- qytzids.push(objName[i].value)
- }
- }
- $('#qytzids').val(qytzids);
- if(isEmpty($('#qytzids').val())){
- $('#qytzids').val(1);
- }
- }
- function qytzxxadd(){
- var path="/xkzbg/addmain?path=10:id="+$('#jyrid').val()+"";
- location.href=$.app+'/qytz/add?path='+path;
- }
- function qytzxxview(qytzid){
- var path="/xkzbg/addmain?path=10:id="+$('#jyrid').val()+"";
- location.href=$.app+'/qytz/view?id='+qytzid+'&path='+path;
- }
- function qytzxxedit(qytzid){
- var path="/xkzbg/addmain?path=10:id="+$('#jyrid').val()+"";
- location.href=$.app+'/qytz/edit?id='+qytzid+'&path='+path;
- }
- function qytzxxdelete(qytzid){
- $.confirm({
- title: '确认框',
- content: '确认删除吗',
- confirm: function(){
- $.post($.app + "/qytz/delete", {
- id : qytzid,
- czid:$('#id').val()
- }, function(data) {
- if (data.success) {
- $.alert({
- title: '提示',
- content: '操作成功',
- confirm: function(){
- $('#qytzids').val('');
- initqytzxx();
- }
- });
- } else {
- $.alert({
- title: '提示',
- content: data.message,
- confirm: function(){
-
- }
- });
- }
- }, "json");
- },
- cancel: function(){
-
- }
- });
- }
- function initqytzxx(){
- $.post($.app + "/gkjyr/qytzxx", {
- id : $('#jyrid').val(),
- czid:$('#id').val(),
- recordStatus:0
- }, function(data) {
- if (data) {
- var str =""
- for(var i=0;i<data.length;i++){
- var qytz = data[i];
- str+="<tr class='tr_bg'>";
- var qytzids = $('#qytzids').val();
- if(isEmpty(qytzids)){
- if(qytz.isTrue || !isEmpty(qytz.xkzid)){
- str+="<td><input type='checkbox' checked name='qytzid' onclick='clickqytz()' value='"+qytz.id+"'/></td>";
- }else{
- str+="<td><input type='checkbox' checked name='qytzid' onclick='clickqytz()' value='"+qytz.id+"'/></td>";
- }
- }else{
- if(qytzids == 1){
- str+="<td><input type='checkbox' checked name='qytzid' onclick='clickqytz()' value='"+qytz.id+"'/></td>";
- }else{
- var qytzid = qytzids.spilt(",");
- var flag = 1;
- for(var i = 0;i<qytzid.length;i++){
- if(qytz.id == qytzid){
- flag = 0 ;
- break;
- }
- }
- if(flag == 0){
- str+="<td><input type='checkbox' checked onclick='clickqytz()' name='qytzid' value='"+qytz.id+"'/></td>";
- }else{
- str+="<td><input type='checkbox' checked name='qytzid' onclick='clickqytz()' value='"+qytz.id+"'/></td>";
- }
- }
-
- }
- str+="<td>"+qytz.tzrmc+"</td>";
- str+="<td>"+(qytz.je==null?"":qytz.je)+"</td>";
- str+="<td>"+(qytz.jedw==null?"":qytz.jedw)+"</td>";
- str+="<td>"+qytz.ssjyrzw+"</td>";
- str+="<td>"+(qytz.tzzje==null?'':qytz.tzzje)+"</td>";
- str+="<td>"+(qytz.tzje==null?'':qytz.tzje)+"</td>";
- str+="<td>"+qytz.sfwszw+"</td>";
- str+="<td>";
- str+="<a class='btn btn-default btn-xs' href='#' onclick=\"qytzxxview('"+qytz.id+"')\"> <i class='glyphicon glyphicon-search'></i> 查看</a>";
- str+="<a class='btn btn-default btn-xs' href='#' onclick=\"qytzxxedit('"+qytz.id+"')\"> <i class='glyphicon glyphicon-wrench'></i> 修改</a>";
- str+="<a class='btn btn-default btn-xs' href='#' onclick=\"qytzxxdelete('"+qytz.id+"')\"> <i class='glyphicon glyphicon-trash'></i> 删除</a>";
- str+="</td>";
- str+="</tr>";
- }
- $('#qytzxxdiv').empty();
- $('#qytzxxdiv').append(str);
- } else {
-
- }
- }, "json");
- }
- </script>
-
- <a class="btn btn-default btn-sm" href="#"
- onclick="qytzxxadd()" style="float:right;"> <i class="glyphicon glyphicon-plus"></i> 新增
- </a>
- <table class="main_table" cellpadding="0" cellspacing="0">
- <tr>
- <th width="5%"><input id="checkAllqytz" name="checkAllqytz" type="checkbox" onclick='checkedAllqytz()' /></th>
- <th width="10%">投资人名称</th>
- <th width="10%">投资金额</th>
- <th width="10%">投资金额单位</th>
- <th width="10%">港口经营人</th>
- <th width="10%">投资总金额</th>
- <th width="10%">投资总金额单位</th>
- <th width="10%">是否外商</th>
- <th width="25%">操作</th>
- </tr>
- <tbody id="qytzxxdiv"></tbody>
-
- </table>
|