Authored by yyq

internation product-review by huangtao

... ... @@ -149,7 +149,9 @@ module.exports={
{name: 'productStandardRelationStr', type: 'String'},
{name: 'appType', type: 'Number'},
{name: 'deposit', type: 'Number'},
{name: 'sellType', type: 'Number'}
{name: 'sellType', type: 'Number'},
{name: 'isBonded', type: 'String'},
{name: 'productBondedBo', type: 'Object'},
]
},
getBaseProduct:{
... ... @@ -267,4 +269,4 @@ module.exports={
]
}
}
}
\ No newline at end of file
}
... ...
... ... @@ -52,39 +52,55 @@
[[each goodsSizeList as item __index]]
<div class="form-group">
<!-- <label class="col-sm-1 red">*</label> -->
<div class="col-sm-2" style='width: 14%'>
<div class="col-sm-1" style="width: [[item._rowHead[0].width || 'auto']]; padding: 0 5px;">
<select id="sizeName" class="form-control btn-sort-chima" data-index=[[index]] data-eq=[[__index]] value='[[item.sizeId]]' required placeholder="尺码">
<option value="[[item.sizeId||'-1']]">[[item.sizeName||'选择尺码']]</option>
</select>
</div>
<div class="col-sm-1">
<div class="col-sm-1" style="width: [[item._rowHead[1].width || 'auto']]; padding: 0 5px;">
<input class="form-control btn-sort-xiaoshou" value="[[item.salePrice]]" placeholder="默认销售价" data-index=[[index]] data-eq=[[__index]] required match="numbers" type="text"></input>
</div>
<div class="col-sm-2" style='width: 13%'>
<div class="col-sm-2" style="width: [[item._rowHead[2].width || 'auto']]; padding: 0 5px;">
<input class="form-control btn-sort-tiaoma" value="[[item.factoryCode]]" placeholder="条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2" style='width: 13%'>
<div class="col-sm-2" style="width: [[item._rowHead[3].width || 'auto']]; padding: 0 5px;">
<input class="form-control btn-sort-nationalCode" value="[[item.nationalCode]]" placeholder="品牌条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-1">
<div class="col-sm-1" style="width: [[item._rowHead[4].width || 'auto']]; padding: 0 5px;">
<select class="form-control btn-sort-kebu" value="[[item.isSuppled||'Y']]" data-index=[[index]] data-eq=[[__index]]>
<option value="N">不可补货</option>
<option value="Y">可补货</option>
</select>
</div>
<div class="col-sm-2" style='width: 13%'>
<div class="col-sm-2" style="width: [[item._rowHead[5].width || 'auto']]; padding: 0 5px;">
<input class="form-control btn-sort-upmCode" value="[[item.upmCode]]" placeholder="UPC条码" data-index=[[index]] data-eq=[[__index]]></input>
</div>
<div class="col-sm-2" style="width: 10%">
<div class="col-sm-2" style="width: [[item._rowHead[6].width || 'auto']]; padding: 0 5px;">
<input class="form-control" type="text" value="[[item.balanceTimeStr]]" readonly="readonly" data-index=[[index]] data-eq=[[__index]]>
</div>
<div class="col-sm-1">
[[if __index==goodsSizeList.length-1]]
<button type="button" class="btn btn-info btn-xs btn-sort-add" data-index=[[index]]>+</button>
[[/if]]
[[if __index!=0]]
<button type="button" class="btn btn-info btn-xs btn-sort-remove" data-index=[[index]] data-eq=[[__index]]>-</button>
[[/if]]
[[if item.isBonded]]
<div class="col-sm-1" style="width: [[item._rowHead[7].width || 'auto']]; padding: 0 5px;">
<input class="form-control sku-input-control" type="text" value="[[item.storageBondedBo.goodsName]]" data-index=[[index]] data-eq=[[__index]] data-key="storageBondedBo.goodsName">
</div>
<div class="col-sm-1" style="width: [[item._rowHead[8].width || 'auto']]; padding: 0 5px;">
<input class="form-control sku-input-control" type="text" value="[[item.storageBondedBo.productRecordcode]]" data-index=[[index]] data-eq=[[__index]] data-key="storageBondedBo.productRecordcode">
</div>
<div class="col-sm-1" style="width: [[item._rowHead[9].width || 'auto']]; padding: 0 5px;">
<input class="form-control sku-input-control" type="text" value="[[item.storageBondedBo.netWeight]]" data-index=[[index]] data-eq=[[__index]] data-key="storageBondedBo.netWeight">
</div>
<div class="col-sm-1" style="width: [[item._rowHead[10].width || 'auto']]; padding: 0 5px;">
<input class="form-control sku-input-control" type="text" value="[[item.storageBondedBo.grossWeight]]" data-index=[[index]] data-eq=[[__index]] data-key="storageBondedBo.grossWeight">
</div>
[[/if]]
<div class="col-sm-1" style="width: 1px;">
<div style="position: absolute; width: 60px;">
[[if __index==goodsSizeList.length-1]]
<button type="button" class="btn btn-info btn-xs btn-sort-add" data-index=[[index]]>+</button>
[[/if]]
[[if __index!=0]]
<button type="button" class="btn btn-info btn-xs btn-sort-remove" data-index=[[index]] data-eq=[[__index]]>-</button>
[[/if]]
</div>
</div>
</div>
... ... @@ -124,6 +140,7 @@
<option value="1">经销</option>
<option value="2">代销</option>
<option value="3">JIT</option>
<option value="6">经销保税</option>
</select>
</div>
</div>
... ... @@ -238,7 +255,7 @@
<input type="radio" name="grade" value="1"></label>
<label class="radio-inline">
<input type="radio" name="grade" value="0"></label>
</div>
</div>
<input type="hidden" id="grade" value="[[grade||'0']]" for="radio" required/>-->
<label class="col-sm-2 control-label">适销季 <span class="red">*</span></label>
<div class="col-sm-4">
... ... @@ -316,6 +333,31 @@
<input type="text" id="salesPriceStr" class="form-control" required value="[[salesPriceStr]]" match="numbers" placeholder="销售价" />
</div>
</div>
<div class="form-group bonded-wrap">
<label class="col-sm-2 control-label">产销国</label>
<div class="col-sm-2">
<input type="text" id="originCountry" class="form-control skn-input-control" value="[[productBondedBo.originCountry]]" data-key="productBondedBo.originCountry"/>
</div>
<label class="col-sm-1 control-label skn-input-control">第一单位</label>
<div class="col-sm-2">
<input type="text" id="firstUnit" class="form-control skn-input-control" value="[[productBondedBo.firstUnit]]" data-key="productBondedBo.firstUnit"/>
</div>
<label class="col-sm-1 control-label">第二单位</label>
<div class="col-sm-2">
<input type="text" id="secondUnit" class="form-control skn-input-control" value="[[productBondedBo.secondUnit]]" data-key="productBondedBo.secondUnit"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">申报单位</label>
<div class="col-sm-2">
<input type="text" id="declareUnit" class="form-control skn-input-control" value="[[productBondedBo.declareUnit]]" data-key="productBondedBo.declareUnit"/>
</div>
<label class="col-sm-2 control-label">商品编码(hscode):</label>
<div class="col-sm-4">
<input type="text" id="hsCode" class="form-control skn-input-control" value="[[productBondedBo.hsCode]]" data-key="productBondedBo.hsCode"/>
</div>
</div>
</div>
</script>
... ... @@ -366,4 +408,4 @@
</select>
<div class='clearfix'></div>
</script>
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
<%include '../../../common/views/__ui/footer'%>
... ...
... ... @@ -51,7 +51,7 @@
<div class="col-sm-4">预计上市日期:[[expectSaleTimeStr]]</div>
<div class="col-sm-4">品牌经典款:[[classic]]</div>
</div>
<div class="form-group">
<div class="col-sm-4">SKN[[productSkn]]</div>
<div class="col-sm-4">展示平台:[[appType]]</div>
... ... @@ -73,13 +73,28 @@
<div class="form-group">
<div class="col-sm-4">预售: [[isAdvance]]</div>
<div class="col-sm-4">预付定金: [[deposit]]</div>
<div class="col-sm-4">吊牌价:[[retailPrice]]</div>
</div>
<div class="form-group">
<div class="col-sm-4">吊牌价:[[retailPrice]]</div>
<div class="col-sm-4">销售价:[[salesPrice]]</div>
<div class="col-sm-4">预计到货时间:[[expectArrivalTimeStr]]</div>
[[if isBonded]]
<div class="col-sm-4">产销国:[[productBondedBo.originCountry]]</div>
[[/if]]
</div>
[[if isBonded]]
<div class="form-group">
<div class="col-sm-4">申报单位:[[productBondedBo.declareUnit]]</div>
<div class="col-sm-4">第一单位:[[productBondedBo.firstUnit]]</div>
<div class="col-sm-4">第二单位:[[productBondedBo.secondUnit]]</div>
</div>
<div class="form-group">
<div class="col-sm-4">商品编码(hscode):[[productBondedBo.hsCode]]</div>
</div>
[[/if]]
</div>
[[if isAuditing!="200"&&isAuditing!="300"]]
<div class="panel-footer">
... ... @@ -109,31 +124,45 @@
<th>厂家颜色</th>
<th>能否补货</th>
<th>支付尾款时间</th>
[[if isBonded]]
<th>备案名称</th>
<th>规格型号</th>
<th>净重(kg)</th>
<th>毛重(kg)</th>
[[/if]]
</tr>
</thead>
<tbody>
[[each baseGoodList as item index]]
[[each item.goodsSizeList as _item index]]
<tr>
<th>
<td>
<span>[[item.productSkc]]</span>
<span>[[item.goodsName]]</span>
</th>
<th>
</td>
<td>
<span>[[_item.productSku]]</span>
<span>[[_item.sizeName]]</span>
</th>
<th>[[_item.salePrice]]</th>
<th>[[item.factoryCode]]</th>
<th>[[_item.factoryCode]]</th>
<th>[[_item.nationalCode]]</th>
<th>[[item.factoryGoodsName]]</th>
</td>
<td>[[_item.salePrice]]</td>
<td>[[item.factoryCode]]</td>
<td>[[_item.factoryCode]]</td>
<td>[[_item.nationalCode]]</td>
<td>[[item.factoryGoodsName]]</td>
[[if _item.isSuppled=="Y"]]
<th></th>
<td></td>
[[else]]
<th></th>
<td></td>
[[/if]]
<td>[[_item.balanceTime]]</td>
[[if isBonded]]
<td>[[_item.storageBondedBo.goodsName]]</td>
<td>[[_item.storageBondedBo.productRecordcode]]</td>
<td>[[_item.storageBondedBo.netWeight]]</td>
<td>[[_item.storageBondedBo.grossWeight]]</td>
[[/if]]
<th>[[_item.balanceTime]]</th>
</tr>
[[/each]]
[[/each]]
... ... @@ -156,4 +185,4 @@
</div>
</div>
</script>
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
<%include '../../../common/views/__ui/footer'%>
... ...
... ... @@ -18,34 +18,34 @@
</div>
<div class="panel-col2">
<select name="shopId" id="shopId" class="form-control">
<option value="-1">请选择店铺</option>
</select>
<option value="-1">请选择店铺</option>
</select>
</div>
<div class="panel-col">
<select name="brandId" id="brandId" class="form-control">
<option value="-1">请选择品牌</option>
</select>
<option value="-1">请选择品牌</option>
</select>
</div>
<div class="panel-col">
<select name="stock" id="stock" class="form-control height40">
<option value="-1">库存情况</option>
<option value="1">有库存</option>
<option value="0">无库存</option>
</select>
</select>
</div>
<!-- <div class="panel-col">
<select name="isScreen" id="isScreen" class="form-control height40">
<option value="">拍摄状态</option>
<option value="Y">已拍摄</option>
<option value="N">未拍摄</option>
</select>
</select>
</div>
<div class="panel-col">
<select name="isMeasure" id="isMeasure" class="form-control height40">
<option value="">测量状态</option>
<option value="Y">已测量</option>
<option value="N">未测量</option>
</select>
</select>
</div> -->
<div class="panel-col">
<select name="gender" id="gender" class="form-control height40">
... ... @@ -53,14 +53,14 @@
<option value="1"></option>
<option value="2"></option>
<option value="3">通用</option>
</select>
</select>
</div>
<div class="panel-col">
<select name="gender" id="skcOnsaleStatus" class="form-control height40">
<option value="-1">SKC是否上架</option>
<option value="1"></option>
<option value="0"></option>
</select>
</select>
</div>
<div class="panel-col">
<select name="gender" id="isAdvance" class="form-control height40">
... ... @@ -68,7 +68,7 @@
<option value="Y">普通预售</option>
<option value="E">定金预售</option>
<option value="N"></option>
</select>
</select>
</div>
<div class="panel-col2">
... ... @@ -80,7 +80,7 @@
<option value="Y">奥莱</option>
<option value="N">非奥莱</option>
<option value="B">品牌设置</option>
</select>
</select>
</div>
<div class="panel-col">
<select name="productStatus" id="productStatus" tabindex="-1" title="" class="form-control height40">
... ... @@ -94,14 +94,14 @@
<option value="7">再次上架通过</option>
<option value="1">已上架</option>
<option value="0">已下架</option>
</select>
</select>
</div>
<div class="panel-col">
<select name="isJit" id="isJit" tabindex="-1" title="" class="form-control height40">
<option value="-1">是否JIT商品</option>
<option value="Y"></option>
<option value="N"></option>
</select>
</select>
</div>
<div class="panel-col">
<select id="appType" class="form-control height40">
... ... @@ -157,7 +157,7 @@
</div>
</div>
</div>
</div>
<!--
... ... @@ -165,7 +165,7 @@
<form class="shelve-form form-horizontal form-bordered">
<div class="panel panel-default">
<div class="panel-body nopadding">
<div class="form-group">
<div class="col-sm-3 height40">预上架时间:</div>
<div class="col-sm-6"><input id="shelveTime" class="form-control" jsaction="time" type="text" placeholder="预上架时间" readonly>
... ... @@ -270,7 +270,7 @@ htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:1
<p style="color: red;">SKN{productSkn} 品牌:{brandName}</p>
<p style="color: red;">商品名称:{productName}</p>
<div id="shelve-table" class="dataTables_wrapper no-footer"></div>
</script>
</script>
<script type="text/template" id="template2">
[[each goodsSizeList as item index]]
... ... @@ -294,4 +294,4 @@ htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:1
<div id="status-log-table" class="dataTables_wrapper no-footer"></div>
</script>
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
<%include '../../../common/views/__ui/footer'%>
... ...
... ... @@ -31,6 +31,7 @@
<option value="2">专卖店</option>
<option value="3">分销店</option>
<option value="4">专营店</option>
<option value="5">有货国际</option>
</select>
</div>
</div>
... ... @@ -53,7 +54,7 @@
aria-describedby="basic-addon2" required>
<span class="input-group-addon" id="basic-addon2">.yohobuy.com</span>
</div>
<p style="margin-top: 10px"><span class="red">注:1. 1-32个字符;2. 只能填英文、数字和破折号-,不区分大小写,不能以破折号开头或者结尾</span></p>
<p style="margin-top: 10px"><span class="red">注:1. 1-32个字符;2. 只能填英文、数字和破折号-,不区分大小写,不能以破折号开头或者结尾</span></p>
</div>
</div>
<div class="form-group" id="blkShop">
... ... @@ -109,7 +110,7 @@
</div>
<div class="col-sm-8">
<input type="file" id="shopLogo" name="shopLogo" value="<%data.shopLogo%>" size="500">
<p><span class="red" style="position: absolute; bottom: 0">提示: 请上传像素为320*160的图片,大小小于500KB</span></p>
<p><span class="red" style="position: absolute; bottom: 0">提示: 请上传像素为320*160的图片,大小小于500KB</span></p>
</div>
</div>
<div class="form-group">
... ... @@ -184,4 +185,4 @@
</div>
</script>
<%include '../../common/views/__ui/footer'%>
\ No newline at end of file
<%include '../../common/views/__ui/footer'%>
... ...
... ... @@ -59,7 +59,7 @@ function __getArgs(str) {
function __requestApi(config, apiOpt, req, callback) {
var me = this;
if (typeof apiOpt == "function") {
var args = __getArgs(apiOpt), o = {};
if (args.length > 2) {
args.slice(2).map(function (namespace) {
... ... @@ -76,10 +76,10 @@ function __requestApi(config, apiOpt, req, callback) {
config: config,
consts: consts
};
if (args.length === 1 && _.isPlainObject(args[0])) {
intermo.req.param(args[0]);
} else {
} else {
api.params = api.params || {};
var os = Object.keys(api.params);
args.forEach(function (value, i) {
... ... @@ -107,7 +107,7 @@ function __requestApi(config, apiOpt, req, callback) {
return callback(null, result);
}].concat(fns));
}
var options = __requestOption(req, apiOpt, config, me.CONSTS);
__sendRequest(options, function (result) {
return callback(null, result);
... ... @@ -130,6 +130,8 @@ function __requestOption(req, apiOpt, config, consts) {
if (req.param(name)) {
if (param.type.toUpperCase() == "NUMBER") {
data[name] = Number(req.param(name));
} else if (param.type.toUpperCase() == "OBJECT") {
data[name] = req.param(name);
} else {
data[name] = String(req.param(name));
}
... ... @@ -149,13 +151,13 @@ function __requestOption(req, apiOpt, config, consts) {
if (req.param(name)) {
data[name] = param.type(req.param(name));
}
if (param.coerce && typeof param.coerce == "function") {
if (param.coerce && typeof param.coerce == "function") {
fns.push({ param: param,name:name});
}
}
fns.forEach(function (fn) {
var d = fn.param.coerce.call(data, req);
if (d) {
if (d) {
data[fn.name] = param.type(d);
}
});
... ... @@ -222,6 +224,7 @@ function __requestOption(req, apiOpt, config, consts) {
'Content-Type' : 'application/json'
}
}
if (apiOpt.headers && _.isPlainObject(apiOpt.headers)) {
options.headers = {};
for (var name in apiOpt.headers) {
... ... @@ -253,9 +256,9 @@ function __requestOption(req, apiOpt, config, consts) {
*/
Interfacer.prototype.require = function (mos, req, res, cb) {
var me = this, funcs = [], names = [], errName = [];
mos.forEach(function (name) {
if (me.apis.hasOwnProperty(name)) {
names.push(name);
if (me.config.mock) {
... ... @@ -270,7 +273,7 @@ Interfacer.prototype.require = function (mos, req, res, cb) {
errName.push(name);
}
});
if (funcs.length != mos.length) {
var err = new Error();
err.message = "某个" + errName.join("->") + " 可能不存在!";
... ... @@ -306,9 +309,9 @@ Interfacer.create = function (apis) {
},
apiOpt: null,
config: {},
error: function () {
error: function () {
}
}
}
... ... @@ -336,7 +339,7 @@ queue.prototype = {
//this.__sendRequest(options, success, fail);
return this;
},
}
function __sendRequest(options, success, fail, wlen, i, args) {
var _err_ = new Error(), obj;
... ... @@ -352,7 +355,7 @@ function __sendRequest(options, success, fail, wlen, i, args) {
Request(options, function (error, response, body) {
//console.error("request-options=> ",options, "body=>" ,body);
//console.error("request-error =>", error, 'status=>', response.statusCode )
if (!wlen.len) {
if (!wlen.len) {
return;
}
if (error) {
... ... @@ -387,7 +390,7 @@ function __sendRequest(options, success, fail, wlen, i, args) {
fail && fail(_err_);
return;
}
} catch (err) {
console.info("Error[response to json @" + options.title + "--"+options.url+"]");
console.info(response);
... ... @@ -398,11 +401,11 @@ function __sendRequest(options, success, fail, wlen, i, args) {
}
args[i]=obj;
wlen.len--;
if (!wlen.len) {
if (!wlen.len) {
success && success.apply(0, args)
}
return;
});
}
module.exports = Interfacer;
\ No newline at end of file
module.exports = Interfacer;
... ...
... ... @@ -201,17 +201,17 @@ var g=new common.grid({
var txt=item.factoryGoodsName?item.factoryGoodsName:item.goodsName;
//待上架商品可以修改色系
if((ACTION == 1 && canEditSort)||ACTION == 0){
html.push("<p>厂家颜色:</p><p><input type='text' id='factoryGoodsName' class='w-goods-text form-control' data-index="+item.__index+" value='"+txt+"' placeholder='厂家颜色' required style='padding: 10px; width: 150px' /></p>");
html.push("<p>厂家颜色:</p><p><input type='text' id='factoryGoodsName' class='w-goods-text form-control' data-index="+item.__index+" value='"+txt+"' placeholder='厂家颜色' required style='padding: 10px; width: 150px' /></p>");
html.push("<p>色系:</p><p>"+common.util.__template2($('#colorSelect').html(),item)+"</p>");
}else{
if(item.isNew){
html.push("<p>厂家颜色:</p><p><input type='text' id='factoryGoodsName' class='w-goods-text form-control' data-index="+item.__index+" value='"+item.goodsName+"' placeholder='厂家颜色' required style='padding: 10px; width: 150px' /></p>");
}else if(RESPONSEDATA.sellType == 3 || RESPONSEDATA.isJit == 'Y'){ // JIT上架后的商品也可以修改厂家颜色
html.push("<p>厂家颜色:</p><p><input type='text' id='factoryGoodsName' class='w-goods-text form-control' data-index="+item.__index+" value='"+txt+"' placeholder='厂家颜色' required style='padding: 10px; width: 150px' /></p>");
html.push("<p>厂家颜色:</p><p><input type='text' id='factoryGoodsName' class='w-goods-text form-control' data-index="+item.__index+" value='"+txt+"' placeholder='厂家颜色' required style='padding: 10px; width: 150px' /></p>");
}else{
html.push("<p>厂家颜色:</p><p><input type='text' id='factoryGoodsName' disabled='disabled' class='w-goods-text form-control' data-index="+item.__index+" value='"+txt+"' placeholder='厂家颜色' required style='padding: 10px; width: 150px' /></p>");
html.push("<p>厂家颜色:</p><p><input type='text' id='factoryGoodsName' disabled='disabled' class='w-goods-text form-control' data-index="+item.__index+" value='"+txt+"' placeholder='厂家颜色' required style='padding: 10px; width: 150px' /></p>");
}
html.push("<p>色系:&nbsp;"+item.goodsName+"</p>");
}
html.push('<p><button type="button" data-index='+item.__index+' class="sortdelete btn btn-danger btn-xs">删除</button></p>');
... ... @@ -229,11 +229,53 @@ var g=new common.grid({
if(!item.isAdd&&!g.__gsm.hasOwnProperty(item.__index)){
g.__gsm[item.__index]=item.goodsSizeList.length;
}
var rowHead = [
{name: '尺码', width: '14%'},
{name: '销售价', width: '10%'},
{name: '条码', width: '13%'},
{name: '品牌条码', width: '13%'},
{name: '是否补货', width: '10%'},
{name: 'UPC条码', width: '13%'},
{name: '支付尾款时间', width: '10%'},
];
var html=[];
html.push("<div class='form-group' style='padding-bottom: 0'><div class='col-sm-11 red'><input type=text value='"+item.factoryCode+"' data-index="+item.__index+" class='modelCode form-control' placeholder='款型编码' required/></div></div>");
html.push("<div class='rows'><div class='form-group' style='padding-bottom: 0'><div class='col-sm-1' style='width: 14%'>尺码</div><div class='col-sm-1'>销售价</div><div class='col-sm-2' style='width: 13%'>条码</div><div class='col-sm-2' style='width: 13%'>品牌条码</div><div class='col-sm-1'>是否补货</div><div class='col-sm-2' style='width: 13%'>UPC条码</div><div class='col-sm-2' style='width: 10%'>支付尾款时间</div></div></div>");
if (+_sellType === 6) {
rowHead.push({
name: '备案名称'
}, {
name: '规格型号'
}, {
name: '净重(kg)'
}, {
name: '毛重(kg)'
});
rowHead.forEach(val => {
val.width = '8.5%';
});
}
html.push('<div class="rows"><div class="form-group" style="padding-bottom: 0">');
rowHead.forEach(val => {
html.push(`<div class="col-sm-1" style="width: ${val.width || 'auto'}; padding: 0 5px;">${val.name}</div>`);
});
html.push('</div></div>');
html.push('<div class="rows" id="rows__'+item.__index+'">');
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
item.goodsSizeList.forEach(size => {
size.isBonded = (+_sellType === 6);
size._rowHead = rowHead;
if (size.isBonded) {
size.storageBondedBo = size.storageBondedBo || {};
}
});
html.push(common.util.__template2($("#template").html(),{index:item.__index,goodsSizeList:item.goodsSizeList}));
html.push('</div>');
return html.join('');
... ... @@ -311,7 +353,7 @@ $(document).on("click",".sortadd",function(){
// if(ACTION == 1 && !canEditSort){
// common.util.__tip("商品有过上架操作,不允许修改厂家颜色","warning");
// return;
// }
// }
if ($.trim($("#salesPriceStr").val())=="") {
common.util.__tip("请填写销售价","warning");
return;
... ... @@ -351,12 +393,12 @@ $(document).on("change","#brandId",function(){
if(/\((.*)\)/g.test(Bll.productNameArr[0])){
Bll.productNameArr[0]=Bll.productNameArr[0].match(/\((.*)\)/)[1];
}
Bll.setProductName();
$("#supplierId").val(-1).trigger("change");
$("#shopId").val(-1).trigger("change");
$("#supplierId").val(-1).trigger("change");
// $("#shopId").val(-1).trigger("change");
$("#supplierId").val(-1).trigger("change");
// $("#shopId").val(-1).trigger("change");
tabTree.isfeeze=false;
tabTree.init([{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""}]);
});
... ... @@ -401,6 +443,8 @@ $(document).on("change","#supplierId",function(){ // 不维护供应商
$(document).on("change","#sellType",function(){
tabTree.isfeeze=false;
tabTree.init([{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""}]);
_sellType = $(this).val();
g.reload();
});
$(document).on("change",":radio[name=gender]",function(){
... ... @@ -484,6 +528,24 @@ $(document).on("change",".btn-sort-kebu",function(){
var _eq=$(this).data("eq");
var item=g.__rows[_index].goodsSizeList[_eq];
item.isSuppled=$(this).val();
}).on("change", ".sku-input-control",function(){
var data=$(this).data();
var inputVal = $(this).val();
var item=g.__rows[data.index].goodsSizeList[data.eq];
if (!data.key) {
return;
}
data.key = data.key.split('.');
data.key.forEach(function(val, index) {
if (data.key[index + 1]) {
item[val] = item[val] || {};
item = item[val];
} else {
item[val] = inputVal;
}
});
});
$(document).on("change",".w-goods-text",function(){
var item=g.__rows[$(this).data("index")];
... ... @@ -703,7 +765,7 @@ $(document).on("click","#btnReview",function(){
if(e.validate()){
common.dialog.confirm("温馨提示","<p>你确定提交吗?</p>",function(){
common.util.__disButton.call($this);
e.submit($("#basicForm").attr("action"),function(option){
... ... @@ -713,29 +775,52 @@ $(document).on("click","#btnReview",function(){
// option.data.isAuditing=200;
option.data.supplierId=common.util.__input("supplierId")?$("#supplierId").val():"0";
option.data.shopId=common.util.__input("shopId")?$("#shopId").val():"0";
option.data.productSkn=ACTION?RESPONSEDATA.productSkn:"";
option.data.maxSortId=select[0]?select[0].id:"";
option.data.middleSortId=select[1]?select[1].id:"";
option.data.smallSortId=select[2]?select[2].id:"";
option.data.sortId=select[3]?select[3].id:"";
option.data.isVip=option.data.isVip||'B';
option.data.isOutLets=option.data.isOutLets||'N';
// option.data.shopId=$("#shopId").val();
option.data.brandId=$("#brandId").val();
option.data.isAuditing=RESPONSEDATA.isAuditing?RESPONSEDATA.isAuditing:"";
option.data.seasons=option.data.seasons?option.data.seasons.replace(/\|/g,','):"";
option.data.isBonded = +_sellType === 6 ? 'Y' : 'N';
$('.skn-input-control').each(function() {
var key = $(this).data('key');
var item = option.data;
var keys, inputVal;
if (key) {
inputVal = $(this).val();
keys = key.split('.');
keys.forEach(function(val, index) {
if (keys[index + 1]) {
item[val] = item[val] || {};
item = item[val];
} else {
item[val] = inputVal;
}
});
}
});
//expectShelfTime
// option.data=new Date(expectShelfTime).getTime();
$.each(g.__rows,function(index,item){
$.each(item.goodsSizeList ,function(i,sku){
sku.salePrice = $.trim(sku.salePrice);
delete sku.isBonded;
delete sku._rowHead;
sku.salePrice = $.trim(sku.salePrice);
})
})
})
option.data.baseGoodInfoStr=JSON.stringify(g.__rows);
... ... @@ -767,7 +852,7 @@ $(document).on("click","#btnReview",function(){
parameterMakeId:ag.rows[i].id
});
}
}
}
}
... ... @@ -791,6 +876,6 @@ $(document).on("click","#btnReview",function(){
});
})
}
return false;
});
... ...
... ... @@ -5,23 +5,25 @@
var $ = require('jquery'),
common = require('../../../common/common');
/*获取基础商品数据*/
var data=window.ViewModel;
data.data.attribute={"1":"普通商品","2":"赠品","3":"虚拟商品","4":"组合商品"}[""+data.data.attribute];
data.data.ageLevel=common.config.__ageLevel(data.data.ageLevel);//data.data.ageLevel.replace("1","成人").replace("2","大童").replace("3","小童");
data.data.gender={"1":"男","2":"女","3":"通用"}[""+data.data.gender];
data.data.grade={"0":"否","1":"是"}[""+data.data.grade];
data.data.goodsSeason={"0":"四季","1":"春","2":"夏","3":"秋","4":"冬","5":"春夏","6":"秋冬"}[""+data.data.goodsSeason];
data.data.isPromotionalGifts={"N":"否","Y":"是"}[""+data.data.isPromotionalGifts];
data.data.isLimited={"N":"否","Y":"是"}[""+data.data.isLimited];
data.data.isLimitbuy={"N":"否","Y":"是"}[""+data.data.isLimitbuy];
data.data.appType={"0":"有货平台","1":"有货,BLK平台"}[""+data.data.appType];
data.data.isAdvance={"N":"否","Y":"是"}[""+data.data.isAdvance];
data.data.classic={"0":"否","1":"是"}[""+data.data.classic];
data.data.sellType={"1":"经销","2":"代销", "3" : "JIT"}[""+data.data.sellType];
var goodList = data.data.baseGoodList;
var goodsInfo=window.ViewModel || {};
goodsInfo = goodsInfo.data || {};
goodsInfo.attribute={"1":"普通商品","2":"赠品","3":"虚拟商品","4":"组合商品"}[""+goodsInfo.attribute];
goodsInfo.ageLevel=common.config.__ageLevel(goodsInfo.ageLevel);//goodsInfo.ageLevel.replace("1","成人").replace("2","大童").replace("3","小童");
goodsInfo.gender={"1":"男","2":"女","3":"通用"}[""+goodsInfo.gender];
goodsInfo.grade={"0":"否","1":"是"}[""+goodsInfo.grade];
goodsInfo.goodsSeason={"0":"四季","1":"春","2":"夏","3":"秋","4":"冬","5":"春夏","6":"秋冬"}[""+goodsInfo.goodsSeason];
goodsInfo.isPromotionalGifts={"N":"否","Y":"是"}[""+goodsInfo.isPromotionalGifts];
goodsInfo.isLimited={"N":"否","Y":"是"}[""+goodsInfo.isLimited];
goodsInfo.isLimitbuy={"N":"否","Y":"是"}[""+goodsInfo.isLimitbuy];
goodsInfo.appType={"0":"有货平台","1":"有货,BLK平台"}[""+goodsInfo.appType];
goodsInfo.isAdvance={"N":"否","Y":"是"}[""+goodsInfo.isAdvance];
goodsInfo.classic={"0":"否","1":"是"}[""+goodsInfo.classic];
goodsInfo.sellType={"1":"经销","2":"代销", "3" : "JIT", '6': '经销保税'}[""+goodsInfo.sellType];
goodsInfo.isBonded = goodsInfo.isBonded === 'Y';
var goodList = goodsInfo.baseGoodList;
$.each(goodList, function(index, item) {
var goodsSizeList = item.goodsSizeList;
var newGoodSizeList = [];
... ... @@ -34,14 +36,16 @@ $.each(goodList, function(index, item) {
_item.balanceTime = '';
}
_item.hsCode = (_item.storageBondedBo && _item.storageBondedBo.hsCode) || '';
newGoodSizeList.push(_item);
});
item.goodsSizeList = newGoodSizeList;
});
var param=[data.data.productSkn]
var a=common.util.__template2($("#template").html(), data.data);
var param=[goodsInfo.productSkn]
var a=common.util.__template2($("#template").html(), goodsInfo);
$(".contentpanel").html(a);
... ... @@ -81,7 +85,7 @@ var BllReject={
//单个通过
$(document).on("click",".apply-success",function(){
var data=function(){
return {
productSknList:JSON.stringify([param[0]]),
... ...