|
|
@@ -14,15 +14,14 @@ define([ 'app/app' ], function(app) {
|
|
|
$scope.logistics = angular.fromJson($scope.invoiceFPur.logistics);
|
|
|
console.log($scope.logistics);
|
|
|
//查看物流详情
|
|
|
- $scope.listLogistics = function(data){
|
|
|
- var lgtid = $scope.logistics.id;
|
|
|
+ $scope.listLogistics = function(){
|
|
|
var modalInstance = $modal.open({
|
|
|
animation: true,
|
|
|
templateUrl: 'static/view/admin/modal/listLogistics_modal.html',
|
|
|
controller: 'listLogisticsCtrl',
|
|
|
resolve: {
|
|
|
- lgtid: function() {
|
|
|
- return lgtid;
|
|
|
+ logistics : function () {
|
|
|
+ return $scope.logistics
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -94,22 +93,25 @@ define([ 'app/app' ], function(app) {
|
|
|
|
|
|
|
|
|
// 物流信息
|
|
|
- app.register.controller('listLogisticsCtrl', [
|
|
|
- '$scope',
|
|
|
- '$modal',
|
|
|
- 'ResponseLogistics',
|
|
|
- '$modalInstance',
|
|
|
- 'lgtid',
|
|
|
- function($scope, $modal, ResponseLogistics, $modalInstance,
|
|
|
- lgtid) {
|
|
|
+ app.register.controller('listLogisticsCtrl', ['$scope', '$modal', 'ResponseLogistics', '$modalInstance', 'logistics', 'KdnLogistics', function($scope, $modal, ResponseLogistics, $modalInstance, logistics, KdnLogistics) {
|
|
|
$scope.Info = [];
|
|
|
$scope.getlogistics = function() {
|
|
|
- ResponseLogistics.get({
|
|
|
- id : lgtid
|
|
|
- }, {}, function(data) {
|
|
|
- $scope.Info = data;
|
|
|
- console.log(data);
|
|
|
+ var params = {};
|
|
|
+ params.companyName = logistics.companyName;
|
|
|
+ params.logisticsCode = logistics.number;
|
|
|
+ KdnLogistics.kdnQuery(params, {}, function(response){
|
|
|
+ if(!response.errorInfo) {
|
|
|
+ $scope.Info = eval ("(" + response.traces + ")");
|
|
|
+ // statusOfLogistics($scope.logisticsInfo[$scope.logisticsInfo.length - 1].AcceptStation);
|
|
|
+ }
|
|
|
+ }, function(){
|
|
|
+ $scope.logisticsInfo = [];
|
|
|
+ toaster.pop('info', '查询物流信息失败,请核对物流公司和运单号');
|
|
|
});
|
|
|
+ // ResponseLogistics.get({id : lgtid}, {}, function(data) {
|
|
|
+ // $scope.Info = data;
|
|
|
+ // console.log(data);
|
|
|
+ // });
|
|
|
};
|
|
|
$scope.getlogistics();
|
|
|
$scope.cancel = function() {
|