|
|
@@ -21,38 +21,38 @@ define(['app/app'], function(app) {
|
|
|
$scope.bills = [];
|
|
|
|
|
|
//获取个人的发票信息
|
|
|
- var getBillInfo = function() {
|
|
|
- Bill.getListPersonal(null, function(data) {
|
|
|
- $scope.bill = {};
|
|
|
- $scope.bills = data;
|
|
|
+ var getBillInfo = function() {
|
|
|
+ Bill.getListPersonal(null, function(data) {
|
|
|
+ $scope.bill = {};
|
|
|
+ $scope.bills = data;
|
|
|
$scope.bill.kind = '1207';
|
|
|
$scope.order.invoicetype = '1207';
|
|
|
- // angular.forEach($scope.bills, function(item) {
|
|
|
- // if(item.kind == '1205') {
|
|
|
- // $scope.bill = item;
|
|
|
- // }
|
|
|
- // });
|
|
|
- }, function(response) {
|
|
|
+ // angular.forEach($scope.bills, function(item) {
|
|
|
+ // if(item.kind == '1205') {
|
|
|
+ // $scope.bill = item;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ }, function(response) {
|
|
|
if(angular.equals('系统错误', response.data)) {
|
|
|
toaster.pop('error', '获取信息失败');
|
|
|
}else {
|
|
|
toaster.pop('error', '获取订单的信息失败,' + response.data);
|
|
|
}
|
|
|
- });
|
|
|
- };
|
|
|
+ });
|
|
|
+ };
|
|
|
|
|
|
- $scope.deliveryMethod = {
|
|
|
+ $scope.deliveryMethod = {
|
|
|
1301 : '第三方配送',
|
|
|
1302 : '卖家配送',
|
|
|
1303 : '上门自提'
|
|
|
};
|
|
|
|
|
|
- //选择相应的发票信息
|
|
|
+ //选择相应的发票信息
|
|
|
$scope.selectBill = function(kind) {
|
|
|
if(!kind || (kind != '1205' && kind != '1206' && kind != '1207')) {
|
|
|
return ;
|
|
|
}
|
|
|
- getTheKindBill(kind);
|
|
|
+ getTheKindBill(kind);
|
|
|
$scope.order.invoicetype = kind;
|
|
|
$scope.bill.kind = kind;
|
|
|
};
|
|
|
@@ -70,10 +70,10 @@ define(['app/app'], function(app) {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- //查看价格分段。
|
|
|
- $scope.togglePrice = function (detail) {
|
|
|
- detail.display = detail.display == 'block' ? 'none' : 'block';
|
|
|
- };
|
|
|
+ //查看价格分段。
|
|
|
+ $scope.togglePrice = function (detail) {
|
|
|
+ detail.display = detail.display == 'block' ? 'none' : 'block';
|
|
|
+ };
|
|
|
|
|
|
//获取订单的信息
|
|
|
var getOrderData = function() {
|
|
|
@@ -239,11 +239,11 @@ define(['app/app'], function(app) {
|
|
|
$scope.calculatePrice(detail.number, detail, detail.currencyName);
|
|
|
//计算总价格
|
|
|
$scope.calculateTotal();
|
|
|
- };
|
|
|
- //选择收货的地址。
|
|
|
+ };
|
|
|
+ //选择收货的地址。
|
|
|
$scope.selectAdd = function(address) {
|
|
|
$scope.payment.address = address;
|
|
|
- $scope.formatArea = $scope.payment.address.area.replace(/,/g,' ');
|
|
|
+ $scope.formatArea = $scope.payment.address.area.replace(/,/g,' ');
|
|
|
if ($scope.order.status == 501){
|
|
|
DistributionRule.findUsableRule({area:$scope.payment.address.area}, $scope.storeArray, function (data) {
|
|
|
if (data){
|
|
|
@@ -650,10 +650,10 @@ define(['app/app'], function(app) {
|
|
|
}
|
|
|
// 人民币为专用增值税发票,美元不开发票 --1205专用增值税发票 --1206普通发票 --1207不开发票
|
|
|
if($scope.order.currency == 'USD') {
|
|
|
- $scope.order.invoicetype = 1207;
|
|
|
+ $scope.order.invoicetype = 1207;
|
|
|
$scope.order.paytype = '1103';
|
|
|
}else {
|
|
|
- $scope.order.invoicetype = 1205;
|
|
|
+ $scope.order.invoicetype = 1205;
|
|
|
$scope.order.paytype = '1102';
|
|
|
}
|
|
|
// 默认选择第三方配送 --1301第三方配送 --卖家配送 --1303上门自提
|
|
|
@@ -736,13 +736,13 @@ define(['app/app'], function(app) {
|
|
|
|
|
|
|
|
|
// 获取当前数量的对应价格区间的单据信息
|
|
|
- if(properPrice.length > 0) {
|
|
|
- detail.usdUnitPrice = properPrice[0].uSDPrice;
|
|
|
- detail.rmbUnitPrice = properPrice[0].rMBPrice;
|
|
|
- }else {
|
|
|
- detail.usdUnitPrice = detail.goodsHistory.prices[detail.goodsHistory.prices.length - 1].uSDPrice;
|
|
|
- detail.rmbUnitPrice = detail.goodsHistory.prices[detail.goodsHistory.prices.length - 1].rMBPrice;
|
|
|
- }
|
|
|
+ if(properPrice.length > 0) {
|
|
|
+ detail.usdUnitPrice = properPrice[0].uSDPrice;
|
|
|
+ detail.rmbUnitPrice = properPrice[0].rMBPrice;
|
|
|
+ }else {
|
|
|
+ detail.usdUnitPrice = detail.goodsHistory.prices[detail.goodsHistory.prices.length - 1].uSDPrice;
|
|
|
+ detail.rmbUnitPrice = detail.goodsHistory.prices[detail.goodsHistory.prices.length - 1].rMBPrice;
|
|
|
+ }
|
|
|
|
|
|
if (currency == 'RMB') {
|
|
|
detail.taxUnitprice = detail.rmbUnitPrice;
|
|
|
@@ -811,7 +811,7 @@ define(['app/app'], function(app) {
|
|
|
$scope.isModify = isModify;
|
|
|
$scope.validEmail = function (email) {
|
|
|
return /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(email)
|
|
|
- };
|
|
|
+ };
|
|
|
|
|
|
$http.get('static/js/prod/data/city.json').success(function(data) {
|
|
|
$scope.division = data;
|
|
|
@@ -829,7 +829,7 @@ define(['app/app'], function(app) {
|
|
|
toaster.pop('error', '系统错误 ' + '加载城市信息失败');
|
|
|
});
|
|
|
|
|
|
- //验证数据
|
|
|
+ //验证数据
|
|
|
$scope.checkForm = function(num) {
|
|
|
var size;
|
|
|
if(num == 1) {
|