|
|
@@ -3,12 +3,14 @@
|
|
|
*/
|
|
|
define(['app/app'], function(app) {
|
|
|
'use strict';
|
|
|
- app.register.controller('bomListDetailCtrl', ['$scope', '$rootScope', 'ngTableParams', 'BaseService', 'toaster', 'Authority', '$stateParams', function($scope, $rootScope, ngTableParams, BaseService, toaster, Authority, $stateParams) {
|
|
|
+ app.register.controller('bomListDetailCtrl', ['$scope', '$rootScope', 'ngTableParams', 'BaseService', 'toaster', 'Authority', '$stateParams', 'seekPurchase', function($scope, $rootScope, ngTableParams, BaseService, toaster, Authority, $stateParams, seekPurchase) {
|
|
|
document.title = '我的求购-优软商城';
|
|
|
// 是否编辑物料中
|
|
|
$scope.editBom = false;
|
|
|
// 是否编辑询价
|
|
|
$scope.editSeek = false;
|
|
|
+ // bom数据
|
|
|
+ $scope.bomData = {};
|
|
|
|
|
|
$scope.setEditBom = function (editBom) {
|
|
|
$scope.editBom = editBom;
|
|
|
@@ -17,5 +19,11 @@ define(['app/app'], function(app) {
|
|
|
$scope.setEditSeek = function (editSeek) {
|
|
|
$scope.editSeek = editSeek;
|
|
|
}
|
|
|
+
|
|
|
+ seekPurchase.getBomListDetail({bomId: $stateParams.id}, function (data) {
|
|
|
+ $scope.bomData = data;
|
|
|
+ }, function (err) {
|
|
|
+ toaster.pop('error', err);
|
|
|
+ })
|
|
|
}]);
|
|
|
});
|