| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- $(function () {
- $("#jqGrid").jqGrid({
- url: baseURL + 'qyh/enterprise/passPage',
- datatype: "json",
- colModel: [
- { label: 'id', name: 'id', index: 'id', width: 50, hidden:true, key: true },
- { label: '营业执照号', name: 'licenseNo', index: 'licenseNo', width: 80 },
- { label: '企业全称', name: 'enterpriseName', index: 'enterpriseName', width: 80 },
- { label: '联系人', name: 'contactPerson', index: 'contactPerson', width: 80 },
- { label: '联系电话', name: 'contactPhone', index: 'contactPhone', width: 80 },
- { label: '营业执照照片', name: 'licensePhoto', index: 'licensePhoto', width: 80,formatter: imageFormat },
- { label: '缴费时间', name: 'payLastTime', index: 'payLastTime', width: 80 },
- { label: '状态', name: 'status', index: 'status', width: 80, formatter:function (cellvalue, options, rowdata) {
- if(cellvalue == 1) {
- return '未缴费'
- }else if(cellvalue == 2) {
- return '已缴费'
- } else {
- return '已过期'
- }
- } },
- ],
- viewrecords: true,
- height: 385,
- rowNum: 10,
- rowList : [10,30,50],
- rownumbers: true,
- rownumWidth: 25,
- autowidth:true,
- multiselect: true,
- pager: "#jqGridPager",
- jsonReader : {
- root: "page.list",
- page: "page.currPage",
- total: "page.totalPage",
- records: "page.totalCount"
- },
- prmNames : {
- page:"page",
- rows:"limit",
- order: "order"
- },
- gridComplete:function(){
- //隐藏grid底部滚动条
- $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
- }
- });
- upload(1,'images','images/*');
- initdate()
- });
- /*日期框初始化*/
- function initdate(){
- layui.use('laydate', function() {
- var laydate = layui.laydate;
- laydate.render({
- elem: '#payLastTime'
- ,theme: '#34B9B4'
- ,trigger: 'click'
- ,type: 'datetime'
- ,format: 'yyyy-MM-dd HH:mm'
- ,done: function(value, date, endDate){
- vm.wjxyEnterprise.payLastTime = value;
- }
- });
- })
- }
- var vm = new Vue({
- el:'#rrapp',
- data:{
- showList: true,
- title: null,
- wjxyEnterprise: {
- state: ''
- },
- queryParam: {
- status:'',
- enterpriseName:'',
- contactPerson:'',
- contactPhone: ''
- },
- gender: [],
- state: '',
- isSee: false,
- },
- methods: {
- query: function () {
- vm.reload(1);
- },
- reset() {
- vm.queryParam.status = ''
- vm.queryParam.enterpriseName = ''
- vm.queryParam.contactPerson = ''
- vm.queryParam.contactPhone = ''
- vm.reload(1);
- },
- // 查看留言
- queryMessage() {
- },
- detail: function (event) {
- var id = getSelectedRow();
- if(id == null){
- return ;
- }
- vm.showList = false;
- vm.title = "企业展示信息";
- vm.isSee = true
- vm.getInfo(id)
- },
- getInfo: function(id){
- $.get(baseURL + "qyh/enterprise/info/"+id, function(r){
- vm.wjxyEnterprise = r.data;
- });
- },
- reload: function (event) {
- vm.showList = true;
- var page;
- if (event == 1){
- page = 1;
- } else {
- page = $("#jqGrid2").jqGrid('getGridParam','page');
- }
- $("#jqGrid").jqGrid('setGridParam',{
- postData:{'status': vm.queryParam.status,'enterpriseName':vm.queryParam.enterpriseName,'contactPerson':vm.queryParam.contactPerson
- ,'contactPhone':vm.queryParam.contactPhone},
- page:page
- }).trigger("reloadGrid");
- }
- }
- });
|