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 = "