|
@@ -234,7 +234,7 @@
|
|
|
<#--<input type="text" class="input-text" style="width:120px;margin-right: 0px;margin-bottom: 10px;" placeholder="手动填写供货价格" id="writeSupplyPrice" name="writeSupplyPrice">-->
|
|
|
</div>
|
|
|
<div class="formControls col-2 col-sm-2" style="width:80px;padding:0 0;margin-right: 15px;">
|
|
|
- <input type="text" class="input-text" style="width:80px;margin-right: 0px;" placeholder="手动填写供货价格" id="writeSupplyPrice" name="writeSupplyPrice">
|
|
|
+ <input type="text" class="input-text" style="width:80px;margin-right: 0px;" placeholder="手动填写供货价格" id="writeSupplyPrice" name="writeSupplyPrice" onkeyup='this.value=this.value.replace(/\D/gi,"")'>
|
|
|
</div>
|
|
|
<label class="form-label col-2 col-sm-2" style="width:135px;padding:0 0;">
|
|
|
<button type="button" style="cursor:pointer; float: right;height: 31px;" class="my-btn-search" id="channelSaleId" onclick="toAddChannelSaleInfo();">添加</button>
|
|
@@ -471,6 +471,34 @@
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ /*获取产品最低价*/
|
|
|
+
|
|
|
+ function getLowestPrice(){
|
|
|
+ var channelDivisionId = document.getElementById("channelCategory").value;
|
|
|
+ var productId = document.getElementById("promotingProducts").value;
|
|
|
+ var writeSupplyPrice = document.getElementById("writeSupplyPrice").value;
|
|
|
+ var msg = null;
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ productId : productId,
|
|
|
+ channelDivisionId : channelDivisionId
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customerBasic/getLowestPrice",
|
|
|
+ async: false,
|
|
|
+ success: function(data){
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ if(writeSupplyPrice < data.returnMsg.lowestPriceInfo.lowestPrice){
|
|
|
+ msg = data.returnMsg.lowestPriceInfo.lowestPrice;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+
|
|
|
/*付款/退款信息填充到开票信息*/
|
|
|
$("input[name='accountNum']").blur(function (){
|
|
|
var accountType = $("input[name='accountType']:checked").val();
|
|
@@ -660,7 +688,7 @@
|
|
|
if (data.returnCode == 200) {
|
|
|
for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
|
|
|
channelTypeListInfo = data.returnMsg.channelTypeList[i];
|
|
|
- html += '<option value="'+ channelTypeListInfo.channelName +'">'+ channelTypeListInfo.channelType +'</option>';
|
|
|
+ html += '<option value="'+ channelTypeListInfo.channelDivisionId +'">'+ channelTypeListInfo.channelType +'</option>';
|
|
|
}
|
|
|
}else{
|
|
|
html = '';
|
|
@@ -874,7 +902,9 @@
|
|
|
}else if(channelCategory == "4"){
|
|
|
channelCategory = "海外";
|
|
|
}
|
|
|
- var channelType = document.getElementById("channelType").value;
|
|
|
+ /*var channelType = document.getElementById("channelType").value;*/
|
|
|
+ var mychannelType=document.getElementById("channelType");
|
|
|
+ var channelType = mychannelType.options[mychannelType.selectedIndex].text;
|
|
|
var channelName = document.getElementById("channelName").value;
|
|
|
var promotingProducts = document.getElementById("promotingProducts").value;
|
|
|
var myselect=document.getElementById("promotingProducts");
|
|
@@ -922,6 +952,11 @@
|
|
|
layer.msg("供货价格长度超限", {icon:2, time: 3000});
|
|
|
return;
|
|
|
}
|
|
|
+ var s = getLowestPrice();
|
|
|
+ if(s != null){
|
|
|
+ layer.msg("最低价格不能少于"+s, {icon:2, time: 3000});
|
|
|
+ return;
|
|
|
+ }
|
|
|
var promotingProductsHtml = '<input type="hidden" value="'+promotingProducts+'">';
|
|
|
//var operation = "删除";
|
|
|
var operation = "<a href='javascript:;' onclick='deleteChannelSale(this)' name='deleteChannelSale'>删除</a>";
|