Merge remote-tracking branch 'origin/master'

master
wufan 2 months ago
commit 266d73e1b1

@ -44,7 +44,14 @@
var XPId = 0; var XPId = 0;
var GoodsModel = null; var GoodsModel = null;
var Title = "货物信息"; var Title = "货物信息";
var UserId = "<%=Session["UserId"]%>"; var UserId = "<%=Session["UserId"]%>";
var TemuChengBen = {
JinJia: "0",
YunFei: "0",
TouCheng: "0",
HuoWuShuiFei: "0",
YuGuJiaGe: "0",
}
var WindowLoadModel = new WindowLoad(); var WindowLoadModel = new WindowLoad();
$(document).ready(function () { $(document).ready(function () {
WindowLoadModel.ApplicationPath = "../"; WindowLoadModel.ApplicationPath = "../";
@ -95,7 +102,8 @@
GetUrl(); GetUrl();
GetUrl2(); GetUrl2();
GetPostNum(); GetPostNum();
GetFedexModel(); GetFedexModel();
GetTemuFee();
} }
//else //else
@ -651,6 +659,74 @@
} }
//获取temu成本预估
function GetTemuFee() {
var param = {
GoodsId: GoodsId
}
$.ajax({
url: "../DD_OrderServiceNew.asmx/GetListTemuChengBen",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
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 YuGuJiaGe = Number(JinJia) + Number(TouCheng) + Number(HuoWuShuiFei)
TemuChengBen = {
JinJia: JinJia,
YunFei: "0",
TouCheng: TouCheng,
HuoWuShuiFei: HuoWuShuiFei,
YuGuJiaGe: YuGuJiaGe.toFixed(2),
}
if (data.d.DataSource && data.d.DataSource.length) {
TemuChengBen = data.d.DataSource[0]
}
$("#txt_temu_JinJia").val(TemuChengBen.JinJia)
$("#txt_temu_YunFei").val(TemuChengBen.YunFei)
$("#txt_temu_TouCheng").val(TemuChengBen.TouCheng)
$("#txt_temu_HuoWuShuiFei").val(TemuChengBen.HuoWuShuiFei)
$('#txt_temu_YuGuJiaGe').text(TemuChengBen.YuGuJiaGe + '$')
}
});
}
//计算并保存temu成本预估
function SaveTemuFee() {
var JinJia = $("#txt_temu_JinJia").val()
var YunFei = $("#txt_temu_YunFei").val()
var TouCheng = $("#txt_temu_TouCheng").val()
var HuoWuShuiFei = $("#txt_temu_HuoWuShuiFei").val()
if (!JinJia || !YunFei || !TouCheng || !HuoWuShuiFei) {
alert("请把信息填写完整");
return;
}
var YuGuJiaGe = Number(JinJia) + Number(YunFei) + Number(TouCheng) + Number(HuoWuShuiFei)
$('#txt_temu_YuGuJiaGe').text(YuGuJiaGe+'$')
var param = {
Model: {
ID: TemuChengBen.ID,
GoodsId: GoodsId,
JinJia: JinJia,
YunFei: YunFei,
TouCheng: TouCheng,
HuoWuShuiFei: HuoWuShuiFei,
YuGuJiaGe: YuGuJiaGe,
}
}
$.ajax({
url: "../DD_OrderServiceNew.asmx/Save_TemuChengBen",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
GetFedexModel();
}
});
}
function SumYGFee() function SumYGFee()
{ {
if(GoodsModel!=null) if(GoodsModel!=null)
@ -4776,6 +4852,19 @@ function selectE(p,c) {
type="button" value="计算" /> type="button" value="计算" />
</td> </td>
</tr> </tr>
<tr>
<td class="f1">
temu成本预估
</td>
<td colspan="3" align="center">
进价:<input id="txt_temu_JinJia" min='0' max='1000000' type="text" style="width: 80px;" class="editTextbox" value="0" />
+运费:<input id="txt_temu_YunFei" min='0' max='1000000' type="text" style="width: 80px;" class="editTextbox" value="0" />
+货物税费:<input id="txt_temu_HuoWuShuiFei" min='0' max='1000000' type="text" style="width: 80px;" class="editTextbox" value="0" />
+头程:<input id="txt_temu_TouCheng" min='0' max='1000000' type="text" style="width: 80px;" class="editTextbox" value="0" />
=预计价格:<a style='color: Red' id="txt_temu_YuGuJiaGe">0$</a>&nbsp;&nbsp;
<input class="btnClass btnClassSave" onclick="SaveTemuFee();" type="button" value="计算并保存" />
</td>
</tr>
</table> </table>
</td> </td>
</tr> </tr>

@ -3001,6 +3001,7 @@
<option value="15">Shopify</option> <option value="15">Shopify</option>
<option value="18">wayfair</option> <option value="18">wayfair</option>
<option value="21">SheIn</option> <option value="21">SheIn</option>
<option value="23">Temu</option>
</select> </select>
</td> </td>
<td class="f1" width="10%"> <td class="f1" width="10%">

@ -447,7 +447,15 @@ namespace TradeManage
public JsonModel<List<HW_GoodsDetailNew2>> GetGoodsDetailListNew22(int platid, int MUserId, int cpzt, int GNum, int TJ1, int IsYC, int IsJQ, int StoreId, int AQNum, int AQNum2, string Name, string Supplier, int TJ2, int SNum, int ENum, int cgjh,int kh, int PageIndex, int PageSize, string Sort) public JsonModel<List<HW_GoodsDetailNew2>> GetGoodsDetailListNew22(int platid, int MUserId, int cpzt, int GNum, int TJ1, int IsYC, int IsJQ, int StoreId, int AQNum, int AQNum2, string Name, string Supplier, int TJ2, int SNum, int ENum, int cgjh,int kh, int PageIndex, int PageSize, string Sort)
{ {
HuoWuData data = new HuoWuData(); HuoWuData data = new HuoWuData();
int num = Convert.ToInt32(base.Session["CompanyId"]); int num = 0;
if (base.Session["CompanyId"] != null)
{
num = Convert.ToInt32(base.Session["CompanyId"]);
}
else
{
num = 1;
}
RefParameterCollection where = new RefParameterCollection(); RefParameterCollection where = new RefParameterCollection();
if (IsYC == 0) if (IsYC == 0)
{ {
@ -475,7 +483,8 @@ namespace TradeManage
where.Add("b.guserid_wayfair", "=", MUserId, DbType.Int32); where.Add("b.guserid_wayfair", "=", MUserId, DbType.Int32);
else if (MUserId != 0 && platid == 21) else if (MUserId != 0 && platid == 21)
where.Add("b.guserid_sheIn", "=", MUserId, DbType.Int32); where.Add("b.guserid_sheIn", "=", MUserId, DbType.Int32);
else if (MUserId != 0 && platid == 23)
where.Add("b.guserid_temu", "=", MUserId, DbType.Int32);
if (AQNum == 1) if (AQNum == 1)
{ {
where.Add("isnull(a.WestNum,0)-isnull(a.GoodsHJNum12,0)", "<", 0, DbType.Int32); where.Add("isnull(a.WestNum,0)-isnull(a.GoodsHJNum12,0)", "<", 0, DbType.Int32);

@ -30614,10 +30614,10 @@ select @id";
try try
{ {
string tsql = @" string tsql = @"
SELECT a.[ID],a.[GoodsId],c.GoodsCode,[JinJia],[YunFei],[TouCheng],[HuoWuShuiFei],[YuGuJiaGe],[CreateUserId],[CreateTime] SELECT top 1 a.[ID],a.[GoodsId],c.GoodsCode,[JinJia],[YunFei],[TouCheng],[HuoWuShuiFei],[YuGuJiaGe],[CreateUserId],[CreateTime]
FROM [newerpbak_cwk].[dbo].[TemuChengBen] a FROM [dbo].[TemuChengBen] a
inner join HW_GoodsInfo c on a.GoodsId=c.GoodsId inner join HW_GoodsInfo c on a.GoodsId=c.GoodsId
where a.GoodsId = @GoodsId "; where a.GoodsId = @GoodsId order by a.CreateTime desc";
Database db = DatabaseFactory.CreateDatabase(); Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetSqlStringCommand(tsql); DbCommand cmd = db.GetSqlStringCommand(tsql);
db.AddInParameter(cmd, "@GoodsId", DbType.Int32, GoodsId); db.AddInParameter(cmd, "@GoodsId", DbType.Int32, GoodsId);

@ -451,7 +451,18 @@ namespace TradeManageNew
public JsonModel<List<HW_GoodsDetailNew2>> GetGoodsDetailListNew22(int platid,int MUserId,int cpzt,int GNum, int TJ1, int IsYC, int IsJQ, int StoreId, int AQNum, int AQNum2, string Name, string Supplier, int TJ2, int SNum, int ENum, int cgjh, int kh, int PageIndex, int PageSize, string Sort) public JsonModel<List<HW_GoodsDetailNew2>> GetGoodsDetailListNew22(int platid,int MUserId,int cpzt,int GNum, int TJ1, int IsYC, int IsJQ, int StoreId, int AQNum, int AQNum2, string Name, string Supplier, int TJ2, int SNum, int ENum, int cgjh, int kh, int PageIndex, int PageSize, string Sort)
{ {
HuoWuData data = new HuoWuData(); HuoWuData data = new HuoWuData();
int num = Convert.ToInt32(base.Session["CompanyId"]); int num = 0;
if (base.Session["CompanyId"] != null)
{
num = Convert.ToInt32(base.Session["CompanyId"]);
}
else
{
num = 1;
}
RefParameterCollection where = new RefParameterCollection(); RefParameterCollection where = new RefParameterCollection();
if (cpzt > 0) if (cpzt > 0)
{ {
@ -497,6 +508,8 @@ namespace TradeManageNew
where.Add("b.guserid_wayfair", "=", MUserId, DbType.Int32); where.Add("b.guserid_wayfair", "=", MUserId, DbType.Int32);
else if (MUserId != 0 && platid == 21) else if (MUserId != 0 && platid == 21)
where.Add("b.guserid_sheIn", "=", MUserId, DbType.Int32); where.Add("b.guserid_sheIn", "=", MUserId, DbType.Int32);
else if (MUserId != 0 && platid == 23)
where.Add("b.guserid_temu", "=", MUserId, DbType.Int32);
if (AQNum == 1) if (AQNum == 1)
{ {

Loading…
Cancel
Save