| | |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">ç©æä»£ç </label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">客æ·åç§°</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input ForFilteringSchemes" name="HCustName" id="HCustName" style="width:190px;"> |
| | | </div> |
| | | </div> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | |
| | | |
| | | var HModName = "Sc_CustomerTagInfoList"; |
| | | var HBillType = "10003"; |
| | | |
| | | var ins; //ç¨äºå¯¼åºexcel |
| | | //#region ãè¿æ»¤æ¹æ¡ã |
| | | |
| | | //è¿æ»¤æ¡ä»¶çclassç±» |
| | |
| | | |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | table.render(option); |
| | | ins = table.render(option); |
| | | |
| | | laypage.render(optionPage); |
| | | layer.close(ajaxLoad); |
| | |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length === 1) { |
| | | var InterID = data[0].hmainid.toString(); |
| | | var HsupId = data[0].hsubid; |
| | | var HQty = data[0].æ°é; |
| | | var HSourceInterID = data[0].æºå主å
ç ; |
| | | var HSourceEntryID = data[0].æºååå
ç ; |
| | | if (checkStatus.data.length >= 1) { |
| | | var HItemSubIDs = ""; |
| | | for (i = 0; i < data.length; i++) { |
| | | HItemSubIDs += data[i].HItemSubID.toString() + ","; |
| | | } |
| | | HItemSubIDs = HItemSubIDs.substring(0, HItemSubIDs.length - 1) |
| | | //é»è¾å 餿¹æ³ |
| | | layer.confirm("确认è¦å é¤åï¼å é¤åä¸è½æ¢å¤", { title: "å é¤ç¡®è®¤" }, function (index) { |
| | | if (data[0].ç¶æ=="å建") { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Xs_SeOutStockBill/DeltetSeOutStockBill", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HInterID": InterID, "HsupId": HsupId, "HQty": HQty, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "Sc_CustomerTagInfo/Delete", //æ¹æ³æå¨é¡µé¢åæ¹æ³å |
| | | data: { "HItemSubIDs": HItemSubIDs, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // å¾å°frameç´¢å¼ |
| | | var index = layer.getFrameIndex(window.name); |
| | | //å
³éå½åframe |
| | | layer.close(index); |
| | | //ä¿®æ¹ä¸ºååå·æ°çé¢ |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }); |
| | | } else { |
| | | layer.msg('æ¤æ¡æ°æ®ä¸æ¯åå»ºç¶æ,æ æ³å é¤ï¼'); |
| | | } |
| | | |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | else { |
| | | layer.msg('è¯·éæ©ä¸è¡æ°æ®å é¤ï¼'); |
| | | layer.msg('è¯·éæ©æ°æ®å é¤ï¼'); |
| | | } |
| | | break; |
| | | //å·æ° |
| | |
| | | //#region å¿«éè¿æ»¤ |
| | | function get_FastQuery(table, option) { |
| | | var HBillNo = $("#HBillNo").val();//åæ®å· |
| | | var HMaterNumber = $("#HMaterNumber").val();//ç©æä»£ç |
| | | var HCustName = $("#HCustName").val();//客æ·åç§° |
| | | |
| | | var ColName = $("#ColName").val();//å¤éæ¡ |
| | | var Comparator = $("#Comparator").val() |
| | |
| | | if (HBillNo) { |
| | | sWhere += " and åæ®å· like '%" + HBillNo + "%'"; |
| | | } |
| | | if (HMaterNumber) { |
| | | sWhere += " and ç©æä»£ç like '%" + HMaterNumber + "%'"; |
| | | } |
| | | if (HCustName) { |
| | | sWhere += " and 客æ·åç§° like '%" + HCustName + "%'"; |
| | | } |
| | | |
| | | //sWhere += addSWhereByOpenType(); |
| | | get_DisplayPage(sWhere); |
| | |
| | | //#region éç½®è¿æ»¤æ¡ä»¶ |
| | | function set_ClearQuery() { |
| | | $("#HBillNo").val("");// |
| | | $("#HMaterNumber").val("");// |
| | | $("#HCustName").val("");// |
| | | |
| | | $("#ColContent").val(""); |
| | | $("#ColName").val("0"); |
| | |
| | | }) |
| | | } |
| | | |
| | | //#region 导åºExecel |
| | | function get_Export() { |
| | | option.data.forEach((item) => { |
| | | for (let itemobj in item) { |
| | | if (item[itemobj] == null) { |
| | | item[itemobj] = ""; |
| | | } |
| | | if (item[itemobj].length > 0) { // åè®¾åæ®µå为field |
| | | item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, ''); // å°æ¢è¡ç¬¦æ¿æ¢ä¸ºç©ºå符串 |
| | | } |
| | | } |
| | | }); |
| | | |
| | | table.exportFile(ins.config.id, option.data, "xls"); |
| | | } |
| | | //#endregion |
| | | |
| | | //éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |