123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- /**
- * 理货延续
- *
- */
- $.namespace("lhyx.main");
- lhyx.main.szd = null;
- lhyx.main.szgq = null;
- lhyx.main.szgk = null;
- lhyx.main.init = function() {
- lhyx.main.sel();
- // 把form传入,构造翻页控件
- pageinfo($("#lhyxform"));
- }
- lhyx.main.sel = function() {
- initszdSelect('szdsel', lhyx.main.szd, 'showgk', '80%');
- initgkSelect('gksel', lhyx.main.szgk, lhyx.main.szd, 'showgq', '80%');
- initgqSelect('gqsel', lhyx.main.szgq, lhyx.main.szd, lhyx.main.szgk, null,
- '80%');
- }
- function showgk() {
- initgqSelect('gqsel', '', '', '', null, 200);
- initgkSelect('gksel', lhyx.main.szgk, $('.szdselectpicker').val(),
- 'showgq', '80%');
- }
- function showgq() {
- initgqSelect('gqsel', lhyx.main.szgq, $('.szdselectpicker').val(), $(
- '.gkselectpicker').val(), null, '80%');
- }
- // 新增
- lhyx.main.add = function() {
- $.ajax({
- async : true,
- url : $.app + "/xkzxx/findByjyrid",
- type : "post",
- dataType : "json",
- data:{
- flag :2
- },
- success : function(data) {// ajax返回的数据
- if (data.success) {
- location.href = $.app + "/lhyx/add";
- } else {
- $.alert({
- title : '提示',
- content : data.message,
- confirm : function() {
- }
- });
- }
- }
- });
-
- }
- lhyx.main.search = function() {
- $("#lhyxform").submit();
- }
- lhyx.main.del = function(data) {
- $.confirm({
- title : '确认框',
- content : '确认删除吗',
- confirm : function() {
- $.post($.app + "/lhyx/delete", {
- id : data
- }, function(data) {
- if (data.success) {
- $.alert({
- title : '提示',
- content : '删除成功',
- confirm : function() {
- $("#lhyxform").submit();
- }
- });
- } else {
- $.alert({
- title : '提示',
- content : data.message,
- confirm : function() {
- }
- });
- }
- }, "json");
- },
- cancel : function() {
- }
- });
- }
- lhyx.main.edit = function(data) {
- location.href = $.app + "/lhyx/edit?id=" + data;
- }
- lhyx.main.back = function(data) {
- location.href = $.app + "/lhyx/edit?flag=th&id=" + data;
- }
- lhyx.main.banli = function(data) {
- location.href = $.app + "/lhyx/view?flag=audit&id=" + data;
- }
- lhyx.main.view = function(data) {
- location.href = $.app + "/lhyx/view?id=" + data;
- }
- lhyx.main.submit = function(data) {
- $.post($.app + "/lhyx/saveTbzt", {
- id : data
- }, function(data) {
- if (data.success) {
- $.alert({
- title : '提示',
- content : '转办省级成功',
- confirm : function() {
- $("#lhyxform").submit();
- }
- });
- } else {
- $.alert({
- title : '提示',
- content : data.message,
- confirm : function() {
- }
- });
- }
- }, "json");
- }
|