add 关闭清算输入原因

master
luoyang 6 years ago
parent 1b60ddb959
commit 0d50ab284c

@ -271,7 +271,7 @@ public interface ClientManager {
void updateAppClient(JSONObject account,int client_id, AppClientBean appClientBean);
void setSkipClearing(JSONObject account,String clientMoniker, Boolean skip_clearing);
void setSkipClearing(JSONObject account,String clientMoniker, Boolean skip_clearing,String remark);
void enableGatewayUpgrade(JSONObject account,String clientMoniker, boolean gatewayUpgrade);

@ -3234,12 +3234,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
@Transactional
public void setSkipClearing(JSONObject account, String clientMoniker, Boolean skip_clearing) {
public void setSkipClearing(JSONObject account, String clientMoniker, Boolean skip_clearing,String remark) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "skip_clearing", skip_clearing));
if (!skip_clearing) {
if ("".equals(remark) || remark==null){
throw new ServerErrorException("请填写关闭清算原因");
}
JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id"));
clientConfig.put("skip_settle_remark", remark);
clientConfigMapper.update(clientConfig);
}
client.put("skip_clearing", skip_clearing);
if (client.getString("rpay_enterprise_id") != null) {
rpayApi.switchMerchantSettle(client);

@ -367,7 +367,7 @@ public class PartnerManageController {
@ManagerMapping(value = "/{clientMoniker}/skip_clearing", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF})
public void skipClearing(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@PathVariable String clientMoniker, @RequestBody JSONObject skip_clearing) {
clientManager.setSkipClearing(manager,clientMoniker, skip_clearing.getBooleanValue("skip_clearing"));
clientManager.setSkipClearing(manager,clientMoniker, skip_clearing.getBooleanValue("skip_clearing"),skip_clearing.getString("remark"));
}
@ManagerMapping(value = "/{clientMoniker}/settle_hour", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.SERVANT, ManagerRole.FINANCIAL_STAFF})

@ -1887,7 +1887,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.loadSubClients();
}]);
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', function ($scope, $rootScope, $http, $uibModal, commonDialog) {
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog','$sce', function ($scope, $rootScope, $http, $uibModal, commonDialog,$sce) {
$scope.bankCtrl = {edit: true, rate_name: 'Wechat'};
$scope.init = {skip_clearing:false,tax_in_surcharge:false,customer_tax_free:false};
$scope.getBankAccount = function () {
@ -1906,19 +1906,39 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
});
};
$scope.skipClearing = function (skipClearing) {
if (!$scope.init.skip_clearing) {
$scope.init.skip_clearing = true;
return;
}
commonDialog.confirm({
title: 'Warning',
content: 'This operation will switch skip clearing status. Are you sure?'
}).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) {
$scope.getBankAccount();
});
})
if (!skipClearing) {
commonDialog.confirm({
title: 'Warning',
content: 'This operation will switch skip clearing status. Are you sure?'
}).then(function () {
commonDialog.inputText({title: '请输入关闭跳过清算的原因'}).then(function (text) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {
skip_clearing: skipClearing,
remark: text
}).then(function (resp) {
$scope.getBankAccount();
});
});
})
}else{
commonDialog.confirm({
title: 'Warning',
content: 'This operation will switch skip clearing status. Are you sure?',
// contentHtml: $sce.trustAsHtml('This operation will switch skip clearing status. Are you sure?<input ng-model="remark"></input>')
}).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) {
$scope.getBankAccount();
});
})
}
};
$scope.taxInSurcharge = function (taxInSurcharge) {
if (!$scope.init.tax_in_surcharge) {

Loading…
Cancel
Save