Authored by 马力

经营模式

... ... @@ -152,7 +152,7 @@
</select>
</div>
<label class="col-sm-1 control-label">JIT供应商</label>
<label class="col-sm-1 control-label">供应商</label>
<div class="col-sm-2">
<select id="supplierId" class="form-control">
<option value="-1">选择JIT供应商</option>
... ...
... ... @@ -107,7 +107,7 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">JIT供应商</label>
<label class="col-sm-2 control-label">供应商</label>
<div class="col-sm-2">
<select id="supplierId" class="form-control">
<option value="[[supplierId||'-1']]">[[supplierName||'供应商']]</option>
... ...
... ... @@ -27,23 +27,24 @@
<div class="col-sm-3">店铺:[[shopName]]</div>
<div class="col-sm-3">品牌:[[brandName]]</div>
<div class="col-sm-3">供应商:[[supplierName]]</div>
[[if renderType=='edit']]
<div class="col-sm-3">厂家编号:[[factoryCode]]</div>
[[else]]
<div class="col-sm-3"><img src="[[productImageUrl]]" width="100" height="100" alt=""></div>
[[/if]]
<div class="col-sm-3">经营模式:[[sellType]]</div>
</div>
<div class="form-group">
<div class="col-sm-3">品类:[[maxSortName]]/[[middleSortName]]/[[smallSortName]]</div>
<div class="col-sm-3">货品年:[[goodsYears]]</div>
<div class="col-sm-3">货品季:[[goodsSeason]]</div>
[[if renderType=='info']]
<div class="col-sm-3">厂家编号:[[factoryCode]]</div>
[[if renderType=='edit']]
<div class="col-sm-3">厂家编号:[[factoryCode]]</div>
[[else]]
<div class="col-sm-3"><img src="[[productImageUrl]]" width="100" height="100" alt=""></div>
[[/if]]
</div>
<div class="form-group">
<div class="col-sm-3">SKN[[productSkn]]</div>
<div class="col-sm-3">商品类型:[[attribute]]</div>
[[if renderType=='info']]
<div class="col-sm-3">厂家编号:[[factoryCode]]</div>
[[/if]]
</div>
<div class="form-group">
<label class="col-sm-1">商品名称<i class="red">*</i>:</label>
... ...
... ... @@ -88,10 +88,10 @@ common.edit.ajaxfileupload('#skuUpmCode', batchExport('#brand-file', 'skuUpmCode
common.edit.ajaxfileupload('#expectSaleTime', batchExport('#sort-file', 'expectSaleTime'));
var isbrandId=false,isshops=false;
var isbrandId=false,isshops=false,issellType=false;
function jiekai(){
if(isbrandId&&isshops){
if(isbrandId&&isshops&&issellType){
$("#baseProduct").prop("disabled",false);
}else{
$("#baseProduct").prop("disabled",true);
... ... @@ -118,12 +118,24 @@ $(document).on("change","#shopId",function(){
})
$(document).on("change","#supplierId",function(){ // 不维护供应商,则不带出经销选项
if($(this).val() > 0){
$("#sellType").append("<option value='1'>经销</option>");
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3]").remove();
$("#sellType").append("<option value='2'>代销</option>");
$("#sellType").append("<option value='3'>JIT</option>");
}else{
$("#sellType option[value=1]").remove();
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3]").remove();
$("#sellType").append("<option value='1'>经销</option>");
}
$("#sellType").val(-1).trigger("change");
})
$(document).on("change","#sellType",function(){ // 不维护供应商,则不带出经销选项
if($(this).val() > 0){
issellType = true;
}else{
issellType = false;
}
jiekai();
})
function __ajaxExeclById(unquid){
var params={param:unquid};
... ...
... ... @@ -149,10 +149,12 @@ if(RESPONSEDATA.isAuditing==200){
$('#expectArrivalTimeStr').removeAttr("required");
$('#advanceSettings').hide();
}
$('#sellType').removeAttr('required'); // 修改页面不允许修改经营模式,已置灰,但要保证老数据没有经营模式的时候,可以正常提交
} else {
// 新增页面隐藏话题字段
$("#productTagDiv").hide();
$("#sellType option[value=1]").remove(); // 新增页面初始化的时候,需要去掉经营模式中的经销选项
$("#sellType option[value=2], #sellType option[value=3]").remove(); // 新增页面初始化的时候,需要去掉经营模式中的经销选项
}
/*下拉选择*/
... ... @@ -356,9 +358,12 @@ $(document).on("change","#shopId",function(){
$(document).on("change","#supplierId",function(){ // 不维护供应商,则不带出经销选项
if($(this).val() > 0){
$("#sellType").append("<option value='1'>经销</option>");
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3]").remove();
$("#sellType").append("<option value='2'>代销</option>");
$("#sellType").append("<option value='3'>JIT</option>");
}else{
$("#sellType option[value=1]").remove();
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3]").remove();
$("#sellType").append("<option value='1'>经销</option>");
}
$("#sellType").val(-1).trigger("change");
});
... ...
... ... @@ -74,6 +74,11 @@ var basicInfohtml = '',
classic: {
'1': '是',
'0': '否'
},
sellType: {
'1': '经销',
'2': '代销',
'3': 'JIT'
}
},
basicInfo = NETSALEDATA.baseProductInfo.baseProduct || '',
... ...