From 5aa953ba7c09d82b148c3b75df0fbf5140b11263 Mon Sep 17 00:00:00 2001 From: fxc <541723947@qq.com> Date: Fri, 17 Jan 2025 16:32:16 +0800 Subject: [PATCH] 11 --- TradeManage/HuoWu/HW_GoodsDetailList2.aspx | 516 +++++++++-------- TradeManageNew/DingDan/DT_SecondHand2.aspx | 106 ++-- TradeManageNew/Huowu/HW_GoodsDetailList2.aspx | 518 ++++++++++-------- 3 files changed, 642 insertions(+), 498 deletions(-) diff --git a/TradeManage/HuoWu/HW_GoodsDetailList2.aspx b/TradeManage/HuoWu/HW_GoodsDetailList2.aspx index f9e3932..3da5fd6 100644 --- a/TradeManage/HuoWu/HW_GoodsDetailList2.aspx +++ b/TradeManage/HuoWu/HW_GoodsDetailList2.aspx @@ -49,7 +49,7 @@ GoodsCode = ""; } - iscp = $.url.param("iscp"); + iscp = $.url.param("iscp"); if (iscp == undefined) { iscp = 0; } @@ -57,19 +57,18 @@ if (UserId == 1) $("#btn_clear").show(); if (UserId == 1 || UserId == 51 || UserId == 53) { - $("#btn_hw6").show(); + $("#btn_hw6").show(); $("#btn_hw5").show(); - $("#btn_hw55").hide(); + $("#btn_hw55").hide(); } - else - { - $("#btn_hw6").hide(); - $("#btn_hw5").hide(); - $("#btn_hw55").show(); + else { + $("#btn_hw6").hide(); + $("#btn_hw5").hide(); + $("#btn_hw55").show(); } if (iscp == 1) { - // $("#txt_mname").attr("disabled", "disabled"); + // $("#txt_mname").attr("disabled", "disabled"); $("#select_mname").val(Name); $("#tr_head").hide(); } @@ -119,12 +118,12 @@ hj += parseInt($(this).val()); }); $("#sp_CGNum").html(hj); - - if (hj > hjsl) - $("#txt_CGNum").val(hj - hjsl); - else - $("#txt_CGNum").val(0); - + + if (hj > hjsl) + $("#txt_CGNum").val(hj - hjsl); + else + $("#txt_CGNum").val(0); + }); $("input[weekz2]").live("keyup", function () { @@ -134,28 +133,28 @@ hj += parseInt($(this).val()); }); $("#sp_CGNum2").html(hj); - - if (hj > hjsl2) - $("#txt_CGNum2").val(hj - hjsl2); - else - $("#txt_CGNum2").val(0); - + + if (hj > hjsl2) + $("#txt_CGNum2").val(hj - hjsl2); + else + $("#txt_CGNum2").val(0); + }); - + $("#" + datagrid1.TableID + " a[CommandName='cmdCG']").live("click", function () { - + var RowIndex = $(this).parentsUntil("tr").parent().attr("index"); var model = datagrid1.Get_Model(RowIndex); - + DDId = model.DetailId; GoodsId = model.GoodsId; pstate = model.FHPlan; - // alert(pstate); + // alert(pstate); GetBFModel(); cgsl = model.CGNum; - if(model.bhremark!=null) - $("#txt_BZ").val(model.bhremark); + if (model.bhremark != null) + $("#txt_BZ").val(model.bhremark); $("#_fixTableHeader").hide(); GetWeeks(); GetWeeks2(); @@ -168,15 +167,15 @@ $("input[weekz]").attr("disabled", "disabled"); $("#txt_CGNum").attr("disabled", "disabled"); } - if (pstate <=2) { + if (pstate <= 2) { $("#txt_CGNum").val(model.CGNum2); $("#txt_CGNum2").val(model.CGNum3); } - + if (pstate == 3) { $("#txt_CGNum").val(0); $("#txt_CGNum2").val(0); - + } if (pstate > 0) { $("#tr_jh1,#tr_jh2,#tr_jh3").show(); @@ -185,7 +184,7 @@ else { $("#tr_jh1,#tr_jh2,#tr_jh3").hide(); } - if (pstate > 1&&pstate<3 && UserId == 1) { + if (pstate > 1 && pstate < 3 && UserId == 1) { $("#btn_sh").show(); $("#btn_bz").hide(); @@ -251,14 +250,14 @@ fopen3(); }); - $("select[stype]").live("change", function () { + $("select[stype]").live("change", function () { var did = $(this).attr("tjpid"); var SalesType = $(this).val(); - + UpdateSalesType(did, SalesType); - }); - //是否考核值改变触发事件,自动保存值 + }); + //是否考核值改变触发事件,自动保存值 $("select[khtype]").live("change", function () { var gid = $(this).attr("goodid"); var iskh = $(this).val(); @@ -284,7 +283,7 @@ Savebfnum1(did, num); }); - $("input[wid]").live("keyup", function () { + $("input[wid]").live("keyup", function () { var did = $(this).attr("wid"); var num = 0; if ($(this).val() != "") { @@ -293,7 +292,7 @@ Savebfnum2(did, num); }); - $("input[cid]").live("keyup", function () { + $("input[cid]").live("keyup", function () { var did = $(this).attr("cid"); var num = 0; if ($(this).val() != "") { @@ -302,13 +301,31 @@ Savebfnum4(did, num); }); - $("input[rid]").live("keyup", function () { + $("input[rid]").live("keyup", function () { var did = $(this).attr("rid"); - + Savebfnum3(did, null); }); + $("input[mid]").live("keyup", function () { + var did = $(this).attr("mid"); + var num = 0; + if ($(this).val() != "") { + num = $(this).val(); + } + Savebfnum4(did, num); + }); + + $("input[tid]").live("keyup", function () { + var did = $(this).attr("tid"); + var num = 0; + if ($(this).val() != "") { + num = $(this).val(); + } + Savebfnum5(did, num); + }); + $("#btn_hw3").bind("click", function () { @@ -327,7 +344,7 @@ window.open("../TongJi/Report406.aspx"); }); - $("#btn_hw6").bind("click", function () { + $("#btn_hw6").bind("click", function () { window.open("../Huowu/HW_GoodsPlan.aspx"); @@ -355,8 +372,8 @@ $("#img_1").attr("src", $(this).attr("src")); }); - $("#select_cpzt").bind("change", function () { - + $("#select_cpzt").bind("change", function () { + ReadData(); }); $("#btn_sch").bind("click", function () { @@ -453,36 +470,36 @@ }); function ReadUser2() { - if (UserId == 1 || UserId == 51 || UserId == 53 || iscp==0) - $("#select_mname").append(""); - var param = new Object(); + if (UserId == 1 || UserId == 51 || UserId == 53 || iscp == 0) + $("#select_mname").append(""); + var param = new Object(); - - param.iscp = iscp; - $.ajax({ - url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup2", - data: Sys.Serialization.JavaScriptSerializer.serialize(param), - async: false, - success: function (data) { + param.iscp = iscp; + $.ajax({ + url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup2", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + async: false, + success: function (data) { - $(data.d).each(function () { - $("#select_mname").append(""); - }); - if (iscp == 1) { - $("#select_mname").val(UserId); - } + $(data.d).each(function () { + $("#select_mname").append(""); - var _userId = $.url.param("userid"); - if (_userId != undefined && _userId != "") { - $("#select_mname").val(_userId); - } + }); + if (iscp == 1) { + $("#select_mname").val(UserId); + } - } + var _userId = $.url.param("userid"); + if (_userId != undefined && _userId != "") { + $("#select_mname").val(_userId); + } + + } - }); - } + }); + } var hjsl = 0; var cgsl = 0; @@ -494,9 +511,9 @@ var param = new Object(); param.detailid = DDId; - var url= "../HuoWuServiceNew.asmx/GetPlanWeekList"; + var url = "../HuoWuServiceNew.asmx/GetPlanWeekList"; if (pstate == 3) - url="../HuoWuServiceNew.asmx/GetPlanWeekList2"; + url = "../HuoWuServiceNew.asmx/GetPlanWeekList2"; $.ajax({ url: url, @@ -511,7 +528,7 @@ $("span[weekno=" + no + "]").html("Week" + no); if (this.cgsl != null) { $("input[weekz=" + no + "]").val(this.cgsl); - hjsl +=parseInt(this.cgsl); + hjsl += parseInt(this.cgsl); } if (this.SDate != null) @@ -523,42 +540,42 @@ } } }); - } - function GetWeeks2() { - - hjsl2 = 0; - var param = new Object(); - - param.detailid = DDId; - - - $.ajax({ - url: "../HuoWuServiceNew.asmx/GetPlanWeekList2", - data: Sys.Serialization.JavaScriptSerializer.serialize(param), - async: false, - success: function (data) { - if (data.d != null) { - /// $("#txt_BZ").val(data.d[0].remark); - $(data.d).each(function (i) { - - var no = i + 1; - $("input[weekz2=" + no + "]").val(""); - - $("span[weekno2=" + no + "]").html("Week" + no); - if (this.cgsl != null) { - $("input[weekz2=" + no + "]").val(this.cgsl); - hjsl2 += parseInt(this.cgsl); - } - if (this.SDate != null) - $("input[weekz2=" + no + "]").attr("sdt", this.SDate.localeFormat("yyyy-MM-dd")); - if (this.EDate != null) - $("input[weekz2=" + no + "]").attr("edt", this.EDate.localeFormat("yyyy-MM-dd")); - }); - - } + } + function GetWeeks2() { + + hjsl2 = 0; + var param = new Object(); + + param.detailid = DDId; + + + $.ajax({ + url: "../HuoWuServiceNew.asmx/GetPlanWeekList2", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + async: false, + success: function (data) { + if (data.d != null) { + /// $("#txt_BZ").val(data.d[0].remark); + $(data.d).each(function (i) { + + var no = i + 1; + $("input[weekz2=" + no + "]").val(""); + + $("span[weekno2=" + no + "]").html("Week" + no); + if (this.cgsl != null) { + $("input[weekz2=" + no + "]").val(this.cgsl); + hjsl2 += parseInt(this.cgsl); + } + if (this.SDate != null) + $("input[weekz2=" + no + "]").attr("sdt", this.SDate.localeFormat("yyyy-MM-dd")); + if (this.EDate != null) + $("input[weekz2=" + no + "]").attr("edt", this.EDate.localeFormat("yyyy-MM-dd")); + }); + } - }); - } + } + }); + } function UpdateYC(DId, IsYC) { if (DId <= 0) @@ -575,49 +592,49 @@ async: false, success: function (data) { - // alert("成功"); + // alert("成功"); // ReadData(); } }); } function SaveJH(obj) { - - var did = $(obj).attr("rid"); - var rq = null; - if ($(obj).val() != "") { - rq = $(obj).val(); - } - Savebfnum3(did, rq); - + var did = $(obj).attr("rid"); + var rq = null; + if ($(obj).val() != "") { + rq = $(obj).val(); + } + Savebfnum3(did, rq); + + } var DDId = 0; var CGObj; function SaveCGNum() { -// if ($("#txt_CGNum").val() == "") { -// alert("请输入采购数量"); -// return; + // if ($("#txt_CGNum").val() == "") { + // alert("请输入采购数量"); + // return; // } - + var param = new Object(); param.sjout = 0; - + if (pstate == 0) param.pstate = 1; - else if (pstate == 1 && UserId==1) - param.pstate =1; - else if (pstate == 1&&UserId>1) + else if (pstate == 1 && UserId == 1) + param.pstate = 1; + else if (pstate == 1 && UserId > 1) param.pstate = 2; - else if (pstate == 2 && UserId == 1) + else if (pstate == 2 && UserId == 1) param.pstate = 3; - else if (pstate ==3 && UserId == 1&&parseInt($("#txt_CGNum").val())>0) + else if (pstate == 3 && UserId == 1 && parseInt($("#txt_CGNum").val()) > 0) param.pstate = 1; - + param.DetailId = DDId; if ($("#txt_CGNum").val() != "") - param.Num=$("#txt_CGNum").val(); + param.Num = $("#txt_CGNum").val(); else param.Num = 0; if (pstate == 3 && param.Num == 0) { @@ -674,10 +691,10 @@ } function SaveCGNum2() { -// if ($("#txt_CGNum").val() == "") { -// alert("请输入采购数量"); -// return; -// } + // if ($("#txt_CGNum").val() == "") { + // alert("请输入采购数量"); + // return; + // } var param = new Object(); param.sjout = 1; param.DetailId = DDId; @@ -696,7 +713,7 @@ md.edate = $(this).attr("edt"); md.cgsl = $(this).val(); md.sjout = 1; - // md.remark = $("#txt_BZ").val(); + // md.remark = $("#txt_BZ").val(); md.GoodsId = GoodsId; Array.add(list, md); } @@ -707,9 +724,9 @@ data: Sys.Serialization.JavaScriptSerializer.serialize(param), async: false, success: function (data) { - - // alert("成功"); - // $.fancybox.close(); + + // alert("成功"); + // $.fancybox.close(); // ReadData(); } }); @@ -1090,7 +1107,7 @@ col.Align = "left"; col.CellTemplate = "{Bind SKU1}
{Bind GoodsName}"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "人员"; col.Align = "left"; col.CellTemplate = "{Bind MName}"; @@ -1101,12 +1118,12 @@ // col.SortExpression = "b.GoodsInNum"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "组长"; - col.Align = "left"; + col.Align = "left"; col.CellTemplate = "{Bind groupname}"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "FBA30天销量"; col.Width = "106px"; col.CellTemplate = "
{Bind GoodsHJNum_FBA}
"; @@ -1137,7 +1154,7 @@ col.CellTemplate = "{Bind Solid}|{Bind TotalSolid}"; // col.SortExpression = "b.GoodsInNum"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "推荐"; col.CellTemplate = ""; // col.SortExpression = "b.GoodsInNum"; @@ -1147,7 +1164,7 @@ col.CellTemplate = "{Bind JHDays}天"; // col.SortExpression = "b.GoodsInNum"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "试品"; col.CellTemplate = ""; // col.SortExpression = "b.GoodsInNum"; @@ -1162,7 +1179,19 @@ col.CellTemplate = "{Bind SubsidyFee}"; Array.add(datagrid1.Columns, col); col = new nblf.ui.DataGridColumn(); - col.HeaderText = "temu成本"; + col.HeaderText = "补贴费用$"; + col.CellTemplate = "{Bind SubsidyFee}"; + Array.add(datagrid1.Columns, col); + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "售价$"; + col.CellTemplate = ""; + Array.add(datagrid1.Columns, col); + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "temu售价$"; + col.CellTemplate = ""; + Array.add(datagrid1.Columns, col); + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "temu成本$"; col.CellTemplate = "{Bind YuGuJiaGe}"; Array.add(datagrid1.Columns, col); col = new nblf.ui.DataGridColumn(); @@ -1209,27 +1238,27 @@ // col.SortExpression = "b.LeftNum"; Array.add(datagrid1.Columns, col); - - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "西"; - // col.Width = "100px"; + + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "西"; + // col.Width = "100px"; col.CellTemplate = ""; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "东"; - // col.Width = "100px"; + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "东"; + // col.Width = "100px"; col.CellTemplate = ""; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "完成数"; - // col.Width = "100px"; + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "完成数"; + // col.Width = "100px"; col.CellTemplate = ""; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "交货日期"; - // col.Width = "100px"; + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "交货日期"; + // col.Width = "100px"; col.CellTemplate = ""; - Array.add(datagrid1.Columns, col); + Array.add(datagrid1.Columns, col); col = new nblf.ui.DataGridColumn(); col.HeaderText = "建议采购数量"; col.CellTemplate = "{Bind CGNum}"; @@ -1505,7 +1534,7 @@ function ReadData() { $("#_fixTableHeader").show(); var param = new Object(); - param.cpzt = $("#select_cpzt").val(); + param.cpzt = $("#select_cpzt").val(); param.IsJQ = 0; if ($("#chk_accurate").is(":checked") == true) param.IsJQ = 1; @@ -1550,7 +1579,7 @@ param.PageSize = datagrid1.Get_PageSize(); param.PageIndex = datagrid1.Get_PageIndex(); - param.platid = $("#select_plat").val(); + param.platid = $("#select_plat").val(); param.Sort = "a.GoodsHJNum2 desc"; //datagrid1.SortExpression +" "+ datagrid1.ViewSortDirection; if (sortname != "") param.Sort = sortname; @@ -1568,7 +1597,7 @@ }); if (iscp == 1) { - $("select[stype]").attr("disabled","disabled"); + $("select[stype]").attr("disabled", "disabled"); } $("select[khtype]").each(function () { console.log($(this)); @@ -1711,10 +1740,10 @@ } function GetBFModel() { - + var param = new Object(); param.detailid = DDId; - + $.ajax({ url: "../HuoWuServiceNew.asmx/GetGoodsModelForBF", data: Sys.Serialization.JavaScriptSerializer.serialize(param), @@ -1723,49 +1752,49 @@ if (data.d != null && data.d.BHNum1 != null) $("#txt_ebf").val(data.d.BHNum1); else - $("#txt_ebf").val(""); - if (data.d != null && data.d.BHNum2 != null) + $("#txt_ebf").val(""); + if (data.d != null && data.d.BHNum2 != null) $("#txt_wbf").val(data.d.BHNum2); - else - $("#txt_wbf").val(""); + else + $("#txt_wbf").val(""); } }); } - function SaveIsSP(id,issp) { + function SaveIsSP(id, issp) { + - var param = new Object(); param.detailid = id; - param.issp =issp; - + param.issp = issp; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_IsSp", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } - function Savebfnum1(id,num) { + function Savebfnum1(id, num) { + - var param = new Object(); param.detailid = id; - param.num1 =num; - + param.num1 = num; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum1", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); @@ -1774,85 +1803,114 @@ - function Savebfnum2(id,num) { + function Savebfnum2(id, num) { + - var param = new Object(); param.detailid = id; - param.num2 =num; - + param.num2 = num; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum2", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } - function Savebfnum4(id,num) { + function Savebfnum4(id, num) { + - var param = new Object(); param.detailid = id; - param.num3 =num; - + param.num3 = num; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum4", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } - function Savebfnum3(id,JH_Date) { + function Savebfnum3(id, JH_Date) { + - var param = new Object(); param.detailid = id; - param.JH_Date =JH_Date; - + param.JH_Date = JH_Date; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum3", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } - function UpdateSalesType(id,SalesType) { - + function Savebfnum4(id, ManuaPrice) { var param = new Object(); param.detailid = id; - param.SalesType =SalesType; - + param.ManuaPrice = ManuaPrice; + + $.ajax({ + url: "../HuoWuServiceNew.asmx/Save_ManuaPrice", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + dataType: "json", + success: function (data) { + } + }); + } + + function Savebfnum5(id, TemuPrice) { + var param = new Object(); + param.detailid = id; + param.TemuPrice = TemuPrice; + + $.ajax({ + url: "../HuoWuServiceNew.asmx/Save_TemuPrice", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + dataType: "json", + success: function (data) { + } + }); + } + + function UpdateSalesType(id, SalesType) { + + + var param = new Object(); + param.detailid = id; + param.SalesType = SalesType; + $.ajax({ url: "../HuoWuServiceNew.asmx/UpdateSalesType", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } //更新商品是否纳入个人考核 - function UpdateIsExamine(goodsId,isExamine ) { + function UpdateIsExamine(goodsId, isExamine) { var param = new Object(); @@ -1874,15 +1932,15 @@ function Savebfnum() { - + var param = new Object(); param.detailid = DDId; param.num1 = 0; param.num2 = 0; if ($("#txt_ebf").val() != "") param.num1 = $("#txt_ebf").val(); - if ($("#txt_wbf").val() != "") - param.num2 =$("#txt_wbf").val() ; + if ($("#txt_wbf").val() != "") + param.num2 = $("#txt_wbf").val(); $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum", data: Sys.Serialization.JavaScriptSerializer.serialize(param), @@ -1897,53 +1955,53 @@ }); } - function Clearbfnum() { + function Clearbfnum() { - if (window.confirm('确定要清空备货数据吗?') == false) return; + if (window.confirm('确定要清空备货数据吗?') == false) return; var param = new Object(); - + $.ajax({ url: "../HuoWuServiceNew.asmx/Clear_BFNum", - // data: Sys.Serialization.JavaScriptSerializer.serialize(param), + // data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { alert("已清空"); - // ReadData(); + // ReadData(); } }); } - //#region 导出 - function ExportData(CK) { - // if ($("#txt_postion").val() == "" && $("#txt_goodsname").val() == "") { - // alert("请至少输入一个查询条件"); + //#region 导出 + function ExportData(CK) { + // if ($("#txt_postion").val() == "" && $("#txt_goodsname").val() == "") { + // alert("请至少输入一个查询条件"); - // return; - // } - var param = new Object(); - param.CK = CK; - - var dd = new Date(); - var fname = "东仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; - if (CK == 1) - fname = "西仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; - $.ajax({ - url: "../HuoWuServiceNew.asmx/GetList_GoodsBF", - data: Sys.Serialization.JavaScriptSerializer.serialize(param), - async: false, - success: function (data) { - if (data.d == "") { - alert("没有备货数据"); - return; - } - params = { FilePath: data.d, FileName: fname }; - - window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params); - } - }); + // return; + // } + var param = new Object(); + param.CK = CK; + + var dd = new Date(); + var fname = "东仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; + if (CK == 1) + fname = "西仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; + $.ajax({ + url: "../HuoWuServiceNew.asmx/GetList_GoodsBF", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + async: false, + success: function (data) { + if (data.d == "") { + alert("没有备货数据"); + return; + } + params = { FilePath: data.d, FileName: fname }; + + window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params); + } + }); } @@ -1968,7 +2026,7 @@ }); } - //#endregion + //#endregion //#endregion //取消采购计划 diff --git a/TradeManageNew/DingDan/DT_SecondHand2.aspx b/TradeManageNew/DingDan/DT_SecondHand2.aspx index 3e603ad..f13b2bf 100644 --- a/TradeManageNew/DingDan/DT_SecondHand2.aspx +++ b/TradeManageNew/DingDan/DT_SecondHand2.aspx @@ -67,10 +67,18 @@ .receipt .product-image{ position: absolute; right: 0; - top: 65px; + top: 35px; width: 150px; height: auto; } + + .order-detail{ + width: 100%; + display: flex; + flex-direction: column; + justify-self: flex-start; + align-items: flex-start; + } @@ -143,7 +151,7 @@ var col = new nblf.ui.DataGridColumn(); col.HeaderText = "SKU"; col.Width = "150px"; - col.CellTemplate = `
{Bind SkuCode}`; + col.CellTemplate = `
{Bind SkuCode}`; col.SortExpression = "c.SkuCode"; Array.add(datagrid1.Columns, col); @@ -192,9 +200,9 @@ case 2: return "已上架"; case 3: - return "等待客户取货"; + return "等待取货"; case 4: - return "完成售卖"; + return "售卖完成"; default: return "-"; } @@ -209,16 +217,27 @@ var col = new nblf.ui.DataGridColumn(); col.HeaderText = "OrderDetail"; - col.CellTemplate = "{Bind OrderDetail}"; - col.CellFormatter = function (order) { + col.CellTemplate = `
{Bind orginData}
`; + col.CellFormatter = function (data) { + var order = data.ShopifyOrder var str = ""; if(order){ - str += `
订单号:
` - str += `
收件人:
` - str += `
手机号:
` - str += `
地址:
` + str += `
- ${data.ShippingMethod==1?'自提':'快递'} -
` + str += `
订单号:${order.OrderNumber}
` + // str += `
下单时间:${formatDate(order.CreatedAt)}
` + str += `
收件人:${order.Name}
` + str += `
手机号:${order.Phone}
` + str += `
省州:${order.ProvinceCode}
` + str += `
城市:${order.City}
` + str += `
地址:${order.Full}
` + str += `
金额:${order.TotalPrice} ${order.Currency}
` + if(data.ShippingMethod==1){ + str += `
预约时间:-
` + }else if(data.ShippingMethod==2){ + str += `
运单号:-
` + } } - return str; + return str } Array.add(datagrid1.Columns, col); @@ -226,16 +245,20 @@ col = new nblf.ui.DataGridColumn(); col.HeaderText = "操作"; col.Width = "100px"; - col.CellTemplate = "{Bind Status}"; - col.CellFormatter = function (value) { + col.CellTemplate = "{Bind orginData}"; + col.CellFormatter = function (data) { var OptionStr = ""; - switch (value) { + var status = data.Status + switch (status) { case 1: OptionStr += ""; break; - case 2: - OptionStr += ""; - OptionStr += ""; + case 3: + if(data.ShippingMethod!==1){ + OptionStr += ""; + }else if(data.ShippingMethod==2){ + OptionStr += ""; + } OptionStr += ""; } return OptionStr; @@ -289,7 +312,7 @@ success: function (data) { WindowLoadModel.Hide(); data.d.DataSource.forEach(it=>{ - it.ImageUrls = JSON.parse(it.ImageUrls) + it.orginData = JSON.parse(JSON.stringify(it)) it.firstImg = it.ImageUrls && it.ImageUrls.length ? it.ImageUrls[0] : "" }) datagrid1.Set_RowCount(data.d.RowCount); @@ -328,16 +351,6 @@ } //#endregion - //#region 日期格式转换 - function formatDate(date) { - const year = date.getFullYear(); - const month = String(date.getMonth() + 1).padStart(2, '0'); - const day = String(date.getDate()).padStart(2, '0'); - - return `${year}-${month}-${day}`; - } - //#endregion - //#region 日期格式转换 function formatDate(date) { const year = date.getFullYear(); @@ -499,6 +512,17 @@ function DownloadReceipt(obj) { var rowindex = $(obj).parent().parent().attr("index"); var model = datagrid1.Get_Model(rowindex); + var order = model.ShopifyOrder + var store = model.BarCode[0] + $('#receiptStore').text(store == 'W'?'West':'East'); + $('#receiptProductName').text(model.ProductEnName); + $('#receiptProductSKU').text(model.SkuCode); + $('#receiptProductCode').text(model.ProductCode); + $('#receiptProductPrice').text(`${order.TotalPrice} ${order.Currency}`); + $('#receiptCustomerName').text(order.Name); + $('#receiptCustomerPhone').text(order.Phone); + $('#receiptCustomerPhone').text(order.Phone); + $('#receiptProductImage').attr("src", model.ProductImageUrl); const receiptEl = document.getElementById('receipt'); $('#receipt').show(); const options = { @@ -572,10 +596,10 @@ @@ -599,21 +623,21 @@ diff --git a/TradeManageNew/Huowu/HW_GoodsDetailList2.aspx b/TradeManageNew/Huowu/HW_GoodsDetailList2.aspx index adb7aec..3da5fd6 100644 --- a/TradeManageNew/Huowu/HW_GoodsDetailList2.aspx +++ b/TradeManageNew/Huowu/HW_GoodsDetailList2.aspx @@ -49,7 +49,7 @@ GoodsCode = ""; } - iscp = $.url.param("iscp"); + iscp = $.url.param("iscp"); if (iscp == undefined) { iscp = 0; } @@ -57,19 +57,18 @@ if (UserId == 1) $("#btn_clear").show(); if (UserId == 1 || UserId == 51 || UserId == 53) { - $("#btn_hw6").show(); + $("#btn_hw6").show(); $("#btn_hw5").show(); - $("#btn_hw55").hide(); + $("#btn_hw55").hide(); } - else - { - $("#btn_hw6").hide(); - $("#btn_hw5").hide(); - $("#btn_hw55").show(); + else { + $("#btn_hw6").hide(); + $("#btn_hw5").hide(); + $("#btn_hw55").show(); } if (iscp == 1) { - // $("#txt_mname").attr("disabled", "disabled"); + // $("#txt_mname").attr("disabled", "disabled"); $("#select_mname").val(Name); $("#tr_head").hide(); } @@ -119,12 +118,12 @@ hj += parseInt($(this).val()); }); $("#sp_CGNum").html(hj); - - if (hj > hjsl) - $("#txt_CGNum").val(hj - hjsl); - else - $("#txt_CGNum").val(0); - + + if (hj > hjsl) + $("#txt_CGNum").val(hj - hjsl); + else + $("#txt_CGNum").val(0); + }); $("input[weekz2]").live("keyup", function () { @@ -134,28 +133,28 @@ hj += parseInt($(this).val()); }); $("#sp_CGNum2").html(hj); - - if (hj > hjsl2) - $("#txt_CGNum2").val(hj - hjsl2); - else - $("#txt_CGNum2").val(0); - + + if (hj > hjsl2) + $("#txt_CGNum2").val(hj - hjsl2); + else + $("#txt_CGNum2").val(0); + }); - + $("#" + datagrid1.TableID + " a[CommandName='cmdCG']").live("click", function () { - + var RowIndex = $(this).parentsUntil("tr").parent().attr("index"); var model = datagrid1.Get_Model(RowIndex); - + DDId = model.DetailId; GoodsId = model.GoodsId; pstate = model.FHPlan; - // alert(pstate); + // alert(pstate); GetBFModel(); cgsl = model.CGNum; - if(model.bhremark!=null) - $("#txt_BZ").val(model.bhremark); + if (model.bhremark != null) + $("#txt_BZ").val(model.bhremark); $("#_fixTableHeader").hide(); GetWeeks(); GetWeeks2(); @@ -168,15 +167,15 @@ $("input[weekz]").attr("disabled", "disabled"); $("#txt_CGNum").attr("disabled", "disabled"); } - if (pstate <=2) { + if (pstate <= 2) { $("#txt_CGNum").val(model.CGNum2); $("#txt_CGNum2").val(model.CGNum3); } - + if (pstate == 3) { $("#txt_CGNum").val(0); $("#txt_CGNum2").val(0); - + } if (pstate > 0) { $("#tr_jh1,#tr_jh2,#tr_jh3").show(); @@ -185,7 +184,7 @@ else { $("#tr_jh1,#tr_jh2,#tr_jh3").hide(); } - if (pstate > 1&&pstate<3 && UserId == 1) { + if (pstate > 1 && pstate < 3 && UserId == 1) { $("#btn_sh").show(); $("#btn_bz").hide(); @@ -251,14 +250,14 @@ fopen3(); }); - $("select[stype]").live("change", function () { + $("select[stype]").live("change", function () { var did = $(this).attr("tjpid"); var SalesType = $(this).val(); - + UpdateSalesType(did, SalesType); - }); - //是否考核值改变触发事件,自动保存值 + }); + //是否考核值改变触发事件,自动保存值 $("select[khtype]").live("change", function () { var gid = $(this).attr("goodid"); var iskh = $(this).val(); @@ -284,7 +283,7 @@ Savebfnum1(did, num); }); - $("input[wid]").live("keyup", function () { + $("input[wid]").live("keyup", function () { var did = $(this).attr("wid"); var num = 0; if ($(this).val() != "") { @@ -293,7 +292,7 @@ Savebfnum2(did, num); }); - $("input[cid]").live("keyup", function () { + $("input[cid]").live("keyup", function () { var did = $(this).attr("cid"); var num = 0; if ($(this).val() != "") { @@ -302,13 +301,31 @@ Savebfnum4(did, num); }); - $("input[rid]").live("keyup", function () { + $("input[rid]").live("keyup", function () { var did = $(this).attr("rid"); - + Savebfnum3(did, null); }); + $("input[mid]").live("keyup", function () { + var did = $(this).attr("mid"); + var num = 0; + if ($(this).val() != "") { + num = $(this).val(); + } + Savebfnum4(did, num); + }); + + $("input[tid]").live("keyup", function () { + var did = $(this).attr("tid"); + var num = 0; + if ($(this).val() != "") { + num = $(this).val(); + } + Savebfnum5(did, num); + }); + $("#btn_hw3").bind("click", function () { @@ -327,7 +344,7 @@ window.open("../TongJi/Report406.aspx"); }); - $("#btn_hw6").bind("click", function () { + $("#btn_hw6").bind("click", function () { window.open("../Huowu/HW_GoodsPlan.aspx"); @@ -355,8 +372,8 @@ $("#img_1").attr("src", $(this).attr("src")); }); - $("#select_cpzt").bind("change", function () { - + $("#select_cpzt").bind("change", function () { + ReadData(); }); $("#btn_sch").bind("click", function () { @@ -453,36 +470,36 @@ }); function ReadUser2() { - if (UserId == 1 || UserId == 51 || UserId == 53 || iscp==0) - $("#select_mname").append(""); - var param = new Object(); + if (UserId == 1 || UserId == 51 || UserId == 53 || iscp == 0) + $("#select_mname").append(""); + var param = new Object(); - - param.iscp = iscp; - $.ajax({ - url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup2", - data: Sys.Serialization.JavaScriptSerializer.serialize(param), - async: false, - success: function (data) { + + param.iscp = iscp; + $.ajax({ + url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup2", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + async: false, + success: function (data) { - $(data.d).each(function () { - $("#select_mname").append(""); + $(data.d).each(function () { + $("#select_mname").append(""); - }); - if (iscp == 1) { - $("#select_mname").val(UserId); - } + }); + if (iscp == 1) { + $("#select_mname").val(UserId); + } - var _userId = $.url.param("userid"); - if (_userId != undefined && _userId != "") { - $("#select_mname").val(_userId); - } + var _userId = $.url.param("userid"); + if (_userId != undefined && _userId != "") { + $("#select_mname").val(_userId); + } - } + } - }); - } + }); + } var hjsl = 0; var cgsl = 0; @@ -494,9 +511,9 @@ var param = new Object(); param.detailid = DDId; - var url= "../HuoWuServiceNew.asmx/GetPlanWeekList"; + var url = "../HuoWuServiceNew.asmx/GetPlanWeekList"; if (pstate == 3) - url="../HuoWuServiceNew.asmx/GetPlanWeekList2"; + url = "../HuoWuServiceNew.asmx/GetPlanWeekList2"; $.ajax({ url: url, @@ -511,7 +528,7 @@ $("span[weekno=" + no + "]").html("Week" + no); if (this.cgsl != null) { $("input[weekz=" + no + "]").val(this.cgsl); - hjsl +=parseInt(this.cgsl); + hjsl += parseInt(this.cgsl); } if (this.SDate != null) @@ -523,42 +540,42 @@ } } }); - } - function GetWeeks2() { - - hjsl2 = 0; - var param = new Object(); - - param.detailid = DDId; - - - $.ajax({ - url: "../HuoWuServiceNew.asmx/GetPlanWeekList2", - data: Sys.Serialization.JavaScriptSerializer.serialize(param), - async: false, - success: function (data) { - if (data.d != null) { - /// $("#txt_BZ").val(data.d[0].remark); - $(data.d).each(function (i) { - - var no = i + 1; - $("input[weekz2=" + no + "]").val(""); - - $("span[weekno2=" + no + "]").html("Week" + no); - if (this.cgsl != null) { - $("input[weekz2=" + no + "]").val(this.cgsl); - hjsl2 += parseInt(this.cgsl); - } - if (this.SDate != null) - $("input[weekz2=" + no + "]").attr("sdt", this.SDate.localeFormat("yyyy-MM-dd")); - if (this.EDate != null) - $("input[weekz2=" + no + "]").attr("edt", this.EDate.localeFormat("yyyy-MM-dd")); - }); - - } + } + function GetWeeks2() { + + hjsl2 = 0; + var param = new Object(); + + param.detailid = DDId; + + + $.ajax({ + url: "../HuoWuServiceNew.asmx/GetPlanWeekList2", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + async: false, + success: function (data) { + if (data.d != null) { + /// $("#txt_BZ").val(data.d[0].remark); + $(data.d).each(function (i) { + + var no = i + 1; + $("input[weekz2=" + no + "]").val(""); + + $("span[weekno2=" + no + "]").html("Week" + no); + if (this.cgsl != null) { + $("input[weekz2=" + no + "]").val(this.cgsl); + hjsl2 += parseInt(this.cgsl); + } + if (this.SDate != null) + $("input[weekz2=" + no + "]").attr("sdt", this.SDate.localeFormat("yyyy-MM-dd")); + if (this.EDate != null) + $("input[weekz2=" + no + "]").attr("edt", this.EDate.localeFormat("yyyy-MM-dd")); + }); + } - }); - } + } + }); + } function UpdateYC(DId, IsYC) { if (DId <= 0) @@ -575,49 +592,49 @@ async: false, success: function (data) { - // alert("成功"); + // alert("成功"); // ReadData(); } }); } function SaveJH(obj) { - - var did = $(obj).attr("rid"); - var rq = null; - if ($(obj).val() != "") { - rq = $(obj).val(); - } - Savebfnum3(did, rq); - + var did = $(obj).attr("rid"); + var rq = null; + if ($(obj).val() != "") { + rq = $(obj).val(); + } + Savebfnum3(did, rq); + + } var DDId = 0; var CGObj; function SaveCGNum() { -// if ($("#txt_CGNum").val() == "") { -// alert("请输入采购数量"); -// return; + // if ($("#txt_CGNum").val() == "") { + // alert("请输入采购数量"); + // return; // } - + var param = new Object(); param.sjout = 0; - + if (pstate == 0) param.pstate = 1; - else if (pstate == 1 && UserId==1) - param.pstate =1; - else if (pstate == 1&&UserId>1) + else if (pstate == 1 && UserId == 1) + param.pstate = 1; + else if (pstate == 1 && UserId > 1) param.pstate = 2; - else if (pstate == 2 && UserId == 1) + else if (pstate == 2 && UserId == 1) param.pstate = 3; - else if (pstate ==3 && UserId == 1&&parseInt($("#txt_CGNum").val())>0) + else if (pstate == 3 && UserId == 1 && parseInt($("#txt_CGNum").val()) > 0) param.pstate = 1; - + param.DetailId = DDId; if ($("#txt_CGNum").val() != "") - param.Num=$("#txt_CGNum").val(); + param.Num = $("#txt_CGNum").val(); else param.Num = 0; if (pstate == 3 && param.Num == 0) { @@ -674,10 +691,10 @@ } function SaveCGNum2() { -// if ($("#txt_CGNum").val() == "") { -// alert("请输入采购数量"); -// return; -// } + // if ($("#txt_CGNum").val() == "") { + // alert("请输入采购数量"); + // return; + // } var param = new Object(); param.sjout = 1; param.DetailId = DDId; @@ -696,7 +713,7 @@ md.edate = $(this).attr("edt"); md.cgsl = $(this).val(); md.sjout = 1; - // md.remark = $("#txt_BZ").val(); + // md.remark = $("#txt_BZ").val(); md.GoodsId = GoodsId; Array.add(list, md); } @@ -707,9 +724,9 @@ data: Sys.Serialization.JavaScriptSerializer.serialize(param), async: false, success: function (data) { - - // alert("成功"); - // $.fancybox.close(); + + // alert("成功"); + // $.fancybox.close(); // ReadData(); } }); @@ -1090,7 +1107,7 @@ col.Align = "left"; col.CellTemplate = "{Bind SKU1}
{Bind GoodsName}"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "人员"; col.Align = "left"; col.CellTemplate = "{Bind MName}"; @@ -1101,12 +1118,12 @@ // col.SortExpression = "b.GoodsInNum"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "组长"; - col.Align = "left"; + col.Align = "left"; col.CellTemplate = "{Bind groupname}"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "FBA30天销量"; col.Width = "106px"; col.CellTemplate = "
{Bind GoodsHJNum_FBA}
"; @@ -1137,7 +1154,7 @@ col.CellTemplate = "{Bind Solid}|{Bind TotalSolid}"; // col.SortExpression = "b.GoodsInNum"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "推荐"; col.CellTemplate = ""; // col.SortExpression = "b.GoodsInNum"; @@ -1147,7 +1164,7 @@ col.CellTemplate = "{Bind JHDays}天"; // col.SortExpression = "b.GoodsInNum"; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "试品"; col.CellTemplate = ""; // col.SortExpression = "b.GoodsInNum"; @@ -1162,6 +1179,22 @@ col.CellTemplate = "{Bind SubsidyFee}"; Array.add(datagrid1.Columns, col); col = new nblf.ui.DataGridColumn(); + col.HeaderText = "补贴费用$"; + col.CellTemplate = "{Bind SubsidyFee}"; + Array.add(datagrid1.Columns, col); + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "售价$"; + col.CellTemplate = ""; + Array.add(datagrid1.Columns, col); + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "temu售价$"; + col.CellTemplate = ""; + Array.add(datagrid1.Columns, col); + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "temu成本$"; + col.CellTemplate = "{Bind YuGuJiaGe}"; + Array.add(datagrid1.Columns, col); + col = new nblf.ui.DataGridColumn(); col.HeaderText = "建议售价$"; col.CellTemplate = "{Bind JYPrice}"; // col.SortExpression = "InPrice"; @@ -1205,27 +1238,27 @@ // col.SortExpression = "b.LeftNum"; Array.add(datagrid1.Columns, col); - - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "西"; - // col.Width = "100px"; + + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "西"; + // col.Width = "100px"; col.CellTemplate = ""; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "东"; - // col.Width = "100px"; + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "东"; + // col.Width = "100px"; col.CellTemplate = ""; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "完成数"; - // col.Width = "100px"; + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "完成数"; + // col.Width = "100px"; col.CellTemplate = ""; Array.add(datagrid1.Columns, col); - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "交货日期"; - // col.Width = "100px"; + col = new nblf.ui.DataGridColumn(); + col.HeaderText = "交货日期"; + // col.Width = "100px"; col.CellTemplate = ""; - Array.add(datagrid1.Columns, col); + Array.add(datagrid1.Columns, col); col = new nblf.ui.DataGridColumn(); col.HeaderText = "建议采购数量"; col.CellTemplate = "{Bind CGNum}"; @@ -1501,7 +1534,7 @@ function ReadData() { $("#_fixTableHeader").show(); var param = new Object(); - param.cpzt = $("#select_cpzt").val(); + param.cpzt = $("#select_cpzt").val(); param.IsJQ = 0; if ($("#chk_accurate").is(":checked") == true) param.IsJQ = 1; @@ -1546,7 +1579,7 @@ param.PageSize = datagrid1.Get_PageSize(); param.PageIndex = datagrid1.Get_PageIndex(); - param.platid = $("#select_plat").val(); + param.platid = $("#select_plat").val(); param.Sort = "a.GoodsHJNum2 desc"; //datagrid1.SortExpression +" "+ datagrid1.ViewSortDirection; if (sortname != "") param.Sort = sortname; @@ -1564,7 +1597,7 @@ }); if (iscp == 1) { - $("select[stype]").attr("disabled","disabled"); + $("select[stype]").attr("disabled", "disabled"); } $("select[khtype]").each(function () { console.log($(this)); @@ -1707,10 +1740,10 @@ } function GetBFModel() { - + var param = new Object(); param.detailid = DDId; - + $.ajax({ url: "../HuoWuServiceNew.asmx/GetGoodsModelForBF", data: Sys.Serialization.JavaScriptSerializer.serialize(param), @@ -1719,49 +1752,49 @@ if (data.d != null && data.d.BHNum1 != null) $("#txt_ebf").val(data.d.BHNum1); else - $("#txt_ebf").val(""); - if (data.d != null && data.d.BHNum2 != null) + $("#txt_ebf").val(""); + if (data.d != null && data.d.BHNum2 != null) $("#txt_wbf").val(data.d.BHNum2); - else - $("#txt_wbf").val(""); + else + $("#txt_wbf").val(""); } }); } - function SaveIsSP(id,issp) { + function SaveIsSP(id, issp) { + - var param = new Object(); param.detailid = id; - param.issp =issp; - + param.issp = issp; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_IsSp", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } - function Savebfnum1(id,num) { + function Savebfnum1(id, num) { + - var param = new Object(); param.detailid = id; - param.num1 =num; - + param.num1 = num; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum1", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); @@ -1770,85 +1803,114 @@ - function Savebfnum2(id,num) { + function Savebfnum2(id, num) { + - var param = new Object(); param.detailid = id; - param.num2 =num; - + param.num2 = num; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum2", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } - function Savebfnum4(id,num) { + function Savebfnum4(id, num) { + - var param = new Object(); param.detailid = id; - param.num3 =num; - + param.num3 = num; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum4", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } - function Savebfnum3(id,JH_Date) { + function Savebfnum3(id, JH_Date) { + - var param = new Object(); param.detailid = id; - param.JH_Date =JH_Date; - + param.JH_Date = JH_Date; + $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum3", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } - function UpdateSalesType(id,SalesType) { - + function Savebfnum4(id, ManuaPrice) { var param = new Object(); param.detailid = id; - param.SalesType =SalesType; - + param.ManuaPrice = ManuaPrice; + + $.ajax({ + url: "../HuoWuServiceNew.asmx/Save_ManuaPrice", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + dataType: "json", + success: function (data) { + } + }); + } + + function Savebfnum5(id, TemuPrice) { + var param = new Object(); + param.detailid = id; + param.TemuPrice = TemuPrice; + + $.ajax({ + url: "../HuoWuServiceNew.asmx/Save_TemuPrice", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + dataType: "json", + success: function (data) { + } + }); + } + + function UpdateSalesType(id, SalesType) { + + + var param = new Object(); + param.detailid = id; + param.SalesType = SalesType; + $.ajax({ url: "../HuoWuServiceNew.asmx/UpdateSalesType", data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { - + } }); } //更新商品是否纳入个人考核 - function UpdateIsExamine(goodsId,isExamine ) { + function UpdateIsExamine(goodsId, isExamine) { var param = new Object(); @@ -1870,15 +1932,15 @@ function Savebfnum() { - + var param = new Object(); param.detailid = DDId; param.num1 = 0; param.num2 = 0; if ($("#txt_ebf").val() != "") param.num1 = $("#txt_ebf").val(); - if ($("#txt_wbf").val() != "") - param.num2 =$("#txt_wbf").val() ; + if ($("#txt_wbf").val() != "") + param.num2 = $("#txt_wbf").val(); $.ajax({ url: "../HuoWuServiceNew.asmx/Save_BFNum", data: Sys.Serialization.JavaScriptSerializer.serialize(param), @@ -1893,53 +1955,53 @@ }); } - function Clearbfnum() { + function Clearbfnum() { - if (window.confirm('确定要清空备货数据吗?') == false) return; + if (window.confirm('确定要清空备货数据吗?') == false) return; var param = new Object(); - + $.ajax({ url: "../HuoWuServiceNew.asmx/Clear_BFNum", - // data: Sys.Serialization.JavaScriptSerializer.serialize(param), + // data: Sys.Serialization.JavaScriptSerializer.serialize(param), dataType: "json", success: function (data) { alert("已清空"); - // ReadData(); + // ReadData(); } }); } - //#region 导出 - function ExportData(CK) { - // if ($("#txt_postion").val() == "" && $("#txt_goodsname").val() == "") { - // alert("请至少输入一个查询条件"); + //#region 导出 + function ExportData(CK) { + // if ($("#txt_postion").val() == "" && $("#txt_goodsname").val() == "") { + // alert("请至少输入一个查询条件"); - // return; - // } - var param = new Object(); - param.CK = CK; - - var dd = new Date(); - var fname = "东仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; - if (CK == 1) - fname = "西仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; - $.ajax({ - url: "../HuoWuServiceNew.asmx/GetList_GoodsBF", - data: Sys.Serialization.JavaScriptSerializer.serialize(param), - async: false, - success: function (data) { - if (data.d == "") { - alert("没有备货数据"); - return; - } - params = { FilePath: data.d, FileName: fname }; - - window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params); - } - }); + // return; + // } + var param = new Object(); + param.CK = CK; + + var dd = new Date(); + var fname = "东仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; + if (CK == 1) + fname = "西仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; + $.ajax({ + url: "../HuoWuServiceNew.asmx/GetList_GoodsBF", + data: Sys.Serialization.JavaScriptSerializer.serialize(param), + async: false, + success: function (data) { + if (data.d == "") { + alert("没有备货数据"); + return; + } + params = { FilePath: data.d, FileName: fname }; + + window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params); + } + }); } @@ -1964,7 +2026,7 @@ }); } - //#endregion + //#endregion //#endregion //取消采购计划