|
|
@@ -5549,7 +5549,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
}
|
|
|
|
|
|
// 跳转到我的报价列表
|
|
|
@@ -5557,6 +5556,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
window.open("#/sale/pubinquiry");
|
|
|
}
|
|
|
|
|
|
+ var pageInfo = {
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 20
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}]);
|
|
|
|
|
|
@@ -5677,7 +5681,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 公共询价详情
|
|
|
*/
|
|
|
- app.controller('PublicInquiryListDetailCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', 'AccountEnterprise', 'publicInquiry', 'publicInquiryList', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams, AccountEnterprise, publicInquiry, publicInquiryList) {
|
|
|
+ app.controller('PublicInquiryListDetailCtrl', ['$scope', '$stateParams', 'PurchaseInquiry', '$filter', 'toaster', 'BaseService', 'ngTableParams', 'AccountEnterprise', 'publicInquiry', 'publicInquiryList', '$modal', function ($scope, $stateParams, PurchaseInquiry, $filter, toaster, BaseService, ngTableParams, AccountEnterprise, publicInquiry, publicInquiryList, $modal) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.currentHasBid = false;
|
|
|
var loadData = function () {
|
|
|
@@ -5702,20 +5706,28 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
|
|
|
|
// 转客户询价
|
|
|
- $scope.transtoInquiry = function (id) {
|
|
|
- publicInquiry.turnToInquiry({id: id}, {}, function (data) {
|
|
|
- if (data.success) {
|
|
|
- toaster.pop('success', '提示', data.success);
|
|
|
- window.location.hash = "sale/pubinquiry/" + data.id;
|
|
|
- }
|
|
|
- if (data.error) {
|
|
|
- toaster.pop('error', '提示', data.error);
|
|
|
- }
|
|
|
- if (data.info) {
|
|
|
- toaster.pop('info', '提示', data.info);
|
|
|
+ $scope.transtoInquiry = function (inquiryItem) {
|
|
|
+ publicInquiry.quotationInfo({id: inquiryItem.id}, function(data) {
|
|
|
+ if (data.inquiryItem) { //存在已报价的就不进行报价操作
|
|
|
+ toaster.pop('error', '该询价单已已经报价');
|
|
|
+ } else {
|
|
|
+ var modalInstance = $modal.open({
|
|
|
+ templateUrl: 'static/tpl/index/baseInfo/modal/quotation_modal.html',
|
|
|
+ controller: 'QuoteCtrl',
|
|
|
+ size: 'lg',
|
|
|
+ resolve: {
|
|
|
+ inquiryItem: function () {
|
|
|
+ return inquiryItem
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ modalInstance.result.then(function (data) {
|
|
|
+ $scope.tableParams.reload();
|
|
|
+ }, function () {
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
- }, function (response) {
|
|
|
- toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
}
|
|
|
}]);
|