index1.js 1.44 KB
//商家管理
'use strict';
var $ = require('jquery'),
    common=require('../common/common');



	var g=new grid({
		el:'#storeadmin_Tabel',
		columns:[
            {display:"ID",name:"shopsId"},
            {display:"店铺名称",name:"shopName"},
            {display:"店铺管理员",name:"adminName"},
            {display:"创建时间",name:"createTime"},
            {display:"更新时间",name:"updateTime"},
            {display:"操作",name:"",render:function(item){
                return '<a href="/supplier/store/adminAdd/'+item.shopsId+'" class="btn btn-info btn-xs">编辑</a><button type="button" data-id="'+item.shopsId+'" class="delete btn btn-danger btn-xs">删除</button>'
            }}
        ]
	})
    g.init($('#url').val());
    if($('#otherUrl').val().split(',').length>1){
        var otherUrl=$('#otherUrl').val().split(',');
        console.log(otherUrl);
        $.each(otherUrl,function(){
            $('#otherUrlValue').append('<p>'+this+'</p>')
        })
    }

    if($('#websiteUrl').val().split(',').length>1){
        var websiteUrl=$('#websiteUrl').val().split(',');
        $.each(websiteUrl,function(){
            $('#websiteUrlValue').append('<p>'+this+'</p>')
        })
    }
    if($('#shopAddress').val().split(',').length>1){  
        var shopAddress=$('#shopAddress').val().split(',');
        $.each(shopAddress,function(){
            $('#shopAddressValue').append('<p>'+this+'</p>')
        })
    }