You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
799 lines
28 KiB
Plaintext
799 lines
28 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CG_ChaseLook.aspx.cs" Inherits="TradeManage.CaiGou.CG_ChaseLook" %>
|
||
|
|
||
|
|
||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head id="Head1">
|
||
|
<title>采购单</title>
|
||
|
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
|
||
|
<link href="../themes/default/easyui.css" rel="stylesheet" type="text/css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/uploadify.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" type="text/javascript"></script>
|
||
|
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/DateBox.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript" src="../Scripts/uploadify/jquery.uploadify.js"></script>
|
||
|
<script src="../Scripts/ajaxfileupload.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.url.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>
|
||
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css"
|
||
|
media="screen" />
|
||
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
||
|
<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/Global.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
||
|
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
||
|
|
||
|
var datagrid3 = new nblf.ui.DataGrid("DataGrid3");
|
||
|
|
||
|
var ChaseId = 0;
|
||
|
var IsCheck = "";
|
||
|
var Title = "采购单审批";
|
||
|
var InUserId = 0;
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
ChaseId = $.url.param("ChaseId");
|
||
|
if (ChaseId == undefined) {
|
||
|
ChaseId = 0;
|
||
|
}
|
||
|
Title = $.url.param("Title");
|
||
|
if (Title == undefined) {
|
||
|
Title = "采购单审批";
|
||
|
}
|
||
|
IsCheck = $.url.param("IsCheck");
|
||
|
if (IsCheck == undefined) {
|
||
|
IsCheck = "";
|
||
|
}
|
||
|
if (IsCheck == "check")
|
||
|
{
|
||
|
$("#tr1").show();
|
||
|
$("#cmdSave").show();
|
||
|
$("#div_kd").hide();
|
||
|
}
|
||
|
else if (IsCheck == "Edit")
|
||
|
{
|
||
|
|
||
|
$("#cmdSave").show();
|
||
|
}
|
||
|
else {
|
||
|
$("#div_kd").hide();
|
||
|
//$("#tr2").show();
|
||
|
$("#cmdSave").hide();
|
||
|
}
|
||
|
CreateDataGrid();
|
||
|
CreateDataGrid2();
|
||
|
CreateDataGrid3();
|
||
|
|
||
|
GetBasePost();
|
||
|
$("#btn_Save").bind("click", function () {
|
||
|
AddBuy();
|
||
|
});
|
||
|
|
||
|
|
||
|
$("#cmdSavekddh").bind("click", function () {
|
||
|
|
||
|
AddPostCode();
|
||
|
});
|
||
|
|
||
|
|
||
|
$("#cmdBack").bind("click", function () {
|
||
|
|
||
|
//window.history.go(-1);
|
||
|
window.parent.CloseTab("采购单", Title);
|
||
|
});
|
||
|
|
||
|
|
||
|
if (ChaseId > 0) {
|
||
|
GetChaseModel();
|
||
|
GetChaseGoodsDetail();
|
||
|
GetPost();
|
||
|
}
|
||
|
});
|
||
|
function GetPost() {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.ChaseId = ChaseId;
|
||
|
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetchasePostList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
PostCodeList = data.d;
|
||
|
datagrid3.DataBind(PostCodeList);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function GetChaseModel() {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.ChaseId = ChaseId;
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetPurchaseModel",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
InUserId = data.d.InUserId;
|
||
|
$("#txtChaseCode").html(data.d.ChaseCode);
|
||
|
$("#txtBuyCode").html(data.d.BuyCode);
|
||
|
|
||
|
$("#txtPostFee").html(data.d.PostFee);
|
||
|
$("#txtRemark").val(data.d.Remark);
|
||
|
$("#txtErrorInfo").val(data.d.ErrorInfo);
|
||
|
|
||
|
if (data.d.BuyDate != null)
|
||
|
$("#txtBuyDate").html(data.d.BuyDate.localeFormat("yyyy-MM-dd"));
|
||
|
if (data.d.DoneDate != null)
|
||
|
$("#txtDoneDate").html(data.d.DoneDate.localeFormat("yyyy-MM-dd"));
|
||
|
|
||
|
$("#txtSupplier").html(data.d.Supplier);
|
||
|
|
||
|
$("#txtSupplierPhone").html(data.d.SupplierPhone);
|
||
|
$("#txtInName").html(data.d.InName);
|
||
|
|
||
|
$("#txtAccount").html(data.d.Account);
|
||
|
var contect = "";
|
||
|
if (data.d.CheckContent != null)
|
||
|
contect = data.d.CheckContent;
|
||
|
if (data.d.State == 0)
|
||
|
$("#txtCheckContent").html("未审批<br/>");
|
||
|
else if (data.d.State == 1)
|
||
|
$("#txtCheckContent").html("审批通过<br/>" + contect);
|
||
|
else if (data.d.State == 2)
|
||
|
$("#txtCheckContent").html("审批未通过<br/>" + contect);
|
||
|
if (data.d.CheckUid>0)
|
||
|
{
|
||
|
$("#tr2").show();
|
||
|
}
|
||
|
if (data.d.CheckDate != null) {
|
||
|
$("#txtCheckDate").html(data.d.CheckDate.localeFormat("yyyy-MM-dd"));
|
||
|
}
|
||
|
$("#txtCheckName").html(data.d.CheckName);
|
||
|
|
||
|
$("#txtGoodsNum").html(data.d.GoodsNum);
|
||
|
$("#txtGoodsMoney").html(data.d.GoodsMoney);
|
||
|
if (data.d.GoodsState > 0)
|
||
|
{
|
||
|
$("#tr_rk").show();
|
||
|
GetInDetail();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function GetInDetail() {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.ChaseId = ChaseId;
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetInStoreList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
datagrid2.DataBind(data.d);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
var PostCodeList = new Array();
|
||
|
function AddPostCode() {
|
||
|
|
||
|
if ($("#txt_kddh").val() == "") {
|
||
|
alert("请输入快递单号");
|
||
|
return;
|
||
|
}
|
||
|
var md = new Object();
|
||
|
md.Id = 0;
|
||
|
md.PostCode = $("#txt_kddh").val();
|
||
|
md.PostName = $("#select_post option:selected").text();
|
||
|
md.PostId = $("#select_post").val();
|
||
|
Array.add(PostCodeList, md);
|
||
|
datagrid3.DataBind(PostCodeList);
|
||
|
$("#txt_kddh").val("");
|
||
|
|
||
|
|
||
|
}
|
||
|
function GetCheck() {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.StepNo = 1;
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetCheckConfig",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
$("#a_check").html("下一步审批人:");
|
||
|
$(data.d).each(function () {
|
||
|
$("#select_Check").append("<option value=" + this.UserId + ">" + this.Name + "</option>");
|
||
|
|
||
|
});
|
||
|
}
|
||
|
else {
|
||
|
$("#a_check").html("您公司还未设置采购审批功能,采购单无需审批");
|
||
|
$("#select_Check").hide();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function GetBasePost() {
|
||
|
|
||
|
|
||
|
var param = new Object();
|
||
|
param.CompanyID = 0;
|
||
|
param.KeyName = "gnkd";
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../UserService.asmx/GetListBaseCode",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
|
||
|
if (data.d != null) {
|
||
|
$(data.d).each(function () {
|
||
|
$("#select_post").append("<option value='" + this.ID + "'>" + this.Name + "</option>");
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function GetCGCode() {
|
||
|
|
||
|
|
||
|
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetCGGCode",
|
||
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
$("#a_cgdh").html(data.d)
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
var GoodsList = null;
|
||
|
function ReadGoods() {
|
||
|
|
||
|
// var param = new Object();
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetSNGoods",
|
||
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
GoodsList = data.d;
|
||
|
$(data.d).each(function () {
|
||
|
$("#select_hwlx").append("<option value=" + this.GoodsId + ">" + this.GoodsCode + "[" + this.GoodsName + "]</option>");
|
||
|
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function aa() {
|
||
|
ReadGoodsDetail();
|
||
|
}
|
||
|
|
||
|
|
||
|
function ReadGoodsDetail() {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.GoodsId = $("#select_hwlx").val();
|
||
|
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetGoodsSPDetail",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
datagrid2.DataBind(data.d);
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function GetBuyGoodsDetail() {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.GoodsId = GoodsId;
|
||
|
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetGoodsSPDetail",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
buylist = data.d;
|
||
|
BindDg1();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function GetChaseGoodsDetail() {
|
||
|
|
||
|
var param = new Object();
|
||
|
param.ChaseId = ChaseId;
|
||
|
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/GetPurchaseGoodsList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
if (data.d != null) {
|
||
|
|
||
|
datagrid1.DataBind(data.d);
|
||
|
$("input[ColName='BuyNum']").MaskedTextBox();
|
||
|
$("input[ColName='BuyMoney']").MaskedTextBox();
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//#region 初始化DataGrid
|
||
|
function CreateDataGrid() {
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "货物编号";
|
||
|
|
||
|
col.CellTemplate = "<a>{Bind GoodsCode}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "货物名称";
|
||
|
|
||
|
col.CellTemplate = "<a>{Bind GoodsName}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "SKU";
|
||
|
|
||
|
col.CellTemplate = "<a>{Bind SKU1}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "描述";
|
||
|
col.CreateFieldSpan("TypeDesc", "");
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "库存数量";
|
||
|
col.CreateFieldSpan("GoodsNum", "");
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "采购单价";
|
||
|
col.CellTemplate = "<a>{Bind BuyMoney}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "采购数量";
|
||
|
col.CellTemplate = "<a>{Bind BuyNum}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "到货数量";
|
||
|
col.CellTemplate = "<a>{Bind InGoodsNum}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "到货异常";
|
||
|
col.CellTemplate = "<a>{Bind Error}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
datagrid1.IsFixHeader = false;
|
||
|
datagrid1.ShowIndexColumn = false;
|
||
|
datagrid1.AllowPaging = false;
|
||
|
//datagrid1.Height = "260px";
|
||
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
||
|
datagrid1.Init();
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
//#region 初始化DataGrid
|
||
|
function CreateDataGrid2() {
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "货物编号";
|
||
|
|
||
|
col.CellTemplate = "<a>{Bind GoodsCode}</a>";
|
||
|
Array.add(datagrid2.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "货物名称";
|
||
|
|
||
|
col.CellTemplate = "<a>{Bind GoodsName}</a>";
|
||
|
Array.add(datagrid2.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "SKU";
|
||
|
|
||
|
col.CellTemplate = "<a>{Bind SKU1}</a>";
|
||
|
Array.add(datagrid2.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "描述";
|
||
|
col.CreateFieldSpan("TypeDesc", "");
|
||
|
Array.add(datagrid2.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "入库情况";
|
||
|
col.CreateFieldSpan("ErrorDesc", "");
|
||
|
Array.add(datagrid2.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "入库时间";
|
||
|
col.CellTemplate = "<a>{Bind InDate,yyyy-MM-dd HH:mm}</a>";
|
||
|
Array.add(datagrid2.Columns, col);
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "入库人";
|
||
|
col.CellTemplate = "<a>{Bind Name}</a>";
|
||
|
Array.add(datagrid2.Columns, col);
|
||
|
|
||
|
|
||
|
|
||
|
datagrid2.IsFixHeader = false;
|
||
|
datagrid2.ShowIndexColumn = false;
|
||
|
datagrid2.AllowPaging = false;
|
||
|
//datagrid1.Height = "260px";
|
||
|
datagrid2.SelectMode = nblf.ui.SelectMode.None;
|
||
|
datagrid2.Init();
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
function CreateDataGrid3() {
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "快递公司";
|
||
|
|
||
|
col.CellTemplate = "<span>{Bind PostName}<span>";
|
||
|
col.Width = "80px";
|
||
|
Array.add(datagrid3.Columns, col);
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "快递单号";
|
||
|
col.Width = "120px";
|
||
|
col.CellTemplate = "<span>{Bind PostCode}<span>";
|
||
|
Array.add(datagrid3.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "物流信息";
|
||
|
|
||
|
col.CellTemplate = "<div>{Bind PostInfo}<div>";
|
||
|
Array.add(datagrid3.Columns, col);
|
||
|
if (IsCheck == "Edit") {
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "操作";
|
||
|
col.Width = "100px";
|
||
|
col.CellTemplate = "<input onclick='DelPost(this)' class='btnClass dgbtnDel' type='button' value='删除'></input>";
|
||
|
Array.add(datagrid3.Columns, col);
|
||
|
}
|
||
|
|
||
|
datagrid3.IsFixHeader = false;
|
||
|
datagrid3.ShowIndexColumn = false;
|
||
|
datagrid3.AllowPaging = false;
|
||
|
//datagrid1.Height = "260px";
|
||
|
datagrid3.SelectMode = nblf.ui.SelectMode.None;
|
||
|
datagrid3.Init();
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
function DelPost(obj) {
|
||
|
if (window.confirm('确定要删除吗?') == false) return;
|
||
|
var rowindex = $(obj).parent().parent().attr("index");
|
||
|
var param = new Object();
|
||
|
var model = datagrid3.Get_Model(rowindex);
|
||
|
param.Id = model.Id;
|
||
|
if (model.Id > 0) {
|
||
|
$.ajax({
|
||
|
url: "CaiGouService.asmx/DeletechasePost",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
alert("删除成功");
|
||
|
datagrid3.Del_Row(rowindex);
|
||
|
|
||
|
}
|
||
|
function ExportData() {
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
param.ChaseId = ChaseId;
|
||
|
param.Code = $("#txtChaseCode").html();
|
||
|
param.BuyDate = $("#txtBuyDate").html();
|
||
|
param.DoneDate = $("#txtDoneDate").html();
|
||
|
var fname = "采购单[" + $("#txtChaseCode").html() + "].xls";
|
||
|
$.ajax({
|
||
|
url: "../CaiGou/CaiGouService.asmx/ExcelCGTable",
|
||
|
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);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
function save() {
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
if (IsCheck == "Edit")
|
||
|
{
|
||
|
var param = new Object();
|
||
|
|
||
|
|
||
|
param.ChaseId = ChaseId;
|
||
|
param.ErrorInfo = $("#txtErrorInfo").val();
|
||
|
param.Remark = $("#txtRemark").val();
|
||
|
|
||
|
param.Postlist = PostCodeList;
|
||
|
$.ajax({
|
||
|
|
||
|
url: "CaiGouService.asmx/SavePurchasePost",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
alert("修改完成");
|
||
|
//window.location.href = "CG_ChaseTable.aspx";
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
var param = new Object();
|
||
|
|
||
|
|
||
|
param.ChaseId = ChaseId;
|
||
|
param.Code = $("#txtChaseCode").html();
|
||
|
param.InUserId = InUserId;
|
||
|
param.CheckContent = $("#txt_spyj").val();
|
||
|
|
||
|
param.Remark = $("#txtRemark").val();
|
||
|
|
||
|
param.State = $("#select_agree").val();
|
||
|
$.ajax({
|
||
|
|
||
|
url: "CaiGouService.asmx/CheckPurchase",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
alert("审批完成");
|
||
|
|
||
|
//window.location.href = "CG_CheckList.aspx";
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
window.parent.CloseTab("采购单", Title);
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</head>
|
||
|
<body class="headbody">
|
||
|
|
||
|
<div class="title_ico">
|
||
|
采购单
|
||
|
</div>
|
||
|
|
||
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
|
||
|
<tr>
|
||
|
|
||
|
<td colspan="4" align="center" style="font-size: 18pt; font-weight: bolder">采购单</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td style="width: 120px" class="f1">
|
||
|
<font color="red" style="font-weight: bolder">*</font>
|
||
|
采购单号:
|
||
|
</td>
|
||
|
<td style="width: 30%">
|
||
|
<a id="txtChaseCode"></a>
|
||
|
</td>
|
||
|
<td style="width: 120px" class="f1">
|
||
|
<font color="red" style="font-weight: bolder">*</font>
|
||
|
采购日期:
|
||
|
</td>
|
||
|
<td style="width: 30%">
|
||
|
<a id="txtBuyDate"></a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td style="width: 120px" class="f1">预计到货日期:</td>
|
||
|
<td>
|
||
|
<a id="txtDoneDate"></a></td>
|
||
|
<td style="width: 120px" class="f1">购买账号:
|
||
|
</td>
|
||
|
|
||
|
<td><a id="txtAccount"></a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td style="width: 120px" class="f1">供应商:</td>
|
||
|
<td>
|
||
|
<a id="txtSupplier"></a></td>
|
||
|
<td style="width: 120px" class="f1">联系方式:</td>
|
||
|
<td>
|
||
|
<a id="txtSupplierPhone"></a></td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td style="width: 120px" class="f1">采购货物:</td>
|
||
|
<td colspan="3">
|
||
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td style="width:120px" class="f1">
|
||
|
运费合计:</td>
|
||
|
<td>
|
||
|
<a id="txtPostFee"></a></td>
|
||
|
<td colspan="2">
|
||
|
数量合计:<a id="txtGoodsNum" style="font-size:x-large;color:Red"></a> 价格合计:<a id="txtGoodsMoney" style="font-size:x-large;color:Red"></a>元</td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td style="width:120px" class="f1">
|
||
|
网上购买单号:</td>
|
||
|
<td>
|
||
|
<a id="txtBuyCode"></a>
|
||
|
</td> <td style="width:120px" class="f1">
|
||
|
采购人:</td>
|
||
|
<td>
|
||
|
<a id="txtInName"></a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr id="tr_rk" style="display:none">
|
||
|
<td style="width: 120px" class="f1" >入库明细:</td>
|
||
|
<td colspan="3">
|
||
|
<div id="DataGrid2" class="DataGridStyle"></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td style="width: 120px" class="f1">异常信息:</td>
|
||
|
<td colspan="3"> <textarea id="txtErrorInfo" cols="100" rows="3" style="width:90%"></textarea>
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr id="tr2" style="display:none">
|
||
|
<td style="width: 120px" class="f1">审批信息:</td>
|
||
|
<td colspan="3" align="left">
|
||
|
|
||
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" class="tableAll">
|
||
|
<tr>
|
||
|
<td class="f1" width="20%">审批人:</td>
|
||
|
<td width="30%"><a id="txtCheckName"></a></td>
|
||
|
<td class="f1" width="20%">审批日期:</td>
|
||
|
<td width="30%"><a id="txtCheckDate"></a></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="f1" width="20%">审批意见:</td>
|
||
|
<td colspan="3"><div id="txtCheckContent" style="width:80%;height:50px"></div></td>
|
||
|
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td style="width: 120px" class="f1">备注信息:</td>
|
||
|
<td colspan="3">
|
||
|
<textarea id="txtRemark" cols="100" rows="4" style="width:90%"></textarea>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td style="width: 120px" class="f1">快递单号:</td>
|
||
|
<td colspan="3" align="left">
|
||
|
<div id="div_kd"> <select id="select_post" class="selectClass" style="width:120px">
|
||
|
|
||
|
</select> <input id="txt_kddh" type="text" style="width:150px;" class="editTextbox"/><input id="cmdSavekddh" type="button" value="添加" class="btnClass btnClassAdd"/><br /></div>
|
||
|
<div id="DataGrid3" class="DataGridStyle" style="width: 90%; margin-left: 0px"></div>
|
||
|
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
<tr id="tr1" style="display:none">
|
||
|
<td style="width: 120px" class="f1">审批信息:</td>
|
||
|
<td colspan="3" align="left">
|
||
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" class="tableAll">
|
||
|
<tr>
|
||
|
<td class="f1" width="20%">审批:</td>
|
||
|
<td>
|
||
|
<select id="select_agree" class="selectClass" style="width:120px" name="D1">
|
||
|
|
||
|
<option value="1">审批通过</option>
|
||
|
<option value="2">审批不通过</option>
|
||
|
</select></td>
|
||
|
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="f1" width="20%">审批意见:</td>
|
||
|
<td ><textarea id="txt_spyj" cols="100" rows="4" style="width:90%" name="S1"></textarea></td>
|
||
|
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td colspan="4" align="center">
|
||
|
<input id="cmdSave" type="button" value="提 交" class="btnClass btnClassSave" onclick="save();" />
|
||
|
<input id="cmdBack" type="button" value="返 回" class="btnClass btnClassBack" />
|
||
|
<input id="cmdOut" class="btnClass btnClassExcelTemplate" onclick="ExportData();" type="button" value="导出采购单" /></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|