@@ -219,7 +333,8 @@
}
});
- laydate.render({type:"datetime", elem:"#expire_time", trigger:"click",min:0});
+ laydate.render({type:"date", elem:"#business-license-start", trigger:"click",min:0});
+ laydate.render({type:"date", elem:"#business-license-end", trigger:"click",min:0});
like.delUpload();
$(document).on("click", ".add-upload-image", function () {
@@ -346,6 +461,35 @@
}
});
+ // 上传身份证正面
+ var uploadInst = likeupload.render({
+ elem: '#id-front' //绑定元素
+ ,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
+ ,accept: 'images'
+ ,data: {type: 'id_card'}
+ ,exts: "jpg|png|jpeg"
+ ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
+ layer.load(); //上传loading
+ }
+ ,done: function(res, index, upload){
+ if (res.code === 1) {
+ var template = '
';
+ template += '

';
+ template += '
x
';
+ $("#id-front").parent().before(template)
+
+ $("input[name='idFront']").val(res.data.file)
+ } else {
+ layer.msg('上传错误');
+ return false;
+ }
+ layer.closeAll('loading'); //关闭loading
+ }
+ ,error: function(index, upload){
+ layer.closeAll('loading'); //关闭loading
+ }
+ });
+
// 上传身份证反面
var uploadInst = likeupload.render({
elem: '#id-back' //绑定元素
@@ -375,6 +519,209 @@
}
});
+ // 开户许可证
+ var uploadInst = likeupload.render({
+ elem: '#open-account' //绑定元素
+ ,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
+ ,accept: 'images'
+ ,data: {type: 'open_account'}
+ ,exts: "jpg|png|jpeg"
+ ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
+ layer.load(); //上传loading
+ }
+ ,done: function(res, index, upload){
+ if (res.code === 1) {
+ var template = '
';
+ template += '

';
+ template += '
x
';
+ $("#open-account").parent().before(template)
+
+ $("input[name='openAccount']").val(res.data.file)
+ } else {
+ layer.msg('上传错误');
+ return false;
+ }
+ layer.closeAll('loading'); //关闭loading
+ }
+ ,error: function(index, upload){
+ layer.closeAll('loading'); //关闭loading
+ }
+ });
+
+ // 银行卡正面
+ var uploadInst = likeupload.render({
+ elem: '#front-bank-card' //绑定元素
+ ,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
+ ,accept: 'images'
+ ,data: {type: 'front_bank_card'}
+ ,exts: "jpg|png|jpeg"
+ ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
+ layer.load(); //上传loading
+ }
+ ,done: function(res, index, upload){
+ if (res.code === 1) {
+ var template = '
';
+ template += '

';
+ template += '
x
';
+ $("#front-bank-card").parent().before(template)
+
+ $("input[name='frontBankCard']").val(res.data.file)
+ } else {
+ layer.msg('上传错误');
+ return false;
+ }
+ layer.closeAll('loading'); //关闭loading
+ }
+ ,error: function(index, upload){
+ layer.closeAll('loading'); //关闭loading
+ }
+ });
+
+ // 银行卡反面
+ var uploadInst = likeupload.render({
+ elem: '#back-bank-card' //绑定元素
+ ,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
+ ,accept: 'images'
+ ,data: {type: 'back_bank_card'}
+ ,exts: "jpg|png|jpeg"
+ ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
+ layer.load(); //上传loading
+ }
+ ,done: function(res, index, upload){
+ if (res.code === 1) {
+ var template = '
';
+ template += '

';
+ template += '
x
';
+ $("#back-bank-card").parent().before(template)
+
+ $("input[name='backBankCard']").val(res.data.file)
+ } else {
+ layer.msg('上传错误');
+ return false;
+ }
+ layer.closeAll('loading'); //关闭loading
+ }
+ ,error: function(index, upload){
+ layer.closeAll('loading'); //关闭loading
+ }
+ });
+
+ // 非法人对私身份证正面照
+ var uploadInst = likeupload.render({
+ elem: '#front-unincorporate' //绑定元素
+ ,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
+ ,accept: 'images'
+ ,data: {type: 'front_unincorporate'}
+ ,exts: "jpg|png|jpeg"
+ ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
+ layer.load(); //上传loading
+ }
+ ,done: function(res, index, upload){
+ if (res.code === 1) {
+ var template = '
';
+ template += '

';
+ template += '
x
';
+ $("#front-unincorporate").parent().before(template)
+
+ $("input[name='frontUnincorporate']").val(res.data.file)
+ } else {
+ layer.msg('上传错误');
+ return false;
+ }
+ layer.closeAll('loading'); //关闭loading
+ }
+ ,error: function(index, upload){
+ layer.closeAll('loading'); //关闭loading
+ }
+ });
+
+ // 非法人对私身份证反面照
+ var uploadInst = likeupload.render({
+ elem: '#back-unincorporate' //绑定元素
+ ,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
+ ,accept: 'images'
+ ,data: {type: 'back_unincorporate'}
+ ,exts: "jpg|png|jpeg"
+ ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
+ layer.load(); //上传loading
+ }
+ ,done: function(res, index, upload){
+ if (res.code === 1) {
+ var template = '
';
+ template += '

';
+ template += '
x
';
+ $("#back-unincorporate").parent().before(template)
+
+ $("input[name='backUnincorporate']").val(res.data.file)
+ } else {
+ layer.msg('上传错误');
+ return false;
+ }
+ layer.closeAll('loading'); //关闭loading
+ }
+ ,error: function(index, upload){
+ layer.closeAll('loading'); //关闭loading
+ }
+ });
+
+ // 非法人授权结算书合影照片
+ var uploadInst = likeupload.render({
+ elem: '#unincorporate-group' //绑定元素
+ ,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
+ ,accept: 'images'
+ ,data: {type: 'unincorporate_group'}
+ ,exts: "jpg|png|jpeg"
+ ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
+ layer.load(); //上传loading
+ }
+ ,done: function(res, index, upload){
+ if (res.code === 1) {
+ var template = '
';
+ template += '

';
+ template += '
x
';
+ $("#unincorporate-group").parent().before(template)
+
+ $("input[name='unincorporateGroup']").val(res.data.file)
+ } else {
+ layer.msg('上传错误');
+ return false;
+ }
+ layer.closeAll('loading'); //关闭loading
+ }
+ ,error: function(index, upload){
+ layer.closeAll('loading'); //关闭loading
+ }
+ });
+
+ // 非法人对私上传的授权书(无营业执照可不填)
+ var uploadInst = likeupload.render({
+ elem: '#unincorporate-authorize' //绑定元素
+ ,url: "{:url('shop.LocalStore/uploadImage')}" //上传接口
+ ,accept: 'images'
+ ,data: {type: 'unincorporate_authorize'}
+ ,exts: "jpg|png|jpeg"
+ ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
+ layer.load(); //上传loading
+ }
+ ,done: function(res, index, upload){
+ if (res.code === 1) {
+ var template = '
';
+ template += '

';
+ template += '
x
';
+ $("#unincorporate-authorize").parent().before(template)
+
+ $("input[name='unincorporateAuthorize']").val(res.data.file)
+ } else {
+ layer.msg('上传错误');
+ return false;
+ }
+ layer.closeAll('loading'); //关闭loading
+ }
+ ,error: function(index, upload){
+ layer.closeAll('loading'); //关闭loading
+ }
+ });
+
function switchTab(number) {
$('.layui-tab-card .layui-tab-title li').removeClass('layui-this');
$('.layui-tab-content .layui-tab-item').removeClass('layui-show');