Authored by shuaiguo

Merge branch 'refs/heads/feature/undertake' into develop

# Conflicts:
#	code/yarn.lock
... ... @@ -23,6 +23,8 @@ module.exports = function (app){
if(rs.data && rs.data.shopsAddressInfo) {
rs.data.shopsAddressInfo = JSON.stringify(rs.data.shopsAddressInfo);
}
console.log('------------data------------', JSON.stringify(rs.data))
this.$extend={
moduleName:"店铺管理",
pageName:"店铺编辑",
... ...
... ... @@ -28,7 +28,11 @@ module.exports={
{name:"city",type:"String"},
{name:"county",type:"String"},
{name:"street",type:"String"},
{name:"detailAdd",type:"String"}
{name:"detailAdd",type:"String"},
{name:"zfbAccountName",type:"String"},
{name:"zfbAccount",type:"String"},
{name:"checkTel",type:"String"}
]
},
... ...
... ... @@ -47,7 +47,10 @@ module.exports={
{name:"city",type:"String"},
{name:"county",type:"String"},
{name:"street",type:"String"},
{name:"detailAdd",type:"String"}
{name:"detailAdd",type:"String"},
{name:"zfbAccountName",type:"String"},
{name:"zfbAccount",type:"String"},
{name:"checkTel",type:"String"}
]
},
... ...
... ... @@ -3,7 +3,7 @@
<form id="storeForm" role="form" class="form-horizontal form-bordered" method="post" action="<%action%>">
<input type="hidden" id="shopsId" value="<%data.shopsId%>">
<input type="hidden" id="shopsAddressInfo" value="<%data.shopsAddressInfo%>">
<input type="hidden" id="shopsAddressInfoData" value="<%data.shopsAddressInfo%>">
<div class="contentpanel">
<div class="panel panel-default">
<div class="panel-heading">
... ... @@ -74,7 +74,7 @@
</div>
<div class="form-group" id="shopsAddressInfo">
<div class="col-sm-1 control-label">
<label>店铺地址:</label>
<label>店铺地址:<span class="red">*</span></label>
</div>
<div class="col-sm-2">
<select name="province" id="province"
... ... @@ -109,9 +109,9 @@
<p style="margin-top: 10px"><span class="red">注:店铺地址为店铺最新可联系到的地址</span></p>
</div>
</div>
<div class="form-group" id="customerTel">
<div class="form-group" id="customerTelFormGroup">
<div class="col-sm-1 control-label">
<label>店铺客服电话:</label>
<label>店铺客服电话:<span class="red">*</span></label>
</div>
<div class="col-sm-8">
<div class="input-group">
... ... @@ -122,6 +122,45 @@
<p style="margin-top: 10px"><span class="red">注:请输入手机号或固定电话号码,固定电话格式为“区号-号码-分机”,支持400或800电话</span></p>
</div>
</div>
<div class="form-group" id="zfbAccountFormGroup">
<div class="col-sm-1 control-label">
<label>支付宝账号:<span class="red">*</span></label>
</div>
<div class="col-sm-8">
<div class="input-group">
<input type="text" form="storeForm" name="zfbAccount" id="zfbAccount"
class="form-control" value="<%data.zfbAccount%>" placeholder="支付宝账号"
aria-describedby="basic-addon2">
</div>
<p style="margin-top: 10px"><span class="red">注:支付宝账号用于提现,支持邮箱和手机格式</span></p>
</div>
</div>
<div class="form-group" id="zfbAccountNameFormGroup">
<div class="col-sm-1 control-label">
<label>支付宝账号名称:<span class="red">*</span></label>
</div>
<div class="col-sm-8">
<div class="input-group">
<input type="text" form="storeForm" name="zfbAccountName" id="zfbAccountName"
class="form-control" value="<%data.zfbAccountName%>" placeholder="支付宝账号名称"
aria-describedby="basic-addon2">
</div>
<p style="margin-top: 10px"><span class="red">注:支付宝账号名称用于提现,将校验支付宝账号姓名一致性</span></p>
</div>
</div>
<div class="form-group" id="checkTelFormGroup">
<div class="col-sm-1 control-label">
<label>联系方式:<span class="red">*</span></label>
</div>
<div class="col-sm-8">
<div class="input-group">
<input type="text" form="storeForm" name="checkTel" id="checkTel"
class="form-control" value="<%data.checkTel%>" placeholder="联系方式"
aria-describedby="basic-addon2">
</div>
<p style="margin-top: 10px"><span class="red">注:请输入手机号,用于接收提现验证码</span></p>
</div>
</div>
<div class="form-group" id="other">
<div class="col-sm-1 control-label">
<label>其他平台网址:</label>
... ...
... ... @@ -91,7 +91,8 @@ var sellType = {
"3": "JIT",
"4": "专营店代销入库",
"5": "专营店代销不入库",
"10": "保税经销"
"10": "保税经销",
"30": "一件代发"
}
}
... ...
... ... @@ -11,16 +11,67 @@ 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 == 6) {
$("#customerTel").show();
// 一件代发 选项展示
function underTakeElm(isShow) {
if(isShow) {
$("#customerTelFormGroup").show();
$("#shopsAddressInfo").show();
$("#checkTelFormGroup").show();
$("#zfbAccountNameFormGroup").show();
$("#zfbAccountFormGroup").show();
$('#province').attr('required', true)
$('#city').attr('required', true)
$('#detailAdd').attr('required', true)
$('#customerTel').attr('required', true)
$('#zfbAccount').attr('required', true)
$('#zfbAccountName').attr('required', true)
$('#checkTel').attr('required', true)
// 一件代发 默认选择单品 且不可修改
$('#shopsType').val('1').attr('disabled', 'disabled')
if(!!~$("#shopsType").val()){
$("#modalId").prop("disabled",false);
}else{
$("#customerTel").hide();
$("#modalId").prop("disabled",true);
}
if(g2.grid){
g2.__rows.length=0;
g2.reload();
}
}else{
$("#customerTelFormGroup").hide();
$("#shopsAddressInfo").hide();
$("#checkTelFormGroup").hide();
$("#zfbAccountNameFormGroup").hide();
$("#zfbAccountFormGroup").hide();
$('#province').attr('required', false)
$('#city').attr('required', false)
$('#detailAdd').attr('required', false)
$('#customerTel').attr('required', false)
$('#zfbAccount').attr('required', false)
$('#zfbAccountName').attr('required', false)
$('#checkTel').attr('required', false)
$('#shopsType').attr('disabled', false).val('-1')
if(!!~$("#shopsType").val()){
$("#modalId").prop("disabled",false);
}else{
$("#modalId").prop("disabled",true);
}
if(g2.grid){
g2.__rows.length=0;
g2.reload();
}
}
}
$(function () {
var shopNature = $("#shopNature").val();
// 一件代发
underTakeElm(shopNature == 6);
if(shopNature == 3){
$("#unionTypeDiv").show();
$("#blkShop").hide();
... ... @@ -432,7 +483,7 @@ const Region = {
}
$(function(){
var shopsAddressInfo = $('#shopsAddressInfo').val();
var shopsAddressInfo = $('#shopsAddressInfoData').val();
if(shopsAddressInfo) {
shopsAddressInfo = JSON.parse(shopsAddressInfo);
}
... ... @@ -504,13 +555,9 @@ $('#street').on('change',function() {
$("#shopNature").on('change', () => {
var shopNature = $("#shopNature").val();
// 一件代发
underTakeElm(shopNature == 6);
if(shopNature == 6) {
$("#customerTel").show();
$("#shopsAddressInfo").show();
Region.initProvice();
}else{
$("#customerTel").hide();
$("#shopsAddressInfo").hide();
}
});
... ...