From a1587175e1a3654a0f12782a2626c88eb6077898 Mon Sep 17 00:00:00 2001
From: fxc <541723947@qq.com>
Date: Tue, 14 Jan 2025 15:32:20 +0800
Subject: [PATCH] 222
---
TradeManage/HuoWu/HW_GoodsAddForTM.aspx | 15 +-
TradeManageNew/DingDan/DT_SecondHand2.aspx | 513 ++++++++-------------
2 files changed, 191 insertions(+), 337 deletions(-)
diff --git a/TradeManage/HuoWu/HW_GoodsAddForTM.aspx b/TradeManage/HuoWu/HW_GoodsAddForTM.aspx
index a0c9711..d33f0e0 100644
--- a/TradeManage/HuoWu/HW_GoodsAddForTM.aspx
+++ b/TradeManage/HuoWu/HW_GoodsAddForTM.aspx
@@ -671,7 +671,7 @@
success: function (data) {
var JinJia = (GoodsModel.InPrice / usdfeerate).toFixed(2)
var TouCheng = (GoodsModel.Solid * 130).toFixed(2)
- var HuoWuShuiFei = (GoodsModel.Solid * 130).toFixed(2)
+ var HuoWuShuiFei = (GoodsModel.FeeRate * GoodsModel.InPrice * 0.01 / usdfeerate).toFixed(2)
var YuGuJiaGe = Number(JinJia) + Number(TouCheng) + Number(HuoWuShuiFei)
TemuChengBen = {
JinJia: JinJia,
@@ -4852,19 +4852,6 @@ function selectE(p,c) {
type="button" value="计算" />
-
{Bind SkuCode}`;
col.SortExpression = "c.SkuCode";
Array.add(datagrid1.Columns, col);
@@ -102,6 +153,11 @@
col.SortExpression = "c.BarCode";
Array.add(datagrid1.Columns, col);
+ col = new nblf.ui.DataGridColumn();
+ col.HeaderText = "Photo";
+ col.CellTemplate = "

";
+ Array.add(datagrid1.Columns, col);
+
var col = new nblf.ui.DataGridColumn();
col.HeaderText = "PositionCode";
col.CellTemplate = "
{Bind WarehousePositionCode}";
@@ -145,39 +201,47 @@
};
Array.add(datagrid1.Columns, col);
+ var col = new nblf.ui.DataGridColumn();
+ col.HeaderText = "PublishMessage";
+ col.CellTemplate = "
{Bind PublishMessage}";
+ col.SortExpression = "c.PublishMessage";
+ Array.add(datagrid1.Columns, col);
+
+ var col = new nblf.ui.DataGridColumn();
+ col.HeaderText = "OrderDetail";
+ col.CellTemplate = "
{Bind OrderDetail}";
+ col.CellFormatter = function (order) {
+ var str = "";
+ if(order){
+ str += `
订单号:
`
+ str += `
收件人:
`
+ str += `
手机号:
`
+ str += `
地址:
`
+ }
+ return str;
+ }
+ Array.add(datagrid1.Columns, col);
+
//操作
col = new nblf.ui.DataGridColumn();
col.HeaderText = "操作";
- col.Width = "200px";
- // col.CellFormatter = function (value) {
- // var OptionStr = "
";
- // switch (value) {
- // case 0:
- // OptionStr += "
";
- // OptionStr += "
";
- // return OptionStr;
- // case 1:
- // OptionStr += "
";
- // OptionStr += "
";
- // OptionStr += "
";
- // return OptionStr;
- // case 2:
- // OptionStr += "
";
- // OptionStr += "
";
- // OptionStr += "
";
- // OptionStr += "
";
- // return OptionStr;
- // case 3: return OptionStr;
- // default:
- // OptionStr += "
";
- // OptionStr += "
";
- // return OptionStr;
- // }
- // };
-
-
-
+ col.Width = "100px";
+ col.CellTemplate = "{Bind Status}";
+ col.CellFormatter = function (value) {
+ var OptionStr = "";
+ switch (value) {
+ case 1:
+ OptionStr += "
";
+ break;
+ case 2:
+ OptionStr += "
";
+ OptionStr += "
";
+ OptionStr += "
";
+ }
+ return OptionStr;
+ }
Array.add(datagrid1.Columns, col);
+
datagrid1.SetPageSize(50);
datagrid1.SetPageIndex(1);
@@ -256,63 +320,21 @@
}
- 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 LinkGoods(GoodsId) {
+ window.open(`https://www.kferp.net/HuoWu/HW_GoodsAddForTM.aspx?GoodsId=${GoodsId}`);
+ }
+ //#endregion
+ //#region 日期格式转换
+ function formatDate(date) {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ const day = String(date.getDate()).padStart(2, '0');
+ return `${year}-${month}-${day}`;
}
//#endregion
@@ -359,16 +381,32 @@
dataType: "json",
success: function (data) {
WindowLoadModel.Hide();
- if(data.Code==1){
+ if(data.d.Code==1){
ReadData();
}else{
- alert(data.Message);
+ alert(data.d.Message);
}
}
});
}
//#endregion
+ //#region 单个上架产品
+ function UploadGoods(obj) {
+ var rowindex = $(obj).parent().parent().attr("index");
+ var model = datagrid1.Get_Model(rowindex);
+ var param = {
+ Ids: [model.Id],
+ }
+ $.ajax({
+ url: "../DD_OrderServiceNew.asmx/OrderUsedSalePlatformPublish",
+ data: Sys.Serialization.JavaScriptSerializer.serialize(param),
+ dataType: "json",
+ });
+ alert("已开始推送,需要一段时间,请稍后查看推送状态");
+ }
+ //#endregion
+
//#region 批量上架产品
function BatUploadGoods(Ids) {
var param = {
@@ -456,6 +494,48 @@
return canvas;
}
//#endregion
+
+ //#region 下载提货单
+ function DownloadReceipt(obj) {
+ var rowindex = $(obj).parent().parent().attr("index");
+ var model = datagrid1.Get_Model(rowindex);
+ const receiptEl = document.getElementById('receipt');
+ $('#receipt').show();
+ const options = {
+ scale: 2,
+ useCORS: true,
+ backgroundColor: '#ffffff',
+ logging: true,
+ windowWidth: receiptEl.scrollWidth,
+ windowHeight: receiptEl.scrollHeight,
+ scrollX: 0,
+ scrollY: 0
+ };
+ html2canvas(receiptEl, options).then(function(canvas) {
+ const link = document.createElement('a');
+ link.download = `pickup_receipt_${model.BarCode}.png`;
+ link.href = canvas.toDataURL('image/png', 1.0);
+ link.click();
+ $('#receipt').hide();
+ });
+ }
+ //#endregion
+
+ //#region 下载快递面单
+ function DownloadTrackCode(obj) {
+ var rowindex = $(obj).parent().parent().attr("index");
+ var model = datagrid1.Get_Model(rowindex);
+ console.log(model)
+ }
+ //#endregion
+
+ //#region 标记卖出
+ function MarkSell(obj) {
+ var rowindex = $(obj).parent().parent().attr("index");
+ var model = datagrid1.Get_Model(rowindex);
+ console.log(model)
+ }
+ //#endregion
@@ -516,240 +596,27 @@
-
-
-
+
+
+
-
-
-
+
+
+
Product Name: Power Tower Dip Station Pull Up Bar Workout Equipment, Adjustable Height 62.2" to 84.5", Holds Up to 660LBS
+
Product SKU: SKU123456
+
Product Code: P789012
+
Product Price: $399.00
+

+
+
+
+
Customer Name: John Smith
+
Phone Number: +1 234 567 8900
+
Appointment Time: 2024-03-20 14:30
+
-
-
-
-
-
-
-

-

-
-
-
-
-
-
- Product
- -
-
-
-

-
-
-
-
-
-
-
-
verification code
-
-
-
-
-
-

-
-
-
-
-
-
-
-