Upd:微信新进件-修改接口

master
dulingling 4 years ago
parent b6bb133f19
commit f3c0f13f0a

@ -1,13 +1,13 @@
package au.com.royalpay.payment.manage.mappers.system; package au.com.royalpay.payment.manage.mappers.system;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper; import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql; import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType; import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List; import java.util.List;
/** /**
@ -15,10 +15,27 @@ import java.util.List;
*/ */
@AutoMapper(tablename = "sys_wx_merchant_apply",pkName = "merchant_app_id") @AutoMapper(tablename = "sys_wx_merchant_apply",pkName = "merchant_app_id")
public interface SysWxMerchantApplyMapper { public interface SysWxMerchantApplyMapper {
@AutoSql(SqlType.SELECT) ` `
@Select("SELECT * FROM sys_wx_merchant_apply WHERE client_id = #{client_id} and is_valid = 1")
List<JSONObject> listWxMerchantApplices(@Param("client_id") int client_id, PageBounds pageBounds); List<JSONObject> listWxMerchantApplices(@Param("client_id") int client_id, PageBounds pageBounds);
@AutoSql(SqlType.INSERT) @AutoSql(SqlType.INSERT)
void insertWxMerchantApply(JSONObject params); void insertWxMerchantApply(JSONObject params);
@AutoSql(SqlType.SELECT)
JSONObject findByClientIdAndSubMerchantAppId(@Param("client_id") int clientId, @Param("merchant_app_id")String merchantAppId);
@AutoSql(SqlType.SELECT)
List<JSONObject> findByClientIdAndSubMerchantId(@Param("client_id") int client_id,@Param("sub_merchant_id") String subMerchantId);
/**
*
* @param client_id
* @param sub_merchant_id
*/
@Update("UPDATE sys_wx_merchant_apply SET is_valid=0 WHERE client_id = #{client_id} and sub_merchant_id = #{sub_merchant_id}")
void failureSubMerchantByClientIdAndSubMerchantId(@Param("client_id")int client_id, @Param("sub_merchant_id")String sub_merchant_id);
@AutoSql(SqlType.UPDATE)
void updateSubMerchantInfoByMerchantAppId(JSONObject updateSubMerchantInfo);
} }

@ -135,6 +135,33 @@ public class NewSubMerchantIdApply {
return params; return params;
} }
public static JSONObject resultParams(JSONObject subMerchantApplyInfo){
return new JSONObject(){{
put("company_name",subMerchantApplyInfo.getString("merchant_name"));
put("merchant_id",subMerchantApplyInfo.getString("merchant_id"));
put("store_name",subMerchantApplyInfo.getString("merchant_shortname"));
put("company_phone",subMerchantApplyInfo.getString("office_phone"));
put("contact_person",subMerchantApplyInfo.getString("contact_name"));
put("contact_phone",subMerchantApplyInfo.getString("contact_phone"));
put("contact_email",subMerchantApplyInfo.getString("contact_email"));
put("industry",subMerchantApplyInfo.getString("business_category"));
put("company_website",subMerchantApplyInfo.getString("website"));
put("mcc_code",subMerchantApplyInfo.getString("mcc_code"));
put("address",subMerchantApplyInfo.getString("stores_address"));
put("company_register_no",subMerchantApplyInfo.getString("extra_reg_cer_number"));
put("company_register_date",subMerchantApplyInfo.getString("extra_reg_cer_exp_date"));
put("merchant_type",subMerchantApplyInfo.getString("extra_merchant_type"));
if(subMerchantApplyInfo.getString("extra_merchant_type").equals( "1")){
put("representative_person",subMerchantApplyInfo.getString("director_name"));
put("representative_person_id_number",subMerchantApplyInfo.getString("director_id_number"));
}else {
put("marketing_person", subMerchantApplyInfo.getString("principal_name"));
put("marketing_person_id_number", subMerchantApplyInfo.getString("principal_id_number"));
}
}};
}
public NewSubMerchantIdApply() { public NewSubMerchantIdApply() {
} }

@ -434,6 +434,10 @@ public interface ClientManager {
String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager); String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager);
JSONObject queryApplicationSubMerchantById(String clientMoniker, String merchantAppId);
void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager);
void registerAlipayGms(String clientMoniker, JSONObject manager); void registerAlipayGms(String clientMoniker, JSONObject manager);
void registerAlipayOnlineGms(String clientMoniker, JSONObject manager); void registerAlipayOnlineGms(String clientMoniker, JSONObject manager);

@ -5638,6 +5638,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return sub_merchant_id; return sub_merchant_id;
} }
/**
*
* @param clientMoniker
* @param subMerchantApply
* @param manager
* @return
*/
@Override @Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker") @CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantApply, JSONObject manager){ public String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantApply, JSONObject manager){
@ -5653,10 +5660,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
params.put("client_id", client.getString("client_id")); params.put("client_id", client.getString("client_id"));
params.put("create_time", new Date()); params.put("create_time", new Date());
params.put("operator", manager.getString("display_name")); params.put("operator", manager.getString("display_name"));
params.put("is_valid","1");
Element elem = wxPayClient.newSubMerchantApplication(subMerchantApply.getMerchant_id(), subMerchantInfo); Element elem = wxPayClient.newSubMerchantApplication(subMerchantApply.getMerchant_id(), subMerchantInfo);
String sub_merchant_id = elem.elementText("sub_mch_id"); String sub_merchant_id = elem.elementText("sub_mch_id");
if (StringUtils.isNotEmpty(sub_merchant_id)) { if (StringUtils.isNotEmpty(sub_merchant_id)) {
params.put("sub_merchant_id", sub_merchant_id); params.put("sub_merchant_id", sub_merchant_id);
List<JSONObject> subMerchants= sysWxMerchantApplyMapper.findByClientIdAndSubMerchantId(client.getInteger("client_id"),sub_merchant_id);
if(subMerchants.size()>0){
sysWxMerchantApplyMapper.failureSubMerchantByClientIdAndSubMerchantId(client.getInteger("client_id"),sub_merchant_id);
}
sysWxMerchantApplyMapper.insertWxMerchantApply(params); sysWxMerchantApplyMapper.insertWxMerchantApply(params);
clearCacheSubMerchantIdApplices(clientMoniker); clearCacheSubMerchantIdApplices(clientMoniker);
} else { } else {
@ -5665,6 +5677,53 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return sub_merchant_id; return sub_merchant_id;
} }
/**
* -
* @param clientMoniker
* @param merchantAppId
*/
@Override
public JSONObject queryApplicationSubMerchantById(String clientMoniker, String merchantAppId){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
JSONObject subMerchantApplyInfo = sysWxMerchantApplyMapper.findByClientIdAndSubMerchantAppId(client.getInteger("client_id"), merchantAppId);
JSONObject resultParams = NewSubMerchantIdApply.resultParams(subMerchantApplyInfo);
resultParams.put("merchant_app_id",subMerchantApplyInfo.getString("merchant_app_id"));
return resultParams;
}
@Override
public void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
checkOrgPermission(manager, client);
JSONObject params = subMerchantIdApply.insertObject(client);
params.put("merchant_app_id",merchantAppId);
SubMerchantInfoInheritance subMerchantInfo = JSONObject.toJavaObject(params, SubMerchantInfoInheritance.class);
params.put("merchant_id", subMerchantIdApply.getMerchant_id());
params.put("client_id", client.getString("client_id"));
params.put("create_time", new Date());
params.put("operator", manager.getString("display_name"));
sysWxMerchantApplyMapper.updateSubMerchantInfoByMerchantAppId(params);
Element elem = wxPayClient.modfiySubMerchant(subMerchantIdApply.getMerchant_id(), subMerchantInfo);
String sub_merchant_id = elem.elementText("sub_mch_id");
if (StringUtils.isNotEmpty(sub_merchant_id)) {
params.put("sub_merchant_id", sub_merchant_id);
sysWxMerchantApplyMapper.updateSubMerchantInfoByMerchantAppId(params);
} else {
throw new BadRequestException(elem.elementText("return_msg"));
}
}
@Override @Override
public void registerAlipayGms(String clientMoniker, JSONObject manager) { public void registerAlipayGms(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);

@ -842,6 +842,18 @@ public class PartnerManageController {
return clientManager.newSubMerchantApplication(clientMoniker, subMerchantIdApply, manager); return clientManager.newSubMerchantApplication(clientMoniker, subMerchantIdApply, manager);
} }
@ManagerMapping(value = "/{clientMoniker}/get_merchant_ids/{merchantAppId}", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public JSONObject querySubMerchantApplication(@PathVariable("clientMoniker") String clientMoniker, @PathVariable("merchantAppId") String merchantAppId) {
return clientManager.queryApplicationSubMerchantById(clientMoniker, merchantAppId);
}
@ManagerMapping(value = "/{clientMoniker}/get_merchant_ids/{merchantAppId}", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void changeSubMerchantApplication(@PathVariable("clientMoniker") String clientMoniker, @PathVariable("merchantAppId") String merchantAppId,
@RequestBody NewSubMerchantIdApply subMerchantIdApply, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changeApplicationSubMerchantById(clientMoniker, merchantAppId,subMerchantIdApply,manager);
}
@ManagerMapping(value = "/{clientMoniker}/register/alipay_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @ManagerMapping(value = "/{clientMoniker}/register/alipay_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void registerAlipayGms(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void registerAlipayGms(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayGms(clientMoniker, manager); clientManager.registerAlipayGms(clientMoniker, manager);

@ -5314,7 +5314,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]); }]);
app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', '$sce', function ($scope, $http, $uibModal, $state, commonDialog, $sce) { app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', '$sce', function ($scope, $http, $uibModal, $state, commonDialog, $sce) {
$scope.showMoreMerchantInfo = false; $scope.showMoreMerchantInfo = false;
$scope.hideMerchantInfo = function () { $scope.hideMerchantInfo = function () {
$scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo; $scope.showMoreMerchantInfo = !$scope.showMoreMerchantInfo;
}; };
@ -5345,6 +5344,23 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}); });
} }
$scope.updateSubMerchantId = function(merchant_app_id){
$uibModal.open({
templateUrl: '/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html',
controller: 'updateApplyWxSubMerchantIdCtrl',
resolve: {
merchantInfo:$scope.partner,
merchantIds:['$http', '$stateParams', function ($http) {
return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids');
}],
subMerchantInfo: ['$http', '$stateParams', function ($http) {
return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_merchant_ids/'+merchant_app_id);
}]
}
}).result.then(function () {
$scope.loadSubMerchantInfos();
})
}
$scope.useRpaySubMerchantId = function (sub_merchant_id) { $scope.useRpaySubMerchantId = function (sub_merchant_id) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/rpay_payment_config', {rpay_enterprise_id: sub_merchant_id}).then(function (resp) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/rpay_payment_config', {rpay_enterprise_id: sub_merchant_id}).then(function (resp) {
commonDialog.alert({ commonDialog.alert({
@ -5369,7 +5385,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}); });
} }
$scope.applyWxSubMerchantId = function () { /*$scope.applyWxSubMerchantId = function () {
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html', templateUrl: '/static/payment/partner/templates/apply_wx_sub_merchant_id.html',
controller: 'applyWxSubMerchantIdCtrl', controller: 'applyWxSubMerchantIdCtrl',
@ -5384,9 +5400,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}).result.then(function () { }).result.then(function () {
$scope.loadSubMerchantInfos(); $scope.loadSubMerchantInfos();
}) })
}; };*/
/*$scope.applyWxSubMerchantId = function () { $scope.applyWxSubMerchantId = function () {
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html', templateUrl: '/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html',
controller: 'newApplyWxSubMerchantIdCtrl', controller: 'newApplyWxSubMerchantIdCtrl',
@ -5401,7 +5417,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}).result.then(function () { }).result.then(function () {
$scope.loadSubMerchantInfos(); $scope.loadSubMerchantInfos();
}) })
};*/ };
$scope.applyMWSubMerchantId = function () { $scope.applyMWSubMerchantId = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/mw_info').then(function (resp) { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/mw_info').then(function (resp) {
@ -5495,7 +5511,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}); });
return; return;
} }
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/sub_apply', $scope.subMerchantInfo).then(function (resp) { $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/get_merchant_ids/'+$scope.subMerchantInfo.merchant_app_id, $scope.subMerchantInfo).then(function (resp) {
$scope.apply_sub_merchant_id = resp.data; $scope.apply_sub_merchant_id = resp.data;
$scope.$close(); $scope.$close();
if (subMerchantInfo.sub_merchant_id != null) { if (subMerchantInfo.sub_merchant_id != null) {
@ -5603,6 +5619,54 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}) })
} }
}]); }]);
app.controller('updateApplyWxSubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog','wechatGoodMcc','merchantInfo', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog,wechatGoodMcc,merchantInfo) {
$scope.wxIndustries = angular.copy(wxMerchantIndustries);
$scope.subMerchantInfo = angular.copy(subMerchantInfo.data);
$scope.merchantInfo = angular.copy(merchantInfo);
$scope.wechatMccIndustries = wechatGoodMcc.configs();
$scope.merchantIds = merchantIds.data;
$scope.updateApply = function (form) {
$scope.errmsg = null;
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
var params = {
company_name : $scope.subMerchantInfo.company_name,
merchant_id : $scope.subMerchantInfo.merchant_id,
store_name : $scope.subMerchantInfo.store_name,
office_phone : $scope.subMerchantInfo.office_phone,
contact_person : $scope.subMerchantInfo.contact_person,
contact_phone : $scope.subMerchantInfo.contact_phone,
company_phone : $scope.subMerchantInfo.company_phone,
contact_email : $scope.subMerchantInfo.contact_email,
industry : $scope.subMerchantInfo.industry,
company_website : $scope.subMerchantInfo.company_website,
merchant_type: $scope.subMerchantInfo.merchant_type,
mcc_code : $scope.subMerchantInfo.mcc_code,
address: $scope.subMerchantInfo.address,
company_register_no: $scope.subMerchantInfo.company_register_no,
company_register_date: $scope.subMerchantInfo.company_register_date
};
if($scope.subMerchantInfo.merchant_type == 1){
params.director_name = $scope.subMerchantInfo.representative_person;
params.director_id_number = $scope.subMerchantInfo.representative_person_id_number;
}else{
params.principal_name = $scope.subMerchantInfo.marketing_person;
params.principal_id_number = $scope.subMerchantInfo.marketing_person_id_number;
}
$http.put('/sys/partners/' + $scope.merchantInfo.client_moniker + '/get_merchant_ids/'+$scope.subMerchantInfo.merchant_app_id, params).then(function (resp) {
$scope.apply_sub_merchant_id = resp.data;
$scope.$close();
commonDialog.confirm({title: 'Confirm', content: '微信商户进件已修改成功!'})
});
}
}]);
app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap', '$filter', 'commonDialog', 'timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap, $filter, commonDialog, timezone) { app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap', '$filter', 'commonDialog', 'timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap, $filter, commonDialog, timezone) {
$scope.subMerchantInfo = angular.copy(subMerchantInfo); $scope.subMerchantInfo = angular.copy(subMerchantInfo);
@ -6516,6 +6580,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return industry; return industry;
} }
}); });
app.filter('newWxMerchants', function () {
return function (values) {
var industry = '';
angular.forEach(newWxMerchantIndustries, function (wxMerchant) {
if (wxMerchant.value == values) {
industry = wxMerchant.label;
}
});
return industry;
}
});
app.filter('yeepayIndustry', function () { app.filter('yeepayIndustry', function () {
return function (value) { return function (value) {
switch (value + '') { switch (value + '') {
@ -6620,6 +6695,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}); });
app.filter('wechatMcc',['wechatGoodMcc', function (wechatGoodMcc) {
return function (values) {
var industry = '';
angular.forEach(wechatGoodMcc.configs(), function (wxMerchant) {
if (wxMerchant.value == values) {
industry = wxMerchant.label;
}
});
return industry;
}
}]);
app.filter('choose_merchant_id', function () { app.filter('choose_merchant_id', function () {
return function (value) { return function (value) {
switch (value + '') { switch (value + '') {

@ -63,11 +63,11 @@
</li> </li>
<li class="list-group-item list-group-item-success"> <li class="list-group-item list-group-item-success">
Business Category Business Category
<span style="float: right">{{id_apply.business_category | wxMerchants}}</span> <span style="float: right">{{id_apply.business_category | newWxMerchants}}</span>
</li> </li>
<li class="list-group-item list-group-item-success"> <li class="list-group-item list-group-item-success">
Description Mcc Code
<span style="float: right;">{{id_apply.merchant_introduction | cut:true:20:' ...'}}</span> <span style="float: right;">{{id_apply.mcc_code | wechatMcc }}</span>
</li> </li>
<li class="list-group-item list-group-item-success"> <li class="list-group-item list-group-item-success">
Operator Operator
@ -80,6 +80,10 @@
ng-click="useSubMerchantId(id_apply.sub_merchant_id)"> ng-click="useSubMerchantId(id_apply.sub_merchant_id)">
USE USE
</button> </button>
<button role="button" class="btn btn-info" title="update"
ng-click="updateSubMerchantId(id_apply.merchant_app_id)">
UPDATE
</button>
</div> </div>
</div> </div>
</div> </div>

@ -0,0 +1,273 @@
<div class="content">
<form novalidate name="subForm">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">Update Apply Wechat Sub Merchant</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':subForm.merchant_name.$invalid && subForm.merchant_name.$dirty}">
<label class="control-label col-sm-3" for="merchant_name_input">* Merchant Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_name"
type="text" name="merchant_name" id="merchant_name_input" required maxlength="50">
<div ng-messages="subForm.merchant_name.$error" ng-if="subForm.merchant_name.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.merchant_id.$invalid && subForm.merchant_id.$dirty}">
<label class="control-label col-sm-3" for="business_category_input">* Merchant ID</label>
<div class="col-sm-8">
<select class="form-control" name="merchant_id"
ng-model="subMerchantInfo.merchant_id"
id="merchant_id_input" required
ng-options="merchant_id.merchant_id as merchant_id.merchant_id for merchant_id in merchantIds">
<option value="">Please Choose</option>
</select>
<div ng-messages="subForm.merchant_id.$error" ng-if="subForm.merchant_id.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
<p class="small text-danger" ng-message="maxLength">More than 50</p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.merchant_storename.$invalid && subForm.merchant_storename.$dirty}">
<label class="control-label col-sm-3" for="merchant_storename_input">* Merchant Store Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.store_name"
type="text" name="merchant_storename" id="merchant_storename_input" required maxlength="50">
<div ng-messages="subForm.merchant_storename.$error" ng-if="subForm.merchant_storename.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.business_category.$invalid && subForm.business_category.$dirty}">
<label class="control-label col-sm-3" for="business_category_input">* Business Category</label>
<div class="col-sm-8">
<select class="form-control" name="business_category"
ng-model="subMerchantInfo.industry"
id="business_category_input" required
ng-options="industry.value as industry.label for industry in wxIndustries">
<option value="">Please Choose</option>
</select>
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
<p class="small text-danger" ng-message="maxLength">More than 50</p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.company_website.$invalid && subForm.company_website.$dirty}">
<label class="control-label col-sm-3" for="website_input">* Website</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_website"
type="url" name="website" id="website_input" required maxlength="128">
<div ng-messages="subForm.company_website.$error" ng-if="subForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
<div class="form-group"
ng-class="{'has-error':subForm.office_phone.$invalid && subForm.office_phone.$dirty}">
<label class="control-label col-sm-3" for="office_phone_input">* Office Phone</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_phone"
type="tel" name="office_phone" id="office_phone_input" required>
<div ng-messages="subForm.office_phone.$error" ng-if="subForm.office_phone.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.contact_name.$invalid && subForm.contact_person.$dirty}">
<label class="control-label col-sm-3" for="contact_name_input">* Contact Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.contact_person"
type="text" name="contact_name" id="contact_name_input" required maxlength="32">
<div ng-messages="subForm.contact_name.$error" ng-if="subForm.contact_name.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 32</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.contact_phone.$invalid && subForm.contact_phone.$dirty}">
<label class="control-label col-sm-3" for="contact_phone_input">* Contact Phone</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.contact_phone"
type="text" name="contact_phone" id="contact_phone_input" required maxlength="16">
<div ng-messages="subForm.contact_phone.$error" ng-if="subForm.contact_phone.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 16</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.contact_email.$invalid && subForm.contact_email.$dirty}">
<label class="control-label col-sm-3" for="contact_email_input">* Contact Email</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.contact_email"
type="text" name="contact_email" id="contact_email_input" required maxlength="128">
<div ng-messages="subForm.contact_email.$error" ng-if="subForm.contact_email.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
<!-- mcc code -->
<div class="form-group"
ng-class="{'has-error':subForm.mcc_code.$invalid && subForm.mcc_code.$dirty}">
<label class="control-label col-sm-3" for="mcc_code_input">* Mcc Code</label>
<div class="col-sm-8">
<select class="form-control" name="mcc_code"
ng-model="subMerchantInfo.mcc_code"
id="mcc_code_input" required
ng-options="mccCode.value as mccCode.label for mccCode in wechatMccIndustries">
<option value="">Please Choose</option>
</select>
<div ng-messages="subForm.mcc_code.$error" ng-if="subForm.mcc_code.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
<div ng-messages="subForm.mcc_code.$error" ng-if="subForm.mcc_code.$dirty">
<p class="small text-danger" ng-message="maxLength">More than 50</p>
</div>
</div>
<!-- store address 店铺地址 -->
<div class="form-group"
ng-class="{'has-error':subForm.address.$invalid && subForm.address.$dirty}">
<label class="control-label col-sm-3" for="address_input">* Store Address</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.address"
type="text" name="address" id="address_input" required maxlength="128">
<div ng-messages="subForm.address.$error" ng-if="subForm.address.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
<!-- 公司注册号 -->
<div class="form-group"
ng-class="{'has-error':subForm.company_register_no.$invalid && subForm.company_register_no.$dirty}">
<label class="control-label col-sm-3" for="company_register_no_input">* Company registration document No</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_register_no"
type="text" name="company_register_no" id="company_register_no_input" required maxlength="50">
<div ng-messages="subForm.company_register_no.$error" ng-if="subForm.company_register_no.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
</div>
</div>
</div>
<!-- 公司注册日期 -->
<div class="form-group"
ng-class="{'has-error':subForm.company_register_date.$invalid && subForm.company_register_date.$dirty}">
<label class="control-label col-sm-3" for="company_register_date_input">* Company registration Date</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_register_date" required maxlength="50"
type="text" name="company_register_date" id="company_register_date_input">
<div ng-messages="subForm.company_register_date.$error" ng-if="subForm.company_register_date.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 50</p>
</div>
</div>
</div>
<!-- director name 法人姓名 -->
<div class="form-group" ng-if="subMerchantInfo.merchant_type == '1'"
ng-class="{'has-error':subForm.representative_person.$invalid && subForm.representative_person.$dirty}">
<label class="control-label col-sm-3" for="representative_person_input">* Director Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.representative_person" required maxlength="128"
type="text" name="representative_person" id="representative_person_input">
<div ng-messages="subForm.representative_person.$error" ng-if="subForm.representative_person.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
<!-- director id number 法人身份证号-->
<div class="form-group" ng-if="subMerchantInfo.merchant_type == '1'"
ng-class="{'has-error':subForm.representative_person_id_number.$invalid && subForm.representative_person_id_number.$dirty}">
<label class="control-label col-sm-3" for="representative_person_id_number_input">* Director Id</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.representative_person_id_number" required maxlength="128"
type="text" name="representative_person_id_number" id="representative_person_id_number_input">
<div ng-messages="subForm.representative_person_id_number.$error" ng-if="subForm.representative_person_id_number.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
<!-- principal name 负责人姓名 -->
<div class="form-group" ng-if="subMerchantInfo.merchant_type != '1'"
ng-class="{'has-error':subForm.marketing_person.$invalid && subForm.marketing_person.$dirty}">
<label class="control-label col-sm-3" for="marketing_person_input">* Principal Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.marketing_person" required maxlength="128"
type="text" name="marketing_person" id="marketing_person_input">
<div ng-messages="subForm.marketing_person.$error" ng-if="subForm.marketing_person.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
<!-- principal id number 负责人身份证号 -->
<div class="form-group" ng-if="subMerchantInfo.merchant_type != '1'"
ng-class="{'has-error':subForm.marketing_person_id_number.$invalid && subForm.marketing_person_id_number.$dirty}">
<label class="control-label col-sm-3" for="marketing_person_id_number_input">* Marketing Person Id</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.marketing_person_id_number" required maxlength="128"
type="text" name="marketing_person_id_number" id="marketing_person_id_number_input">
<div ng-messages="subForm.marketing_person_id_number.$error" ng-if="subForm.marketing_person_id_number.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!--end 商品基本资料-->
<!--<div class="panel panel-default">-->
<!--<div class="panel-heading">Goods Qr Code</div>-->
<!--<div class="panel-body">-->
<!--</div>-->
<!--</div>-->
<!--end 商品二维码-->
<div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button"
ng-click="updateApply(subForm)">Submit
</button>
</div>
</div>
</div>
</form>
</div>
Loading…
Cancel
Save