|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_GoodsPlan.aspx.cs" Inherits="TradeManageNew.Huowu.HW_GoodsPlan" %>
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
<head>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
<title>货物信息</title>
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
|
|
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/DataGrid.js?a=35" type="text/javascript"></script>
|
|
|
<script src="../Scripts/DataPager.js?a=13" type="text/javascript"></script>
|
|
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts2/Global.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/FixTable.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/jquery.cookies.min.js" type="text/javascript"></script>
|
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css"
|
|
|
media="screen" />
|
|
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
|
|
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/LodopFuncs.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/JSLINQ.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/echarts.min.js" type="text/javascript"></script>
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
var did = 0;
|
|
|
var ggid = 0;
|
|
|
var iscg = 0;
|
|
|
var UserId = '<%= Session["UserId"].ToString() %>';
|
|
|
var _pageIndex = 1;
|
|
|
var _pageSize = 100;
|
|
|
$(document).ready(function () {
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
WindowLoadModel.Load();
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
var CurrentDate = new Date();
|
|
|
$("#txt_SDate").val(CurrentDate.localeFormat("yyyy-MM-01"));
|
|
|
$("#txt_EDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
var GoodsCode = $.url.param("GoodsCode");
|
|
|
if (GoodsCode == undefined) {
|
|
|
GoodsCode = "";
|
|
|
}
|
|
|
var PId = $.url.param("PId");
|
|
|
|
|
|
iscg = $.url.param("iscg");
|
|
|
if (iscg == undefined) {
|
|
|
iscg =0;
|
|
|
}
|
|
|
GetModel_UserDept();
|
|
|
$("#select_plat").val(PId);
|
|
|
ReadSortList();
|
|
|
ReadUser();
|
|
|
GetUserSelect();
|
|
|
$("#txt_goodsname").val(GoodsCode);
|
|
|
SaveGoodsPlan();
|
|
|
CreateDataGrid2();
|
|
|
GetShopList();
|
|
|
GetSelectShopList();
|
|
|
CreateDataGrid();
|
|
|
ReadData();
|
|
|
ReadSortList();
|
|
|
|
|
|
// 回车键按下触发
|
|
|
// $(document).live("click", function (e) {
|
|
|
|
|
|
// if($(e.target).closest("div[gid]").length == 0 && ggid>0){
|
|
|
// //点击id为menu之外且id不是不是open,则触发
|
|
|
// // alert(ggid);
|
|
|
// // SaveLeaveWord();
|
|
|
// }
|
|
|
//// if (ggid>0) {
|
|
|
//// SaveLeaveWord();
|
|
|
////}
|
|
|
// });
|
|
|
var time = null;
|
|
|
$("div[gggid]").live("click", function () {
|
|
|
clearTimeout(time);
|
|
|
ggid = $(this).attr("gggid");
|
|
|
|
|
|
time = setTimeout(function () {
|
|
|
|
|
|
$("textarea[ggid='" + ggid + "']").show();
|
|
|
$("a[ssid='" + ggid + "']").show();
|
|
|
},300);
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
var time_cg = null;
|
|
|
$("div[cgggid]").live("click", function () {
|
|
|
clearTimeout(time);
|
|
|
ggid = $(this).attr("cgggid");
|
|
|
|
|
|
time_cg = setTimeout(function () {
|
|
|
|
|
|
$("textarea[cggid='" + ggid + "']").show();
|
|
|
$("a[cssid='" + ggid + "']").show();
|
|
|
},300);
|
|
|
|
|
|
|
|
|
});
|
|
|
$("a[ggggid]").live("click", function () {
|
|
|
var sid = $(this).attr("ggggid");
|
|
|
ggid =sid;
|
|
|
UpdateLeaveWord(sid,1);
|
|
|
});
|
|
|
$("a[ssid]").live("click", function () {
|
|
|
ggid= $(this).attr("ssid");
|
|
|
SaveLeaveWord(1);
|
|
|
});
|
|
|
$("div[gid]").live("dblclick", function () {
|
|
|
clearTimeout(time);
|
|
|
ggid = $(this).attr("gid");
|
|
|
fopen3();
|
|
|
GetLeaveWord(1);
|
|
|
});
|
|
|
|
|
|
$("a[cggggid]").live("click", function () {
|
|
|
var csid = $(this).attr("cggggid");
|
|
|
ggid =csid;
|
|
|
UpdateLeaveWord(csid,2);
|
|
|
});
|
|
|
$("a[cssid]").live("click", function () {
|
|
|
ggid= $(this).attr("cssid");
|
|
|
SaveLeaveWord(2);
|
|
|
});
|
|
|
$("div[cgid]").live("dblclick", function () {
|
|
|
clearTimeout(time_cg);
|
|
|
ggid = $(this).attr("cgid");
|
|
|
fopen3();
|
|
|
GetLeaveWord(2);
|
|
|
});
|
|
|
$("#select_plat").live("change", function () {
|
|
|
GetShopList();
|
|
|
CreateDataGrid();
|
|
|
ReadData();
|
|
|
|
|
|
});
|
|
|
$("#cmdAdd").click(function () {
|
|
|
Model = new Object();
|
|
|
Model.id = 0;
|
|
|
// ClearControlValue("MainTable"); //清空内容
|
|
|
//var CurrentDate = new Date();
|
|
|
//$("#txtInDate").val(CurrentDate.localeFormat("yyyy-MM-dd"));
|
|
|
|
|
|
$("#span_code").val();
|
|
|
ShowFancybox("test2");
|
|
|
});
|
|
|
$("select[tjgid]").live("change", function () {
|
|
|
var tjgid = $(this).attr("tjgid");
|
|
|
|
|
|
var muserid = $(this).val();
|
|
|
var mname = $(this).find("option:selected").text();
|
|
|
UpdateGoodsUser(tjgid, muserid,mname);
|
|
|
|
|
|
});
|
|
|
|
|
|
$("select[pgoodsid]").live("change", function () {
|
|
|
var gid = $(this).attr("pgoodsid");
|
|
|
var pcount = $(this).val();
|
|
|
var pzdate = $(this).attr("pzdate");
|
|
|
var selectObj = $(this);
|
|
|
|
|
|
var param = new Object();
|
|
|
param.goodsid = gid;
|
|
|
param.planCount = pcount;
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/UpdateGoodsPlanCount",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
//拍照日期不为空,并且方案数是0,1的显示红色,其余显示黑色
|
|
|
if (pzdate != null && pzdate != '' && pzdate != 'undefined' && pcount != '' && (pcount == 0 || pcount == 1)) {
|
|
|
selectObj.css("color", "red");
|
|
|
}
|
|
|
else {
|
|
|
selectObj.css("color", "black");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
$("select[edpgoodsid]").live("change", function () {
|
|
|
var gid = $(this).attr("edpgoodsid");
|
|
|
var pcount = $(this).val();
|
|
|
var pzdate = $(this).attr("pzdate");
|
|
|
var selectObj = $(this);
|
|
|
|
|
|
var param = new Object();
|
|
|
param.goodsid = gid;
|
|
|
param.edplanCount = pcount;
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/UpdateGoodsEditPlanCount",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
if (data.d.Code == 1) {
|
|
|
//拍照日期不为空,并且方案数是0,1的显示红色,其余显示黑色
|
|
|
if (pzdate != null && pzdate != '' && pzdate != 'undefined' && pcount != '' && (pcount == 0 || pcount == 1)) {
|
|
|
selectObj.css("color", "red");
|
|
|
}
|
|
|
else {
|
|
|
selectObj.css("color", "black");
|
|
|
}
|
|
|
} else {
|
|
|
alert("操作失败");
|
|
|
console.log("失败原因:" + data.d.Message);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
$("#" + datagrid1.TableID + " a[CommandName='dgbtnKC']").live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
var DId = model.Id;
|
|
|
$("#txt_OutDays2").val(model.OutDays2);
|
|
|
$("#txt_Price").val(model.Price);
|
|
|
$("#txt_Price2").val(model.Price2);
|
|
|
$("#txt_Num").val(model.Num);
|
|
|
$("#txt_Price3").val(model.Price3);
|
|
|
$("#txt_Num2").val(model.Num2);
|
|
|
$("#txt_Price4").val(model.Price4);
|
|
|
$("#txt_PlanInfo").val(model.PlanInfo);
|
|
|
$("#txt_AdviseInfo").val(model.AdviseInfo);
|
|
|
$("#txt_Remark").val(model.Remark);
|
|
|
fopen4();
|
|
|
Model= model;
|
|
|
var snames = model.ShopNames;
|
|
|
|
|
|
|
|
|
ReadShopList(snames);
|
|
|
});
|
|
|
|
|
|
$("#DataGrid1 [CommandName]").live("click", function () {
|
|
|
var CommandName = $(this).attr("CommandName");
|
|
|
var index = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
Model = datagrid1.Get_Model(index);
|
|
|
if (CommandName == "cmdSKU") {
|
|
|
|
|
|
$("#sp_code").html(Model.goodscode);
|
|
|
$("#txtJDDate").val("");
|
|
|
$("#txtPZDate").val("");
|
|
|
$("#txtTPDate").val("");
|
|
|
$("#txtSJDate").val("");
|
|
|
$("#txtYPDate").val("");
|
|
|
$("#txtRKDate").val("");
|
|
|
$("#txtBuyName").val("");
|
|
|
if (Model.JDDate != null) {
|
|
|
|
|
|
$("#txtJDDate").val(Model.JDDate.localeFormat("yyyy-MM-dd"));
|
|
|
}
|
|
|
if (Model.PZDate != null) {
|
|
|
|
|
|
$("#txtPZDate").val(Model.PZDate.localeFormat("yyyy-MM-dd"));
|
|
|
}
|
|
|
if (Model.TPDate != null) {
|
|
|
|
|
|
$("#txtTPDate").val(Model.TPDate.localeFormat("yyyy-MM-dd"));
|
|
|
}
|
|
|
if (Model.SJDate != null) {
|
|
|
|
|
|
$("#txtSJDate").val(Model.SJDate.localeFormat("yyyy-MM-dd"));
|
|
|
}
|
|
|
if (Model.YPDate != null) {
|
|
|
|
|
|
$("#txtYPDate").val(Model.YPDate.localeFormat("yyyy-MM-dd"));
|
|
|
}
|
|
|
if (Model.RKDate != null) {
|
|
|
|
|
|
$("#txtRKDate").val(Model.RKDate.localeFormat("yyyy-MM-dd"));
|
|
|
}
|
|
|
if (Model.BuyName != null) {
|
|
|
|
|
|
$("#txtBuyName").val(Model.BuyName);
|
|
|
}
|
|
|
|
|
|
ShowFancybox("test2");
|
|
|
}
|
|
|
if (CommandName == "cmdImg") {
|
|
|
|
|
|
//window.open("../HuoWu/HW_GoodsAddForTM.aspx?GoodsId=" + Model.id);
|
|
|
window.open("../HuoWu/HW_GoodsDetailList2.aspx?GoodsCode=" + Model.goodscode);
|
|
|
}
|
|
|
|
|
|
});
|
|
|
$("#txt_name").bind("input propertychange", function () {
|
|
|
GetUserList();
|
|
|
|
|
|
});
|
|
|
// $("span[hlink]").live("dblclick", function () {
|
|
|
// var url = $(this).attr("hlink");
|
|
|
// if (url != "") {
|
|
|
// window.open(url);
|
|
|
// }
|
|
|
// });
|
|
|
var timer = null;
|
|
|
$("span[gid]").live("click", function () { //单击事件
|
|
|
clearTimeout(timer);
|
|
|
gid = $(this).attr("gid");
|
|
|
|
|
|
sid = $(this).attr("spid");
|
|
|
platid = $(this).attr("sid");
|
|
|
sno = $(this).attr("sno");
|
|
|
name = $(this).attr("name");
|
|
|
timer = setTimeout(function () { //在单击事件中添加一个setTimeout()函数,设置单击事件触发的时间间隔
|
|
|
|
|
|
GetUserList();
|
|
|
|
|
|
GetShopList2();
|
|
|
ShowFancybox("test");
|
|
|
|
|
|
}, 300);
|
|
|
})
|
|
|
$("span[gid]").live("dblclick", function () { //双击事件
|
|
|
clearTimeout(timer); //在双击事件中,先清除前面click事件的时间处理
|
|
|
var url = $(this).attr("hlink");
|
|
|
if (url != "") {
|
|
|
window.open(url);
|
|
|
}
|
|
|
});
|
|
|
$("#btn_tj").bind("click", function () {
|
|
|
window.open("../tongji/Report46.aspx");
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$("#chk_isly,#chk_ycl,#che_xsbgl,#che_nokc").bind("click", function () {
|
|
|
_pageIndex = datagrid1.Get_PageIndex();
|
|
|
_pageSize = datagrid1.Get_PageSize();
|
|
|
|
|
|
CreateDataGrid();
|
|
|
ReadData();
|
|
|
});
|
|
|
$("#btn_sch").bind("click", function () {
|
|
|
GetWeek2();
|
|
|
CreateDataGrid();
|
|
|
|
|
|
ReadData();
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
function GetModel_UserDept() {
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetModel_UserDept",
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
|
|
|
if (data.d == 24)//采购部门
|
|
|
{
|
|
|
iscg = 1;
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function ReadUser() {
|
|
|
$("#select_name").append("<option value='0' selected>全部</option>");
|
|
|
if (UserId == 1 || UserId == 51 || UserId == 53 || UserId == 114 || iscg == 1 || UserId==225) {
|
|
|
//$("#select_name").append("<option value='0'>全部</option>");
|
|
|
$("#select_namenew").append("<option value='-1'>选择</option>");
|
|
|
if(iscg ==0)
|
|
|
$("#tr_1").show();
|
|
|
}
|
|
|
var param = new Object();
|
|
|
if (iscg == 1)
|
|
|
param.iscp = 0;
|
|
|
else
|
|
|
param.iscp = 1;
|
|
|
$.ajax({
|
|
|
url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup2",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async:false,
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
//$(data.d).each(function () {
|
|
|
// if (UserId == 1 || UserId == 51 || UserId == 53)
|
|
|
// $("#select_name,#select_namenew").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
|
|
|
// else
|
|
|
// if (UserId == this.UserId)
|
|
|
// $("#select_name,#select_namenew").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
|
|
|
|
|
|
//});
|
|
|
$(data.d).each(function () {
|
|
|
$("#select_name,#select_namenew").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
|
|
|
|
|
|
});
|
|
|
if (UserId != 1 && UserId != 51 && UserId != 53 && UserId != 114 && UserId!=225)
|
|
|
//$("#select_name,#select_namenew").val(UserId);
|
|
|
$("#select_namenew").val(UserId);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function UpdateGoodsUser(gid,muserid,mname) {
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
param.platid = $("#select_plat").val();
|
|
|
param.goodsid = gid;
|
|
|
param.userid =muserid;
|
|
|
param.name =mname;
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/UpdateGoodsMate",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#region 读取数据
|
|
|
function SaveGoodsPlan() {
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/SaveGoodsPlan",
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
var gid=0;
|
|
|
var sid = 0;
|
|
|
var sno = 0;
|
|
|
var name = "";
|
|
|
//#region 读取数据
|
|
|
function GetModel(id, wname, sku) {
|
|
|
var param = new Object();
|
|
|
|
|
|
param.id = id;
|
|
|
|
|
|
param.weekname = wname;
|
|
|
$("#txt_sku").val(sku);
|
|
|
$("#select_week").val(wname);
|
|
|
$("#txtnum").val("");
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetModel_ProductionDetail",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#txtnum").val(data.d.weeknum);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
//#region 读取数据
|
|
|
function GetModelData(mid) {
|
|
|
var param = new Object();
|
|
|
|
|
|
param.mid = mid;
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListProductionPlanDetail2",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
|
|
|
datagrid2.DataBind(data.d);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
function GetWeek() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#select_week").append("<option value='0'>-选择-</option>");
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetHW_WeekNameList",
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
if (data.d != null) {
|
|
|
$(data.d).each(function () {
|
|
|
if (this.IsNow == 1)
|
|
|
$("#select_sweek").append("<option value='" + this.WeekName + "' stime='" + this.SDate.localeFormat("yyyy-MM-dd") + "' etime='" + this.EDate.localeFormat("yyyy-MM-dd") + "' selected='selected'>" + this.WeekName + "</option>");
|
|
|
else
|
|
|
$("#select_sweek").append("<option value='" + this.WeekName + "' stime='" + this.SDate.localeFormat("yyyy-MM-dd") + "' etime='" + this.EDate.localeFormat("yyyy-MM-dd") + "'>" + this.WeekName + "</option>");
|
|
|
if (this.IsNow == 2)
|
|
|
$("#select_eweek").append("<option value='" + this.WeekName + "' stime='" + this.SDate.localeFormat("yyyy-MM-dd") + "' etime='" + this.EDate.localeFormat("yyyy-MM-dd") + "' selected='selected'>" + this.WeekName + "</option>");
|
|
|
else
|
|
|
$("#select_eweek").append("<option value='" + this.WeekName + "' stime='" + this.SDate.localeFormat("yyyy-MM-dd") + "' etime='" + this.EDate.localeFormat("yyyy-MM-dd") + "'>" + this.WeekName + "</option>");
|
|
|
$("#select_week").append("<option value='" + this.WeekName + "' stime='" + this.SDate.localeFormat("yyyy-MM-dd") + "' etime='" + this.EDate.localeFormat("yyyy-MM-dd") + "'>" + this.WeekName + "</option>");
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function GetWeek2() {
|
|
|
|
|
|
var param = new Object();
|
|
|
param.SDate = $("#select_sweek").find("option:selected").attr("stime");
|
|
|
param.EDate = $("#select_eweek").find("option:selected").attr("stime");
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetHW_WeekNameList2",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
wlist = data.d;
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function fopen4() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#test4',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function fopen3() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#test3',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function fopen() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#test',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
var wlist = null;
|
|
|
//#region 初始化DataGrid
|
|
|
function CreateDataGrid() {
|
|
|
Array.clear(datagrid1.Columns);
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "图片";
|
|
|
col.CellTemplate = "<a CommandName='cmdImg' class='linka'><img src='{Bind imgurl}' alt='' width='50px' height='50px'/></a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "编号sku";
|
|
|
col.CellTemplate = "<a style='cursor:pointer;color:blue' CommandName='cmdSKU'>{Bind goodscode}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "平台";
|
|
|
col.CellTemplate = "<a class='platname'></a>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
if (iscg == 0) {
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "人员";
|
|
|
col.CellTemplate = "<select tjgid='{Bind id}' muid='{Bind MUserId}' ><option value='-1'></option>" + uselecthtml + "</select>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
}
|
|
|
else {
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "人员";
|
|
|
col.CellTemplate = "<span>{Bind mname}</span>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
}
|
|
|
if (UserId == 1 || iscg == 0) {
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "销售留言";
|
|
|
col.Width = "200px"
|
|
|
col.CellTemplate = "<div style='cursor:pointer;' title='单击留言' gid='{Bind id}'><div gggid='{Bind id}' style='font-size:13px;'>  {Bind Leaveword}</div><a ggggid='{Bind id}' style='cursor:pointer;color:blue'>{Bind readname}</a><textarea cols='20' name='S1' rows='2' style='display:none' ggid='{Bind id}'></textarea><br/><a ssid='{Bind id}' style='cursor:pointer;color:blue;display:none'>提交</a></div>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
}
|
|
|
if (UserId == 1 || iscg == 1) {
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "采购留言";
|
|
|
col.Width = "200px"
|
|
|
col.CellTemplate = "<div style='cursor:pointer;' title='单击留言' cgid='{Bind id}'><div cgggid='{Bind id}' style='font-size:13px;'>  {Bind Leaveword_cg}</div><a cggggid='{Bind id}' style='cursor:pointer;color:blue'>{Bind readname_cg}</a><textarea cols='20' name='S1' rows='2' style='display:none' cggid='{Bind id}'></textarea><br/><a cssid='{Bind id}' style='cursor:pointer;color:blue;display:none'>提交</a></div>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
}
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "店铺";
|
|
|
//col.CellTemplate = "<div><a style='color:Red;margin-left:5px;'>Lucky Tree</a>,<a target='_blank' href='https://www.amazon.com/dp/B0C6QDXCLW?ref=myi_title_dp' style='color:green;margin-left:5px;'>Luckymore</a>,<a style='color:green;margin-left:5px;'>DP</a></div>";
|
|
|
col.CellTemplate ="<div>{Bind GoodMustShop}</div>"
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "建议采购数量";
|
|
|
col.CellTemplate = "<a>{Bind JYCGNum}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "W仓剩余";
|
|
|
col.CellTemplate = "<a>{Bind StockAndOnloadNumW}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "E仓剩余";
|
|
|
col.CellTemplate = "<a>{Bind StockAndOnloadNumE}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "生产中";
|
|
|
col.CellTemplate = "<a>{Bind GoodsInNum}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "完成数";
|
|
|
col.CellTemplate = "<a>{Bind BHNum3}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "留言统计期销量";
|
|
|
col.CellTemplate = "<span>{Bind OrderNum}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "最近10|20|30天销量";
|
|
|
col.CellTemplate = "<span CommandName='cmdXL' title='点击查看最近销量趋势'>{Bind GoodsHJNum4}</span>|<span CommandName='cmdXL' title='点击查看最近销量趋势'>{Bind GoodsHJNum3}</span>|<span CommandName='cmdXL' title='点击查看最近销量趋势'>{Bind GoodsHJNum2}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
if ($("#chk_ycl").is(":checked") == false) {
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "最长出单周期(天)";
|
|
|
//col.CellTemplate = "<span>{Bind OutDays2}</span>";
|
|
|
//// col.SortExpression = "b.GoodsInNum";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "前期定价$";
|
|
|
col.CellTemplate = "<span>{Bind Price}</span>";
|
|
|
// col.SortExpression = "InPrice";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "稳定定价";
|
|
|
col.CellTemplate = "<span>{Bind Price2}</span>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "第一名销量";
|
|
|
col.CellTemplate = "<span>{Bind Num}</span>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "定价$";
|
|
|
col.CellTemplate = "<span>{Bind Price3}</span>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "目标销量";
|
|
|
//col.CellTemplate = "<span>{Bind Num2}</span>";
|
|
|
//// col.SortExpression = "b.GoodsInNum";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "定价$";
|
|
|
//col.CellTemplate = "<span>{Bind Price4}</span>";
|
|
|
|
|
|
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "重推店铺";
|
|
|
//col.CellTemplate = "<div>{Bind ShopNames}</div>";
|
|
|
//col.Width = "150px";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "计划";
|
|
|
//col.CellTemplate = "<div>{Bind PlanInfo}</div>";
|
|
|
//col.Width = "250px";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "要求";
|
|
|
col.CellTemplate = "<div>{Bind AdviseInfo}</div>";
|
|
|
col.Width = "150px";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "备注";
|
|
|
col.CellTemplate = "<div>{Bind Remark}</div>";
|
|
|
col.Width = "150px";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "周销量 | 金额";
|
|
|
//col.CellTemplate = "<span>{Bind GoodsWeekHJNum}|{Bind GoodsWeekHJPrice}</span>";
|
|
|
//// col.SortExpression = "b.GoodsInNum";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "月销量|金额";
|
|
|
//col.CellTemplate = "<span>{Bind GoodsHJNum2}|{Bind GoodsMonthHJPrice}</span>";
|
|
|
//// col.SortExpression = "b.GoodsInNum";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "未出单天数(天)";
|
|
|
col.CellTemplate = "<span style='color:{Bind NoOutDaysColor};' GNum='{Bind NoOutDays}' SNum='{Bind OutDays2}'>{Bind NoOutDays}</span>";
|
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
|
col.HeaderText = "操作";
|
|
|
col.Width = "80px";
|
|
|
col.CellTemplate = "<a CommandName='dgbtnKC' style='color: #23527c;cursor:pointer'>填写</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
}
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "建档时间";
|
|
|
col.CellTemplate = "<span CommandName='cmdSKU' jdsj='{Bind id}'>{Bind JDDate,yyyy-MM-dd}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "样品收到时间";
|
|
|
col.CellTemplate = "<span CommandName='cmdSKU' ypsj='{Bind id}'>{Bind YPDate,yyyy-MM-dd}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "编辑方案数";
|
|
|
col.CellTemplate = "<select edpgoodsid='{Bind id}' edplancount='{Bind EditPlanCount}' pzdate='{Bind PZDate}' ><option value=''></option><option value='0'>0</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option></select>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "拍照日期";
|
|
|
col.CellTemplate = "<span CommandName='cmdSKU' pzsj='{Bind id}'>{Bind PZDate,yyyy-MM-dd}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "图片日期";
|
|
|
col.CellTemplate = "<span CommandName='cmdSKU' tpsj='{Bind id}'>{Bind TPDate,yyyy-MM-dd}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "上架日期";
|
|
|
//col.CellTemplate = "<span CommandName='cmdSKU' sjsj='{Bind id}'>{Bind SJDate,yyyy-MM-dd}</span>";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "方案数";
|
|
|
col.CellTemplate = "<select pgoodsid='{Bind id}' plancount='{Bind PlanCount}' pzdate='{Bind PZDate}' ><option value=''></option><option value='0'>0</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option></select>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "采购人员";
|
|
|
col.CellTemplate = "<span CommandName='cmdSKU' cgry='{Bind id}'>{Bind BuyName}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "出运日期";
|
|
|
col.CellTemplate = "<span CommandName='cmdSKU' cysj='{Bind id}'>{Bind Date1,yyyy-MM-dd}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "入库时间";
|
|
|
col.CellTemplate = "<span CommandName='cmdSKU' rksj='{Bind id}'>{Bind RKDate,yyyy-MM-dd}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
$(shoplist).each(function (i) {
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = this.ShopName;
|
|
|
//col.CellTemplate = "<span gid='{Bind id}' sid='" + this.ShopId + "' sno='" + this.ShopNo + "' spid='0' hlink='' name='' style='cursor:pointer;color:red'>未分配</span><span sgid='{Bind id}' ssid='" + this.ShopId + "' ssno='" + this.ShopNo + "'sspid='0' style='cursor:pointer;color:#000000'></span><span ssgid='{Bind id}' sssid='" + this.ShopId + "' sssno='" + this.ShopNo + "'ssspid='0' style='cursor:pointer;color:#000000'></span>";
|
|
|
var ii = i + 1;
|
|
|
var colname = "ShopName" + ii;
|
|
|
var colurl = "ShopUrl" + ii;
|
|
|
col.CellTemplate = "<a href='{Bind "+colurl+"}' target='_blank' style='cursor:pointer;text-decoration: underline;'>{Bind "+colname+"}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
if ($("#select_plat").val() == 2) {
|
|
|
//去除昨日广告,改为上周广告费用总和,并加一列排名列
|
|
|
// col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText ="昨日广告";
|
|
|
//var colname2 = "PreDayFee" + ii;
|
|
|
//col.CellTemplate = "<a>{Bind "+colname2+"}</a>";
|
|
|
// Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "上周广告";
|
|
|
var colname5 = "LastWeekFee" + ii;
|
|
|
var colname55 = "Last2DayAdfee" + ii;
|
|
|
col.CellTemplate = "<a>{Bind " + colname5 + "}/{Bind " + colname55 + "}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "小/大类排名";
|
|
|
var colname6 = "SmallAndBigRank" + ii;
|
|
|
col.CellTemplate = "<a>{Bind " + colname6 + "}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
if (UserId == 1) {
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "上周纯利";
|
|
|
var colname3 = "WeekLR" + ii;
|
|
|
col.CellTemplate = "<a>{Bind " + colname3 + "}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
}
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText ="建议下周投入";
|
|
|
var colname4 = "NextFee" + ii;
|
|
|
var colname5= "NextFeeType" + ii;
|
|
|
col.CellTemplate = "<a ftype='{Bind "+colname5+"}'>{Bind "+colname4+"}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "昨日曝光量";
|
|
|
//var colname6 = "Impressions" + ii;
|
|
|
//col.CellTemplate = "<a>{Bind " + colname6 + "}</a>";
|
|
|
//Array.add(datagrid1.Columns, col);
|
|
|
if ($("#che_xsbgl").prop("checked")) {
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "曝光量";
|
|
|
col.CellTemplate = "<div class='chart-cell-" + ii + "' style='width:200px;' bglid={Bind id}></div>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
}
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "上架日期";
|
|
|
var colname7 = "UpFirstDay" + ii;
|
|
|
col.CellTemplate = "<a>{Bind " + colname7 + "}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "操作";
|
|
|
col.Width = "100px";
|
|
|
col.CellTemplate = "<span onclick='DelCol(this)' style='color: #0000FF;cursor:pointer;text-decoration: underline;' xid='{Bind id}' isend='{Bind IsEnd}' >{Bind EndName}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
datagrid1.SetPageSize(_pageSize);
|
|
|
datagrid1.SetPageIndex(_pageIndex);
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
datagrid1.AllowPaging = true;
|
|
|
datagrid1.IsFixHeader = true;
|
|
|
datagrid1.Height = $(document).height() - 230;
|
|
|
datagrid1.IsHoverColor = true;
|
|
|
//datagrid1.FixLeftColumns = 9;
|
|
|
datagrid1.Width ="100%";
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.CheckBox;
|
|
|
datagrid1.Init();
|
|
|
datagrid1.add_PageIndexChanged(function () {
|
|
|
|
|
|
ReadData();
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function CreateDataGrid2() {
|
|
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "周次";
|
|
|
col.CellTemplate = "<span>{Bind weekname}</span>";
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "生产中数量";
|
|
|
col.CellTemplate = "<span>{Bind weeknum}</span>";
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
datagrid2.SetPageSize(20);
|
|
|
datagrid2.SetPageIndex(1);
|
|
|
datagrid2.IsFixHeader = false;
|
|
|
datagrid2.ShowIndexColumn = false;
|
|
|
datagrid2.AllowPaging = false;
|
|
|
datagrid2.Width = "100%";
|
|
|
datagrid2.SelectMode = nblf.ui.SelectMode.None;
|
|
|
datagrid2.Init();
|
|
|
// datagrid2.add_PageIndexChanged(function () { ReadData(); });
|
|
|
|
|
|
}
|
|
|
|
|
|
//#endregion
|
|
|
var shoplist = null;
|
|
|
function GetShopList() {
|
|
|
var param = new Object();
|
|
|
param.platid = $("#select_plat").val();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsShopNew2",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
|
|
|
shoplist = data.d;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function GetShopList22() {
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsShop22",
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
|
|
|
shoplist = data.d;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
var uselecthtml="";
|
|
|
function GetUserSelect() {
|
|
|
uselecthtml = "";
|
|
|
if (UserId != 1 && UserId != 51 && UserId != 53 && UserId != 114 && UserId!=225) {
|
|
|
//uselecthtml += "<option value='" + $("#select_name").val() + "'>" + $("#select_name").find("option:selected").text() + "</option>";
|
|
|
|
|
|
var param = new Object();
|
|
|
if (iscg == 1)
|
|
|
param.iscp = 0;
|
|
|
else
|
|
|
param.iscp = 1;
|
|
|
$.ajax({
|
|
|
url: "../SysManageServiceNew.asmx/GetListUserInfoFromGroup2",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
$(data.d).each(function () {
|
|
|
uselecthtml += "<option value='" + this.UserId + "'>" + this.Name + "</option>";
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListUserSelect",
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
// uselecthtml = "<select tjgid='{Bind GoodsId}' muid='{Bind MUserId}' ><option value='-1'></option>";
|
|
|
$(data.d).each(function () {
|
|
|
if (UserId == 1 || UserId == 51 || UserId == 53 || UserId == 114 || UserId==225)
|
|
|
uselecthtml += "<option value='" + this.UserId + "'>" + this.Name + "</option>";
|
|
|
else if ($("#select_name").val() != "0" && parseInt($("#select_name").val()) == this.UserId)
|
|
|
uselecthtml += "<option value='" + this.UserId + "'>" + this.Name + "</option>";
|
|
|
else if (UserId == this.UserId)
|
|
|
uselecthtml += "<option value='" + this.UserId + "'>" + this.Name + "</option>";
|
|
|
|
|
|
});
|
|
|
// uselecthtml += "</select >";
|
|
|
// alert(uselecthtml);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
var ulist = null;
|
|
|
function GetUserList() {
|
|
|
$("#select_user").empty();
|
|
|
var param = new Object();
|
|
|
param.name = $("#txt_name").val();
|
|
|
$("#select_user").append("<option value='0'>未分配</option>");
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsUserInfo",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
if (this.Name == name)
|
|
|
$("#select_user").append("<option value='" + this.UserId + "' selected='selected'>" + this.Name + "</option>");
|
|
|
else if (UserId == 1 || UserId == 51 || UserId == 53 || UserId == 114 || UserId==225)
|
|
|
$("#select_user").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
var platid = 0;
|
|
|
function GetShopList2() {
|
|
|
|
|
|
$("#select_shop2").empty();
|
|
|
var param = new Object();
|
|
|
param.platid = platid;
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsShop",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
|
|
if (this.ShopId == sid)
|
|
|
$("#select_shop2").append("<option value='" + this.ShopId + "' selected='selected'>" + this.ShopName + "</option>");
|
|
|
else
|
|
|
$("#select_shop2").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#region 读取数据
|
|
|
function ReadData() {
|
|
|
if ($("#select_cd").val() != "-1") {
|
|
|
GetShopList22();
|
|
|
|
|
|
|
|
|
}
|
|
|
GetUserSelect();
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
//param.SortId = SortId;
|
|
|
|
|
|
CreateWhere("SelectHtml", param); //读取查询条件
|
|
|
if(SortId>0)
|
|
|
param.cs+=" and a.SortId="+SortId
|
|
|
param.cs = Base64.encode(param.cs);
|
|
|
param.name = $("#txt_uName").val();
|
|
|
param.IsFP = $("#select_fp").val();
|
|
|
param.IsLJ = $("#select_lj").val();
|
|
|
param.IsEnd = 0;
|
|
|
if ($("#chk_isend").is(":checked") == true)
|
|
|
param.IsEnd = 1;
|
|
|
|
|
|
param.isly = 0;
|
|
|
if ($("#chk_isly").is(":checked") == true)
|
|
|
param.isly = 1;
|
|
|
param.muserid = $("#select_name").val();
|
|
|
param.cdtj = $("#select_cd").val();
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
|
param.platid = $("#select_plat").val();
|
|
|
param.iscg = iscg;
|
|
|
param.lysdt = null;
|
|
|
if ($("#txt_LYSDate").val()!="")
|
|
|
param.lysdt = $("#txt_LYSDate").val();
|
|
|
param.lyedt = null;
|
|
|
if ($("#txt_LYEDate").val()!="")
|
|
|
param.lyedt = $("#txt_LYEDate").val();
|
|
|
|
|
|
param.lysdt2 = null;
|
|
|
if ($("#txt_LYSDate2").val()!="")
|
|
|
param.lysdt2 = $("#txt_LYSDate2").val();
|
|
|
param.lyedt2 = null;
|
|
|
if ($("#txt_LYEDate2").val()!="")
|
|
|
param.lyedt2 = $("#txt_LYEDate2").val();
|
|
|
|
|
|
param.lynr = $("#txt_lynr").val();
|
|
|
|
|
|
if ($("#che_nokc").is(":checked") == true)
|
|
|
param.iskc = 1;
|
|
|
else
|
|
|
param.iskc = 0;
|
|
|
param.fas = $("#select_fas").val();
|
|
|
param.shopId = $("#select_shop").val();
|
|
|
|
|
|
param.isShowAll = 0; //显示全部
|
|
|
if ($("#chk_xsall").is(":checked") == true)
|
|
|
param.isShowAll = 1;
|
|
|
param.isOnlyYC = 0; //只显示隐藏
|
|
|
if ($("#chk_xsyc").is(":checked") == true)
|
|
|
param.isOnlyYC = 1;
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsPlan",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
$(".platname").html($("#select_plat").find("option:selected").text());
|
|
|
$("select[muid]").each(function () {
|
|
|
var muid = $(this).attr("muid");
|
|
|
$(this).val(muid);
|
|
|
|
|
|
});
|
|
|
|
|
|
$("select[plancount]").each(function () {
|
|
|
var pcount = $(this).attr("plancount");
|
|
|
$(this).val(pcount);
|
|
|
var pzdate = $(this).attr("pzdate");
|
|
|
if (pzdate != null && pzdate != '' && pzdate != 'undefined' && pcount!='' && (pcount == 0 || pcount == 1)) {
|
|
|
$(this).css("color", "red");
|
|
|
}
|
|
|
else {
|
|
|
$(this).css("color", "black");
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$("select[edplancount]").each(function () {
|
|
|
var pcount = $(this).attr("edplancount");
|
|
|
$(this).val(pcount);
|
|
|
var pzdate = $(this).attr("pzdate");
|
|
|
if (pzdate != null && pzdate != '' && pzdate != 'undefined' && pcount != '' && (pcount == 0 || pcount == 1)) {
|
|
|
$(this).css("color", "red");
|
|
|
}
|
|
|
else {
|
|
|
$(this).css("color", "black");
|
|
|
}
|
|
|
});
|
|
|
|
|
|
if (UserId != 1) {
|
|
|
$("a[ggggid]").hide();
|
|
|
$("a[cggggid]").hide();
|
|
|
}
|
|
|
if (data.d.DataSource != null && data.d.DataSource.length > 0) {
|
|
|
//alert(data.d.DataSource[0].mids);
|
|
|
// ReadData2(data.d.DataSource[0].mids);
|
|
|
if ($("#che_xsbgl").prop("checked")) {
|
|
|
CreateTDsEchart(data.d.DataSource);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
$("a[ftype='1']").css("color", "blue");
|
|
|
$("a[ftype='1']").attr("title", "利润增加且acos>=15广告不变");
|
|
|
$("a[ftype='2']").css("color", "yellow");
|
|
|
$("a[ftype='2']").attr("title", "利润增加 acos<15原广告+利润20%");
|
|
|
$("a[ftype='3']").css("color", "green");
|
|
|
$("a[ftype='3']").attr("title", "利润减少 acos>=15原广告 80%");
|
|
|
$("a[ftype='4']").css("color", "#800000");
|
|
|
$("a[ftype='4']").attr("title", "利润减少 acos<15 广告不变");
|
|
|
$("a[ftype='5']").css("color", "red");
|
|
|
$("a[ftype='5']").attr("title", "利润负且acos>=15原广告的50%");
|
|
|
$("a[ftype='6']").css("color", "#008080");
|
|
|
$("a[ftype='6']").attr("title", "利润负 acos<15 原广告 70%");
|
|
|
$("a[ftype='7']").css("color", "#FF00FF");
|
|
|
$("a[ftype='7']").attr("title", "有利润且没广告的利润的20%");
|
|
|
$("a[ftype='8']").css("color", "blue");
|
|
|
$("a[ftype='8']").attr("title", "利润增加 acos>=15上周没投广告,利润30%");
|
|
|
$("span[isend=1]").css("color","red");
|
|
|
|
|
|
|
|
|
$("span[CommandName='cmdSKU']").each(function () {
|
|
|
if ($(this).html() == "")
|
|
|
$(this).html("无");
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 读取数据
|
|
|
function ReadData5(mids) {
|
|
|
var param = new Object();
|
|
|
|
|
|
param.mids = mids;
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsPlanUrl",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
$("span[gid='" + this.GoodsId + "'][spid='" + this.LinkId + "']").css("color","#009900");
|
|
|
$("span[gid='" + this.GoodsId + "'][spid='" + this.LinkId + "']").attr("hlink", this.LinkUrl);
|
|
|
});
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 读取数据
|
|
|
function ReadData2(mids) {
|
|
|
var param = new Object();
|
|
|
|
|
|
param.mids = mids;
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsPlanDetail",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
var no = 0;
|
|
|
var pid = 0;
|
|
|
var gid = 0;
|
|
|
$(data.d).each(function () {
|
|
|
if (this.PlatId != pid || this.GoodsId != gid)
|
|
|
no = 0;
|
|
|
no++;
|
|
|
pid = this.PlatId;
|
|
|
gid = this.GoodsId;
|
|
|
|
|
|
$("span[gid='" + this.GoodsId + "'][sid='" + this.PlatId + "'][sno='" + no + "']").css("color", "blue");
|
|
|
$("span[gid='" + this.GoodsId + "'][sid='" + this.PlatId + "'][sno='" + no + "']").attr("spid", this.ShopId);
|
|
|
$("span[sgid='" + this.GoodsId + "'][ssid='" + this.PlatId + "'][ssno='" + no + "']").attr("sspid", this.ShopId);
|
|
|
$("span[ssgid='" + this.GoodsId + "'][sssid='" + this.PlatId + "'][sssno='" + no + "']").attr("ssspid", this.ShopId);
|
|
|
$("span[gid='" + this.GoodsId + "'][sid='" + this.PlatId + "'][sno='" + no + "']").attr("name", this.Name);
|
|
|
$("span[gid='" + this.GoodsId + "'][sid='" + this.PlatId + "'][sno='" + no + "']").html(this.Name + "【" + this.ShopName + "】");
|
|
|
|
|
|
});
|
|
|
ReadData3(mids);
|
|
|
ReadData4(mids);
|
|
|
ReadData5(mids);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
//#region 读取数据
|
|
|
function ReadData3(mids) {
|
|
|
// var param = new Object();
|
|
|
// if ($("#txt_SDate").val() == "" || $("#txt_EDate").val() == "") {
|
|
|
// return;
|
|
|
// }
|
|
|
// param.SDate = $("#txt_SDate").val();
|
|
|
// param.EDate = $("#txt_EDate").val();
|
|
|
var param = new Object();
|
|
|
WindowLoadModel.Show();
|
|
|
param.mids = mids;
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsShopCount3",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
if (this.Num > 10) {
|
|
|
$("span[sgid='" + this.GoodsId + "'][sspid='" + this.ShopId + "']").css("color","#AA0000");
|
|
|
}
|
|
|
$("span[sgid='" + this.GoodsId + "'][sspid='" + this.ShopId + "']").html("【" + this.Num + "】");
|
|
|
});
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
//#region 读取数据
|
|
|
function ReadData4(mids) {
|
|
|
// var param = new Object();
|
|
|
// if ($("#txt_SDate").val() == "" || $("#txt_EDate").val() == "") {
|
|
|
// return;
|
|
|
// }
|
|
|
// param.SDate = $("#txt_SDate").val();
|
|
|
// param.EDate = $("#txt_EDate").val();
|
|
|
var param = new Object();
|
|
|
WindowLoadModel.Show();
|
|
|
param.mids = mids;
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsShopCount4",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
if (data.d != null) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
if (this.Num > 10) {
|
|
|
$("span[ssgid='" + this.GoodsId + "'][ssspid='" + this.ShopId + "']").css("color", "#AA0000");
|
|
|
}
|
|
|
$("span[ssgid='" + this.GoodsId + "'][ssspid='" + this.ShopId + "']").html("【" + this.Num + "】");
|
|
|
});
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 删除
|
|
|
function DelCol(obj) {
|
|
|
//if (window.confirm('确定要jies吗?') == false) return;
|
|
|
var rowindex = $(obj).parent().parent().attr("index");
|
|
|
var param = new Object();
|
|
|
var model = datagrid1.Get_Model(rowindex);
|
|
|
param.GoodsId = model.id;
|
|
|
if(model.IsEnd==1)
|
|
|
param.IsEnd = 0;
|
|
|
else
|
|
|
param.IsEnd = 1;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/UpdateIsEnd",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
alert("操作成功");
|
|
|
if (param.IsEnd == 1) {
|
|
|
datagrid1.DataSource[rowindex].IsEnd = 1;
|
|
|
|
|
|
if ($("#chk_isend").is(":checked") == false) {
|
|
|
|
|
|
//Array.removeAt(datagrid1.DataSource, rowindex);
|
|
|
$("tr[index=" + rowindex + "]").remove();
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
|
|
|
$("span[xid=" + model.id + "]").html("恢复");
|
|
|
$("span[xid=" + model.id + "]").css("color", "red");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
datagrid1.DataSource[rowindex].IsEnd = 0;
|
|
|
|
|
|
$("span[xid=" + model.id + "]").css("color", "blue");
|
|
|
$("span[xid=" + model.id + "]").html("结束");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
//#region 导出
|
|
|
function ExportData() {
|
|
|
// if ($("#txt_postion").val() == "" && $("#txt_goodsname").val()=="") {
|
|
|
// alert("请至少输入一个查询条件");
|
|
|
|
|
|
// return;
|
|
|
// }
|
|
|
var param = new Object();
|
|
|
//param.SortId = SortId;
|
|
|
param.PostionCode = $("#txt_postion").val();
|
|
|
param.GoodsName = $("#txt_goodsname").val();
|
|
|
param.StoreId = $("#select_ck").val();
|
|
|
var dd = new Date();
|
|
|
var fname = "盘库数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls";
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetList_GoodsLeftExcel",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
|
|
|
params = { FilePath: data.d, FileName: fname };
|
|
|
|
|
|
window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
//#region 显示弹出窗体
|
|
|
function ShowFancybox(id) {
|
|
|
$.fancybox({
|
|
|
'scrolling': 'no',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#' + id,
|
|
|
'onClosed': function () {
|
|
|
|
|
|
}
|
|
|
}, 0);
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
var Model = null;
|
|
|
//#region 保存
|
|
|
function Save() {
|
|
|
var param = new Object();
|
|
|
var md = new Object();
|
|
|
md.GoodsId = Model.id;
|
|
|
md.JDDate = $("#txtJDDate").val();
|
|
|
md.PZDate = $("#txtPZDate").val();
|
|
|
md.TPDate = $("#txtTPDate").val();
|
|
|
md.SJDate = $("#txtSJDate").val();
|
|
|
md.YPDate = $("#txtYPDate").val();
|
|
|
md.RKDate = $("#txtRKDate").val();
|
|
|
md.BuyName = $("#txtBuyName").val();
|
|
|
md.Date1 = $("#txtDate1").val();
|
|
|
if ($("#txtJDDate").val() != "") {
|
|
|
var str1 = $("#txtJDDate").val().replace(/-/g, '/'); // "2010/08/01";
|
|
|
var date1 = new Date(str1);
|
|
|
Model.JDDate = date1;
|
|
|
}
|
|
|
else
|
|
|
Model.JDDate = null;
|
|
|
if ($("#txtPZDate").val() != "") {
|
|
|
var str2 = $("#txtPZDate").val().replace(/-/g, '/'); // "2010/08/01";
|
|
|
var date2 = new Date(str2);
|
|
|
Model.PZDate = date2;
|
|
|
}
|
|
|
else
|
|
|
Model.PZDate = null;
|
|
|
if ($("#txtTPDate").val() != "") {
|
|
|
var str3 = $("#txtTPDate").val().replace(/-/g, '/'); // "2010/08/01";
|
|
|
var date3= new Date(str3);
|
|
|
Model.TPDate = date3;
|
|
|
}
|
|
|
else
|
|
|
Model.TPDate = null;
|
|
|
|
|
|
if ($("#txtSJDate").val() != "") {
|
|
|
var str4 = $("#txtSJDate").val().replace(/-/g, '/'); // "2010/08/01";
|
|
|
var date4 = new Date(str4);
|
|
|
Model.SJDate = date4;
|
|
|
}
|
|
|
else
|
|
|
Model.SJDate = null;
|
|
|
if ($("#txtYPDate").val() != "") {
|
|
|
var str5 = $("#txtYPDate").val().replace(/-/g, '/'); // "2010/08/01";
|
|
|
var date5 = new Date(str5);
|
|
|
Model.YPDate = date5;
|
|
|
}
|
|
|
else
|
|
|
Model.YPDate = null;
|
|
|
if ($("#txtRKDate").val() != "") {
|
|
|
var str6 = $("#txtRKDate").val().replace(/-/g, '/'); // "2010/08/01";
|
|
|
var date6 = new Date(str6);
|
|
|
Model.RKDate = date6;
|
|
|
}
|
|
|
else
|
|
|
Model.RKDate = null;
|
|
|
if ($("#txtDate1").val() != "") {
|
|
|
var str7 = $("#txtDate1").val().replace(/-/g, '/'); // "2010/08/01";
|
|
|
var date7= new Date(str7);
|
|
|
Model.Date1 = date7;
|
|
|
}
|
|
|
else
|
|
|
Model.Date1 = null;
|
|
|
Model.BuyName = $("#txtBuyName").val();
|
|
|
param.Model = md;
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/Save_GoodsExtra",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
// alert("保存成功");
|
|
|
if ($("#txtJDDate").val() != "")
|
|
|
$("span[jdsj=" + Model.id + "]").html($("#txtJDDate").val());
|
|
|
else
|
|
|
$("span[jdsj=" + Model.id + "]").html("");
|
|
|
if ($("#txtSJDate").val() != "")
|
|
|
$("span[sjsj=" + Model.id + "]").html($("#txtSJDate").val());
|
|
|
else
|
|
|
$("span[sjsj=" + Model.id + "]").html("");
|
|
|
if ($("#txtPZDate").val() != "")
|
|
|
$("span[pzsj=" + Model.id + "]").html($("#txtPZDate").val());
|
|
|
else
|
|
|
$("span[pzsj=" + Model.id + "]").html("");
|
|
|
if ($("#txtTPDate").val() != "")
|
|
|
$("span[tpsj=" + Model.id + "]").html($("#txtTPDate").val());
|
|
|
else
|
|
|
$("span[tpsj=" + Model.id + "]").html("");
|
|
|
if ($("#txtYPDate").val() != "")
|
|
|
$("span[ypsj=" + Model.id + "]").html($("#txtYPDate").val());
|
|
|
else
|
|
|
$("span[ypsj=" + Model.id + "]").html("");
|
|
|
if ($("#txtRKDate").val() != "")
|
|
|
$("span[rksj=" + Model.id + "]").html($("#txtRKDate").val());
|
|
|
else
|
|
|
$("span[rksj=" + Model.id + "]").html("");
|
|
|
if ($("#txtDate1").val() != "")
|
|
|
$("span[cysj=" + Model.id + "]").html($("#txtDate1").val());
|
|
|
else
|
|
|
$("span[rksj=" + Model.id + "]").html("");
|
|
|
if ($("#txtBuyName").val() != "")
|
|
|
$("span[cgry=" + Model.id + "]").html($("#txtBuyName").val());
|
|
|
else
|
|
|
$("span[cgry=" + Model.id + "]").html("");
|
|
|
$("span[CommandName='cmdSKU']").each(function () {
|
|
|
if ($(this).html() == "")
|
|
|
$(this).html("无");
|
|
|
});
|
|
|
$.fancybox.close();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
//#region 保存
|
|
|
function SaveGoodsUserChange() {
|
|
|
var list = datagrid1.GetSelectListModel();
|
|
|
if (list == null || $(list).length == 0) {
|
|
|
alert("请选择要变更的货号");
|
|
|
return;
|
|
|
}
|
|
|
if ($("#select_namenew").val() == "-1")
|
|
|
{
|
|
|
alert("请选择要变更的人员");
|
|
|
return;
|
|
|
}
|
|
|
var param = new Object();
|
|
|
|
|
|
param.list =list;
|
|
|
param.userid = $("#select_namenew").val();
|
|
|
param.name = $("#select_namenew").find("option:selected").text();
|
|
|
param.platid = $("#select_plat").val();
|
|
|
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/UpdateGoodsMateFromGoodids",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
ReadData();
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
//#region 保存
|
|
|
function SaveGoodsUser() {
|
|
|
var param = new Object();
|
|
|
var md = new Object();
|
|
|
md.GoodsId = gid;
|
|
|
md.ShopId = $("#select_shop2").val();
|
|
|
md.UserId = $("#select_user").val();
|
|
|
|
|
|
param.Model = md;
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/Save_GoodsUser",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
//alert("保存成功");
|
|
|
|
|
|
|
|
|
if ($("#select_user").val() == "0") {
|
|
|
$("span[gid=" + gid + "][sid=" + platid + "][sno=" + sno + "]").html("未分配");
|
|
|
$("span[gid=" + gid + "][sid=" + platid + "][sno=" + sno + "]").css("color", "red");
|
|
|
}
|
|
|
else {
|
|
|
$("span[gid=" + gid + "][sid=" + platid + "][sno=" + sno + "]").html($("#select_user").find("option:selected").text() + "【" + $("#select_shop2").find("option:selected").text() + "】");
|
|
|
$("span[gid=" + gid + "][sid=" + platid + "][sno=" + sno + "]").css("color", "blue");
|
|
|
$("span[gid=" + gid + "][sid=" + platid + "][sno='" + sno + "']").attr("spid", $("#select_shop2").val());
|
|
|
$("span[sgid=" + gid + "][ssid=" + platid + "][ssno='" + sno + "']").attr("sspid", $("#select_shop2").val());
|
|
|
}
|
|
|
|
|
|
|
|
|
$.fancybox.close();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
//#region 保存
|
|
|
function UpdateLeaveWord(sid,leavetype) {
|
|
|
var param = new Object();
|
|
|
var md = new Object();
|
|
|
md.id = -1;
|
|
|
md.goodsid = sid;
|
|
|
md.leavetype = leavetype;
|
|
|
md.platid = $("#select_plat").val();
|
|
|
param.Model = md;
|
|
|
// WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/Save_GoodsLeaveWord",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
//WindowLoadModel.Hide();
|
|
|
if (leavetype == 1) {
|
|
|
$("div[gggid='" + sid + "']").html("  ");
|
|
|
$("a[ggggid='" + sid + "']").hide();
|
|
|
}
|
|
|
else if (leavetype == 2) {
|
|
|
$("div[cgggid='" + sid + "']").html("  ");
|
|
|
$("a[cggggid='" + sid + "']").hide();
|
|
|
|
|
|
}
|
|
|
alert("已标记阅读");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 保存
|
|
|
function SaveLeaveWord(leavetype) {
|
|
|
var lw = "";
|
|
|
if (leavetype == 1) {
|
|
|
if ($("textarea[ggid='" + ggid + "']").val() == "") {
|
|
|
|
|
|
ggid = 0;
|
|
|
$("textarea[ggid='" + ggid + "']").hide();
|
|
|
alert("留言不能为空");
|
|
|
return;
|
|
|
}
|
|
|
lw = $("textarea[ggid='" + ggid + "']").val();
|
|
|
}
|
|
|
else if (leavetype ==2) {
|
|
|
if ($("textarea[cggid='" + ggid + "']").val() == "") {
|
|
|
|
|
|
ggid = 0;
|
|
|
$("textarea[cggid='" + ggid + "']").hide();
|
|
|
alert("留言不能为空");
|
|
|
return;
|
|
|
}
|
|
|
lw = $("textarea[cggid='" + ggid + "']").val();
|
|
|
}
|
|
|
var param = new Object();
|
|
|
var md = new Object();
|
|
|
|
|
|
md.id = 0;
|
|
|
md.leavetype = leavetype;
|
|
|
md.platid = $("#select_plat").val();
|
|
|
md.goodsid = ggid;
|
|
|
md.leaveword =lw;
|
|
|
|
|
|
param.Model = md;
|
|
|
// WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/Save_GoodsLeaveWord",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
// WindowLoadModel.Hide();
|
|
|
if (leavetype == 1) {
|
|
|
$("div[gggid='" + ggid + "']").html(data.d);
|
|
|
$("textarea[ggid='" + ggid + "']").hide();
|
|
|
$("a[ssid='" + ggid + "']").hide();
|
|
|
$("textarea[ggid='" + ggid + "']").val("");
|
|
|
}
|
|
|
else if (leavetype == 2) {
|
|
|
$("div[cgggid='" + ggid + "']").html(data.d);
|
|
|
$("textarea[cggid='" + ggid + "']").hide();
|
|
|
$("a[cssid='" + ggid + "']").hide();
|
|
|
$("textarea[cggid='" + ggid + "']").val("");
|
|
|
}
|
|
|
|
|
|
ggid = 0;
|
|
|
//alert("保存成功");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
//#region 保存
|
|
|
function GetLeaveWord(leavetype) {
|
|
|
|
|
|
var param = new Object();
|
|
|
$("#div_mess").empty();
|
|
|
param.leavetype = leavetype;
|
|
|
param.goodsid = ggid;
|
|
|
param.platid= $("#select_plat").val();
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetListGoodsLeaveWord",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
$(data.d).each(function (i) {
|
|
|
var dd = this.indate.localeFormat("MM-dd");
|
|
|
if (i % 2 == 0) {
|
|
|
$("#div_mess").append('<div style = "text-align:left" ><font color="blue">'+this.inname+'['+dd+']:</font><font color="gray">'+this.leaveword+'</font></div ><br />');
|
|
|
}
|
|
|
else {
|
|
|
$("#div_mess").append('<div style="text-align:right"> <font color="gray">'+this.leaveword+'</font><font color="green"> :'+this.inname+'['+dd+']</font></div><br />');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 读取分类
|
|
|
|
|
|
var ListSort = null;
|
|
|
|
|
|
function ReadSortList() {
|
|
|
|
|
|
|
|
|
ListSort = new Array();
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetGoodsSortListNew",
|
|
|
//data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: true,
|
|
|
success: function (data) {
|
|
|
ListSort = data.d;
|
|
|
|
|
|
BindTreeView();
|
|
|
|
|
|
ReadSortTree();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 绑定
|
|
|
|
|
|
var TreeSource;
|
|
|
function BindTreeView() {
|
|
|
TreeSource = new Array();
|
|
|
// Treehtml = new Sys.StringBuilder();
|
|
|
var Sortslist = GetListSort(null);
|
|
|
$(Sortslist).each(function () {
|
|
|
|
|
|
var childNode = new Array();
|
|
|
var model = new Array();
|
|
|
model.id = this.SortId;
|
|
|
model.text = this.SortName;
|
|
|
model.state = "closed";
|
|
|
model.checked = false;
|
|
|
model.iconCls = ".icon-addfolder";
|
|
|
model.children = childNode;
|
|
|
|
|
|
Array.add(TreeSource, model);
|
|
|
|
|
|
BindTreeChildNode(model.children, this.SortId);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 绑定
|
|
|
|
|
|
function BindTreeChildNode(PrevNode, ParentItemId) {
|
|
|
|
|
|
var Sortslist = GetListSort(ParentItemId);
|
|
|
|
|
|
$(Sortslist).each(function () {
|
|
|
var atr = new Object();
|
|
|
var childNode = new Array();
|
|
|
var model = new Array();
|
|
|
model.id = this.SortId;
|
|
|
model.text = this.SortName;
|
|
|
|
|
|
model.iconCls = "icon-Tree";
|
|
|
model.state = "closed";
|
|
|
model.checked = false;
|
|
|
|
|
|
model.children = childNode;
|
|
|
|
|
|
Array.add(PrevNode, model);
|
|
|
|
|
|
BindTreeChildNode(model.children, this.SortId);
|
|
|
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 返回指定级菜单
|
|
|
function GetListSort(ParentItemId) {
|
|
|
var Sortslist = new Array();
|
|
|
$(ListSort).each(function () {
|
|
|
if (this.ParentId == ParentItemId) {
|
|
|
var model = new Object();
|
|
|
model.SortId = this.SortId;
|
|
|
model.ParentId = this.ParentId;
|
|
|
model.SortName = this.SortName;
|
|
|
|
|
|
Array.add(Sortslist, model);
|
|
|
}
|
|
|
});
|
|
|
return Sortslist;
|
|
|
}
|
|
|
//#endregion
|
|
|
var SortName = "";
|
|
|
var SortId = 0;
|
|
|
function ReadSortTree() {
|
|
|
|
|
|
var model = new Array();
|
|
|
model.id = 0;
|
|
|
model.text = "-全部-";
|
|
|
model.state = "closed";
|
|
|
model.checked = false;
|
|
|
model.iconCls = ".icon-addfolder";
|
|
|
model.children = null;
|
|
|
|
|
|
Array.insert(TreeSource, 0, model);
|
|
|
$("#txtSortId").combotree({
|
|
|
data: TreeSource,
|
|
|
onSelect: function (node) {
|
|
|
// var node = $("#txtSortId").tree("getSelected");
|
|
|
|
|
|
SortId = node.id;
|
|
|
if (node.children.length > 0) {
|
|
|
SortName = node.text;
|
|
|
SortId = 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
function ReadShopList(ShopNames) {
|
|
|
$("#div_shopnames").empty();
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
|
param.ShopNames = ShopNames;
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetZTShopList",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: true,
|
|
|
success: function (data) {
|
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
if (this.IsCheck == true)
|
|
|
$("#div_shopnames").append("<input spid='" + this.ShopId + "' sname='" + this.ShopName + "' type='checkbox' checked='checked'/>"+this.ShopName);
|
|
|
else
|
|
|
$("#div_shopnames").append("<input spid='"+this.ShopId+"' sname='" + this.ShopName + "' type='checkbox' />"+this.ShopName);
|
|
|
});
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function Save2() {
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
var md = new Object();
|
|
|
md.GoodsId = Model.id;
|
|
|
md.Id = 0;
|
|
|
if( $("#txt_OutDays2").val()!="")
|
|
|
md.OutDays2 = $("#txt_OutDays2").val();
|
|
|
if( $("#txt_Price").val()!="")
|
|
|
md.Price = $("#txt_Price").val();
|
|
|
if( $("#txt_Price2").val()!="")
|
|
|
md.Price2 = $("#txt_Price2").val();
|
|
|
if( $("#txt_Price3").val()!="")
|
|
|
md.Price3 = $("#txt_Price3").val();
|
|
|
if( $("#txt_Price4").val()!="")
|
|
|
md.Price4 = $("#txt_Price4").val();
|
|
|
if( $("#txt_Num").val()!="")
|
|
|
md.Num = $("#txt_Num").val();
|
|
|
if( $("#txt_Num2").val()!="")
|
|
|
md.Num2 = $("#txt_Num2").val();
|
|
|
md.PlanInfo=$("#txt_PlanInfo").val();
|
|
|
md.AdviseInfo=$("#txt_AdviseInfo").val();
|
|
|
md.Remark = $("#txt_Remark").val();
|
|
|
var snames = "";
|
|
|
$("input[spid]").each(function () {
|
|
|
if ($(this).is(":checked") == true)
|
|
|
snames += $(this).attr("sname")+",";
|
|
|
});
|
|
|
md.ShopNames = snames;
|
|
|
param.Model =md;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/Save_GoodsUserPlanCount",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
|
|
|
alert("保存成功");
|
|
|
$.fancybox.close();
|
|
|
ReadData();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
//渲染每一行的折线图
|
|
|
function CreateTDsEchart(datas) {
|
|
|
$(shoplist).each(function (i) {
|
|
|
var ii = i + 1;
|
|
|
var chartCells = $('.chart-cell-' + ii);
|
|
|
|
|
|
chartCells.each(function () {
|
|
|
var chart = echarts.init(this); // this 代表当前的 chart-cell 元素
|
|
|
var bglid = $(this).attr("bglid");//获取当前行的bglid
|
|
|
var _data = datas.find(r => r.id == bglid);
|
|
|
|
|
|
|
|
|
var _dataii = _data["BGLZXTData" + ii];
|
|
|
if (_dataii == null)
|
|
|
return true;
|
|
|
|
|
|
var data = _dataii.map(function (n) {
|
|
|
return { name: n.Name, value: n.Value };
|
|
|
});
|
|
|
var option = {
|
|
|
grid: {
|
|
|
left: 5,
|
|
|
right: 5,
|
|
|
top: 5,
|
|
|
bottom: 5,
|
|
|
containLabel: true
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: 'axis'
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
data: data.map(function (item) {
|
|
|
return item.name;
|
|
|
}),
|
|
|
axisLabel: {
|
|
|
show: false // 隐藏 x 轴标签
|
|
|
},
|
|
|
axisTick: {
|
|
|
show: false // 隐藏 x 轴刻度线
|
|
|
},
|
|
|
axisLine: {
|
|
|
show: false // 隐藏 x 轴线
|
|
|
}
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'value',
|
|
|
axisLabel: {
|
|
|
show: false // 隐藏 y 轴标签
|
|
|
},
|
|
|
axisTick: {
|
|
|
show: false // 隐藏 y 轴刻度线
|
|
|
},
|
|
|
axisLine: {
|
|
|
show: false // 隐藏 y 轴线
|
|
|
}
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
type: 'line',
|
|
|
data: data.map(function (item) {
|
|
|
return item.value;
|
|
|
}),
|
|
|
lineStyle: {
|
|
|
width: 1 // 短线宽度
|
|
|
},
|
|
|
itemStyle: {
|
|
|
borderWidth: 0.5, // 点边框宽度
|
|
|
borderColor: 'black' // 点边框颜色
|
|
|
},
|
|
|
symbolSize: 2 // 点大小
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
|
|
|
// 设置容器尺寸
|
|
|
chart.resize({
|
|
|
width: 200,
|
|
|
height: 30
|
|
|
});
|
|
|
|
|
|
chart.setOption(option);
|
|
|
});
|
|
|
|
|
|
})
|
|
|
}
|
|
|
|
|
|
//获取店铺下拉数据
|
|
|
function GetSelectShopList() {
|
|
|
$("#select_shop").empty();
|
|
|
$("#select_shop").append("<option value='0'>全部</option>");
|
|
|
var param = new Object();
|
|
|
|
|
|
param.DeptId = 0;
|
|
|
param.PlatType = 0;
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../BaseDataNew.asmx/GetShopListForTM",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
if (data.d != null) {
|
|
|
$(data.d).each(function (i) {
|
|
|
$("#select_shop").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
<body class="headbody">
|
|
|
<div class="title_ico">
|
|
|
货物统计信息
|
|
|
</div>
|
|
|
|
|
|
<div style="display: none">
|
|
|
<div id="test4" title="" style="width: 550px; height: 400px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
最长出单周期:
|
|
|
</td>
|
|
|
<td colspan="3">
|
|
|
<input id="txt_OutDays2" class="editTextbox" style="width: 120px;"
|
|
|
type="text" />天
|
|
|
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
前期定价:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="txt_Price" class="editTextbox" style="width: 120px;" type="text" />$
|
|
|
</td>
|
|
|
<td class="f1" width="15%">
|
|
|
稳定定价:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="txt_Price2" class="editTextbox" style="width: 120px;"
|
|
|
type="text" />$
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
第一名销量:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="txt_Num" class="editTextbox" style="width: 120px;" type="text" />
|
|
|
</td>
|
|
|
<td class="f1" width="15%">
|
|
|
定价:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="txt_Price3" class="editTextbox" style="width: 120px;"
|
|
|
type="text" />$
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
目标销量:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="txt_Num2" class="editTextbox" style="width: 120px;" type="text" />
|
|
|
</td>
|
|
|
<td class="f1" width="15%">
|
|
|
定价:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input id="txt_Price4" class="editTextbox" style="width: 120px;"
|
|
|
type="text" />$
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
重推店铺:
|
|
|
</td>
|
|
|
<td colspan="3">
|
|
|
<div id="div_shopnames"></div>
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
计划:
|
|
|
</td>
|
|
|
<td colspan="3">
|
|
|
<textarea id="txt_PlanInfo" cols="20" style="width:99%" rows="3"></textarea>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
要求:
|
|
|
</td>
|
|
|
<td colspan="3">
|
|
|
<textarea id="txt_AdviseInfo" cols="20" style="width:99%" rows="3"></textarea>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="15%">
|
|
|
备注:
|
|
|
</td>
|
|
|
<td colspan="3">
|
|
|
<textarea id="txt_Remark" cols="20" rows="3" style="width:99%"></textarea>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="center" colspan="4">
|
|
|
<input id="btn_Save4" type="button" class="btnClass btnClassSave" value="确 定" onclick="Save2();" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
<div id="test" title="货物图片" style="width: 300px; height: 300px;">
|
|
|
<table class="tableAll" style="width: 100%;">
|
|
|
<colgroup>
|
|
|
<col style="width: 80px;" />
|
|
|
<col />
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
<td class="f1" >姓名:</td>
|
|
|
<td><input id='txt_name' type='text' style='width: 99%' />输入名字可以搜索</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" ></td>
|
|
|
|
|
|
<td><select id="select_user" style="width: 99%;">
|
|
|
|
|
|
</select></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" >店铺:</td>
|
|
|
|
|
|
<td><select id="select_shop2" style="width: 99%;">
|
|
|
|
|
|
</select></td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
<td colspan="2" align="center">
|
|
|
<input id="cmdSave" type="button" value="确定" onclick="SaveGoodsUser();" class="btnClass btnClassSave"/>
|
|
|
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
<div id="test2" title="编辑" style="width: 400px; height: auto;">
|
|
|
<table class="tableAll" style="width: 100%;">
|
|
|
<colgroup>
|
|
|
<col style="width: 80px;" />
|
|
|
<col />
|
|
|
</colgroup>
|
|
|
<tr>
|
|
|
<td class="f1" >编号</td>
|
|
|
<td><span id="sp_code"></span></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" >建档日期</td>
|
|
|
<td><input id='txtJDDate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})"/></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" >拍照日期</td>
|
|
|
<td><input id='txtPZDate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})"/></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" >图片日期</td>
|
|
|
<td><input id='txtTPDate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})"/></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" >上架日期</td>
|
|
|
<td><input id='txtSJDate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})"/></td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td class="f1" >样品日期</td>
|
|
|
<td><input id='txtYPDate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})"/></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" >出运日期</td>
|
|
|
<td><input id='txtDate1' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})"/></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" >入库日期</td>
|
|
|
<td><input id='txtRKDate' type='text' style='width: 99%' onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})"/></td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" >采购人</td>
|
|
|
<td><input id='txtBuyName' type='text' style='width: 99%'/></td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
<td colspan="4" align="center">
|
|
|
<input id="Button1" type="button" value="保存" onclick="Save();"/>
|
|
|
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
<div id="test3" title="编辑" style="width: 400px; height: auto;">
|
|
|
<table class="tableAll" style="width: 100%;">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td><div style="height:400px;overflow:auto" id="div_mess">
|
|
|
<div style="text-align:left"><font color="blue">黄琼[05-30]:</font><font color="gray">吃按时间撒旦拉萨大撒大苏打撒旦时间撒旦拉萨大撒大苏打撒旦时间撒旦拉萨大撒大苏打撒旦时间撒旦拉萨大撒大苏打撒旦时间撒旦拉萨大撒大苏打撒旦时间撒旦拉萨大撒大苏打撒旦</font></div><br />
|
|
|
<div style="text-align:right"> <font color="gray"> 吃按时间撒旦拉萨大撒大苏打撒旦</font><font color="green"> :Admin[05-31]</font></div><br />
|
|
|
<div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br /> <div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br /> <div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br />
|
|
|
<div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br /> <div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br /> <div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br />
|
|
|
<div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br /> <div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br /> <div style="text-align:left">黄琼[05-30]:吃按时间撒旦拉萨大撒大苏打撒旦</div><br />
|
|
|
<div style="text-align:right"> 吃按时间撒旦拉萨大撒大苏打撒旦 :Admin[05-31]</div><br />
|
|
|
</div></td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<table id="SelectHtml" class="tableAll" style="width: 100%;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
<td align="left">
|
|
|
平台:<select id="select_plat" class="selectClass" name="D6" style="width: 120px" >
|
|
|
<option value="2" selected="selected">亚马逊</option>
|
|
|
<option value="3">ebay</option>
|
|
|
<option value="6">沃尔玛</option>
|
|
|
<option value="15">Shopify</option>
|
|
|
<option value="18">wayfair</option>
|
|
|
<option value="21">SheIn</option>
|
|
|
<option value="22">TikTok</option>
|
|
|
<option value="23">TEMU</option>
|
|
|
</select>
|
|
|
编号: <input id="txt_goodsname" class="editTextbox" style="width: 120px;" type="text" where="(GoodsCode like '%@value%' or GoodsOldCode like '%@value%')" /> 编号归属人员:<select id="select_name" class="selectClass" name="D5" style="width: 120px" >
|
|
|
</select> 分配店铺人员:<input id="txt_uName" class="editTextbox" style="width: 120px;" type="text" />
|
|
|
<input id="chk_isend" type="checkbox" />是否显示已结束的 未出单天数<input id="txt_sday" class="editTextbox" style="width: 50px;" type="text" where="DATEDIFF(day,a.LastOrderDate,GETDATE())>= @value" />---<input id="txt_eday" class="editTextbox" style="width: 50px;" type="text" where="DATEDIFF(day,a.LastOrderDate,GETDATE())<= @value" />天 是否出单:<select id="select_cd"
|
|
|
name="D2">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="1">入库后一个月未出单</option>
|
|
|
<option value="2">入库后两个月未出单</option>
|
|
|
</select> 类目:<select id="txtSortId" class="easyui-combobox" name="D4" style="width: 150px;">
|
|
|
</select> <input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />
|
|
|
<input id="btn_tj" class="btnClass btnClassFind" type="button" value="统计已分配未上架情况" /></td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
<td align="left">
|
|
|
<input id="chk_isly" type="checkbox" />是否有未读留言 留言日期:<input id="txt_LYSDate" class="editTextbox" onfocus="WdatePicker()" style="width: 100px;" type="text" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" />-<input
|
|
|
id="txt_LYEDate" class="editTextbox" onfocus="WdatePicker()"
|
|
|
style="width: 100px;" type="text" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" /> 留言内容:<input id="txt_lynr" class="editTextbox" style="width: 120px;" type="text" /> 日期:<input id="txt_LYSDate2" class="editTextbox" onfocus="WdatePicker()" style="width: 100px;" type="text" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" />-<input
|
|
|
id="txt_LYEDate2" class="editTextbox" onfocus="WdatePicker()"
|
|
|
style="width: 100px;" type="text" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" />没有留言 是否分配店铺:<select id="select_fp" name="D1">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="1">已分配店铺</option>
|
|
|
<option value="0">未分配店铺</option>
|
|
|
</select>
|
|
|
是否上架链接:<select id="select_lj" name="D1">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="1">已分配的已全部有上架链接</option>
|
|
|
<option value="0">包含没上架链接</option>
|
|
|
<option value="2">已有上架链接</option>
|
|
|
</select> 出运日期:<input id="txt_SDate2" class="editTextbox" onfocus="WdatePicker()" style="width: 100px;" type="text" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" where="b.Date1>= '@value'" />-<input
|
|
|
id="txt_EDate2" class="editTextbox" onfocus="WdatePicker()"
|
|
|
style="width: 100px;" type="text" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" where="b.Date1<= '@value 23:59:59'" /> 入库日期:<input id="txt_SDate3" class="editTextbox" onfocus="WdatePicker()" style="width: 100px;" type="text" where="b.RKDate>= '@value'" />-<input
|
|
|
id="txt_EDate3" class="editTextbox" onfocus="WdatePicker()"
|
|
|
style="width: 100px;" type="text" where="b.RKDate<= '@value 23:59:59'" />
|
|
|
<input id="chk_ycl" type="checkbox" />隐藏货号信息填写列
|
|
|
|
|
|
<input id="che_xsbgl" type="checkbox" />显示曝光量
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="left"><input id="che_nokc" type="checkbox" />隐藏无库存商品 方案数:<select id="select_fas" name="D1">
|
|
|
<option value="-1">全部</option>
|
|
|
<option value="0">0</option>
|
|
|
<option value="1">1</option>
|
|
|
<option value="2">2</option>
|
|
|
<option value="3">3</option>
|
|
|
<option value="4">4</option>
|
|
|
<option value="5">5</option>
|
|
|
</select>
|
|
|
店铺:<select id="select_shop" class="selectClass" style="width: 120px" name="D7"></select>
|
|
|
<input id="chk_xsall" type="checkbox" /><label for="chk_xsall">显示全部</label>
|
|
|
<input id="chk_xsyc" type="checkbox" /><label for="chk_xsyc">只显示隐藏</label>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
<td align="left">
|
|
|
名字 <font color="#009900" style="font-weight:bolder">绿色</font> 表示 已经有链接
|
|
|
双击名字可以跳转到链接地址 销量数字 <font color="#AA0000" style="font-weight:bolder">深红色</font> 表示 销量大于 10单 第一个数字表示入库后
|
|
|
1个月订单量 第二个数字表示 入库后 2个月订单量 </td>
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
<tr style="display:none">
|
|
|
|
|
|
|
|
|
|
|
|
<td align="left">
|
|
|
销量统计日期: <input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 100px;" type="text" />-<input
|
|
|
id="txt_EDate" class="editTextbox" onfocus="WdatePicker()"
|
|
|
style="width: 100px;" type="text" /></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
<tr id="tr_1" style="display:none">
|
|
|
<td>
|
|
|
<select id="select_namenew" class="selectClass" name="D5" style="width: 120px" >
|
|
|
</select> <input id="cmdChange" type="button" value="批量修改人员" class="btnClass btnClassEdit" onclick="SaveGoodsUserChange();"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td valign="top">
|
|
|
<div id="DataGrid1" class="DataGridStyle" style="width:2600px"></div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</body>
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|