Merge branch 'develop'

master
yixian 4 years ago
commit a169d962d1

@ -74,7 +74,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
controller: 'batchAddMerchantsDialogCtrl',
size: 'lg'
}).result.then(function (merchants) {
let arr = $scope.editingTask.whitelist_clients;
let arr = $scope.editingTask.whitelist_clients || [];
for (let mch of merchants) {
if (arr.filter(wMch => wMch.client_moniker === mch.client_moniker).length < 1) {
arr.push(mch);
@ -108,6 +108,9 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.currentTasks.push(task);
})
};
$scope.cancelEdit = function () {
$scope.editingTask = null;
}
$scope.submitTasks = function () {
let tasks = [];
for (let task of $scope.currentTasks) {
@ -219,7 +222,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
let arr = $scope.plans.filter(p => p.plan_id === $scope.task.plan)
chosenPlan = arr.length ? arr[0] : null;
$scope.$close({
plan_id: $scope.plan.remark.replace(' ', '') + randomString(6),
plan_id: $scope.task.remark.replace(' ', '') + randomString(6),
settle_date: $filter('date')($scope.task.settle_date, 'yyyy-MM-dd'),
remark: $scope.task.remark,
plan: chosenPlan
@ -236,12 +239,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
cleanDays.push(3);
}
$scope.$close({
plan_id: $scope.plan.remark.replace(' ', '') + randomString(6),
plan_id: $scope.task.remark.replace(' ', '') + randomString(6),
disabled_clean_days: cleanDays,
settle_date: $filter('date')($scope.task.settle_date, 'yyyy-MM-dd'),
last_settle_date: $scope.task.last_settle_date != null ? $filter('date')($scope.task.last_settle_date, 'yyyy-MM-dd') : null,
remark: $scope.task.remark,
follow_sub_partner: $scope.plan.follow_sub_partner
follow_sub_partner: $scope.task.follow_sub_partner
})
}

@ -1,8 +1,8 @@
<div class="modal-header">Batch Add Merchants</div>
<div class="modal-body">
<p>Paste client monikers below</p>
<p>Merchants Count: {{$scope.merchantsInfo.length}}</p>
<textarea placeholder="Client Monikers" rows="10" ng-change="analysisMerchants()"
<p>Merchants Count: {{merchantsInfo.length}}</p>
<textarea class="form-control" placeholder="Client Monikers" rows="10" ng-change="analysisMerchants()"
ng-model="data.client_monikers"></textarea>
</div>
<div class="modal-footer">

@ -79,7 +79,7 @@
</div>
</div>
<div class="box box-info" ng-if="!progress.processing && editingTask!=null">
<div class="box-header">Editing Task</div>
<div class="box-header">Editing Task:{{editingTask.remark}}</div>
<div class="box-body">
<div class="form-group">
<label class="control-label">Settle Date</label>
@ -116,7 +116,7 @@
</table>
</div>
<div class="box-box-footer">
<button class="btn btn-danger" ng-click="editingTask = null">Cancel</button>
<button class="btn btn-danger" ng-click="cancelEdit()">Cancel</button>
</div>
</div>
</section>

@ -10,7 +10,8 @@
<div class="form-group">
<label class="control-label col-xs-4" for="planSelect">Plan</label>
<div class="col-xs-6">
<select id="planSelect" ng-model="task.plan" ng-options="plan.plan_id as plan.name for plan in plans">
<select class="form-control" id="planSelect" ng-model="task.plan"
ng-options="plan.plan_id as plan.name for plan in plans">
<option value="">Manual Add</option>
</select>
</div>
@ -37,14 +38,14 @@
</div>
<div class="form-group" ng-if="!task.plan">
<label class="control-label col-xs-4">Enable Clean Days</label>
<div class="col-xs-6 checkbox-inline">
<label>
<div class="col-xs-6">
<label class="checkbox-inline">
<input type="checkbox" ng-model="task.t1">T+1
</label>
<label>
<label class="checkbox-inline">
<input type="checkbox" ng-model="task.t2">T+2
</label>
<label>
<label class="checkbox-inline">
<input type="checkbox" ng-model="task.t3">T+3
</label>
</div>

Loading…
Cancel
Save