123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816 |
- function statusFormat(value, row, index) {
- if (value == "107") {
- return "激活";
- } else {
- return "冻结";
- }
- };
- $(function() {
- var $advSearchForm = $("#advSearchForm");
- var $searchForm = $("#searchForm").searchForm();
- var advSearchForm = $("#advSearchForm").searchForm();
- var $provinceCombobox = $advSearchForm.find("select[comboname='receiverProvince']");
- var $cityCombobox = $advSearchForm.find("select[comboname='receiverCity']");
- var $toolbar = $("#toolbar") ;
- $.OrdersList = new $.AbstractList( {
- entity:"Orders",
- searchForm:$searchForm,
- advSearchForm:advSearchForm,
- id:"orderId",
- functionId : functionId,
- showExportButton : true,
- showTopic : true,
- autoLoad : false
- }) ;
-
- $("#waveRuleId").combobox({
- valueField : 'bcWrId',
- textField : 'bcWrName',
- url : WEBROOT + "/loadData.action?entity=waveRule",
- mode : 'remote',
- async:false,
- needBlank:false,
- required:true
- });
-
- $('#waveRuleWin').window({
- title : '自定义波次',
- width:400,
- height:200,
- closed : true,
- cache : false,
- modal : true
- });
- $("#waveRuleConfirm").click(function(){
- var waveRuleId = $("#waveRuleId").combobox('getValue');
-
- if ($.isEmpty(waveRuleId))
- {
- alertMsg("提示", '请选择波次模板', 'warning');
- }
-
- var postData = {
- waveRuleId : waveRuleId
- };
- var url = WEBROOT + "/Orders/executeWaveRule.action";
- ajaxRequest(url, postData, function(response){
- if (response.code = 'success')
- {
- showMsg("提示","生成"+ response.data.length + "个波次:"+$.encodeJSON(response.data));
- $('#waveRuleWin').window('close');
- }
- else
- {
- alertMsg("提示", response.errorDesc, 'error');
- $('#waveRuleWin').window('close');
- }
- }, null, this);
-
- });
-
- $.fn.extend($.OrdersList, {
- beforeSearch:function(qo){
- var creationTime = qo.getCondition('creationTime');
- if(creationTime &&creationTime.length ==2 ){
- if( creationTime[0].value > creationTime[1].value ){
- alertMsg("提示", '开始时间不能大于结束时间', 'warning');
- return false;
- }
- }
- return true ;
- },
- freeWaveRule:function(){
- $('#waveRuleWin').window('open');
- $("#waveRuleId").combobox('clear');
- },
- pause:function(){
- var url = WEBROOT + "/Orders/forzeCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successPauseCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successPauseCheck, null, this);
- }
- },
-
- unPause:function(){
- var url = WEBROOT + "/Orders/activeCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successActiveCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successActiveCheck, null, this);
- }
- },
-
- closeOrders:function(){
- var url = WEBROOT + "/Orders/closeOrdersCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successCloseCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
-
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successCloseCheck, null, this);
- }
- },
- //打印发货清单
- print:function(){
- var url = WEBROOT + "/Orders/printOrdersCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successPrintCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
-
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successPrintCheck, null, this);
- }
- },
- //加入波次
- addWave:function(){
- var url = WEBROOT + "/Orders/joinWaveCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successJoinWaveCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
-
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successJoinWaveCheck, null, this);
- }
-
- },
- //分配库存
- allocate:function(){
- var url = WEBROOT + "/Orders/allocateCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
-
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successAllocateCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successAllocateCheck, null, this);
- }
- },
-
- printFiveBill:function(){
- var url = WEBROOT + "/Orders/printFiveBillCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successFiveBillPrintCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
-
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successFiveBillPrintCheck, null, this);
- }
- },
- printFaceBill:function(){
-
- var url = WEBROOT + "/Orders/printFiveBillCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successRemingPrintCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
-
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successRemingPrintCheck, null, this);
- }
-
- },
- //打印发票
- printInvoice:function(){
- var url = WEBROOT + "/Orders/printInvoiceCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign=this.searchForm.getQo();
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- }
- ajaxRequest(url, postData, successInvoicePrintCheck, null, this);
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- }
- ajaxRequest(url, postData, successInvoicePrintCheck, null, this);
- }
- },
- //打印COD面单
- printCod:function(){
- var url = WEBROOT + "/Orders/printCodCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
-
- var conditionForSign = this.searchForm.getQo();
-
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- };
-
- ajaxRequest(url, postData, successPrintCodCheck, null, this);
-
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- };
- ajaxRequest(url, postData, successPrintCodCheck, null, this);
- }
- },
- //打印五联返单
- printReturn:function(){
- var url = WEBROOT + "/Orders/printReturnCheck.action";
- var rows = this.getSelections();
- if(rows.length==0){
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
-
- var conditionForSign = this.searchForm.getQo();
-
- if(conditionForSign['conditionRules']!=""){
- var postData={
- conditions:JSON.stringify(conditionForSign)
- };
-
- ajaxRequest(url, postData, successPrintReturnCheck, null, this);
-
- }else{
- $.messager.alert("提示", "请选择要加入的行", "error");
- }
- }else{
- var ids = [];
- for ( var i = 0; i < rows.length; i++) {
- ids.push(rows[i][this.id]);
- }
- var postData={
- ids:$.encodeJSON(ids)
- };
- ajaxRequest(url, postData, successPrintReturnCheck, null, this);
- }
- }
-
- });
-
- if (!$.isEmpty(buttonData)) {
- // 构建权限按钮
- $.buildToolbar($toolbar, buttonData);
- };
-
- initProvince($provinceCombobox, $cityCombobox, '中国');
-
- $provinceCombobox.combobox({//省修改事件
- onSelect:function(){
- initCity($cityCombobox, '中国', $provinceCombobox.combobox("getValue"));
- }
- });
- $("#btnSearch").bind("click", $.proxy($.OrdersList.quickSearch, $.OrdersList));
- $("#btnAdvSearch").bind("click", $.proxy($.OrdersList.openAdvSearchWindow, $.OrdersList));
- $("#btnQuery").bind("click", $.proxy($.OrdersList.advSearch, $.OrdersList));
- $("#btnReset").bind("click",$.proxy($.OrdersList.reset, $.OrdersList));
-
- $('#customerId').combogrid({ // 货主
- url : WEBROOT + "/loadData.action?entity=customer",
- idField : 'customerId',
- textField : 'customerName',
- delay : 500,
- mode : 'remote',
- showHeader : false,
- striped : true,
- columns : [ [ {
- field : 'customerName',
- width : '150'
- } ] ],
- onBeforeLoad : function(param) { // 此设置使控件不会自动加载数据 这里不能使用this
- if (!$("#customerId").combogrid('getText')) {
- return false;
- } else {
- return true;
- }
- },
- onShowPanel : function() { // 在第一次触发下拉框事件是加载数据
- if (!$(this).combogrid('getText')) {
- $(this).combogrid({
- onBeforeLoad : function(param) {
- return true;
- }
- });
- }
- }
- });
- //承运商
- $("#carrierId").combogrid({
- url:WEBROOT + "/loadData.action?entity=vender&isCarrier=1",
- mode: 'remote',
- idField : 'venderId',
- textField : 'venderName',
- delay: 500,
- showHeader : false,
- striped : true,
- columns:[[
- {field:'venderName',width:155}
- ]],
- onBeforeLoad:function(param){
- //此设置使控件不会自动加载数据
- if (!$('#carrierId').combogrid('getText'))
- {
- return false;
- }
- else
- {
- return true;
- }
- },
- onShowPanel:function(){
- //在第一次触发下拉框事件是加载数据
- if (!$(this).combogrid('getText'))
- {
- $(this).combogrid({onBeforeLoad:function(param){
- return true;
- }});
- }
- },onSelectAfter:function(index,record)
- {
-
- }
- });
- });
- function successAllocateCheck(data){
- $.messager.confirm('提示', '可以分配' + data[0].length + '条记录,确定要分配吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doAllocate.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, successAllocate, null, this);
- }
- }
- });
- }
- function successJoinWaveCheck(data){
- $.messager.confirm('提示', '可以加入' + data[0].length + '条记录,确定要加入波次吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doJoinWave.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, successAllocate, null, this);
- }
- }
- });
- }
- function successAllocate(ajaxResponse){
- $.messager.alert("提示", ajaxResponse.data, "info");
- $("#maingrid").datagrid("reload");
- }
- function successCloseCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以关闭,确定要关闭吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doCloseOrders.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, successClose, null, this);
- }
- }
- });
- }
- function successClose(ajaxResponse){
- $.messager.alert("提示", ajaxResponse.data, "info");
- $("#maingrid").datagrid('reload');
- }
- function successPrintCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doPrintOrders.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, function(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- autoMatch:1,
- templeteType:'发货清单'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- });
- }
- }
- });
- }
- function successInvoicePrintCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doInvoicePrint.action";
- var postData={ids:$.encodeJSON(data[0])};
- ajaxRequest(url, postData, function(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- autoMatch:1,
- templeteType:'发票'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- });
- }
- }
- });
- }
- /**
- * 五联单检查完成
- * @param data
- */
- function successFiveBillPrintCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doFiveBillPrint.action";
- var postData={ids:$.encodeJSON(data[0])};
- ajaxRequest(url, postData, function(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- autoMatch:1,
- templeteType:'物流面单'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- });
- }
- }
- });
- }
- /**
- * 打印热敏单检查完成
- * @param data
- */
- function successRemingPrintCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doFiveBillPrint.action";
- var postData={ids:$.encodeJSON(data[0]),isReming:1};
- ajaxRequest(url, postData, function(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- autoMatch:1,
- templeteType:'热敏面单'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- });
- }
- }
- });
- }
- /**
- * 热敏面单数据检查完成
- * @param data
- */
- function successFaceBillPrintCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doFaceBillPrint.action";
- var postData={ids:$.encodeJSON(data[0])};
- ajaxRequest(url, postData, function(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- autoMatch:1,
- templeteType:'热敏面单'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- });
- }
- }
- });
- }
- /**
- * 发票订单数据检查完成
- * @param data
- */
- function succesInvoicePrintCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doInvoicePrint.action";
- var postData={ids:$.encodeJSON(data[0])};
- ajaxRequest(url, postData, function(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- autoMatch:1,
- templeteType:'发票'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- });
- }
- }
- });
- }
- function successPrintCodCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doPrintCod.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, function(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- autoMatch:1,
- templeteType:'COD面单'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- });
- }
- }
- });
- }
- function successPrintReturnCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doPrintReturn.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, function(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- autoMatch:1,
- templeteType:'五联返单'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- });
- }
- }
- });
- }
- function successPauseCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以暂挂,确定要暂挂吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doFroze.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, commonSuccess, null, this);
- }
- }
- });
- }
- function successActiveCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以解除暂挂,确定要解除暂挂吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Orders/doActive.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, commonSuccess, null, this);
- }
- }
- });
- }
- function commonSuccess(ajaxResponse){
- $.messager.alert("提示", ajaxResponse.data, "info");
- $("#maingrid").datagrid('reload');
- }
|