master
fxc 2 months ago
parent 0a8ef1f231
commit 5aa953ba7c

@ -49,7 +49,7 @@
GoodsCode = ""; GoodsCode = "";
} }
iscp = $.url.param("iscp"); iscp = $.url.param("iscp");
if (iscp == undefined) { if (iscp == undefined) {
iscp = 0; iscp = 0;
} }
@ -57,19 +57,18 @@
if (UserId == 1) if (UserId == 1)
$("#btn_clear").show(); $("#btn_clear").show();
if (UserId == 1 || UserId == 51 || UserId == 53) { if (UserId == 1 || UserId == 51 || UserId == 53) {
$("#btn_hw6").show(); $("#btn_hw6").show();
$("#btn_hw5").show(); $("#btn_hw5").show();
$("#btn_hw55").hide(); $("#btn_hw55").hide();
} }
else else {
{ $("#btn_hw6").hide();
$("#btn_hw6").hide(); $("#btn_hw5").hide();
$("#btn_hw5").hide(); $("#btn_hw55").show();
$("#btn_hw55").show();
} }
if (iscp == 1) { if (iscp == 1) {
// $("#txt_mname").attr("disabled", "disabled"); // $("#txt_mname").attr("disabled", "disabled");
$("#select_mname").val(Name); $("#select_mname").val(Name);
$("#tr_head").hide(); $("#tr_head").hide();
} }
@ -119,12 +118,12 @@
hj += parseInt($(this).val()); hj += parseInt($(this).val());
}); });
$("#sp_CGNum").html(hj); $("#sp_CGNum").html(hj);
if (hj > hjsl) if (hj > hjsl)
$("#txt_CGNum").val(hj - hjsl); $("#txt_CGNum").val(hj - hjsl);
else else
$("#txt_CGNum").val(0); $("#txt_CGNum").val(0);
}); });
$("input[weekz2]").live("keyup", function () { $("input[weekz2]").live("keyup", function () {
@ -134,28 +133,28 @@
hj += parseInt($(this).val()); hj += parseInt($(this).val());
}); });
$("#sp_CGNum2").html(hj); $("#sp_CGNum2").html(hj);
if (hj > hjsl2) if (hj > hjsl2)
$("#txt_CGNum2").val(hj - hjsl2); $("#txt_CGNum2").val(hj - hjsl2);
else else
$("#txt_CGNum2").val(0); $("#txt_CGNum2").val(0);
}); });
$("#" + datagrid1.TableID + " a[CommandName='cmdCG']").live("click", function () { $("#" + datagrid1.TableID + " a[CommandName='cmdCG']").live("click", function () {
var RowIndex = $(this).parentsUntil("tr").parent().attr("index"); var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
var model = datagrid1.Get_Model(RowIndex); var model = datagrid1.Get_Model(RowIndex);
DDId = model.DetailId; DDId = model.DetailId;
GoodsId = model.GoodsId; GoodsId = model.GoodsId;
pstate = model.FHPlan; pstate = model.FHPlan;
// alert(pstate); // alert(pstate);
GetBFModel(); GetBFModel();
cgsl = model.CGNum; cgsl = model.CGNum;
if(model.bhremark!=null) if (model.bhremark != null)
$("#txt_BZ").val(model.bhremark); $("#txt_BZ").val(model.bhremark);
$("#_fixTableHeader").hide(); $("#_fixTableHeader").hide();
GetWeeks(); GetWeeks();
GetWeeks2(); GetWeeks2();
@ -168,15 +167,15 @@
$("input[weekz]").attr("disabled", "disabled"); $("input[weekz]").attr("disabled", "disabled");
$("#txt_CGNum").attr("disabled", "disabled"); $("#txt_CGNum").attr("disabled", "disabled");
} }
if (pstate <=2) { if (pstate <= 2) {
$("#txt_CGNum").val(model.CGNum2); $("#txt_CGNum").val(model.CGNum2);
$("#txt_CGNum2").val(model.CGNum3); $("#txt_CGNum2").val(model.CGNum3);
} }
if (pstate == 3) { if (pstate == 3) {
$("#txt_CGNum").val(0); $("#txt_CGNum").val(0);
$("#txt_CGNum2").val(0); $("#txt_CGNum2").val(0);
} }
if (pstate > 0) { if (pstate > 0) {
$("#tr_jh1,#tr_jh2,#tr_jh3").show(); $("#tr_jh1,#tr_jh2,#tr_jh3").show();
@ -185,7 +184,7 @@
else { else {
$("#tr_jh1,#tr_jh2,#tr_jh3").hide(); $("#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_sh").show();
$("#btn_bz").hide(); $("#btn_bz").hide();
@ -251,14 +250,14 @@
fopen3(); fopen3();
}); });
$("select[stype]").live("change", function () { $("select[stype]").live("change", function () {
var did = $(this).attr("tjpid"); var did = $(this).attr("tjpid");
var SalesType = $(this).val(); var SalesType = $(this).val();
UpdateSalesType(did, SalesType); UpdateSalesType(did, SalesType);
}); });
//是否考核值改变触发事件,自动保存值 //是否考核值改变触发事件,自动保存值
$("select[khtype]").live("change", function () { $("select[khtype]").live("change", function () {
var gid = $(this).attr("goodid"); var gid = $(this).attr("goodid");
var iskh = $(this).val(); var iskh = $(this).val();
@ -284,7 +283,7 @@
Savebfnum1(did, num); Savebfnum1(did, num);
}); });
$("input[wid]").live("keyup", function () { $("input[wid]").live("keyup", function () {
var did = $(this).attr("wid"); var did = $(this).attr("wid");
var num = 0; var num = 0;
if ($(this).val() != "") { if ($(this).val() != "") {
@ -293,7 +292,7 @@
Savebfnum2(did, num); Savebfnum2(did, num);
}); });
$("input[cid]").live("keyup", function () { $("input[cid]").live("keyup", function () {
var did = $(this).attr("cid"); var did = $(this).attr("cid");
var num = 0; var num = 0;
if ($(this).val() != "") { if ($(this).val() != "") {
@ -302,13 +301,31 @@
Savebfnum4(did, num); Savebfnum4(did, num);
}); });
$("input[rid]").live("keyup", function () { $("input[rid]").live("keyup", function () {
var did = $(this).attr("rid"); var did = $(this).attr("rid");
Savebfnum3(did, null); 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 () { $("#btn_hw3").bind("click", function () {
@ -327,7 +344,7 @@
window.open("../TongJi/Report406.aspx"); window.open("../TongJi/Report406.aspx");
}); });
$("#btn_hw6").bind("click", function () { $("#btn_hw6").bind("click", function () {
window.open("../Huowu/HW_GoodsPlan.aspx"); window.open("../Huowu/HW_GoodsPlan.aspx");
@ -355,8 +372,8 @@
$("#img_1").attr("src", $(this).attr("src")); $("#img_1").attr("src", $(this).attr("src"));
}); });
$("#select_cpzt").bind("change", function () { $("#select_cpzt").bind("change", function () {
ReadData(); ReadData();
}); });
$("#btn_sch").bind("click", function () { $("#btn_sch").bind("click", function () {
@ -453,36 +470,36 @@
}); });
function ReadUser2() { function ReadUser2() {
if (UserId == 1 || UserId == 51 || UserId == 53 || iscp==0) if (UserId == 1 || UserId == 51 || UserId == 53 || iscp == 0)
$("#select_mname").append("<option value=0>全部</option>"); $("#select_mname").append("<option value=0>全部</option>");
var param = new Object(); 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("<option value=" + this.UserId + ">" + this.Name + "</option>");
}); $(data.d).each(function () {
if (iscp == 1) { $("#select_mname").append("<option value=" + this.UserId + ">" + this.Name + "</option>");
$("#select_mname").val(UserId);
}
var _userId = $.url.param("userid"); });
if (_userId != undefined && _userId != "") { if (iscp == 1) {
$("#select_mname").val(_userId); $("#select_mname").val(UserId);
} }
} var _userId = $.url.param("userid");
if (_userId != undefined && _userId != "") {
$("#select_mname").val(_userId);
}
}
}); });
} }
var hjsl = 0; var hjsl = 0;
var cgsl = 0; var cgsl = 0;
@ -494,9 +511,9 @@
var param = new Object(); var param = new Object();
param.detailid = DDId; param.detailid = DDId;
var url= "../HuoWuServiceNew.asmx/GetPlanWeekList"; var url = "../HuoWuServiceNew.asmx/GetPlanWeekList";
if (pstate == 3) if (pstate == 3)
url="../HuoWuServiceNew.asmx/GetPlanWeekList2"; url = "../HuoWuServiceNew.asmx/GetPlanWeekList2";
$.ajax({ $.ajax({
url: url, url: url,
@ -511,7 +528,7 @@
$("span[weekno=" + no + "]").html("Week" + no); $("span[weekno=" + no + "]").html("Week" + no);
if (this.cgsl != null) { if (this.cgsl != null) {
$("input[weekz=" + no + "]").val(this.cgsl); $("input[weekz=" + no + "]").val(this.cgsl);
hjsl +=parseInt(this.cgsl); hjsl += parseInt(this.cgsl);
} }
if (this.SDate != null) if (this.SDate != null)
@ -523,42 +540,42 @@
} }
} }
}); });
} }
function GetWeeks2() { function GetWeeks2() {
hjsl2 = 0; hjsl2 = 0;
var param = new Object(); var param = new Object();
param.detailid = DDId; param.detailid = DDId;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/GetPlanWeekList2", url: "../HuoWuServiceNew.asmx/GetPlanWeekList2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false, async: false,
success: function (data) { success: function (data) {
if (data.d != null) { if (data.d != null) {
/// $("#txt_BZ").val(data.d[0].remark); /// $("#txt_BZ").val(data.d[0].remark);
$(data.d).each(function (i) { $(data.d).each(function (i) {
var no = i + 1; var no = i + 1;
$("input[weekz2=" + no + "]").val(""); $("input[weekz2=" + no + "]").val("");
$("span[weekno2=" + no + "]").html("Week" + no); $("span[weekno2=" + no + "]").html("Week" + no);
if (this.cgsl != null) { if (this.cgsl != null) {
$("input[weekz2=" + no + "]").val(this.cgsl); $("input[weekz2=" + no + "]").val(this.cgsl);
hjsl2 += parseInt(this.cgsl); hjsl2 += parseInt(this.cgsl);
} }
if (this.SDate != null) if (this.SDate != null)
$("input[weekz2=" + no + "]").attr("sdt", this.SDate.localeFormat("yyyy-MM-dd")); $("input[weekz2=" + no + "]").attr("sdt", this.SDate.localeFormat("yyyy-MM-dd"));
if (this.EDate != null) if (this.EDate != null)
$("input[weekz2=" + no + "]").attr("edt", this.EDate.localeFormat("yyyy-MM-dd")); $("input[weekz2=" + no + "]").attr("edt", this.EDate.localeFormat("yyyy-MM-dd"));
}); });
}
} }
}); }
} });
}
function UpdateYC(DId, IsYC) { function UpdateYC(DId, IsYC) {
if (DId <= 0) if (DId <= 0)
@ -575,49 +592,49 @@
async: false, async: false,
success: function (data) { success: function (data) {
// alert("成功"); // alert("成功");
// ReadData(); // ReadData();
} }
}); });
} }
function SaveJH(obj) { 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 DDId = 0;
var CGObj; var CGObj;
function SaveCGNum() { function SaveCGNum() {
// if ($("#txt_CGNum").val() == "") { // if ($("#txt_CGNum").val() == "") {
// alert("请输入采购数量"); // alert("请输入采购数量");
// return; // return;
// } // }
var param = new Object(); var param = new Object();
param.sjout = 0; param.sjout = 0;
if (pstate == 0) if (pstate == 0)
param.pstate = 1; param.pstate = 1;
else if (pstate == 1 && UserId==1) else if (pstate == 1 && UserId == 1)
param.pstate =1; param.pstate = 1;
else if (pstate == 1&&UserId>1) else if (pstate == 1 && UserId > 1)
param.pstate = 2; param.pstate = 2;
else if (pstate == 2 && UserId == 1) else if (pstate == 2 && UserId == 1)
param.pstate = 3; 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.pstate = 1;
param.DetailId = DDId; param.DetailId = DDId;
if ($("#txt_CGNum").val() != "") if ($("#txt_CGNum").val() != "")
param.Num=$("#txt_CGNum").val(); param.Num = $("#txt_CGNum").val();
else else
param.Num = 0; param.Num = 0;
if (pstate == 3 && param.Num == 0) { if (pstate == 3 && param.Num == 0) {
@ -674,10 +691,10 @@
} }
function SaveCGNum2() { function SaveCGNum2() {
// if ($("#txt_CGNum").val() == "") { // if ($("#txt_CGNum").val() == "") {
// alert("请输入采购数量"); // alert("请输入采购数量");
// return; // return;
// } // }
var param = new Object(); var param = new Object();
param.sjout = 1; param.sjout = 1;
param.DetailId = DDId; param.DetailId = DDId;
@ -696,7 +713,7 @@
md.edate = $(this).attr("edt"); md.edate = $(this).attr("edt");
md.cgsl = $(this).val(); md.cgsl = $(this).val();
md.sjout = 1; md.sjout = 1;
// md.remark = $("#txt_BZ").val(); // md.remark = $("#txt_BZ").val();
md.GoodsId = GoodsId; md.GoodsId = GoodsId;
Array.add(list, md); Array.add(list, md);
} }
@ -707,9 +724,9 @@
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false, async: false,
success: function (data) { success: function (data) {
// alert("成功"); // alert("成功");
// $.fancybox.close(); // $.fancybox.close();
// ReadData(); // ReadData();
} }
}); });
@ -1090,7 +1107,7 @@
col.Align = "left"; col.Align = "left";
col.CellTemplate = "<a CommandName='cmdLook' class='linka'>{Bind SKU1}</a><br/><span>{Bind GoodsName}</span>"; col.CellTemplate = "<a CommandName='cmdLook' class='linka'>{Bind SKU1}</a><br/><span>{Bind GoodsName}</span>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "人员"; col.HeaderText = "人员";
col.Align = "left"; col.Align = "left";
col.CellTemplate = "<a>{Bind MName}</a>"; col.CellTemplate = "<a>{Bind MName}</a>";
@ -1101,12 +1118,12 @@
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "组长"; col.HeaderText = "组长";
col.Align = "left"; col.Align = "left";
col.CellTemplate = "<a>{Bind groupname}</a>"; col.CellTemplate = "<a>{Bind groupname}</a>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "FBA30天销量"; col.HeaderText = "FBA30天销量";
col.Width = "106px"; col.Width = "106px";
col.CellTemplate = "<div style='background-color: #23c6c8;width:48px;height:25px'><span style='color: #fff;font-weight: 600;font-size:13pt;'>{Bind GoodsHJNum_FBA}</span></div>"; col.CellTemplate = "<div style='background-color: #23c6c8;width:48px;height:25px'><span style='color: #fff;font-weight: 600;font-size:13pt;'>{Bind GoodsHJNum_FBA}</span></div>";
@ -1137,7 +1154,7 @@
col.CellTemplate = "<span>{Bind Solid}|{Bind TotalSolid}</span>"; col.CellTemplate = "<span>{Bind Solid}|{Bind TotalSolid}</span>";
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "推荐"; col.HeaderText = "推荐";
col.CellTemplate = "<select tjpid='{Bind DetailId}' stype='{Bind SalesType}' ><option value='-1'></option><option value='1'>主推</option><option value='2'>推荐</option><option value='3'>季节性产品</option><option value='4'>保留</option><option value='5'>不推</option><option value='6'>清仓</option></select >"; col.CellTemplate = "<select tjpid='{Bind DetailId}' stype='{Bind SalesType}' ><option value='-1'></option><option value='1'>主推</option><option value='2'>推荐</option><option value='3'>季节性产品</option><option value='4'>保留</option><option value='5'>不推</option><option value='6'>清仓</option></select >";
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
@ -1147,7 +1164,7 @@
col.CellTemplate = "<span>{Bind JHDays}天</span>"; col.CellTemplate = "<span>{Bind JHDays}天</span>";
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "试品"; col.HeaderText = "试品";
col.CellTemplate = "<input type='checkbox' name='IsSP' spid='{Bind DetailId}' checked='{Bind IsSP}'></input>"; col.CellTemplate = "<input type='checkbox' name='IsSP' spid='{Bind DetailId}' checked='{Bind IsSP}'></input>";
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
@ -1162,7 +1179,19 @@
col.CellTemplate = "<span>{Bind SubsidyFee}</span>"; col.CellTemplate = "<span>{Bind SubsidyFee}</span>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "temu成本"; col.HeaderText = "补贴费用$";
col.CellTemplate = "<span>{Bind SubsidyFee}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "售价$";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:80px;' class='editTextbox' mid='{Bind DetailId}' value='{Bind ManuaPrice}'/>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "temu售价$";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:80px;' class='editTextbox' tid='{Bind DetailId}' value='{Bind TemuPrice}'/>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "temu成本$";
col.CellTemplate = "<span>{Bind YuGuJiaGe}</span>"; col.CellTemplate = "<span>{Bind YuGuJiaGe}</span>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
@ -1209,27 +1238,27 @@
// col.SortExpression = "b.LeftNum"; // col.SortExpression = "b.LeftNum";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "西"; col.HeaderText = "西";
// col.Width = "100px"; // col.Width = "100px";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' wid='{Bind DetailId}' value='{Bind BHNum2}'/>"; col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' wid='{Bind DetailId}' value='{Bind BHNum2}'/>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "东"; col.HeaderText = "东";
// col.Width = "100px"; // col.Width = "100px";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' eid='{Bind DetailId}' value='{Bind BHNum1}'/>"; col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' eid='{Bind DetailId}' value='{Bind BHNum1}'/>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "完成数"; col.HeaderText = "完成数";
// col.Width = "100px"; // col.Width = "100px";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' cid='{Bind DetailId}' value='{Bind BHNum3}'/>"; col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' cid='{Bind DetailId}' value='{Bind BHNum3}'/>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "交货日期"; col.HeaderText = "交货日期";
// col.Width = "100px"; // col.Width = "100px";
col.CellTemplate = "<input type='text' style='width:100px;' class='editTextbox' onfocus='WdatePicker({onpicked:function(){SaveJH(this)}})' rid='{Bind DetailId}' value='{Bind JH_Date,yyyy-MM-dd}'/>"; col.CellTemplate = "<input type='text' style='width:100px;' class='editTextbox' onfocus='WdatePicker({onpicked:function(){SaveJH(this)}})' rid='{Bind DetailId}' value='{Bind JH_Date,yyyy-MM-dd}'/>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "建议采购数量"; col.HeaderText = "建议采购数量";
col.CellTemplate = "<a CommandName='cmdCG'>{Bind CGNum}</a>"; col.CellTemplate = "<a CommandName='cmdCG'>{Bind CGNum}</a>";
@ -1505,7 +1534,7 @@
function ReadData() { function ReadData() {
$("#_fixTableHeader").show(); $("#_fixTableHeader").show();
var param = new Object(); var param = new Object();
param.cpzt = $("#select_cpzt").val(); param.cpzt = $("#select_cpzt").val();
param.IsJQ = 0; param.IsJQ = 0;
if ($("#chk_accurate").is(":checked") == true) if ($("#chk_accurate").is(":checked") == true)
param.IsJQ = 1; param.IsJQ = 1;
@ -1550,7 +1579,7 @@
param.PageSize = datagrid1.Get_PageSize(); param.PageSize = datagrid1.Get_PageSize();
param.PageIndex = datagrid1.Get_PageIndex(); param.PageIndex = datagrid1.Get_PageIndex();
param.platid = $("#select_plat").val(); param.platid = $("#select_plat").val();
param.Sort = "a.GoodsHJNum2 desc"; //datagrid1.SortExpression +" "+ datagrid1.ViewSortDirection; param.Sort = "a.GoodsHJNum2 desc"; //datagrid1.SortExpression +" "+ datagrid1.ViewSortDirection;
if (sortname != "") if (sortname != "")
param.Sort = sortname; param.Sort = sortname;
@ -1568,7 +1597,7 @@
}); });
if (iscp == 1) { if (iscp == 1) {
$("select[stype]").attr("disabled","disabled"); $("select[stype]").attr("disabled", "disabled");
} }
$("select[khtype]").each(function () { $("select[khtype]").each(function () {
console.log($(this)); console.log($(this));
@ -1711,10 +1740,10 @@
} }
function GetBFModel() { function GetBFModel() {
var param = new Object(); var param = new Object();
param.detailid = DDId; param.detailid = DDId;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/GetGoodsModelForBF", url: "../HuoWuServiceNew.asmx/GetGoodsModelForBF",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
@ -1723,49 +1752,49 @@
if (data.d != null && data.d.BHNum1 != null) if (data.d != null && data.d.BHNum1 != null)
$("#txt_ebf").val(data.d.BHNum1); $("#txt_ebf").val(data.d.BHNum1);
else else
$("#txt_ebf").val(""); $("#txt_ebf").val("");
if (data.d != null && data.d.BHNum2 != null) if (data.d != null && data.d.BHNum2 != null)
$("#txt_wbf").val(data.d.BHNum2); $("#txt_wbf").val(data.d.BHNum2);
else else
$("#txt_wbf").val(""); $("#txt_wbf").val("");
} }
}); });
} }
function SaveIsSP(id,issp) { function SaveIsSP(id, issp) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.issp =issp; param.issp = issp;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_IsSp", url: "../HuoWuServiceNew.asmx/Save_IsSp",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
function Savebfnum1(id,num) { function Savebfnum1(id, num) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.num1 =num; param.num1 = num;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum1", url: "../HuoWuServiceNew.asmx/Save_BFNum1",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
@ -1774,85 +1803,114 @@
function Savebfnum2(id,num) { function Savebfnum2(id, num) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.num2 =num; param.num2 = num;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum2", url: "../HuoWuServiceNew.asmx/Save_BFNum2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
function Savebfnum4(id,num) { function Savebfnum4(id, num) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.num3 =num; param.num3 = num;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum4", url: "../HuoWuServiceNew.asmx/Save_BFNum4",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
function Savebfnum3(id,JH_Date) { function Savebfnum3(id, JH_Date) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.JH_Date =JH_Date; param.JH_Date = JH_Date;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum3", url: "../HuoWuServiceNew.asmx/Save_BFNum3",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
function UpdateSalesType(id,SalesType) {
function Savebfnum4(id, ManuaPrice) {
var param = new Object(); var param = new Object();
param.detailid = id; 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({ $.ajax({
url: "../HuoWuServiceNew.asmx/UpdateSalesType", url: "../HuoWuServiceNew.asmx/UpdateSalesType",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
//更新商品是否纳入个人考核 //更新商品是否纳入个人考核
function UpdateIsExamine(goodsId,isExamine ) { function UpdateIsExamine(goodsId, isExamine) {
var param = new Object(); var param = new Object();
@ -1874,15 +1932,15 @@
function Savebfnum() { function Savebfnum() {
var param = new Object(); var param = new Object();
param.detailid = DDId; param.detailid = DDId;
param.num1 = 0; param.num1 = 0;
param.num2 = 0; param.num2 = 0;
if ($("#txt_ebf").val() != "") if ($("#txt_ebf").val() != "")
param.num1 = $("#txt_ebf").val(); param.num1 = $("#txt_ebf").val();
if ($("#txt_wbf").val() != "") if ($("#txt_wbf").val() != "")
param.num2 =$("#txt_wbf").val() ; param.num2 = $("#txt_wbf").val();
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum", url: "../HuoWuServiceNew.asmx/Save_BFNum",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), 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(); var param = new Object();
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Clear_BFNum", url: "../HuoWuServiceNew.asmx/Clear_BFNum",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param), // data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
alert("已清空"); alert("已清空");
// ReadData(); // ReadData();
} }
}); });
} }
//#region 导出 //#region 导出
function ExportData(CK) { function ExportData(CK) {
// if ($("#txt_postion").val() == "" && $("#txt_goodsname").val() == "") { // if ($("#txt_postion").val() == "" && $("#txt_goodsname").val() == "") {
// alert("请至少输入一个查询条件"); // alert("请至少输入一个查询条件");
// return; // return;
// } // }
var param = new Object(); var param = new Object();
param.CK = CK; param.CK = CK;
var dd = new Date(); var dd = new Date();
var fname = "东仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; var fname = "东仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls";
if (CK == 1) if (CK == 1)
fname = "西仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; fname = "西仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls";
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/GetList_GoodsBF", url: "../HuoWuServiceNew.asmx/GetList_GoodsBF",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false, async: false,
success: function (data) { success: function (data) {
if (data.d == "") { if (data.d == "") {
alert("没有备货数据"); alert("没有备货数据");
return; return;
} }
params = { FilePath: data.d, FileName: fname }; params = { FilePath: data.d, FileName: fname };
window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params); window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
} }
}); });
} }
@ -1968,7 +2026,7 @@
}); });
} }
//#endregion //#endregion
//#endregion //#endregion
//取消采购计划 //取消采购计划

@ -67,10 +67,18 @@
.receipt .product-image{ .receipt .product-image{
position: absolute; position: absolute;
right: 0; right: 0;
top: 65px; top: 35px;
width: 150px; width: 150px;
height: auto; height: auto;
} }
.order-detail{
width: 100%;
display: flex;
flex-direction: column;
justify-self: flex-start;
align-items: flex-start;
}
</style> </style>
<script src="https://cdn.jsdelivr.net/npm/jsbarcode@3.11.5/dist/JsBarcode.all.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/jsbarcode@3.11.5/dist/JsBarcode.all.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js"></script>
@ -143,7 +151,7 @@
var col = new nblf.ui.DataGridColumn(); var col = new nblf.ui.DataGridColumn();
col.HeaderText = "SKU"; col.HeaderText = "SKU";
col.Width = "150px"; col.Width = "150px";
col.CellTemplate = `<div class="product-box"><img src='{Bind firstImg}' alt='' width='50px' height='50px'/><a style="cursor: pointer;" onclick="LinkGoods({Bind SkuId})">{Bind SkuCode}</a></diav>`; col.CellTemplate = `<div class="product-box"><img src='{Bind ProductImageUrl}' alt='' width='50px' height='50px'/><a style="cursor: pointer;" onclick="LinkGoods({Bind ProductId})">{Bind SkuCode}</a></diav>`;
col.SortExpression = "c.SkuCode"; col.SortExpression = "c.SkuCode";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
@ -192,9 +200,9 @@
case 2: case 2:
return "已上架"; return "已上架";
case 3: case 3:
return "等待客户取货"; return "等待取货";
case 4: case 4:
return "完成售卖"; return "售卖完成";
default: default:
return "-"; return "-";
} }
@ -209,16 +217,27 @@
var col = new nblf.ui.DataGridColumn(); var col = new nblf.ui.DataGridColumn();
col.HeaderText = "OrderDetail"; col.HeaderText = "OrderDetail";
col.CellTemplate = "<span>{Bind OrderDetail}</span>"; col.CellTemplate = `<div class="order-detail">{Bind orginData}</div>`;
col.CellFormatter = function (order) { col.CellFormatter = function (data) {
var order = data.ShopifyOrder
var str = ""; var str = "";
if(order){ if(order){
str += `<div>订单号:</div>` str += `<div style="font-size: 14px;miargn-bottom:4px">- ${data.ShippingMethod==1?'自提':'快递'} -</div>`
str += `<div>收件人:</div>` str += `<div>订单号:${order.OrderNumber}</div>`
str += `<div>手机号:</div>` // str += `<div>下单时间:${formatDate(order.CreatedAt)}</div>`
str += `<div>地址:</div>` str += `<div>收件人:${order.Name}</div>`
str += `<div>手机号:${order.Phone}</div>`
str += `<div>省州:${order.ProvinceCode}</div>`
str += `<div>城市:${order.City}</div>`
str += `<div>地址:${order.Full}</div>`
str += `<div>金额:${order.TotalPrice} ${order.Currency}</div>`
if(data.ShippingMethod==1){
str += `<div>预约时间:-</div>`
}else if(data.ShippingMethod==2){
str += `<div>运单号:-</div>`
}
} }
return str; return str
} }
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
@ -226,16 +245,20 @@
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作"; col.HeaderText = "操作";
col.Width = "100px"; col.Width = "100px";
col.CellTemplate = "{Bind Status}"; col.CellTemplate = "{Bind orginData}";
col.CellFormatter = function (value) { col.CellFormatter = function (data) {
var OptionStr = ""; var OptionStr = "";
switch (value) { var status = data.Status
switch (status) {
case 1: case 1:
OptionStr += "<input onclick='UploadGoods(this)' class='btnClass dgbtnEdit' type='button' value='上架产品'></input>"; OptionStr += "<input onclick='UploadGoods(this)' class='btnClass dgbtnEdit' type='button' value='上架产品'></input>";
break; break;
case 2: case 3:
OptionStr += "<input onclick='DownloadReceipt(this)' class='btnClass dgbtnEdit' type='button' value='下载提货单'></input>"; if(data.ShippingMethod!==1){
OptionStr += "<input onclick='DownloadTrackCode(this)' class='btnClass dgbtnEdit' type='button' value='下载快递面单'></input>"; OptionStr += "<input onclick='DownloadReceipt(this)' class='btnClass dgbtnEdit' type='button' value='下载提货单'></input>";
}else if(data.ShippingMethod==2){
OptionStr += "<input onclick='DownloadTrackCode(this)' class='btnClass dgbtnEdit' type='button' value='下载快递面单'></input>";
}
OptionStr += "<input onclick='MarkSell(this)' class='btnClass dgbtnEdit' type='button' value='标记卖出'></input>"; OptionStr += "<input onclick='MarkSell(this)' class='btnClass dgbtnEdit' type='button' value='标记卖出'></input>";
} }
return OptionStr; return OptionStr;
@ -289,7 +312,7 @@
success: function (data) { success: function (data) {
WindowLoadModel.Hide(); WindowLoadModel.Hide();
data.d.DataSource.forEach(it=>{ 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] : "" it.firstImg = it.ImageUrls && it.ImageUrls.length ? it.ImageUrls[0] : ""
}) })
datagrid1.Set_RowCount(data.d.RowCount); datagrid1.Set_RowCount(data.d.RowCount);
@ -328,16 +351,6 @@
} }
//#endregion //#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 日期格式转换 //#region 日期格式转换
function formatDate(date) { function formatDate(date) {
const year = date.getFullYear(); const year = date.getFullYear();
@ -499,6 +512,17 @@
function DownloadReceipt(obj) { function DownloadReceipt(obj) {
var rowindex = $(obj).parent().parent().attr("index"); var rowindex = $(obj).parent().parent().attr("index");
var model = datagrid1.Get_Model(rowindex); 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'); const receiptEl = document.getElementById('receipt');
$('#receipt').show(); $('#receipt').show();
const options = { const options = {
@ -572,10 +596,10 @@
<td width="15%"> <td width="15%">
<select id="select_Status" class="selectClass" name="Status" style="width: 120px"> <select id="select_Status" class="selectClass" name="Status" style="width: 120px">
<option value="-1">All</option> <option value="-1">All</option>
<option value="0">未上架</option> <option value="1">未上架</option>
<option value="1">已上架</option> <option value="2">已上架</option>
<option value="2">等待取货</option> <option value="3">等待取货</option>
<option value="3">售卖完成</option> <option value="4">售卖完成</option>
</select> </select>
</td> </td>
<td> <td>
@ -599,21 +623,21 @@
<!-- 提货单 --> <!-- 提货单 -->
<div class="receipt" id="receipt" style="display: none;"> <div class="receipt" id="receipt" style="display: none;">
<div class="header"> <div class="header">
<h3>Pickup Receipt ( <span id="receiptStore">West</span> )</h3> <h3>Pickup Receipt ( <span id="receiptStore">-</span> )</h3>
</div> </div>
<div class="info-section"> <div class="info-section">
<div class="product-details"> <div class="product-details">
<p>Product Name: <span id="receiptProductName">Power Tower Dip Station Pull Up Bar Workout Equipment, Adjustable Height 62.2" to 84.5", Holds Up to 660LBS</span></p> <p>Product Name: <span id="receiptProductName">-</span></p>
<p>Product SKU: <span id="receiptProductSKU">SKU123456</span></p> <p>Product SKU: <span id="receiptProductSKU">-</span></p>
<p>Product Code: <span id="receiptProductCode">P789012</span></p> <p>Product Code: <span id="receiptProductCode">-</span></p>
<p>Product Price: <span id="receiptProductPrice">$399.00</span></p> <p>Product Price: <span id="receiptProductPrice">-</span></p>
<img id="receiptProductImage" src="https://cdn.shopify.com/s/files/1/0915/6817/7474/files/KM2739_main.jpg?v=1736757843" alt="Product Image" class="product-image"> <img id="receiptProductImage" src="" alt="Product Image" class="product-image">
</div> </div>
<div class="customer-info"> <div class="customer-info">
<p>Customer Name: <span id="receiptCustomerName">John Smith</span></p> <p>Customer Name: <span id="receiptCustomerName">-</span></p>
<p>Phone Number: <span id="receiptCustomerPhone">+1 234 567 8900</span></p> <p>Phone Number: <span id="receiptCustomerPhone">-</span></p>
<p>Appointment Time: <span id="receiptAppointmentTime">2024-03-20 14:30</span></p> <p>Appointment Time: <span id="receiptAppointmentTime">-</span></p>
</div> </div>
</div> </div>
</div> </div>

@ -49,7 +49,7 @@
GoodsCode = ""; GoodsCode = "";
} }
iscp = $.url.param("iscp"); iscp = $.url.param("iscp");
if (iscp == undefined) { if (iscp == undefined) {
iscp = 0; iscp = 0;
} }
@ -57,19 +57,18 @@
if (UserId == 1) if (UserId == 1)
$("#btn_clear").show(); $("#btn_clear").show();
if (UserId == 1 || UserId == 51 || UserId == 53) { if (UserId == 1 || UserId == 51 || UserId == 53) {
$("#btn_hw6").show(); $("#btn_hw6").show();
$("#btn_hw5").show(); $("#btn_hw5").show();
$("#btn_hw55").hide(); $("#btn_hw55").hide();
} }
else else {
{ $("#btn_hw6").hide();
$("#btn_hw6").hide(); $("#btn_hw5").hide();
$("#btn_hw5").hide(); $("#btn_hw55").show();
$("#btn_hw55").show();
} }
if (iscp == 1) { if (iscp == 1) {
// $("#txt_mname").attr("disabled", "disabled"); // $("#txt_mname").attr("disabled", "disabled");
$("#select_mname").val(Name); $("#select_mname").val(Name);
$("#tr_head").hide(); $("#tr_head").hide();
} }
@ -119,12 +118,12 @@
hj += parseInt($(this).val()); hj += parseInt($(this).val());
}); });
$("#sp_CGNum").html(hj); $("#sp_CGNum").html(hj);
if (hj > hjsl) if (hj > hjsl)
$("#txt_CGNum").val(hj - hjsl); $("#txt_CGNum").val(hj - hjsl);
else else
$("#txt_CGNum").val(0); $("#txt_CGNum").val(0);
}); });
$("input[weekz2]").live("keyup", function () { $("input[weekz2]").live("keyup", function () {
@ -134,28 +133,28 @@
hj += parseInt($(this).val()); hj += parseInt($(this).val());
}); });
$("#sp_CGNum2").html(hj); $("#sp_CGNum2").html(hj);
if (hj > hjsl2) if (hj > hjsl2)
$("#txt_CGNum2").val(hj - hjsl2); $("#txt_CGNum2").val(hj - hjsl2);
else else
$("#txt_CGNum2").val(0); $("#txt_CGNum2").val(0);
}); });
$("#" + datagrid1.TableID + " a[CommandName='cmdCG']").live("click", function () { $("#" + datagrid1.TableID + " a[CommandName='cmdCG']").live("click", function () {
var RowIndex = $(this).parentsUntil("tr").parent().attr("index"); var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
var model = datagrid1.Get_Model(RowIndex); var model = datagrid1.Get_Model(RowIndex);
DDId = model.DetailId; DDId = model.DetailId;
GoodsId = model.GoodsId; GoodsId = model.GoodsId;
pstate = model.FHPlan; pstate = model.FHPlan;
// alert(pstate); // alert(pstate);
GetBFModel(); GetBFModel();
cgsl = model.CGNum; cgsl = model.CGNum;
if(model.bhremark!=null) if (model.bhremark != null)
$("#txt_BZ").val(model.bhremark); $("#txt_BZ").val(model.bhremark);
$("#_fixTableHeader").hide(); $("#_fixTableHeader").hide();
GetWeeks(); GetWeeks();
GetWeeks2(); GetWeeks2();
@ -168,15 +167,15 @@
$("input[weekz]").attr("disabled", "disabled"); $("input[weekz]").attr("disabled", "disabled");
$("#txt_CGNum").attr("disabled", "disabled"); $("#txt_CGNum").attr("disabled", "disabled");
} }
if (pstate <=2) { if (pstate <= 2) {
$("#txt_CGNum").val(model.CGNum2); $("#txt_CGNum").val(model.CGNum2);
$("#txt_CGNum2").val(model.CGNum3); $("#txt_CGNum2").val(model.CGNum3);
} }
if (pstate == 3) { if (pstate == 3) {
$("#txt_CGNum").val(0); $("#txt_CGNum").val(0);
$("#txt_CGNum2").val(0); $("#txt_CGNum2").val(0);
} }
if (pstate > 0) { if (pstate > 0) {
$("#tr_jh1,#tr_jh2,#tr_jh3").show(); $("#tr_jh1,#tr_jh2,#tr_jh3").show();
@ -185,7 +184,7 @@
else { else {
$("#tr_jh1,#tr_jh2,#tr_jh3").hide(); $("#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_sh").show();
$("#btn_bz").hide(); $("#btn_bz").hide();
@ -251,14 +250,14 @@
fopen3(); fopen3();
}); });
$("select[stype]").live("change", function () { $("select[stype]").live("change", function () {
var did = $(this).attr("tjpid"); var did = $(this).attr("tjpid");
var SalesType = $(this).val(); var SalesType = $(this).val();
UpdateSalesType(did, SalesType); UpdateSalesType(did, SalesType);
}); });
//是否考核值改变触发事件,自动保存值 //是否考核值改变触发事件,自动保存值
$("select[khtype]").live("change", function () { $("select[khtype]").live("change", function () {
var gid = $(this).attr("goodid"); var gid = $(this).attr("goodid");
var iskh = $(this).val(); var iskh = $(this).val();
@ -284,7 +283,7 @@
Savebfnum1(did, num); Savebfnum1(did, num);
}); });
$("input[wid]").live("keyup", function () { $("input[wid]").live("keyup", function () {
var did = $(this).attr("wid"); var did = $(this).attr("wid");
var num = 0; var num = 0;
if ($(this).val() != "") { if ($(this).val() != "") {
@ -293,7 +292,7 @@
Savebfnum2(did, num); Savebfnum2(did, num);
}); });
$("input[cid]").live("keyup", function () { $("input[cid]").live("keyup", function () {
var did = $(this).attr("cid"); var did = $(this).attr("cid");
var num = 0; var num = 0;
if ($(this).val() != "") { if ($(this).val() != "") {
@ -302,13 +301,31 @@
Savebfnum4(did, num); Savebfnum4(did, num);
}); });
$("input[rid]").live("keyup", function () { $("input[rid]").live("keyup", function () {
var did = $(this).attr("rid"); var did = $(this).attr("rid");
Savebfnum3(did, null); 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 () { $("#btn_hw3").bind("click", function () {
@ -327,7 +344,7 @@
window.open("../TongJi/Report406.aspx"); window.open("../TongJi/Report406.aspx");
}); });
$("#btn_hw6").bind("click", function () { $("#btn_hw6").bind("click", function () {
window.open("../Huowu/HW_GoodsPlan.aspx"); window.open("../Huowu/HW_GoodsPlan.aspx");
@ -355,8 +372,8 @@
$("#img_1").attr("src", $(this).attr("src")); $("#img_1").attr("src", $(this).attr("src"));
}); });
$("#select_cpzt").bind("change", function () { $("#select_cpzt").bind("change", function () {
ReadData(); ReadData();
}); });
$("#btn_sch").bind("click", function () { $("#btn_sch").bind("click", function () {
@ -453,36 +470,36 @@
}); });
function ReadUser2() { function ReadUser2() {
if (UserId == 1 || UserId == 51 || UserId == 53 || iscp==0) if (UserId == 1 || UserId == 51 || UserId == 53 || iscp == 0)
$("#select_mname").append("<option value=0>全部</option>"); $("#select_mname").append("<option value=0>全部</option>");
var param = new Object(); var param = new Object();
param.iscp = iscp; param.iscp = iscp;
$.ajax({ $.ajax({
url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup2", url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false, async: false,
success: function (data) { success: function (data) {
$(data.d).each(function () { $(data.d).each(function () {
$("#select_mname").append("<option value=" + this.UserId + ">" + this.Name + "</option>"); $("#select_mname").append("<option value=" + this.UserId + ">" + this.Name + "</option>");
}); });
if (iscp == 1) { if (iscp == 1) {
$("#select_mname").val(UserId); $("#select_mname").val(UserId);
} }
var _userId = $.url.param("userid"); var _userId = $.url.param("userid");
if (_userId != undefined && _userId != "") { if (_userId != undefined && _userId != "") {
$("#select_mname").val(_userId); $("#select_mname").val(_userId);
} }
} }
}); });
} }
var hjsl = 0; var hjsl = 0;
var cgsl = 0; var cgsl = 0;
@ -494,9 +511,9 @@
var param = new Object(); var param = new Object();
param.detailid = DDId; param.detailid = DDId;
var url= "../HuoWuServiceNew.asmx/GetPlanWeekList"; var url = "../HuoWuServiceNew.asmx/GetPlanWeekList";
if (pstate == 3) if (pstate == 3)
url="../HuoWuServiceNew.asmx/GetPlanWeekList2"; url = "../HuoWuServiceNew.asmx/GetPlanWeekList2";
$.ajax({ $.ajax({
url: url, url: url,
@ -511,7 +528,7 @@
$("span[weekno=" + no + "]").html("Week" + no); $("span[weekno=" + no + "]").html("Week" + no);
if (this.cgsl != null) { if (this.cgsl != null) {
$("input[weekz=" + no + "]").val(this.cgsl); $("input[weekz=" + no + "]").val(this.cgsl);
hjsl +=parseInt(this.cgsl); hjsl += parseInt(this.cgsl);
} }
if (this.SDate != null) if (this.SDate != null)
@ -523,42 +540,42 @@
} }
} }
}); });
} }
function GetWeeks2() { function GetWeeks2() {
hjsl2 = 0; hjsl2 = 0;
var param = new Object(); var param = new Object();
param.detailid = DDId; param.detailid = DDId;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/GetPlanWeekList2", url: "../HuoWuServiceNew.asmx/GetPlanWeekList2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false, async: false,
success: function (data) { success: function (data) {
if (data.d != null) { if (data.d != null) {
/// $("#txt_BZ").val(data.d[0].remark); /// $("#txt_BZ").val(data.d[0].remark);
$(data.d).each(function (i) { $(data.d).each(function (i) {
var no = i + 1; var no = i + 1;
$("input[weekz2=" + no + "]").val(""); $("input[weekz2=" + no + "]").val("");
$("span[weekno2=" + no + "]").html("Week" + no); $("span[weekno2=" + no + "]").html("Week" + no);
if (this.cgsl != null) { if (this.cgsl != null) {
$("input[weekz2=" + no + "]").val(this.cgsl); $("input[weekz2=" + no + "]").val(this.cgsl);
hjsl2 += parseInt(this.cgsl); hjsl2 += parseInt(this.cgsl);
} }
if (this.SDate != null) if (this.SDate != null)
$("input[weekz2=" + no + "]").attr("sdt", this.SDate.localeFormat("yyyy-MM-dd")); $("input[weekz2=" + no + "]").attr("sdt", this.SDate.localeFormat("yyyy-MM-dd"));
if (this.EDate != null) if (this.EDate != null)
$("input[weekz2=" + no + "]").attr("edt", this.EDate.localeFormat("yyyy-MM-dd")); $("input[weekz2=" + no + "]").attr("edt", this.EDate.localeFormat("yyyy-MM-dd"));
}); });
}
} }
}); }
} });
}
function UpdateYC(DId, IsYC) { function UpdateYC(DId, IsYC) {
if (DId <= 0) if (DId <= 0)
@ -575,49 +592,49 @@
async: false, async: false,
success: function (data) { success: function (data) {
// alert("成功"); // alert("成功");
// ReadData(); // ReadData();
} }
}); });
} }
function SaveJH(obj) { 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 DDId = 0;
var CGObj; var CGObj;
function SaveCGNum() { function SaveCGNum() {
// if ($("#txt_CGNum").val() == "") { // if ($("#txt_CGNum").val() == "") {
// alert("请输入采购数量"); // alert("请输入采购数量");
// return; // return;
// } // }
var param = new Object(); var param = new Object();
param.sjout = 0; param.sjout = 0;
if (pstate == 0) if (pstate == 0)
param.pstate = 1; param.pstate = 1;
else if (pstate == 1 && UserId==1) else if (pstate == 1 && UserId == 1)
param.pstate =1; param.pstate = 1;
else if (pstate == 1&&UserId>1) else if (pstate == 1 && UserId > 1)
param.pstate = 2; param.pstate = 2;
else if (pstate == 2 && UserId == 1) else if (pstate == 2 && UserId == 1)
param.pstate = 3; 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.pstate = 1;
param.DetailId = DDId; param.DetailId = DDId;
if ($("#txt_CGNum").val() != "") if ($("#txt_CGNum").val() != "")
param.Num=$("#txt_CGNum").val(); param.Num = $("#txt_CGNum").val();
else else
param.Num = 0; param.Num = 0;
if (pstate == 3 && param.Num == 0) { if (pstate == 3 && param.Num == 0) {
@ -674,10 +691,10 @@
} }
function SaveCGNum2() { function SaveCGNum2() {
// if ($("#txt_CGNum").val() == "") { // if ($("#txt_CGNum").val() == "") {
// alert("请输入采购数量"); // alert("请输入采购数量");
// return; // return;
// } // }
var param = new Object(); var param = new Object();
param.sjout = 1; param.sjout = 1;
param.DetailId = DDId; param.DetailId = DDId;
@ -696,7 +713,7 @@
md.edate = $(this).attr("edt"); md.edate = $(this).attr("edt");
md.cgsl = $(this).val(); md.cgsl = $(this).val();
md.sjout = 1; md.sjout = 1;
// md.remark = $("#txt_BZ").val(); // md.remark = $("#txt_BZ").val();
md.GoodsId = GoodsId; md.GoodsId = GoodsId;
Array.add(list, md); Array.add(list, md);
} }
@ -707,9 +724,9 @@
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false, async: false,
success: function (data) { success: function (data) {
// alert("成功"); // alert("成功");
// $.fancybox.close(); // $.fancybox.close();
// ReadData(); // ReadData();
} }
}); });
@ -1090,7 +1107,7 @@
col.Align = "left"; col.Align = "left";
col.CellTemplate = "<a CommandName='cmdLook' class='linka'>{Bind SKU1}</a><br/><span>{Bind GoodsName}</span>"; col.CellTemplate = "<a CommandName='cmdLook' class='linka'>{Bind SKU1}</a><br/><span>{Bind GoodsName}</span>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "人员"; col.HeaderText = "人员";
col.Align = "left"; col.Align = "left";
col.CellTemplate = "<a>{Bind MName}</a>"; col.CellTemplate = "<a>{Bind MName}</a>";
@ -1101,12 +1118,12 @@
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "组长"; col.HeaderText = "组长";
col.Align = "left"; col.Align = "left";
col.CellTemplate = "<a>{Bind groupname}</a>"; col.CellTemplate = "<a>{Bind groupname}</a>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "FBA30天销量"; col.HeaderText = "FBA30天销量";
col.Width = "106px"; col.Width = "106px";
col.CellTemplate = "<div style='background-color: #23c6c8;width:48px;height:25px'><span style='color: #fff;font-weight: 600;font-size:13pt;'>{Bind GoodsHJNum_FBA}</span></div>"; col.CellTemplate = "<div style='background-color: #23c6c8;width:48px;height:25px'><span style='color: #fff;font-weight: 600;font-size:13pt;'>{Bind GoodsHJNum_FBA}</span></div>";
@ -1137,7 +1154,7 @@
col.CellTemplate = "<span>{Bind Solid}|{Bind TotalSolid}</span>"; col.CellTemplate = "<span>{Bind Solid}|{Bind TotalSolid}</span>";
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "推荐"; col.HeaderText = "推荐";
col.CellTemplate = "<select tjpid='{Bind DetailId}' stype='{Bind SalesType}' ><option value='-1'></option><option value='1'>主推</option><option value='2'>推荐</option><option value='3'>季节性产品</option><option value='4'>保留</option><option value='5'>不推</option><option value='6'>清仓</option></select >"; col.CellTemplate = "<select tjpid='{Bind DetailId}' stype='{Bind SalesType}' ><option value='-1'></option><option value='1'>主推</option><option value='2'>推荐</option><option value='3'>季节性产品</option><option value='4'>保留</option><option value='5'>不推</option><option value='6'>清仓</option></select >";
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
@ -1147,7 +1164,7 @@
col.CellTemplate = "<span>{Bind JHDays}天</span>"; col.CellTemplate = "<span>{Bind JHDays}天</span>";
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "试品"; col.HeaderText = "试品";
col.CellTemplate = "<input type='checkbox' name='IsSP' spid='{Bind DetailId}' checked='{Bind IsSP}'></input>"; col.CellTemplate = "<input type='checkbox' name='IsSP' spid='{Bind DetailId}' checked='{Bind IsSP}'></input>";
// col.SortExpression = "b.GoodsInNum"; // col.SortExpression = "b.GoodsInNum";
@ -1162,6 +1179,22 @@
col.CellTemplate = "<span>{Bind SubsidyFee}</span>"; col.CellTemplate = "<span>{Bind SubsidyFee}</span>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "补贴费用$";
col.CellTemplate = "<span>{Bind SubsidyFee}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "售价$";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:80px;' class='editTextbox' mid='{Bind DetailId}' value='{Bind ManuaPrice}'/>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "temu售价$";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:80px;' class='editTextbox' tid='{Bind DetailId}' value='{Bind TemuPrice}'/>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "temu成本$";
col.CellTemplate = "<span>{Bind YuGuJiaGe}</span>";
Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn();
col.HeaderText = "建议售价$"; col.HeaderText = "建议售价$";
col.CellTemplate = "<span>{Bind JYPrice}</span>"; col.CellTemplate = "<span>{Bind JYPrice}</span>";
// col.SortExpression = "InPrice"; // col.SortExpression = "InPrice";
@ -1205,27 +1238,27 @@
// col.SortExpression = "b.LeftNum"; // col.SortExpression = "b.LeftNum";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "西"; col.HeaderText = "西";
// col.Width = "100px"; // col.Width = "100px";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' wid='{Bind DetailId}' value='{Bind BHNum2}'/>"; col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' wid='{Bind DetailId}' value='{Bind BHNum2}'/>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "东"; col.HeaderText = "东";
// col.Width = "100px"; // col.Width = "100px";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' eid='{Bind DetailId}' value='{Bind BHNum1}'/>"; col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' eid='{Bind DetailId}' value='{Bind BHNum1}'/>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "完成数"; col.HeaderText = "完成数";
// col.Width = "100px"; // col.Width = "100px";
col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' cid='{Bind DetailId}' value='{Bind BHNum3}'/>"; col.CellTemplate = "<input type='text' min='0' max='10000000' precision='0' style='width:50px;' class='editTextbox' cid='{Bind DetailId}' value='{Bind BHNum3}'/>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "交货日期"; col.HeaderText = "交货日期";
// col.Width = "100px"; // col.Width = "100px";
col.CellTemplate = "<input type='text' style='width:100px;' class='editTextbox' onfocus='WdatePicker({onpicked:function(){SaveJH(this)}})' rid='{Bind DetailId}' value='{Bind JH_Date,yyyy-MM-dd}'/>"; col.CellTemplate = "<input type='text' style='width:100px;' class='editTextbox' onfocus='WdatePicker({onpicked:function(){SaveJH(this)}})' rid='{Bind DetailId}' value='{Bind JH_Date,yyyy-MM-dd}'/>";
Array.add(datagrid1.Columns, col); Array.add(datagrid1.Columns, col);
col = new nblf.ui.DataGridColumn(); col = new nblf.ui.DataGridColumn();
col.HeaderText = "建议采购数量"; col.HeaderText = "建议采购数量";
col.CellTemplate = "<a CommandName='cmdCG'>{Bind CGNum}</a>"; col.CellTemplate = "<a CommandName='cmdCG'>{Bind CGNum}</a>";
@ -1501,7 +1534,7 @@
function ReadData() { function ReadData() {
$("#_fixTableHeader").show(); $("#_fixTableHeader").show();
var param = new Object(); var param = new Object();
param.cpzt = $("#select_cpzt").val(); param.cpzt = $("#select_cpzt").val();
param.IsJQ = 0; param.IsJQ = 0;
if ($("#chk_accurate").is(":checked") == true) if ($("#chk_accurate").is(":checked") == true)
param.IsJQ = 1; param.IsJQ = 1;
@ -1546,7 +1579,7 @@
param.PageSize = datagrid1.Get_PageSize(); param.PageSize = datagrid1.Get_PageSize();
param.PageIndex = datagrid1.Get_PageIndex(); param.PageIndex = datagrid1.Get_PageIndex();
param.platid = $("#select_plat").val(); param.platid = $("#select_plat").val();
param.Sort = "a.GoodsHJNum2 desc"; //datagrid1.SortExpression +" "+ datagrid1.ViewSortDirection; param.Sort = "a.GoodsHJNum2 desc"; //datagrid1.SortExpression +" "+ datagrid1.ViewSortDirection;
if (sortname != "") if (sortname != "")
param.Sort = sortname; param.Sort = sortname;
@ -1564,7 +1597,7 @@
}); });
if (iscp == 1) { if (iscp == 1) {
$("select[stype]").attr("disabled","disabled"); $("select[stype]").attr("disabled", "disabled");
} }
$("select[khtype]").each(function () { $("select[khtype]").each(function () {
console.log($(this)); console.log($(this));
@ -1707,10 +1740,10 @@
} }
function GetBFModel() { function GetBFModel() {
var param = new Object(); var param = new Object();
param.detailid = DDId; param.detailid = DDId;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/GetGoodsModelForBF", url: "../HuoWuServiceNew.asmx/GetGoodsModelForBF",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
@ -1719,49 +1752,49 @@
if (data.d != null && data.d.BHNum1 != null) if (data.d != null && data.d.BHNum1 != null)
$("#txt_ebf").val(data.d.BHNum1); $("#txt_ebf").val(data.d.BHNum1);
else else
$("#txt_ebf").val(""); $("#txt_ebf").val("");
if (data.d != null && data.d.BHNum2 != null) if (data.d != null && data.d.BHNum2 != null)
$("#txt_wbf").val(data.d.BHNum2); $("#txt_wbf").val(data.d.BHNum2);
else else
$("#txt_wbf").val(""); $("#txt_wbf").val("");
} }
}); });
} }
function SaveIsSP(id,issp) { function SaveIsSP(id, issp) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.issp =issp; param.issp = issp;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_IsSp", url: "../HuoWuServiceNew.asmx/Save_IsSp",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
function Savebfnum1(id,num) { function Savebfnum1(id, num) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.num1 =num; param.num1 = num;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum1", url: "../HuoWuServiceNew.asmx/Save_BFNum1",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
@ -1770,85 +1803,114 @@
function Savebfnum2(id,num) { function Savebfnum2(id, num) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.num2 =num; param.num2 = num;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum2", url: "../HuoWuServiceNew.asmx/Save_BFNum2",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
function Savebfnum4(id,num) { function Savebfnum4(id, num) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.num3 =num; param.num3 = num;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum4", url: "../HuoWuServiceNew.asmx/Save_BFNum4",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
function Savebfnum3(id,JH_Date) { function Savebfnum3(id, JH_Date) {
var param = new Object(); var param = new Object();
param.detailid = id; param.detailid = id;
param.JH_Date =JH_Date; param.JH_Date = JH_Date;
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum3", url: "../HuoWuServiceNew.asmx/Save_BFNum3",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
function UpdateSalesType(id,SalesType) {
function Savebfnum4(id, ManuaPrice) {
var param = new Object(); var param = new Object();
param.detailid = id; 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({ $.ajax({
url: "../HuoWuServiceNew.asmx/UpdateSalesType", url: "../HuoWuServiceNew.asmx/UpdateSalesType",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
} }
}); });
} }
//更新商品是否纳入个人考核 //更新商品是否纳入个人考核
function UpdateIsExamine(goodsId,isExamine ) { function UpdateIsExamine(goodsId, isExamine) {
var param = new Object(); var param = new Object();
@ -1870,15 +1932,15 @@
function Savebfnum() { function Savebfnum() {
var param = new Object(); var param = new Object();
param.detailid = DDId; param.detailid = DDId;
param.num1 = 0; param.num1 = 0;
param.num2 = 0; param.num2 = 0;
if ($("#txt_ebf").val() != "") if ($("#txt_ebf").val() != "")
param.num1 = $("#txt_ebf").val(); param.num1 = $("#txt_ebf").val();
if ($("#txt_wbf").val() != "") if ($("#txt_wbf").val() != "")
param.num2 =$("#txt_wbf").val() ; param.num2 = $("#txt_wbf").val();
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Save_BFNum", url: "../HuoWuServiceNew.asmx/Save_BFNum",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), 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(); var param = new Object();
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/Clear_BFNum", url: "../HuoWuServiceNew.asmx/Clear_BFNum",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param), // data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
alert("已清空"); alert("已清空");
// ReadData(); // ReadData();
} }
}); });
} }
//#region 导出 //#region 导出
function ExportData(CK) { function ExportData(CK) {
// if ($("#txt_postion").val() == "" && $("#txt_goodsname").val() == "") { // if ($("#txt_postion").val() == "" && $("#txt_goodsname").val() == "") {
// alert("请至少输入一个查询条件"); // alert("请至少输入一个查询条件");
// return; // return;
// } // }
var param = new Object(); var param = new Object();
param.CK = CK; param.CK = CK;
var dd = new Date(); var dd = new Date();
var fname = "东仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; var fname = "东仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls";
if (CK == 1) if (CK == 1)
fname = "西仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls"; fname = "西仓备货数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls";
$.ajax({ $.ajax({
url: "../HuoWuServiceNew.asmx/GetList_GoodsBF", url: "../HuoWuServiceNew.asmx/GetList_GoodsBF",
data: Sys.Serialization.JavaScriptSerializer.serialize(param), data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false, async: false,
success: function (data) { success: function (data) {
if (data.d == "") { if (data.d == "") {
alert("没有备货数据"); alert("没有备货数据");
return; return;
} }
params = { FilePath: data.d, FileName: fname }; params = { FilePath: data.d, FileName: fname };
window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params); window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
} }
}); });
} }
@ -1964,7 +2026,7 @@
}); });
} }
//#endregion //#endregion
//#endregion //#endregion
//取消采购计划 //取消采购计划

Loading…
Cancel
Save