Commit 65cd5345 by 杨树贤

设置上传

parent 9afd8ff9
......@@ -142,3 +142,11 @@ function multiArrayUnique(arr) {
}) === index;
});
}
function getFootstoneDomain() {
var defaultDomain = "http://footstone.liexindev.net";
if (document.domain.indexOf("ichunt") !== -1) {
defaultDomain = "https://footstone_v2.ichunt.net";
}
return defaultDomain;
}
......@@ -79,10 +79,10 @@
if (ladder.hasOwnProperty('price_cn')) {
if (ladder.price_cn > 0) {
return '<div class="view_ladder_price_cn layui-row"><div class="layui-col-xs5"><span>' + (ladder.purchases) + '+</span></div><div class="layui-col-xs7"><span>' + (ladder.price_cn) + '</span></div></div>';
}else{
} else {
return '';
}
}else{
} else {
return '';
}
......@@ -96,7 +96,7 @@
let ladder = data.ladder_price[data.ladder_price.length - 1];
if (ladder.hasOwnProperty('price_us')) {
if (ladder.price_us > 0) {
return '<div class="view_ladder_price_us layui-row""><div class="layui-col-xs5"><span>'+ (ladder.purchases) + '+</span></div><div class="layui-col-xs7"><span>$' + (ladder.price_us) + '</span></div></div>';
return '<div class="view_ladder_price_us layui-row""><div class="layui-col-xs5"><span>' + (ladder.purchases) + '+</span></div><div class="layui-col-xs7"><span>$' + (ladder.price_us) + '</span></div></div>';
}
return '';
}
......@@ -455,13 +455,31 @@
});
$("#update_sku").click(function () {
let checkStatus = table.checkStatus('skuList');
let data = checkStatus.data;
let skuIds = Array.from(data, ({goods_id}) => goods_id);
if (skuIds.length === 0) {
layer.msg('请选择要操作的sku', {icon: 5});
return false;
}
console.log(skuIds);
if (skuIds.length > 1) {
layer.msg('此操作只支持单选', {icon: 5});
return false;
}
let skuId = skuIds[0];
let domain = getFootstoneDomain();
window.open(domain + '/web/sku/saveSku?from=supplier&goods_id=' + skuId);
});
//划过显示成本价格
let ladderPriceTipsVal = '';
$(document).on('mouseenter', '.view_ladder_price_cn', function () {
let self = this;
let rowIndex = $(this).parent().parent().parent().attr('data-index');
let data = table.cache['skuList'][rowIndex].ladder_price;
console.log(data)
if (!data) {
return false;
}
......
......@@ -39,6 +39,7 @@
<button type="button" class="layui-btn layui-btn-sm" id="set_sku_tag">设置标签</button>
@if (checkPerm('SetSupplierSkuCpTimeLimit'))
<button type="button" class="layui-btn layui-btn-sm" id="set_sku_cp_time_ruler">商品有效期配置</button>
<button type="button" class="layui-btn layui-btn-sm" id="update_sku">修改商品信息</button>
@endif
@endif
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment