Authored by zhaoqing

专营店

... ... @@ -130,7 +130,8 @@ module.exports=function(app) {
app.post("/product/searchProductDetail","basegoods_searchProductDetail");
app.post("/product/checkNationalCodeExist","basegoods_checkNationalCodeExist");
app.post("/product/getSellTypeFromBeiJin","basegoods_getSellTypeFromBeiJin");
/*批量修改品牌条码*/
app.get("/product/baseproduct/batchUpdateNationalCode","goods.batchUpdateNationalCode.Batch",function(){
this.$extend={
... ...
... ... @@ -257,6 +257,14 @@ module.exports={
params:[
{name: "nationalCode",type:"String"}
]
},
getSellTypeFromBeiJin : {
title: '校验品牌条码唯一性',
url: '/product/getSellTypeFromBeiJin',
params:[
{name: 'supplierId', type: 'Number'},
{name: 'brandId', type: 'Number'}
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -179,8 +179,6 @@
<div class="col-sm-2">
<select id="sellType" class="form-control">
<option value="-1">经营模式</option>
<option value="2">代销</option>
<option value="3">JIT</option>
</select>
</div>
</div>
... ...
... ... @@ -29,7 +29,8 @@
<option value="-1">店铺类型</option>
<option value="1">旗舰店</option>
<option value="2">专卖店</option>
<option value="3">分销店铺</option>
<option value="3">分销店</option>
<option value="4">专营店</option>
</select>
</div>
</div>
... ... @@ -150,7 +151,15 @@
</div>
<input type="hidden" id="shopRelationList" value="<%data.shopRelationList%>"/>
</div>
<div class="form-group">
<div class="col-sm-1 control-label">
<label>营业执照:</label>
</div>
<div class="col-sm-9">
<script id="edit-business-license" type="text/plain" style="width:100%;height:500px;"></script>
<input id="businessLicense" type="hidden" placeholder="营业执照" value="<%data.businessLicense%>">
</div>
</div>
<div style="text-align: center">
<button type="button" data-oncheck='1' class="check delay-btn btn btn-success">提交</button>
<!--<button type="button" data-oncheck='2' class="check delay-btn btn btn-info btn-cun">暂存</button>-->
... ...
... ... @@ -74,6 +74,13 @@
<div id="baseTable"></div>
<input type="hidden" id="shopRelationList" value='<%data.shopRelationList%>' />
</div>
<div class="row show-grid">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">营业执照:</div>
<div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">
<script id="edit-business-license" type="text/plain" style="width:100%;height:500px;"></script>
<input id="businessLicense" type="hidden" placeholder="营业执照" value="<%data.businessLicense%>">
</div>
</div>
<div style="text-align: center">
<%if btn%>
<a class="btn btn-success" id="tongguo">审核通过</a>
... ...
... ... @@ -14,7 +14,6 @@ new common.dropDown({el:"#supplierId",ajax:"getjitSup",params:function(){
return {brandId:$("#brandId").val(),shopId:$("#shopId").val()}
}});
$('input[type="file"]').after('<div class="file-name btn btn-default">请选择文件</div>');
var loadModal = null;
... ... @@ -122,9 +121,22 @@ $(document).on("change","#shopId",function(){
})
$(document).on("change","#supplierId",function(){ // 不维护供应商,则不带出经销选项
if($(this).val() > 0){
$("#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>");
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3], #sellType option[value=4], #sellType option[value=5]").remove();
common.util.__ajax2({
url:'/product/getSellTypeFromBeiJin',
async:false,
data:{
supplierId: $(this).val(),
brandId:$("#brandId").val()
}
},function(res){
if(res.data){
//从北京获取经营类型
for(var i=0;i<res.data.size;i++){
$("#sellType").append("<option value='"+ res.data[i].sellType +"'>"+ res.data[i].sellTypeName +"</option>");
}
}
},true);
}else{
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3]").remove();
$("#sellType").append("<option value='1'>经销</option>");
... ...
... ... @@ -372,12 +372,26 @@ $(document).on("change","#shopId",function(){
});
$(document).on("change","#supplierId",function(){ // 不维护供应商,则不带出经销选项
if($(this).val() > 0){
$("#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>");
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3], #sellType option[value=4], #sellType option[value=5]").remove();
common.util.__ajax2({
url:'/product/getSellTypeFromBeiJin',
async:false,
data:{
supplierId: $(this).val(),
brandId:$("#brandId").val()
}
},function(res){
if(res.data){
//从北京获取经营类型
for(var i=0;i<res.data.size;i++){
$("#sellType").append("<option value='"+ res.data[i].sellType +"'>"+ res.data[i].sellTypeName +"</option>");
}
}
},true);
}else{
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3]").remove();
$("#sellType option[value=1], #sellType option[value=2], #sellType option[value=3], #sellType option[value=4], #sellType option[value=5]").remove();
$("#sellType").append("<option value='1'>经销</option>");
}
$("#sellType").val(-1).trigger("change");
... ...
... ... @@ -78,7 +78,9 @@ var basicInfohtml = '',
sellType: {
'1': '经销',
'2': '代销',
'3': 'JIT'
'3': 'JIT',
'4': '专营店代销入库',
'5': '专营店代销不入库',
}
},
basicInfo = NETSALEDATA.baseProductInfo.baseProduct || '',
... ...
... ... @@ -10,6 +10,7 @@ var util = require('../../common/util');
var e=new common.edit("#storeForm",{bucket:"yhb-img01"});
window.UMshopintro = UM.getEditor('edit-shop-intro');
window.UMBusinessLicense = UM.getEditor('edit-business-license');
$(function () {
var shopNature = $("#shopNature").val();
if(shopNature == 3){
... ... @@ -129,6 +130,10 @@ e.on("render",function(){
if(shopIntroContent) {
UMshopintro.setContent(shopIntroContent);
}
var businessLicenseContent = $('#businessLicense').val();
if(businessLicenseContent) {
UMBusinessLicense.setContent(businessLicenseContent);
}
});
e.on("bind",function(){
... ... @@ -345,6 +350,7 @@ function submitForm(callback) {
var result = e.submit($("#storeForm").attr("action"),function(option){
option.data=$.extend({},option.data,_arr);
option.data.shopIntro = UMshopintro.getContent();
option.data.businessLicense = UMBusinessLicense.getContent();
console.log(option.data);
option.success=function(res){
if(res.code=="200"){
... ...
... ... @@ -9,7 +9,7 @@ require('../../common/umeditor');
require('../../common/zh-cn');
var ENUM={
shopNature:{1:'旗舰店',2:'专卖店',3:'分销店'},
shopNature:{1:'旗舰店',2:'专卖店',3:'分销店',4:'专营店'},
shopsType:{1:'单品店',2:'多品店'},
checkStatus:{100:'暂存',200:'审核中',300:'通过',900:'驳回'},
opt:{"add":"添加","delete":"删除"},
... ... @@ -18,7 +18,7 @@ var ENUM={
};
var shopNature = $('#shopNature1').html();
if(shopNature == 3){
$('#shopNature1').html("分销店");
$('#shopNature1').html("分销店");
$("#showUnionType").show();
$("#showBLK").hide();
$("#showUrl").hide();
... ... @@ -29,6 +29,8 @@ if(shopNature == 3){
$('#shopNature1').html("旗舰店");
}else if(shopNature == 2){
$('#shopNature1').html("专卖店");
}else if(shopNature == 4){
$('#shopNature1').html("专营店");
}
$("#showUnionType").hide();
$("#showBLK").show();
... ... @@ -94,4 +96,11 @@ window.UMshopintro.setDisabled('fullscreen');
var shopIntroContent = $('#shopIntro').val();
if(shopIntroContent) {
UMshopintro.setContent(shopIntroContent);
}
window.UMBusinessLicense = UM.getEditor('edit-business-license');
window.UMBusinessLicense.setDisabled('fullscreen');
var businessLicenseContent = $('#businessLicense').val();
if(businessLicenseContent) {
UMBusinessLicense.setContent(businessLicenseContent);
}
\ No newline at end of file
... ...