|
|
@@ -1022,7 +1022,7 @@
|
|
|
search = encodeURI(search);
|
|
|
var reg = new RegExp(search, 'gim');
|
|
|
var result = content.replace(reg, '<font color="red">$&</font>');
|
|
|
- result = decodeURI(result);
|
|
|
+ result = decodemessageURI(result);
|
|
|
return $sce.trustAsHtml(result);
|
|
|
};
|
|
|
$rootScope.searchKeyword = null;// 清除缓存的关键字
|
|
|
@@ -6229,7 +6229,6 @@
|
|
|
quotation: {
|
|
|
currency: 'RMB',
|
|
|
taxrate: 17,
|
|
|
- date: new Date()
|
|
|
},
|
|
|
product: {},
|
|
|
prices: [{lapQty: 0}],
|
|
|
@@ -6352,12 +6351,12 @@
|
|
|
$scope.item.quotation.custUserUU = $scope.item.quotation.custUser.userUU;
|
|
|
$scope.item.productId = $scope.item.product.id;
|
|
|
// $scope.item.quotation.status = 100;//在录入
|
|
|
- if ($scope.item.quotation.date instanceof Date) {
|
|
|
- $scope.item.quotation.date = $scope.item.quotation.date.getTime();
|
|
|
- }
|
|
|
- if ($scope.item.quotation.endDate instanceof Date) {
|
|
|
- $scope.item.quotation.endDate = $scope.item.quotation.endDate.getTime();
|
|
|
- }
|
|
|
+ // if ($scope.item.quotation.date instanceof Date) {
|
|
|
+ // $scope.item.quotation.date = $scope.item.quotation.date.getTime();
|
|
|
+ // }
|
|
|
+ // if ($scope.item.quotation.endDate instanceof Date) {
|
|
|
+ // $scope.item.quotation.endDate = $scope.item.quotation.endDate.getTime();
|
|
|
+ // }
|
|
|
Quotation.save({}, $scope.item, function (data) {
|
|
|
$scope.loading = false;
|
|
|
$scope.item = data;
|
|
|
@@ -16450,10 +16449,11 @@
|
|
|
$modalInstance.close(company);
|
|
|
}
|
|
|
}]);
|
|
|
+
|
|
|
/**
|
|
|
* 新增代采订单
|
|
|
*/
|
|
|
- app.controller('NewDeputyOrderCtrl', ['$scope', 'toaster', '$modal', 'DeputyOrder', '$filter', 'ngTableParams', 'BaseService', 'DecimalNumber', function ($scope, toaster, $modal, DeputyOrder, $filter, ngTableParams, BaseService, DecimalNumber) {
|
|
|
+ app.controller('NewDeputyOrderCtrl', ['$scope', 'toaster', '$modal', 'DeputyOrder', '$filter', 'ngTableParams', 'BaseService', 'DecimalNumber', 'DekeyValue', function ($scope, toaster, $modal, DeputyOrder, $filter, ngTableParams, BaseService, DecimalNumber, DekeyValue) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
//默认采购单号不重复
|
|
|
$scope.orderCodeEnable = true;
|
|
|
@@ -16489,8 +16489,17 @@
|
|
|
$scope.deputyEnterprises = data;
|
|
|
$scope.deOrder.deputyname = $scope.deputyEnterprises[0].deputyenname;
|
|
|
$scope.deOrder.deputyuu = $scope.deputyEnterprises[0].deputyenuu;
|
|
|
+ getPayMethod($scope.deOrder.deputyuu, 'paymentmethod');
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+ var getPayMethod = function(enuu, key) {
|
|
|
+ // 获取我方付款支付方式默认值
|
|
|
+ DekeyValue.getValue({enuu: enuu, key: key}, function(data) {
|
|
|
+ $scope.methods = data.content;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
// 更新名称时后台更改uu号
|
|
|
$scope.change = function (deputyname) {
|
|
|
DeputyOrder.deputyEnterprise({}, function (data) {
|
|
|
@@ -16498,6 +16507,7 @@
|
|
|
angular.forEach($scope.deputyEn, function (en) {
|
|
|
if (deputyname == en.deputyenname) {
|
|
|
$scope.deputyuu = en.deputyenuu;
|
|
|
+ getPayMethod($scope.deputyuu, 'paymentmethod');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
@@ -16970,7 +16980,7 @@
|
|
|
/**
|
|
|
* 代采详情
|
|
|
*/
|
|
|
- app.controller('DeputyOrderDetailCtrl', ['$scope', 'toaster', 'DeputyOrder', '$stateParams', 'ngTableParams', 'BaseService', '$modal', 'DecimalNumber', 'CurrentRole', function ($scope, toaster, DeputyOrder, $stateParams, ngTableParams, BaseService, $modal, DecimalNumber, CurrentRole) {
|
|
|
+ app.controller('DeputyOrderDetailCtrl', ['$scope', 'toaster', 'DeputyOrder', '$stateParams', 'ngTableParams', 'BaseService', '$modal', 'DecimalNumber', 'CurrentRole', 'DekeyValue', function ($scope, toaster, DeputyOrder, $stateParams, ngTableParams, BaseService, $modal, DecimalNumber, CurrentRole, DekeyValue) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
// 获取当前用户是否为普通用户
|
|
|
CurrentRole.isUser({}, {}, function (data) {
|
|
|
@@ -16997,8 +17007,16 @@
|
|
|
$scope.deputyEnterprises = data;
|
|
|
$scope.deOrder.deputyname = $scope.deputyEnterprises[0].deputyenname;
|
|
|
$scope.deOrder.deputyuu = $scope.deputyEnterprises[0].deputyenuu;
|
|
|
+ getPayMethod($scope.deOrder.deputyuu, 'paymentmethod');
|
|
|
});
|
|
|
|
|
|
+ var getPayMethod = function(enuu, key) {
|
|
|
+ // 获取我方付款支付方式默认值
|
|
|
+ DekeyValue.getValue({enuu: enuu, key: key}, function(data) {
|
|
|
+ $scope.methods = data.content;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
// 更新代采企业时更新费率
|
|
|
$scope.change = function (deputyname) {
|
|
|
DeputyOrder.deputyEnterprise({}, function (data) {
|
|
|
@@ -17006,6 +17024,7 @@
|
|
|
angular.forEach($scope.deputyEn, function (en) {
|
|
|
if (deputyname == en.deputyenname) {
|
|
|
$scope.deputyuu = en.deputyenuu;
|
|
|
+ getPayMethod($scope.deputyuu, 'paymentmethod');
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
@@ -19771,7 +19790,7 @@
|
|
|
if (!angular.isUndefined($stateParams.id)) { // 获取招标单详情
|
|
|
$scope.loading = true;
|
|
|
getCurrentEn();
|
|
|
- PurcTender.getOne({id: $stateParams.id}, function (data) {
|
|
|
+ PurcTender.getPurcTenderDetail({id: $stateParams.id}, function (data) {
|
|
|
data.$editing = false;
|
|
|
$scope.tender = data;
|
|
|
$scope.tenderProd = data.purchaseTenderProds;
|