|
|
@@ -5412,7 +5412,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
// 转客户询价
|
|
|
$scope.transtoInquiry = function (inquiryItem) {
|
|
|
publicInquiry.quotationInfo({id: inquiryItem.id}, function(data) {
|
|
|
- console.log(data);
|
|
|
if (data.inquiryItem) { //存在已报价的就不进行报价操作
|
|
|
toaster.pop('error', '该询价单已已经报价');
|
|
|
} else {
|
|
|
@@ -5490,27 +5489,26 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 保存报价信息
|
|
|
$scope.save = function(inquiryItem, method) {
|
|
|
- console.log(inquiryItem);
|
|
|
- // var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
|
|
|
- // $upload.upload({
|
|
|
- // url: 'pubInquiry/turnToQuotation',
|
|
|
- // file: file,
|
|
|
- // method: 'POST',
|
|
|
- // data: {
|
|
|
- // item: inquiryItem,
|
|
|
- // method: method
|
|
|
- // }
|
|
|
- // }).success(function (data) {
|
|
|
- // if (data.item) {
|
|
|
- // item = data.item;
|
|
|
- // }
|
|
|
- // $scope.loading = false;
|
|
|
- // toaster.pop('info', '提示', '报价成功');
|
|
|
- // $modalInstance.close();
|
|
|
- // }).error(function (data) {
|
|
|
- // $scope.loading = false;
|
|
|
- // toaster.pop('error', '附件上传失败');
|
|
|
- // });
|
|
|
+ var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
|
|
|
+ $upload.upload({
|
|
|
+ url: 'pubInquiry/turnToQuotation',
|
|
|
+ file: file,
|
|
|
+ method: 'POST',
|
|
|
+ data: {
|
|
|
+ item: inquiryItem,
|
|
|
+ method: method
|
|
|
+ }
|
|
|
+ }).success(function (data) {
|
|
|
+ if (data.item) {
|
|
|
+ item = data.item;
|
|
|
+ }
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('info', '提示', '报价成功');
|
|
|
+ $modalInstance.close();
|
|
|
+ }).error(function (data) {
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '附件上传失败');
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
$scope.previewShow = false;
|
|
|
@@ -5562,7 +5560,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 () {
|
|
|
@@ -5603,6 +5601,33 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ // 转客户询价
|
|
|
+ $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 () {
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
}]);
|
|
|
|
|
|
// 询价单明细
|