master
kira 8 years ago
parent bfad3255f4
commit 981459d0bb

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>au.com.royalpay.payment</groupId> <groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId> <artifactId>payment-parent</artifactId>
<version>0.2.0</version> <version>0.2.0-dev</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
/** /**
* @author kira * @author kira
* @date 2018/7/27 * @date 2018/7/27
@ -18,7 +21,12 @@ public class QueryCustomVo {
public JSONObject toParam() { public JSONObject toParam() {
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
if (StringUtils.isNotEmpty(date)) { if (StringUtils.isNotEmpty(date)) {
result.put("data", date); date = date.replace("Z", " UTC");
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
try {
result.put("date", format.parse(date));
} catch (ParseException e) {
}
} }
if (StringUtils.isNotEmpty(channel)) { if (StringUtils.isNotEmpty(channel)) {
result.put("channel", channel); result.put("channel", channel);

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.custom.core.impl;
import au.com.royalpay.payment.core.CustomSupport; import au.com.royalpay.payment.core.CustomSupport;
import au.com.royalpay.payment.core.beans.CustomReport; import au.com.royalpay.payment.core.beans.CustomReport;
import au.com.royalpay.payment.core.beans.OrderStatus;
import au.com.royalpay.payment.manage.custom.core.CustomService; import au.com.royalpay.payment.manage.custom.core.CustomService;
import au.com.royalpay.payment.manage.mappers.custom.CustomReportDetailsMapper; import au.com.royalpay.payment.manage.mappers.custom.CustomReportDetailsMapper;
import au.com.royalpay.payment.manage.mappers.custom.CustomReportsMapper; import au.com.royalpay.payment.manage.mappers.custom.CustomReportsMapper;
@ -42,7 +43,7 @@ public class CustomServiceImpl implements CustomService {
CustomReport customReport = new CustomReport(orderId, mchCustomId, custom); CustomReport customReport = new CustomReport(orderId, mchCustomId, custom);
if (!CollectionUtils.isEmpty(subOrders)) { if (!CollectionUtils.isEmpty(subOrders)) {
subOrders.forEach(p -> { subOrders.forEach(p -> {
customReport.addSubOrder(p.getBigDecimal("order_fee"), p.getBigDecimal("product_fee")); customReport.addSubOrder(p.getBigDecimal("sub_order_fee"), p.getBigDecimal("sub_order_fee").subtract(p.getBigDecimal("transport_fee")));
}); });
} }
JSONObject result = customSupport.saveCustom(customReport); JSONObject result = customSupport.saveCustom(customReport);
@ -64,6 +65,7 @@ public class CustomServiceImpl implements CustomService {
@Override @Override
public JSONObject query(JSONObject param, int page, int limit) { public JSONObject query(JSONObject param, int page, int limit) {
param.put("orderStatus", OrderStatus.SUCCESS.getStatus());
return PageListUtils.buildPageListResult(customReportsMapper.queryWithTrans(param, new PageBounds(page, limit))); return PageListUtils.buildPageListResult(customReportsMapper.queryWithTrans(param, new PageBounds(page, limit)));
} }

@ -3,10 +3,14 @@ package au.com.royalpay.payment.manage.custom.web;
import au.com.royalpay.payment.manage.custom.beans.AddCustomVO; import au.com.royalpay.payment.manage.custom.beans.AddCustomVO;
import au.com.royalpay.payment.manage.custom.beans.QueryCustomVo; import au.com.royalpay.payment.manage.custom.beans.QueryCustomVo;
import au.com.royalpay.payment.manage.custom.core.CustomService; import au.com.royalpay.payment.manage.custom.core.CustomService;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.tools.CommonConsts;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
@ -15,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
@RestController @RestController
@RequestMapping(value = "/custom") @PartnerMapping(value = "/custom")
public class CustomController { public class CustomController {
@Resource @Resource
@ -27,13 +31,15 @@ public class CustomController {
} }
@RequestMapping(value = "/query",method = RequestMethod.GET) @RequestMapping(value = "/query",method = RequestMethod.GET)
public JSONObject queryWithTran( QueryCustomVo queryCustomVo) { public JSONObject queryWithTran(@ModelAttribute(CommonConsts.PARTNER_STATUS)JSONObject partner, QueryCustomVo queryCustomVo) {
return customService.query(queryCustomVo.toParam(),queryCustomVo.getPage(),queryCustomVo.getLimit()); JSONObject param = queryCustomVo.toParam();
param.put("client_id",partner.getIntValue("client_id"));
return customService.query(param,queryCustomVo.getPage(),queryCustomVo.getLimit());
} }
@RequestMapping(value = "",method = RequestMethod.POST) @RequestMapping(value = "",method = RequestMethod.POST)
@ResponseBody @ResponseBody
public void add(AddCustomVO addCustomVO) { public void add(@RequestBody AddCustomVO addCustomVO) {
customService.add(addCustomVO.getOrder_id(),addCustomVO.getMch_custom_no(),addCustomVO.getCustom(),addCustomVO.getSubOrders()); customService.add(addCustomVO.getOrder_id(),addCustomVO.getMch_custom_no(),addCustomVO.getCustom(),addCustomVO.getSubOrders());
} }
} }

@ -3,18 +3,28 @@
<mapper namespace="au.com.royalpay.payment.manage.mappers.custom.CustomReportsMapper"> <mapper namespace="au.com.royalpay.payment.manage.mappers.custom.CustomReportsMapper">
<select id="queryWithTrans" resultType="com.alibaba.fastjson.JSONObject"> <select id="queryWithTrans" resultType="com.alibaba.fastjson.JSONObject">
select * from select o.order_id order_id, t.transaction_time transaction_time, t.transaction_amount transaction_amount,t.cny_amount cny_amount ,r.report_status report_status
pmt_custom_reports r from
pmt_orders o
left join left join
pmt_transactions t pmt_transactions t
on r.order_id = t.order_id on o.order_id = t.order_id
<if test="channel!=null"> and
and r.channel = #{channel} o.status in (
</if> <foreach collection="orderStatus" item="item" separator=",">
#{item}
</foreach>
)
left join
pmt_custom_reports r
on r.order_id = o.order_id
and o.client_id = #{client_id}
<where> <where>
<if test="channel!=null">
and o.channel = #{channel}
</if>
<if test="date!=null"> <if test="date!=null">
DATE(t.transaction_time) = #{date} and DATE(t.transaction_time) = #{date}
</if> </if>
</where> </where>
</select> </select>

@ -59,6 +59,7 @@ var modules = [
{path: 'static/boot/indexMainApp', module: 'indexMainApp', roles: [1, 2, 3]}, {path: 'static/boot/indexMainApp', module: 'indexMainApp', roles: [1, 2, 3]},
{path: 'static/commons/commons', module: 'commons', roles: [1, 2, 3]}, {path: 'static/commons/commons', module: 'commons', roles: [1, 2, 3]},
{path: 'static/payment/good/good-manage', module: 'goodManagement', roles: [1, 2, 3]}, {path: 'static/payment/good/good-manage', module: 'goodManagement', roles: [1, 2, 3]},
{path: 'static/payment/custom/custom', module: 'customManagement', roles: [1, 2, 3]},
{path: 'static/payment/partner/partner', module: 'partnerInfoApp', roles: [1, 2, 3]}, {path: 'static/payment/partner/partner', module: 'partnerInfoApp', roles: [1, 2, 3]},
{path: 'static/payment/tradelog/tradelog', module: 'tradeLogApp', roles: [1, 2, 3]}, {path: 'static/payment/tradelog/tradelog', module: 'tradeLogApp', roles: [1, 2, 3]},
{path: 'static/payment/tradelog/transflow', module: 'balanceReport', roles: [1, 2, 3]}, {path: 'static/payment/tradelog/transflow', module: 'balanceReport', roles: [1, 2, 3]},

@ -1,106 +1,105 @@
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch'], function (angular) { define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], function (angular) {
'use strict'; 'use strict';
var app = angular.module('customManagement', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload']);
var app = angular.module('customManagement', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch']); app.config(['$stateProvider', function ($stateProvider) {
app.config(['$stateProvider', function ($stateProvider) { $stateProvider.state('custom', {
$stateProvider.state('custom', { url: '/custom',
url: '/custom', templateUrl: '/static/payment/custom/templates/custom.html',
templateUrl: '/static/payment/custom/templates/custom.html', controller: 'customCtrl'
controller: 'customCtrl' })
}) }]);
}]); app.controller('customCtrl', ['$scope', '$http', 'commonDialog','$filter','$uibModal', function ($scope, $http, commonDialog,$filter,$uibModal) {
app.controller('customCtrl', ['$scope', '$http', 'commonDialog','$filter','orderService', function ($scope, $http, commonDialog,$filter,orderService) {
$scope.pagination = {}; $scope.pagination = {};
$scope.params = {}; $scope.customOrders = {};
$scope.new_bill = {}; $scope.params = {channel:'ALL'};
$scope.minDate = new Date(); $scope.loadList = function () {
var maxDate = new Date(); var params = angular.copy($scope.params);
$scope.maxDate = maxDate.setDate(maxDate.getDate() + 14); if (params.channel =='ALL'){
delete params.channel;
}
params.page = $scope.pagination.page || 1;
console.log(params);
$http.get('/custom/query',{params: params}).then(function (resp) {
$scope.customOrders = resp.data.data;
$scope.pagination = resp.data.pagination;
})
};
$scope.loadList(1);
$scope.add = function (order_id) {
$uibModal.open({
templateUrl: '/static/payment/custom/templates/custom_add.html',
controller: 'customAddCtrl',
size: 'lg',
resolve: {
order_id: function () {
return order_id;
}
}
})
}
}]);
$scope.loadBills = function (page) { app.controller('customAddCtrl', ['$scope', '$http','commonDialog','order_id', function ($scope, $http,commonDialog,order_id) {
var params = angular.copy($scope.params); $scope.custom = {has_sub:false,order_id:order_id};
params.page = page || $scope.pagination.page || 1; $scope.subOrders = new Array();
$http.get('/partner/qrcode', {params: params}).then(function (resp) { $scope.subOrder = {};
$scope.bills = resp.data; $scope.addSubOrders = function () {
$scope.pagination = resp.data.pagination; var subOrder = angular.copy($scope.subOrder);
}); subOrder.idNum = $scope.subOrders.length+1;
$scope.subOrders.push(subOrder);
}; };
$scope.loadBills(1); $scope.submit=function () {
$scope.generateBill = function () { if($scope.custom.custom==''){
var params = angular.copy($scope.new_bill); alert('请输入海关名称');
if(!params.client_order_id){
alert("client order id为空,是否后台自动生成?");
}
if(!params.order_amount){
alert("order amount不可为空!");
return;
} }
if(params.cancle_time){ if($scope.custom.mchCustomId==''){
params.cancle_time = $filter('date')(params.cancle_time, 'yyyy-MM-dd HH:mm:ss') alert('请输入备案号');
}else {
alert("Expire Date 不可为空!");
} }
$http.post('/partner/qrcode/bills',params).then(function (resp) { $scope.custom.subOrders = $scope.subOrders;
commonDialog.alert({title: 'Success', content: 'Success', type: 'success'}); var param = angular.copy($scope.custom);
$scope.code_url = resp.data; $http.post('/custom', param).then(function (resp) {
$scope.loadBills(1); $scope.$close();
},function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
};
$scope.disableBill = function (bill) {
commonDialog.confirm(
{
title: 'Delete Bill',
content: 'Are you sure to delete this bill?'
}).then(function () {
$http.delete('/partner/qrcode/'+bill.bill_code_id).then(function(){
$scope.loadBills(1);
});
}) })
}; }
$scope.clearBill = function () { $scope.removeSubOrders = function (order) {
$scope.new_bill = {}; for(var i= 0 ;i<$scope.subOrders.length;i++){
$scope.code_url = ""; if($scope.subOrders[i].idNum == order.idNum){
}; $scope.subOrders.splice(i,1);
return;
}
}
}
}]);
app.controller('customDetailCtrl', ['$scope', '$http','commonDialog', function ($scope, $http,commonDialog) {
$scope.subOrders = {};
$scope.showTradeDetail = function (order) {
orderService.clientOrderDetail(order)
};
}]); }]);
app.filter('billStatus', function () {
app.filter('reportStatus', function () {
return function (status) { return function (status) {
switch (status + '') { switch (status + '') {
case '0':
return '暂存';
case '1': case '1':
return 'wait for payment'; return '提交';
case '2': case '2':
return 'disabled'; return '提交失败';
case '3': case '3':
return 'payment success' return '提交成功';
} }
} }
}); });
app.filter('remarkCut', function () {
return function (value, wordwise, max, tail) {
if (!value) return '';
max = parseInt(max, 10);
if (!max) return value;
if (value.length <= max) return value;
value = value.substr(0, max);
if (wordwise) {
var lastspace = value.lastIndexOf(' ');
if (lastspace != -1) {
value = value.substr(0, lastspace);
}
}
return value + (tail || ' …');
};
});
return app; return app;

@ -22,146 +22,75 @@
<div class="box-header"> <div class="box-header">
<div class="form-horizontal col-sm-8"> <div class="form-horizontal col-sm-8">
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-4 col-sm-3">* Order Amount</label> <label class="control-label col-xs-4 col-sm-3">Channel</label>
<div class="col-xs-8 col-sm-6"> <div class="col-xs-8 col-sm-6">
<div class="input-group"> <p class="form-control-static">
<input type="number" step="0.01" name="order_amount" class="form-control form-control-float" <a role="button" ng-class="{'bg-primary':params.channel=='ALL'}"
ng-model="new_bill.order_amount" required ng-click="params.channel='ALL';loadList()">All</a> |
onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')" <a role="button" ng-class="{'bg-primary':params.channel=='Wechat'}"
aria-describedby="basic-addon2"> ng-click="params.channel='Wechat';loadList()">Wechat Pay</a> |
<span class="input-group-addon" id="basic-addon2">$</span> <a role="button" ng-class="{'bg-primary':params.channel=='Alipay'}"
</div> ng-click="params.channel='Alipay';loadList()">Alipay</a> |
<p class="small text-info"></p> </p>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-4 col-sm-3">* Expire Date</label> <label class="control-label col-xs-4 col-sm-3">Date</label>
<div class="col-xs-8 col-sm-6"> <div class="col-xs-8 col-sm-6">
<input class="form-control" ng-model="new_bill.cancle_time" <input class="form-control" ng-model="params.date"
uib-datepicker-popup size="10" is-open="ctrl.dateInput" uib-datepicker-popup size="10" is-open="ctrl.dateInput"
ng-click="ctrl.dateInput=true" ng-click="ctrl.dateInput=true"
datepicker-options="{minDate:minDate,maxDate:maxDate}" name="cancle_time" required> datepicker-options="{minDate:minDate,maxDate:maxDate}" name="date" required>
<p class="small text-info">The date of expiry should not exceed fifteen days</p>
</div> </div>
</div> <button class="btn btn-primary" type="button" ng-click="loadList(1)"><i
<div class="form-group">
<label class="control-label col-xs-4 col-sm-3">Reference NO</label>
<div class="col-xs-8 col-sm-6">
<input class="form-control" ng-model="new_bill.client_order_id">
<p class="small text-info"> System will automatically generate when the Reference NO is empty</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-3">Remark</label>
<div class="col-xs-8 col-sm-6">
<textarea maxlength="100" class="form-control" ng-model="new_bill.remark"></textarea>
<p class="small text-info">within 100 characters</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-3"></label>
<div class="col-sm-6">
<button class="btn btn-success" ng-click="generateBill()">generate
</button>&nbsp;&nbsp;&nbsp;
<button class="btn btn-primary" ng-click="clearBill()">clear</button>
</div>
</div>
</div>
<div class="col-sm-4" style="text-align: center" ng-if="code_url">
<a class="thumbnail" download ng-href="{{code_url}}" uib-tooltip="Download">
<img ng-src="{{code_url}}">
</a>
<p>
<a ng-href="{{code_url}}" download><i class="fa fa-download"></i> Download Bill QR
Code Image</a>
</p>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header">
<div class="form-inline">
<div class="form-group">
<label class="control-label">Bill Status</label>
&nbsp;
<a role="button" ng-class="{'bg-primary':params.status==null}"
ng-click="params.status=null;loadBills(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.status==3}"
ng-click="params.status=3;loadBills(1)">Success</a> |
<a role="button" ng-class="{'bg-primary':params.status==2}"
ng-click="params.status=2;loadBills(1)">Disabled</a>
</div>
&nbsp; &nbsp; &nbsp; &nbsp;
<div class="form-group">
<label class="control-label" >Reference NO</label>
<input type="text" class="form-control"
ng-model="params.client_order_id"
ng-enter="loadBills(1)">
</div>
<div class="form-group">
<button class="btn btn-primary" type="button" ng-click="loadBills(1)"><i
class="fa fa-search"></i></button> class="fa fa-search"></i></button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<h3 class="box-title"> <h3 class="box-title">
Bill List Custom Order List
</h3> </h3>
</div> </div>
<div class="box-body table-responsive"> <div class="box-body table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Order Amount</th> <th>订单号</th>
<th>Reference NO</th> <th>时间</th>
<th>Payer</th> <th>订单金额</th>
<th>Order Status</th> <th>人民币金额</th>
<th>Bill Status</th> <th>报关状态</th>
<th>Expire Date</th> <th>操作</th>
<th>Remark</th>
<th>Create time</th>
<th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="bill in bills" <tr ng-repeat="order in customOrders">
ng-class="{'delete':bill.status==2}"> <td ng-bind="order.order_id"></td>
<td ng-bind="bill.order_amount | currency:'AUD '"></td> <th ng-bind="order.transaction_time"></th>
<th ng-bind="bill.client_order_id"></th> <td ng-bind="order.transaction_amount"></td>
<td ng-bind="bill.nickname"></td> <th ng-bind="order.cny_amount"></th>
<th ng-bind="bill.order_status|tradeStatus"></th> <th ng-bind="order.report_status|reportStatus"></th>
<th ng-bind="bill.status|billStatus"></th>
<td ng-bind="bill.cancle_time |limitTo:10"></td>
<td ng-bind="bill.remark|remarkCut:true:10:'...'"></td>
<td ng-bind="bill.create_time"></td>
<td> <td>
<a ng-if="bill.order_id&&bill.status!=2" class="text-primary" role="button" title="Detail" <a class="text-primary" role="button" title="Detail"
ng-click="showTradeDetail(bill)"> ng-click="add(order.order_id)">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
</a> </a>
<a ng-if="bill.code_url&&bill.status==1" ng-href="{{bill.code_url}}" download><i
class="fa fa-download"
uib-tooltip="Download Bill QR Code Image"></i></a>
<a ng-if="!bill.order_id&&bill.status==1"
class="text-bold text-danger" role="button" ng-click="disableBill(bill)">Disable</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="box-footer" ng-if="bills.length"> <div class="box-footer" ng-if="customOrders.length">
<uib-pagination class="pagination" <uib-pagination class="pagination"
total-items="pagination.totalCount" total-items="pagination.totalCount"
boundary-links="true" boundary-links="true"
ng-model="pagination.page" ng-model="pagination.page"
items-per-page="pagination.limit" items-per-page="pagination.limit"
max-size="10" max-size="10"
ng-change="loadBills(1)" ng-change="loadList(1)"
previous-text="&lsaquo;" previous-text="&lsaquo;"
next-text="&rsaquo;" next-text="&rsaquo;"
first-text="&laquo;" first-text="&laquo;"

@ -0,0 +1,80 @@
<div class="modal-header">
<h4>Add Declare Custom</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<form class="form-horizontal" novalidate name="rate_form">
<div class="form-group">
<label class="control-label col-sm-4" for="custom">海关</label>
<div class="col-sm-6">
<input class="form-control" ng-model="custom.custom" id="custom" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="mch_custom_no">备案号</label>
<div class="col-sm-6">
<input class="form-control" ng-model="custom.mch_custom_no" id="mch_custom_no" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="has_sub">是否拆单</label>
<div class="col-sm-6">
<input ng-model="custom.has_sub" id="has_sub" type="checkbox">
</div>
</div>
<div class="form-group" ng-if="custom.has_sub">
<table class="table table-striped">
<thead>
<tr>
<th>海关金额</th>
<th>运费金额</th>
<th>消费者名称</th>
<th>消费者ID</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subOrder in subOrders">
<td ng-bind="subOrder.sub_order_fee | currency:'AUD '"></td>
<td ng-bind="subOrder.transport_fee"></td>
<td ng-bind="subOrder.buyer_name"></td>
<td ng-bind="subOrder.cert_id"></td>
<td>
<a role="button" class="text-danger text-bold ng-scope" ng-click="removeSubOrders(subOrder)">remove</a>
</td>
</tr>
</tbody>
</table>
</div>
<div ng-if="custom.has_sub">
<div class="form-group">
<label class="control-label col-sm-4" for="sub_order_fee">订单金额</label>
<div class="col-sm-6">
<input class="form-control" ng-model="subOrder.sub_order_fee" id="sub_order_fee" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="transport_fee">运费金额</label>
<div class="col-sm-6">
<input class="form-control" ng-model="subOrder.transport_fee" id="transport_fee" type="text">
</div>
</div>
<div class="form-group" style="text-align: right;margin-right: 17%;" ng-click="addSubOrders()">
<button class="btn btn-success" type="button"> add</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="submit()" ng-disabled="ctrl.sending">Submit</button>
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>

@ -0,0 +1,83 @@
<div class="modal-header">
<h4 ng-if="isAdd">Add Declare Custom</h4>
<h4 ng-if="!isAdd">Custom Order Detail</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-12">
<form class="form-horizontal" novalidate name="rate_form">
<div class="form-group">
<label class="control-label col-sm-4" for="custom">海关</label>
<div class="col-sm-6">
<input class="form-control" ng-model="custom.custom" id="custom" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="mchCustomId">备案号</label>
<div class="col-sm-6">
<input class="form-control" ng-model="custom.mchCustomId" id="mchCustomId" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="has_sub">是否拆单</label>
<div class="col-sm-6">
<input ng-model="custom.has_sub" id="has_sub" type="checkbox">
</div>
</div>
<div class="form-group" ng-if="custom.has_sub">
<table class="table table-striped">
<thead>
<tr>
<th>海关金额</th>
<th>运费金额</th>
<th>消费者名称</th>
<th>消费者ID</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subOrder in subOrders">
<td ng-bind="subOrder.subOrderFee | currency:'AUD '"></td>
<td ng-bind="subOrder.transportFee"></td>
<td ng-bind="subOrder.buyer_name"></td>
<td ng-bind="subOrder.cert_id"></td>
<td>
<a role="button" class="text-danger text-bold ng-scope" ng-click="removeSubOrders(subOrder)">remove</a>
</td>
</tr>
</tbody>
</table>
</div>
<div ng-if="custom.has_sub">
<div class="form-group">
<label class="control-label col-sm-4" for="subOrderFee">订单金额</label>
<div class="col-sm-6">
<input class="form-control" ng-model="subOrder.subOrderFee" id="subOrderFee" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="transportFee">运费金额</label>
<div class="col-sm-6">
<input class="form-control" ng-model="subOrder.transportFee" id="transportFee" type="text">
</div>
</div>
<div class="form-group" ng-click="addSubOrders()">
add
</div>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="saveRate(rate_form)" ng-disabled="ctrl.sending">Submit</button>
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>
Loading…
Cancel
Save