| | |
| | | var linterid = params[params[0]]; |
| | | var lentryid = params[params[1]]; |
| | | var type = params[params[2]]; |
| | | var mainUrl = "GetHBarCodeShowBillMain"; |
| | | var subUrl = "GetHBarCodeShowBillSub"; |
| | | //原生成条码方法 |
| | | var mainUrl = "GetHBarCodeShowBillMain"; //表头数据加载ajax |
| | | var subUrl = "GetHBarCodeShowBillSub";//表体数据加载ajax |
| | | var saveBarCode = "GetBarcodeSaveBillBox";//条码生成保存方法ajax |
| | | //采购订单条码生成规则 |
| | | if (type == 'SRM_POOrderBillList') { |
| | | mainUrl = 'GetHBarCodeShowBillMainBycg'; |
| | | subUrl = "GetHBarCodeShowBillSubBycg"; |
| | | saveBarCode = "GetBarcodeSaveBillBoxBycg"; |
| | | } |
| | | // debugger; |
| | | $.ajax({ |
| | | url: GetWEBURL() + mainUrl, |
| | | type: "GET", |
| | | data: { "sMsg": linterid }, |
| | | success: function (d) { |
| | | console.log(d.data); |
| | | //$("#HDate").val(d.) |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HRemark").val(d.data[0].HRemark); |
| | | $("#HDate").val(d.data[0].HDateForWeb); |
| | | //$("#HMaker").val(d.data[0].HMaker); |
| | | $("#HMakerDate").val(d.data[0].HMakerDate) |
| | | $("#HChecker").val(d.data[0].HChecker); |
| | | $("#HCheckDate").val(d.data[0].HCheckDate); |
| | | $("#HSupID").val(d.data[0].HSupID); |
| | | $("#HSupName").val(d.data[0].HSupName); |
| | | $("#HEmpID").val(d.data[0].HEmpID); |
| | | $("#HEmpName").val(d.data[0].HEmpName); |
| | | $("#HManagerID").val(d.data[0].HManagerID); |
| | | $("#HManagerName").val(d.data[0].HManagerName); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | } |
| | | }); |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURL() + mainUrl, |
| | | type: "GET", |
| | | data: { "sMsg": linterid }, |
| | | success: function (d) { |
| | | console.log(d.data); |
| | | //$("#HDate").val(d.) |
| | | $("#HInterID").val(d.data[0].HInterID); |
| | | $("#HBillNo").val(d.data[0].HBillNo); |
| | | $("#HRemark").val(d.data[0].HRemark); |
| | | $("#HDate").val(d.data[0].HDateForWeb); |
| | | //$("#HMaker").val(d.data[0].HMaker); |
| | | $("#HMakerDate").val(d.data[0].HMakerDate) |
| | | $("#HChecker").val(d.data[0].HChecker); |
| | | $("#HCheckDate").val(d.data[0].HCheckDate); |
| | | $("#HSupID").val(d.data[0].HSupID); |
| | | $("#HSupName").val(d.data[0].HSupName); |
| | | $("#HEmpID").val(d.data[0].HEmpID); |
| | | $("#HEmpName").val(d.data[0].HEmpName); |
| | | $("#HManagerID").val(d.data[0].HManagerID); |
| | | $("#HManagerName").val(d.data[0].HManagerName); |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | } |
| | | }); |
| | | |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | |
| | | $.ajax( |
| | | { |
| | | type: "POST", |
| | | url: GetWEBURL() + "GetBarcodeSaveBillBox", //方法所在页面和方法名 |
| | | url: GetWEBURL() + saveBarCode, //方法所在页面和方法名 |
| | | async: true, |
| | | data: { "msg": sMainSub }, |
| | | dataType: "json", |
| | |
| | | } |
| | | }); |
| | | layer.load(3) |
| | | |
| | | |
| | | table.render({ |
| | | elem: '#mainTable' |
| | | , url: GetWEBURL() + subUrl |
| | |
| | | , { field: 'HMoney', title: '金额', width: 100, hide: true } |
| | | , { field: 'HMTONO', title: '计划跟踪单号', width: 100 } |
| | | , { field: 'HBatchNo', title: '批次', width: 100, edit: 'text' } |
| | | , { field: 'HKFDate', title: '生产日期', align: 'center', width: 150 }//, data_field: 'HKFDate', event: "chooseHKFDate" |
| | | , { field: 'HKFPeriod', title: '保质期', width: 100 }//, edit: 'text', event: "inputHKFPeriod" |
| | | , { field: 'HKFDQDate', title: '到期日期', align: 'center', width: 150 }//, data_field: 'HKFDQDate', event: "chooseHKFDQDate" |
| | | //, { field: 'HBeginDate', title: '生产日期', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" } |
| | | //, { field: 'HEndDate', title: '失效日期', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" } |
| | | , { field: 'HKFDate', title: '生产日期', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate"}// |
| | | , { field: 'HKFPeriod', title: '保质期', width: 100, edit: 'text', event: "inputHKFPeriod"}// |
| | | , { field: 'HKFDQDate', title: '到期日期', align: 'center', width: 150, data_field: 'HKFDQDate', event: "chooseHKFDQDate"}// |
| | | //, { field: 'HDate', title: '要求交货日期', width: 150 } |
| | | , { field: 'HPOOrderInterID', title: '采购订单主内码', width: 150, hide: true } |
| | | , { field: 'HPOOrderEntryID', title: '采购订单子内码', width: 150, hide: true } |
| | |
| | | , { field: 'HSupID', title: '供应商ID', width: 150, hide: true } |
| | | |
| | | ]] |
| | | // , data: [linterid] |
| | | // , page: true |
| | | //, height: 500 |
| | | |
| | | , done: function (res, curr, count) { |
| | | //日期控件 |
| | | //$(".layui-input-date").each(function (i) { |
| | | // layui.laydate.render({ |
| | | // elem: this |
| | | // ,format: "yyyy-MM-dd" |
| | | // , value: this.value |
| | | // ,trigger:'click'//采用click弹出 |
| | | // , done: function (value, date, endDate) { |
| | | // table.cache.mainTable. |
| | | // //if (res && res.data[i]) { |
| | | // // $.extend(res.data[i], { 'HKFDate': value }) |
| | | // //} |
| | | // } |
| | | // }); |
| | | //}); |
| | | |
| | | console.log(res); |
| | | layer.closeAll("loading"); |
| | | } |
| | |
| | | , { field: 'HMoney', title: '金额', width: 100, hide: true } |
| | | , { field: 'HMTONO', title: '计划跟踪单号', width: 100 } |
| | | , { field: 'HBatchNo', title: '批次', width: 100, edit: 'text' } |
| | | //, { field: 'HBeginDate', title: '生产日期', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" } |
| | | //, { field: 'HEndDate', title: '失效日期', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" } |
| | | , { field: 'HKFDate', title: '生产日期', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" } |
| | | , { field: 'HKFPeriod', title: '保质期', width: 100, edit: 'text', event: "inputHKFPeriod" } |
| | | , { field: 'HKFDQDate', title: '到期日期', align: 'center', width: 150, data_field: 'HKFDQDate', event: "chooseHKFDQDate" } |
| | | , { field: 'HKFPeriod', title: '保质期', width: 100, edit: 'text', event: "inputHKFPeriod"} |
| | | , { field: 'HKFDQDate', title: '到期日期', align: 'center', width: 150, data_field: 'HKFDQDate', event: "chooseHKFDQDate"} |
| | | //, { field: 'HDate', title: '要求交货日期', width: 150 } |
| | | , { field: 'HPOOrderInterID', title: '采购订单主内码', width: 150, hide: true } |
| | | , { field: 'HPOOrderEntryID', title: '采购订单子内码', width: 150, hide: true } |
| | |
| | | } |
| | | }); |
| | | } |
| | | else if (obj.event == 'chooseHBeginDate') { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //直接显示 |
| | | , closeStop: this |
| | | , done: function (value, date) { |
| | | data[field] = value; |
| | | obj.update(data); |
| | | |
| | | } |
| | | }); |
| | | } |
| | | else if (obj.event == 'chooseHEndDate') { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild |
| | | , show: true //直接显示 |
| | | , closeStop: this |
| | | , done: function (value, date) { |
| | | data[field] = value; |
| | | obj.update(data); |
| | | |
| | | } |
| | | }); |
| | | } |
| | | else if (obj.event == 'inputHKFPeriod') { |
| | | $(obj.tr).find(".layui-table-edit").keyup(function () { |
| | | var $input = $(this), val = $input.val(); |