|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DT_OrderReturn.aspx.cs" Inherits="TradeManageNew.DingDan.DT_OrderReturn" %>
|
|
|
|
|
|
|
|
|
|
|
|
<!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/card.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="../themes/New.css?a=1" />
|
|
|
<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=3445" type="text/javascript"></script>
|
|
|
<script src="../Scripts/DataPager.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 src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/qrcode.min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/html2canvas.min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/jquery.cookies.min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox2.1/source/jquery.fancybox.css?v=2.1.5"
|
|
|
media="screen" />
|
|
|
<script type="text/javascript" src="../Scripts/fancybox2.1/lib/jquery.mousewheel-3.0.6.pack.js"></script>
|
|
|
<script type="text/javascript" src="../Scripts/fancybox2.1/source/jquery.fancybox.js?v=2.1.5"></script>
|
|
|
|
|
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
|
<script type="text/javascript" src="../Scripts/highcharts.js"></script>
|
|
|
<script src="../Scripts/kindeditor/kindeditor-min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
var showDetailModel = '';
|
|
|
|
|
|
|
|
|
var id = 0;
|
|
|
var ScanState = 0;
|
|
|
$(document).ready(function () {
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
WindowLoadModel.Load();
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
CreateDataGrid();
|
|
|
$("#txt_trackcode").focus();
|
|
|
GetShopList();
|
|
|
ReadData();
|
|
|
$(document).keyup(function (event) {
|
|
|
if ($("#txt_trackcode").is(":focus") == true && event.keyCode == 13) {
|
|
|
if ($("#txt_trackcode").val() != "")
|
|
|
ReadData();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
//货物详情
|
|
|
//#region 货物详情
|
|
|
$(`#${datagrid1.TableID} input[CommandName='showDetail']`).live("click", function () {
|
|
|
$("#img_1").attr("src", $(this).attr("src"));
|
|
|
$("#div_img").empty();
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
showDetailModel = datagrid1.Get_Model(RowIndex);
|
|
|
OpenGoodsMsg(showDetailModel)
|
|
|
|
|
|
});
|
|
|
//#endregion
|
|
|
//上架状态选择
|
|
|
//#region 上架状态选择
|
|
|
$(`#${datagrid1.TableID} input[CommandName='StartPutaway']`).live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
id = model.id;
|
|
|
if (model.SecondHandSalePrice == null || model.SecondHandSalePrice == 0) {
|
|
|
$("#txt_SecondHandSalePrice").val((model.order_amount * 0.7).toFixed(2));
|
|
|
} else {
|
|
|
$("#txt_SecondHandSalePrice").val(model.SecondHandSalePrice);
|
|
|
}
|
|
|
|
|
|
$("#select_offerup").val(model.IsOfferUp);
|
|
|
$("#select_maketplace").val(model.IsMaketPlace);
|
|
|
|
|
|
OpenStartPutaway();
|
|
|
|
|
|
});
|
|
|
//#endregion
|
|
|
|
|
|
//上架状态选择
|
|
|
//#region 提货信息选择
|
|
|
$(`#${datagrid1.TableID} input[CommandName='CreateSecongHandBuyerMsg']`).live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
id = model.id;
|
|
|
$("#txt_buyer_name").val(model.SecondHandBuyerName);
|
|
|
$("#txt_buyer_phone").val(model.SecondHandBuyerPhone);
|
|
|
$("#txt_buyer_time").val(model.SecondHandBuyerTime);
|
|
|
$("#btn_CreateSecongHandBuyerMsg").show();
|
|
|
OpenSecongHandBuyerMsg();
|
|
|
});
|
|
|
$(`#${datagrid1.TableID} input[CommandName='LookSecongHandBuyerMsg']`).live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
id = model.id;
|
|
|
$("#txt_buyer_name").val(model.SecondHandBuyerName);
|
|
|
$("#txt_buyer_phone").val(model.SecondHandBuyerPhone);
|
|
|
$("#txt_buyer_time").val(model.SecondHandBuyerTime);
|
|
|
$("#btn_CreateSecongHandBuyerMsg").hide();
|
|
|
OpenSecongHandBuyerMsg();
|
|
|
});
|
|
|
$(`#${datagrid1.TableID} input[CommandName='CancelSecongHandBuyerMsg']`).live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
id = model.id;
|
|
|
|
|
|
if (window.confirm('确定要撤销吗?') == false) return;
|
|
|
|
|
|
CancelSecongHandBuyerMsg();
|
|
|
});
|
|
|
|
|
|
//#endregion
|
|
|
$(`#${datagrid1.TableID} input[CommandName='EndBuy']`).live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
id = model.id;
|
|
|
|
|
|
if (window.confirm('确定已卖出吗?') == false) return;
|
|
|
UpdateSecondHandType(id, 3)
|
|
|
});
|
|
|
//生成取件码图片
|
|
|
$(`#${datagrid1.TableID} input[CommandName='CreateImage']`).live("click", function () {
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
id = model.id;
|
|
|
var product = '';
|
|
|
var param = new Object();
|
|
|
param.OrderId = model.orderid;
|
|
|
//获取货物信息
|
|
|
$.ajax({
|
|
|
url: "../DD_OrderServiceNew.asmx/GetOrderGoodsListForTMSecond",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
GoodsList = data.d;
|
|
|
if (GoodsList != null) {
|
|
|
product = GoodsList[0].GoodsEnglisgName;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
let obj = {
|
|
|
trackCode: model.tracking_id,
|
|
|
product: product,
|
|
|
price: model.SecondHandSalePrice == null ? (model.order_amount * 0.7).toFixed(2) : model.SecondHandSalePrice,
|
|
|
date: model.SecondHandBuyerTime,
|
|
|
contactName: model.SecondHandBuyerName,
|
|
|
contactPhone: model.SecondHandBuyerPhone,
|
|
|
address: model.StoreName == 'E' ? '2615 Port Industrial Dr Suite 408, Jacksonville, FL, 32218' :'11190 White Birch Dr Suite 100, Rancho Cucamonga, CA 91730',
|
|
|
}
|
|
|
debugger
|
|
|
downloadQRCodeImg(obj);
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
//货物详情
|
|
|
//#region 货物详情
|
|
|
function OpenGoodsMsg(showDetailModel) {
|
|
|
|
|
|
var param = new Object();
|
|
|
param.OrderId = showDetailModel.orderid;
|
|
|
$.fancybox({
|
|
|
'width': '70%',
|
|
|
'height': '100%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#OrderReturnDetail',
|
|
|
'afterLoad': function () {
|
|
|
//获取货物信息
|
|
|
$.ajax({
|
|
|
url: "../DD_OrderServiceNew.asmx/GetOrderGoodsListForTMSecond",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
//WindowLoadModel.Hide();
|
|
|
GoodsList = data.d;
|
|
|
if (GoodsList != null) {
|
|
|
debugger
|
|
|
var GoodsName = GoodsList[0].GoodsName;
|
|
|
var GoodsSKU = GoodsList[0].GoodsSKU;
|
|
|
var GoodsInfo = GoodsList[0].GoodsInfo;
|
|
|
var shopName = showDetailModel.ShopName;
|
|
|
var productImgUrl = GoodsList[0].LinkUrl;
|
|
|
var GoodsEnglisgName = GoodsList[0].GoodsEnglisgName;
|
|
|
|
|
|
//$("#txt_Merchantsku").val(showDetailModel.merchant_sku);//txt_GoodsUrl
|
|
|
$("#txt_GoodsCode").val(GoodsSKU);
|
|
|
$("#txt_GoodsName").val(GoodsName);
|
|
|
$("#txt_GoodsDeatil").val(GoodsInfo);
|
|
|
$("#txt_GoodsEnglisgName").val(GoodsEnglisgName);
|
|
|
//$("#txt_GoodsUrl").val(showDetailModel.productImgUrl);
|
|
|
|
|
|
var link = document.getElementById("txt_GoodsUrl");
|
|
|
link.href = productImgUrl;
|
|
|
link.text = shopName;
|
|
|
|
|
|
var newLinkUrlList = GoodsList[0].LinkUrlList;
|
|
|
debugger
|
|
|
var divElement = document.getElementById('div_LinkList');
|
|
|
divElement.innerHTML = '';
|
|
|
$(newLinkUrlList).each(t => {
|
|
|
if (t != null) {
|
|
|
$("#div_LinkList").append(`<a target='_blank' id="txt_GoodsUrl" href="${newLinkUrlList[t].LinkUrl}" style='color:green;margin-left:5px;display:block;'>${newLinkUrlList[t].LinkDesc}</a>`);
|
|
|
}
|
|
|
});
|
|
|
// div_LinkList<a target='_blank' id="txt_GoodsUrl" style='color:green;margin-left:5px;'></a>
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
//图片信息
|
|
|
//先用列表的
|
|
|
var imgList = [];
|
|
|
imgList.push(showDetailModel.Img_Url);
|
|
|
imgList.push(showDetailModel.ImgUrl);
|
|
|
showDetailModel.ImgUrl2 != null ? imgList.push(showDetailModel.ImgUrl2) : '';
|
|
|
showDetailModel.ImgUrl3 != null ? imgList.push(showDetailModel.ImgUrl3) : '';
|
|
|
showDetailModel.ImgUrl4 != null ? imgList.push(showDetailModel.ImgUrl4) : '';
|
|
|
showDetailModel.ImgUrl5 != null ? imgList.push(showDetailModel.ImgUrl5) : '';
|
|
|
|
|
|
$("#img_1").attr("src",imgList[0]);
|
|
|
$(imgList).each(t => {
|
|
|
if (t != null) {
|
|
|
$("#div_img").append(`<img src='${t}' width='100px' height='80px' style='margin-right:5px'/>`);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
},
|
|
|
'onClosed': function () {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//上架操作
|
|
|
//#region 上架操作
|
|
|
//打开上架信息页面
|
|
|
//#region 打开上架信息页面
|
|
|
function OpenStartPutaway() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#StartPutaway',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//保存上架信息
|
|
|
//#region 保存上架信息
|
|
|
function SavePutawayMsg() {
|
|
|
if ($("#txt_SecondHandSalePrice").val() == "") {
|
|
|
alert("SecondHandSalePrice is empty");
|
|
|
return;
|
|
|
}
|
|
|
var param = new Object();
|
|
|
|
|
|
param.id = id;
|
|
|
param.SecondHandSalePrice = $("#txt_SecondHandSalePrice").val();
|
|
|
param.IsOfferUp = $("#select_offerup").val();
|
|
|
param.IsMaketPlace = $("#select_maketplace").val();
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../DD_OrderServiceNew.asmx/UpdatePutawayMsg",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
alert("保存成功");
|
|
|
$.fancybox.close();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
var secondHandType = 0;
|
|
|
if (param.IsOfferUp == 1 || param.IsMaketPlace == 1) {
|
|
|
secondHandType = 1;
|
|
|
}
|
|
|
UpdateSecondHandType(id, secondHandType)
|
|
|
ReadData();
|
|
|
}
|
|
|
//#endregion
|
|
|
//#endregion
|
|
|
//提货信息
|
|
|
//#region 提货信息
|
|
|
//#region 提货页面
|
|
|
function OpenSecongHandBuyerMsg() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#SecongHandBuyerMsg',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//保存提货信息
|
|
|
//#region 保存提货信息
|
|
|
function SaveSecongHandBuyerMsg() {
|
|
|
var param = new Object();
|
|
|
param.id = id;
|
|
|
param.SecondHandBuyerName = $("#txt_buyer_name").val();
|
|
|
param.SecondHandBuyerPhone = $("#txt_buyer_phone").val();
|
|
|
param.SecondHandBuyerTime = $("#txt_buyer_time").val();
|
|
|
param.isSecondHandBuyer = true;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../DD_OrderServiceNew.asmx/UpdateSecondHandBuyer",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
alert("保存成功");
|
|
|
$.fancybox.close();
|
|
|
UpdateSecondHandType(id, 2);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
ReadData();
|
|
|
}
|
|
|
//#endregion
|
|
|
//撤销提货信息
|
|
|
//#region 撤销提货信息
|
|
|
function CancelSecongHandBuyerMsg() {
|
|
|
var param = new Object();
|
|
|
param.id = id;
|
|
|
param.SecondHandBuyerName = "";
|
|
|
param.SecondHandBuyerPhone = "";
|
|
|
param.SecondHandBuyerTime = "";
|
|
|
param.isSecondHandBuyer = false;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../DD_OrderServiceNew.asmx/UpdateSecondHandBuyer",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
alert("撤销成功");
|
|
|
$.fancybox.close();
|
|
|
UpdateSecondHandType(id, 1);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
ReadData();
|
|
|
}
|
|
|
//#endregion
|
|
|
//#endregion
|
|
|
//通用 更新二手状态
|
|
|
//#region 更新二手状态
|
|
|
function UpdateSecondHandType(newId,secondHandType) {
|
|
|
var param = new Object();
|
|
|
param.id = newId;
|
|
|
param.SecondHandType = secondHandType;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "../DD_OrderServiceNew.asmx/UpdateSecondHandType",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
ReadData();
|
|
|
}
|
|
|
//#endregion
|
|
|
// 初始化DataGrid
|
|
|
//#region 初始化DataGrid
|
|
|
function CreateDataGrid() {
|
|
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Shop";
|
|
|
col.CellTemplate = "<span>{Bind ShopName}</span>";
|
|
|
col.SortExpression = "c.ShopName";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "OrderCode";
|
|
|
col.CellTemplate = "<a href='DD_OrderGoodsMateForTM.aspx?Title=订单查询&OrderId={Bind orderid}' target='_blank' class='linka'>{Bind ordercode}</a>";
|
|
|
col.SortExpression = "ordercode";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "order_date";
|
|
|
col.CellTemplate = "<a>{Bind order_date,yyyy-MM-dd HH:mm}</a>";
|
|
|
col.SortExpression = "order_date";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "SKU";
|
|
|
col.CellTemplate = "<a><img src='{Bind Img_Url}' alt='' width='50px' height='50px'/>{Bind merchant_sku}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "return_quantity";
|
|
|
col.CellTemplate = "<a>{Bind return_quantity}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "order_amount";
|
|
|
col.CellTemplate = "<a>{Bind order_amount}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "refund_amount";
|
|
|
col.CellTemplate = "<a>{Bind refund_amount}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "label_cost";
|
|
|
col.CellTemplate = "<a>{Bind label_cost}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "tracking_id";
|
|
|
col.CellTemplate = "<a>{Bind tracking_id}</a> <a>【{Bind return_carrier}】</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "return_reason_code";
|
|
|
col.CellTemplate = "<div>{Bind return_reason_code}</div>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Scan Status";
|
|
|
col.SortExpression = "ScanState";
|
|
|
col.CellTemplate = "<span>{Bind ScanState}</span>";
|
|
|
col.CellFormatter = function (value) {
|
|
|
switch (value) {
|
|
|
case "2": return "First Scan";
|
|
|
case "1": return "Final Scan";
|
|
|
default: return "No Scan";
|
|
|
}
|
|
|
};
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "ScanDate";
|
|
|
col.SortExpression = "ScanDate";
|
|
|
col.CellTemplate = "<span>{Bind ScanDate,yyyy-MM-dd HH:mm}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Scan Name";
|
|
|
col.CellTemplate = "<span>{Bind Name}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "WareHouse";
|
|
|
col.CellTemplate = "<span>{Bind StoreName}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "InType";
|
|
|
col.SortExpression = "InType";
|
|
|
col.CellTemplate = "<span>{Bind InType}</span>";
|
|
|
col.CellFormatter = function (value) {
|
|
|
switch (value) {
|
|
|
case "1": return "Restock";
|
|
|
case "4": return "Sale";
|
|
|
case "2": return "CTN change";
|
|
|
case "3": return "Scrap";
|
|
|
case "5": return "Claim";
|
|
|
default: return "";
|
|
|
}
|
|
|
};
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Return PostionCode";
|
|
|
col.CellTemplate = "<span>{Bind PostionCode}</span>";
|
|
|
col.SortExpression = "PostionCode";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Return BarCode";
|
|
|
col.CellTemplate = "<span>{Bind barcode}</span>";
|
|
|
col.SortExpression = "barcode";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Photos";
|
|
|
col.CellTemplate = "<a CommandName='cmdImg' iul='{Bind ImgUrl}' ><img src='../{Bind ImgUrl}' alt='' width='100px' height='100px'/></a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "OfferUp";
|
|
|
col.CellTemplate = "<span>{Bind IsOfferUp}</span>";
|
|
|
col.CellFormatter = function (value) {
|
|
|
switch (value) {
|
|
|
case 0: return "No";
|
|
|
case 1: return "Yes";
|
|
|
default: return "No";
|
|
|
}
|
|
|
};
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "MaketPlace";
|
|
|
col.CellTemplate = "<span>{Bind IsMaketPlace}</span>";
|
|
|
col.CellFormatter = function (value) {
|
|
|
switch (value) {
|
|
|
case 0: return "No";
|
|
|
case 1: return "Yes";
|
|
|
default: return "No";
|
|
|
}
|
|
|
};
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
//是否有客户预约信息
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "SecondHandSalePrice";
|
|
|
col.CellTemplate = "<span>{Bind SecondHandSalePrice}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
//操作语句
|
|
|
var OptionStr = "";
|
|
|
//是否售卖完毕
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "SecondHandType";
|
|
|
col.CellTemplate = "<span>{Bind SecondHandType}</span>";
|
|
|
col.CellFormatter = function (value) {
|
|
|
switch (value) {
|
|
|
case 0:
|
|
|
return "未上架";
|
|
|
case 1:
|
|
|
return "上架中";
|
|
|
case 2:
|
|
|
return "等待客户取货";
|
|
|
case 3: return "完成售卖";
|
|
|
default:
|
|
|
return "未上架";
|
|
|
}
|
|
|
};
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
//操作
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "操作";
|
|
|
col.Width = "300px";
|
|
|
//col.CellTemplate = "<input class='btnClass dgbtnEdit' type='button' value='详情' onclick='ShowDetail();' ></input> ";
|
|
|
col.CellTemplate = "<span>{Bind SecondHandType}</span>";
|
|
|
col.CellFormatter = function (value) {
|
|
|
var OptionStr = "<input CommandName='showDetail' class='btnClass dgbtnEdit' type='button' value='详情'></input> ";
|
|
|
switch (value) {
|
|
|
case 0:
|
|
|
OptionStr += "<input CommandName='StartPutaway' class='btnClass dgbtnEdit' type='button' value='上架'></input> ";
|
|
|
OptionStr += "<input CommandName='EndBuy' class='btnClass dgbtnEdit' type='button' value='已卖出'></input> ";
|
|
|
return OptionStr;
|
|
|
case 1:
|
|
|
OptionStr += "<input CommandName='StartPutaway' class='btnClass dgbtnEdit' type='button' value='上架信息修改'></input> ";
|
|
|
OptionStr += "<input CommandName='CreateSecongHandBuyerMsg' class='btnClass dgbtnEdit' type='button' value='生成预约单'></input> ";
|
|
|
OptionStr += "<input CommandName='EndBuy' class='btnClass dgbtnEdit' type='button' value='已卖出'></input> ";
|
|
|
return OptionStr;
|
|
|
case 2:
|
|
|
OptionStr += "<input CommandName='LookSecongHandBuyerMsg' class='btnClass dgbtnEdit' type='button' value='查看预约单'></input> ";
|
|
|
OptionStr += "<input CommandName='CancelSecongHandBuyerMsg' class='btnClass dgbtnEdit' type='button' value='取消预约单'></input> ";
|
|
|
OptionStr += "<input CommandName='CreateImage' class='btnClass dgbtnEdit' type='button' value='生成客户提货图片'></input> ";
|
|
|
OptionStr += "<input CommandName='EndBuy' class='btnClass dgbtnEdit' type='button' value='已卖出'></input> ";
|
|
|
return OptionStr;
|
|
|
case 3: return OptionStr;
|
|
|
default:
|
|
|
OptionStr += "<input CommandName='StartPutaway' class='btnClass dgbtnEdit' type='button' value='上架'></input> ";
|
|
|
OptionStr += "<input CommandName='EndBuy' class='btnClass dgbtnEdit' type='button' value='已卖出'></input> ";
|
|
|
return OptionStr;
|
|
|
}
|
|
|
};
|
|
|
//col.CellTemplate = OptionStr;
|
|
|
//col.CellTemplate += "<input CommandName='StartPutaway' class='btnClass dgbtnEdit' type='button' value='上架'></input> ";
|
|
|
//col.CellTemplate += "<input CommandName='CreateSecongHandBuyerMsg' class='btnClass dgbtnEdit' type='button' value='生成预约单'></input> ";
|
|
|
//col.CellTemplate += "<input CommandName='LookSecongHandBuyerMsg' class='btnClass dgbtnEdit' type='button' value='查看预约单'></input> ";
|
|
|
//col.CellTemplate += "<input CommandName='CancelSecongHandBuyerMsg' class='btnClass dgbtnEdit' type='button' value='取消预约单'></input> ";
|
|
|
//col.CellTemplate += "<input CommandName='CreateImage' class='btnClass dgbtnEdit' type='button' value='生成客户提货图片'></input> ";
|
|
|
//col.CellTemplate += "<input CommandName='EndBuy' class='btnClass dgbtnEdit' type='button' value='已卖出'></input> ";
|
|
|
|
|
|
|
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
datagrid1.SetPageSize(50);
|
|
|
datagrid1.SetPageIndex(1);
|
|
|
|
|
|
datagrid1.SortExpression = "Id ";
|
|
|
datagrid1.ViewSortDirection = "desc";
|
|
|
datagrid1.IsFixHeader = false;
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
datagrid1.AllowPaging = true;
|
|
|
datagrid1.AllowPaging2 = true;
|
|
|
datagrid1.ShowIndexColumn = true;
|
|
|
datagrid1.Width = "100%";
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
|
datagrid1.Init();
|
|
|
datagrid1.Sorting(function () {
|
|
|
|
|
|
ReadData();
|
|
|
});
|
|
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
|
|
|
|
|
}
|
|
|
var PState = 0;
|
|
|
//#endregion
|
|
|
// 读取数据
|
|
|
//#region 读取数据
|
|
|
function ReadData() {
|
|
|
|
|
|
var param = new Object();
|
|
|
param.ShopId = $("#select_shop").val();
|
|
|
param.InType = "4";//InType=6 Second hand
|
|
|
param.ScanState = 1;// $("#select_scanstate").val();
|
|
|
param.OrderCode = $("#txt_OrderCode").val();
|
|
|
param.SKU = $("#txt_SKU").val();
|
|
|
param.trackcode = $("#txt_trackcode").val();
|
|
|
param.SDate = null;
|
|
|
if ($("#txt_SDate").val() != "")
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
param.EDate = null;
|
|
|
if ($("#txt_EDate").val() != "")
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
param.SDate2 = null;
|
|
|
if ($("#txt_SDate2").val() != "")
|
|
|
param.SDate2 = $("#txt_SDate2").val();
|
|
|
param.EDate2 = null;
|
|
|
if ($("#txt_EDate2").val() != "")
|
|
|
param.EDate2 = $("#txt_EDate2").val();
|
|
|
param.trackcz = $("#select_tracking").val();
|
|
|
param.changestate = $("#select_changestate").val();
|
|
|
param.warehouse = $("#select_warehouse").val();
|
|
|
param.SecondState = $("#select_SecondState").val();
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
|
|
|
|
//param.Sort = datagrid1.SortExpression + " " + datagrid1.ViewSortDirection;
|
|
|
param.Sort = "order_date " + datagrid1.ViewSortDirection;
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../DD_OrderServiceNew.asmx/GetListOrderForReturnSecond",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
$("a[iul]").each(function () {
|
|
|
var iul = $(this).attr("iul");
|
|
|
if (iul == "")
|
|
|
$(this).hide();
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function GetTimediff(date1) {
|
|
|
// var date1= '2015/05/01 00:00:00'; //开始时间
|
|
|
var date2 = new Date(); //结束时间
|
|
|
var date3 = new Date(date1).getTime() - date2.getTime(); //时间差的毫秒数
|
|
|
//计算出相差天数
|
|
|
if (date3 <= 0)
|
|
|
return "0";
|
|
|
var days = Math.floor(date3 / (24 * 3600 * 1000))
|
|
|
|
|
|
//计算出小时数
|
|
|
var leave1 = date3 % (24 * 3600 * 1000) //计算天数后剩余的毫秒数
|
|
|
var hours = Math.floor(leave1 / (3600 * 1000))
|
|
|
|
|
|
return days + "天 " + hours + "小时";
|
|
|
|
|
|
|
|
|
}
|
|
|
function GetExcelData() {
|
|
|
var param = new Object();
|
|
|
|
|
|
param.IsDetail = 0;
|
|
|
if ($("#chk_pp").is(':checked') == true)
|
|
|
param.IsDetail = 1;
|
|
|
if ($("#select_plat").find("option").length > 0)
|
|
|
param.PlatType = $("#select_plat").val();
|
|
|
else
|
|
|
param.PlatType = 0;
|
|
|
if ($("#select_shop").find("option").length > 0)
|
|
|
param.ShopId = $("#select_shop").val();
|
|
|
else
|
|
|
param.ShopId = 0;
|
|
|
if ($("#txt_days").val() != "")
|
|
|
param.OutDays = $("#txt_days").val();
|
|
|
else
|
|
|
param.OutDays = 0;
|
|
|
param.DateType = $("#select_rqlx").val();
|
|
|
param.SDate = null;
|
|
|
if ($("#txt_SDate").val() != "")
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
param.EDate = null;
|
|
|
if ($("#txt_EDate").val() != "")
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
|
|
param.TjType = $("#select_tj").val();
|
|
|
param.Name = $("#txt_Name").val();
|
|
|
param.MateState = $("#select_ppstate").val();
|
|
|
param.State = $("#select_fhstate").val();
|
|
|
param.PrintState = $("#select_printstate").val();
|
|
|
param.IsSku = 0;
|
|
|
param.MoneyState = $("#select_moneystate").val();
|
|
|
if ($("#chk_sku").is(':checked') == true)
|
|
|
param.IsSku = 1;
|
|
|
param.IsError = 0;
|
|
|
if ($("#chk_yc").is(':checked') == true)
|
|
|
param.IsError = 1;
|
|
|
param.HBOrder = 0;
|
|
|
if ($("#chk_hb").is(':checked') == true)
|
|
|
param.HBOrder = 1;
|
|
|
|
|
|
var fname = "订单导出.xls";
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "DD_OrderService.asmx/ExcelOrderData",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
params = { FilePath: data.d, FileName: fname };
|
|
|
|
|
|
window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//选择商店
|
|
|
//#region 选择商店
|
|
|
function GetShopList() {
|
|
|
$("#select_shop").empty();
|
|
|
//if (AllShop == "1")
|
|
|
$("#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>");
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
|
<body class="headbody">
|
|
|
<div class="title_ico">
|
|
|
二手售卖
|
|
|
</div>
|
|
|
|
|
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
|
|
<tr>
|
|
|
|
|
|
<td class="f1" width="10%">tracking_id:</td>
|
|
|
<td colspan="5">
|
|
|
<input id="txt_trackcode" class="editTextbox" style="width: 300px;" type="text" />
|
|
|
<font color="red">Scan gun scanning and printing barcode</font></td>
|
|
|
<td> </td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="10%">shop:</td>
|
|
|
<td width="18%">
|
|
|
<select id="select_shop" class="selectClass" style="width: 120px" name="D7">
|
|
|
</select></td>
|
|
|
<td class="f1" width="12%">OrderCode: </td>
|
|
|
<td width="18%">
|
|
|
<select id="select_dept" class="selectClass" style="width: 90px; display: none" name="D8">
|
|
|
</select><input id="txt_OrderCode" class="editTextbox" style="width: 120px;" type="text" />
|
|
|
</td>
|
|
|
<td class="f1" style="width: 10%;">SKU:</td>
|
|
|
<td width="22%">
|
|
|
<input id="txt_SKU" class="editTextbox" style="width: 120px;" type="text" />
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="f1" width="10%">tracking_id exist:</td>
|
|
|
<td width="18%">
|
|
|
<select id="select_tracking" class="selectClass" name="D10" style="width: 120px">
|
|
|
<option value="-1">All</option>
|
|
|
<option value="0">no exist</option>
|
|
|
<option value="1">yes exist</option>
|
|
|
</select></td>
|
|
|
<td style="width: 12%; color: red" class="f1" align="center">ChangeOrder</td>
|
|
|
<td width="15%">
|
|
|
<select id="select_changestate" class="selectClass" name="D11" style="width: 120px">
|
|
|
<option value="-1">All</option>
|
|
|
<option value="0">Not processed</option>
|
|
|
|
|
|
</select></td>
|
|
|
<td class="f1" style="width: 10%;">Order Date:</td>
|
|
|
<td width="22%" colspan="2">
|
|
|
<input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-<input id="txt_EDate" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<%-- <td class="f1" width="10%"> </td>--%>
|
|
|
<%-- <td width="18%">--%>
|
|
|
<td class="f1" style="width: 10%;">WareHouse:</td>
|
|
|
<td width="15%">
|
|
|
<select id="select_warehouse" class="selectClass" name="D11" style="width: 120px">
|
|
|
<option value="-1">All</option>
|
|
|
<option value="0">W</option>
|
|
|
<option value="1">E</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
<td class="f1" style="width: 10%;">Scan Date:</td>
|
|
|
<td width="22%" colspan="1">
|
|
|
<input id="txt_SDate2" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />-<input id="txt_EDate2" class="editTextbox" onfocus="WdatePicker()" style="width: 120px;" type="text" />
|
|
|
|
|
|
</td>
|
|
|
<td class="f1" style="width: 10%;">Select Second State:</td>
|
|
|
<td width="22%" colspan="1">
|
|
|
<select id="select_SecondState" class="selectClass" name="D11" style="width: 120px">
|
|
|
<option value="-1">All</option>
|
|
|
<option value="0">未上架</option>
|
|
|
<option value="1">上架中</option>
|
|
|
<option value="2">等待取货</option>
|
|
|
<option value="3">售卖完成</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" onclick="ReadData();" />
|
|
|
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td valign="top" colspan="7">
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
|
|
|
<div style="display: none">
|
|
|
<div id="StartPutaway" title="货物图片" style="width: 600px; height: 400px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">Second Hand Sale Price:
|
|
|
</td>
|
|
|
<td align="left">
|
|
|
<input id="txt_SecondHandSalePrice" type="text" />
|
|
|
<%-- <input id="txt_tracking_id" type="text" />--%>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">OfferUp:
|
|
|
</td>
|
|
|
<td align="left">
|
|
|
<select id="select_offerup" class="selectClass" name="D10" style="width: 120px">
|
|
|
<option value="0">No</option>
|
|
|
<option value="1">Yes</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">MaketPlace:
|
|
|
</td>
|
|
|
<td align="left">
|
|
|
<select id="select_maketplace" class="selectClass" name="D10" style="width: 120px">
|
|
|
<option value="0">No</option>
|
|
|
<option value="1">Yes</option>
|
|
|
</select>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="center" colspan="2">
|
|
|
<input
|
|
|
id="btn_Save" type="button" class="btnClass btnClassSave" value="SavePutawayMsg" onclick="SavePutawayMsg();" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div id="OrderReturnDetail" title="二手货物详情" style="width: 600px; height: 550px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">GoodsName:</td>
|
|
|
<td align="left">
|
|
|
<input id="txt_GoodsName" type="text" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">GoodsEnglisgName:</td>
|
|
|
<td align="left">
|
|
|
<input id="txt_GoodsEnglisgName" type="text" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">Goods Url:</td>
|
|
|
<td align="left">
|
|
|
<a target='_blank' id="txt_GoodsUrl" style='color:green;margin-left:5px;'></a>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">GoodsCode:</td>
|
|
|
<td align="left">
|
|
|
<input id="txt_GoodsCode" type="text" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">Goods Deatil:</td>
|
|
|
<td align="left">
|
|
|
<textarea id="txt_GoodsDeatil" cols="100" rows="2" style="width: 90%;height:150px"></textarea>
|
|
|
<%-- <input id="txt_GoodsDeatil" type="textarea" />--%>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1"> First Image:</td>
|
|
|
<td colspan="2" align="center">
|
|
|
<img src="" width="280px" height="250px" id="img_1" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">Image List:</td>
|
|
|
<td align="left">
|
|
|
<div id="div_img">
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
|
|
|
<td style="width: 80px;" class="f1">Link List:</td>
|
|
|
|
|
|
<td align="left">
|
|
|
|
|
|
<div id="div_LinkList">
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td align="center" colspan="2">
|
|
|
<input id="btn_DownloadImage" type="button" class="btnClass btnClassSave" value="Download Image" onclick="DownloadImage();" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
<div id="SecongHandBuyerMsg" title="生成预约单信息" style="width: 300px; height: 300px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">Buyer Name:</td>
|
|
|
<td align="left">
|
|
|
<input id="txt_buyer_name" type="text" strly="width:150px"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">Buyer Phone:</td>
|
|
|
<td align="left">
|
|
|
<input id="txt_buyer_phone" type="text" strly="width:150px"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">Buyer Time:</td>
|
|
|
<td align="left">
|
|
|
<input id="txt_buyer_time" type="text" strly="width:150px" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td align="center" colspan="2">
|
|
|
<input id="btn_CreateSecongHandBuyerMsg" type="button" class="btnClass btnClassSave" value="Save" onclick="SaveSecongHandBuyerMsg();" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<div class="card" id="card" style="display: none">
|
|
|
<div class="card-bg">
|
|
|
<img class="card-bg1" src="../SecondHandImage/bg1.png" alt="">
|
|
|
<img class="card-bg2" src="../SecondHandImage/bg2.png" alt="">
|
|
|
</div>
|
|
|
<div class="card-header">
|
|
|
<strong>TrackCode: </strong>
|
|
|
<span id="trackCode">-</span>
|
|
|
</div>
|
|
|
<div class="card-body">
|
|
|
<!-- <div class="logo">
|
|
|
<img src="./image/logo.png" alt="">
|
|
|
</div> -->
|
|
|
<div class="goods-info">
|
|
|
<div class="product">
|
|
|
<sapn class="product-title">Product</sapn>
|
|
|
<sapn class="product-text" id="product">-</sapn>
|
|
|
</div>
|
|
|
<div class="price">
|
|
|
<img class="price-icon" src="../SecondHandImage/price.png" alt="">
|
|
|
<sapn class="price-num" id="price">-</sapn>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="code">
|
|
|
<div id="qrcode" class="code-img">
|
|
|
</div>
|
|
|
<div class="code-title">verification code</div>
|
|
|
<div class="code-date" id="date"></div>
|
|
|
</div>
|
|
|
<div class="info">
|
|
|
<div class="contact">
|
|
|
<img class="contact-icon" src="../SecondHandImage/contact.png" alt="">
|
|
|
<sapn class="contact-num">
|
|
|
<span id="contactName">-</span>:
|
|
|
<span id="contactPhone">-</span>
|
|
|
</sapn>
|
|
|
</div>
|
|
|
<div class="address">
|
|
|
<img class="address-icon" src="../SecondHandImage/address.png" alt="">
|
|
|
<sapn class="address-num" id="address">-</sapn>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<script>
|
|
|
//生成取件码图片
|
|
|
//#region 生成取件码图片
|
|
|
// 初始化二维码
|
|
|
const qrcode = new QRCode("qrcode", {
|
|
|
text: '',
|
|
|
width: 400,
|
|
|
height: 400
|
|
|
});
|
|
|
// 下载取件码图片
|
|
|
function downloadQRCodeImg(obj) {
|
|
|
|
|
|
if (obj.product.length > 22) {
|
|
|
obj.product = obj.product.substring(0, 22) + '...';
|
|
|
}
|
|
|
for (let key in obj) {
|
|
|
$("#" + key).text(obj[key])
|
|
|
}
|
|
|
$("#card").show()
|
|
|
debugger
|
|
|
|
|
|
qrcode.makeCode(obj.trackCode + '')
|
|
|
generateImages(obj.trackCode)
|
|
|
}
|
|
|
// 生成图片
|
|
|
function generateImages(title) {
|
|
|
html2canvas(document.querySelector("#card")).then((canvas) => {
|
|
|
const imgUrl = canvas.toDataURL("image/png", 1);
|
|
|
const image = document.createElement("img");
|
|
|
image.src = imgUrl;
|
|
|
const content = document.createElement("div");
|
|
|
content.appendChild(image);
|
|
|
// 下载图片
|
|
|
const a = document.createElement("a");
|
|
|
a.href = imgUrl;
|
|
|
a.download = title;
|
|
|
a.click();
|
|
|
content.remove();
|
|
|
a.remove();
|
|
|
$("#card").hide()
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|