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="计算" /> - - - temu成本预估: - - - 进价: - +运费: - +货物税费: - +头程: - =预计价格:0$   - - - diff --git a/TradeManageNew/DingDan/DT_SecondHand2.aspx b/TradeManageNew/DingDan/DT_SecondHand2.aspx index 5f1c5c8..3e603ad 100644 --- a/TradeManageNew/DingDan/DT_SecondHand2.aspx +++ b/TradeManageNew/DingDan/DT_SecondHand2.aspx @@ -16,6 +16,61 @@ img[src=""] { visibility: hidden; } + .product-box{ + width: 100%; + display: flex; + justify-content: flex-start; + align-items: center; + } + .product-box a{ + text-align: left; + padding: 0 4px; + } + + + .receipt { + width: 540px; + margin: 0; + padding: 10px 30px; + box-shadow: none; + font-family: "Microsoft YaHei", sans-serif; + background: #fff; + } + .receipt .product-image { + width: 200px; + margin: 0 auto 20px; + display: block; + } + .receipt .info-section { + border-top: 2px solid #f0f0f0; + padding-top: 20px; + } + .receipt .product-details, .customer-info { + margin-bottom: 20px; + line-height: 2; + } + .receipt .product-details p, .customer-info p { + color: #666; + margin: 8px 0; + font-size: 14px; + font-weight: normal; + } + .receipt .product-details span, .customer-info span { + color: #000; + font-weight: 500; + margin-left: 10px; + font-size: 16px; + } + .receipt .product-details{ + position: relative; + } + .receipt .product-image{ + position: absolute; + right: 0; + top: 65px; + width: 150px; + height: auto; + } @@ -85,14 +140,10 @@ //#region 初始化DataGrid function CreateDataGrid() { - col = new nblf.ui.DataGridColumn(); - col.HeaderText = "Image"; - col.CellTemplate = ""; - Array.add(datagrid1.Columns, col); - var col = new nblf.ui.DataGridColumn(); col.HeaderText = "SKU"; - col.CellTemplate = "{Bind SkuCode}"; + col.Width = "150px"; + col.CellTemplate = `
{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 @@ -
-
- - - - - - - - - - - - - - - - - - - -
Second Hand Sale Price: - - -<%-- --%> -
OfferUp: - - -
MaketPlace: - - -
- -
+ +