123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- /*
- * 描 述:单据详细
- */
- var acceptClick;
- var keyValue = request('keyValue');
- var currentColRow = null;
- var bootstrap = function ($, learun) {
- "use strict";
- var selectedRow = learun.frameTab.currentIframe().selectedRow;
- var page = {
- init: function () {
- page.bind();
- //page.initData();
- },
- bind: function () {
- // 仓库与区域多选
- $('#txt_WareaNo').lrselect({
- url: top.$.rootUrl + '/BaseManager/BaseWarehouse/GetCheckWWTree',
- //type: 'treemultiple',
- width: 150,
- maxHeight: 180,
- allowSearch: true
- });
- $('#btn_Print').on('click', function () {
- var postData = $('#gridtable').jfGridGet("rowdata");
- if (postData != "") {
- var warehouseName = $("#txt_WareaNo").text();
- var head = $('#form1').lrGetFormData(keyValue);
- if (postData.length == 0) {
- learun.alert.error('未选择行项目!');
- return false;
- }
- var heatstr = JSON.stringify(head);
- var frist = JSON.stringify(postData);
- var datas = {};
- datas["heatStr"] = heatstr;
- datas["fristData"] = frist;
- $.lrSaveForm(top.$.rootUrl + '/BaseManager/BasePrintLog/PrintBarCode?typeBarcode=货位', datas, function (data) {
- var dbdata = JSON.stringify(data.data);
- CSharp.LocationSupper(dbdata);
- });
- }
- });
- //$('#btn_Print').on('click', function () {
- // var postData = $('#gridtable').jfGridGet("rowdata");
- // if (postData != "") {
- // var warehouseName = $("#txt_WareaNo").text();
- // var head = $('#form1').lrGetFormData(keyValue);
- // if (postData.length == 0) {
- // learun.alert.error('未选择行项目!');
- // return false;
- // }
- // var heatstr = JSON.stringify(head);
- // var frist = JSON.stringify(postData);
- // var datas = {};
- // datas["heatStr"] = heatstr;
- // datas["fristData"] = frist;
- // $.lrSaveForm(top.$.rootUrl + '/BaseManager/BasePrintLog/PrintBarCode?typeBarcode=货位', datas, function (data) {
- // var options = { format: "CODE128", displayValue: false, fontSize: 12, height: 250 };
- // var dbdata = eval(data.data);
- // var htmls = "";
- // var i = 0;
- // $.each(dbdata, function (index, dbdata) {
- // htmls += "<div style='width: 100%;'>";
- // htmls += "<div style='text-align: center;font-size: 28px;'>" + warehouseName + " </div>";
- // htmls += "<div id='DivbarCode" + i + "'style='margin:0 auto;width: 244px;'>";
- // htmls += "<svg id='BarCode" + i + "'> </svg>";
- // htmls += "</div>";
- // htmls += "<div id='showText" + i + "' style='text-align: center;font-size: 20px;'></div>";
- // htmls += "</div>";
- // htmls += "<div style='page-break-after: always;'></div>";
- // i = i + 1;
- // });
- // $("#pringWarea").html(htmls);
- // i = 0;
- // $.each(dbdata, function (index, dbdata) {
- // var barcode = document.getElementById('BarCode' + i);
- // var barval = dbdata["F_BARCODE"];
- // JsBarcode(barcode, barval, options);
- // var widths = $("#BarCode" + i).width();
- // $("#DivbarCode" + i).width(widths);
- // $("#showText" + i).text(barval);
- // i = i + 1;
- // });
- // doPrint();
- // });
- // //$.each(postData, function (i, val) {
- // // htmls += "<div style='width: 100%;'>";
- // // htmls += "<div style='text-align: center;font-size: 28px;'>" + warehouseName + " </div>";
- // // htmls += "<div id='DivbarCode" + i + "'style='margin:0 auto;width: 244px;'>";
- // // htmls += "<svg id='BarCode" + i + "'> </svg>";
- // // htmls += "</div>";
- // // htmls += "<div id='showText" + i + "' style='text-align: center;font-size: 20px;'></div>";
- // // htmls += "</div>";
- // // htmls += "<div style='page-break-after: always;'></div>";
- // // });
- // //$("#pringWarea").html(htmls);
- // //$.each(postData, function (i, val) {
- // // var f_no = val["F_NO"];
- // // var F_WAREHOUSENO = val["F_WAREHOUSENO"];
- // // var barcode = document.getElementById('BarCode' + i);
- // // var barval = "*LOC*" + f_no;
- // // JsBarcode(barcode, barval, options);
- // // var widths = $("#BarCode" + i).width();
- // // $("#DivbarCode" + i).width(widths);
- // // $("#showText" + i).text(barval);
- // //});
- // //doPrint();
- // }
- // //learun.layerForm({
- // // id: '0',
- // // title: strmsg,
- // // url: top.$.rootUrl + '/BaseManager/BasePrintLog/PrintLoca',
- // // height: 600,
- // // width: 800,
- // // btn: ['复盘', '关闭'],
- // // callBack: function (id) {
- // // return top[id].acceptClick(refreshGirdData);
- // // }
- // //});
-
- //});
- $('#btn_Search').on('click', function () {
- var postData = $('#form1').lrGetFormData();
- page.search({ queryJson: JSON.stringify(postData) });
- });
- $('#gridtable').jfGrid({
- url: top.$.rootUrl + '/BaseManager/BaseWareCell/GetListByWare',
- headData: [
- { label: '编号', name: 'F_NO', width: 160, align: "left" },
- { label: '名称', name: 'F_NAME', width: 120, align: "left" },
- {
- label: '仓库名称', name: 'F_WAREHOUSENO', width: 150, align: "left"
- , formatterAsync: function (callback, value, row) {
- learun.clientdata.getAsync('warehouse', {
- key: value,
- callback: function (item) {
- callback(item.F_NAME);
- }
- });
- }
- },
- {
- label: '区域名称', name: 'F_WAREANO', width: 150, align: "left"
- , formatterAsync: function (callback, value, row) {
- learun.clientdata.getAsync('warea', {
- key: value,
- callback: function (item) {
- callback(item.F_NAME);
- }
- });
- }
- },
- {
- label: '货位状态', name: 'F_STATENUM', width: 80, align: "center"
- , formatterAsync: function (callback, value, row) {
- learun.clientdata.getAsync('dataItem', {
- Rowkey: value,
- GrpCode: 'EWareCellState',
- getType: 'Num',
- callback: function (item) {
- callback(item.F_NAME);
- }
- });
- }
- },
- { label: '行', name: 'F_LINE', width: 120, align: "left" },
- { label: '列', name: 'F_COL', width: 120, align: "left" },
- { label: '层', name: 'F_LAYER', width: 120, align: "left" },
- ],
- isMultiselect: true,
- reloadSelected: true,
- width: 1200,
- height: 600
- });
- page.search();
- },
- search: function (param) {
- $('#gridtable').jfGridSet('reload', param);
- }
- };
- page.init();
- }
|