|
|
@@ -537,6 +537,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
url : "/apBill",
|
|
|
templateUrl : "static/tpl/index/fa/apBill.html",
|
|
|
controller: 'SaleApBillCtrl'
|
|
|
+ }).state('fa.apBill_detail', {
|
|
|
+ url : "/apBill/:id",
|
|
|
+ templateUrl : "static/tpl/index/fa/apBill_detail.html",
|
|
|
+ controller: 'SaleApBillDetailCtrl'
|
|
|
}).state('fa.arCheck', {
|
|
|
url : "/arCheck",
|
|
|
templateUrl : "static/tpl/index/fa/arCheck.html",
|
|
|
@@ -6474,6 +6478,22 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
};
|
|
|
|
|
|
}]);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 客户应付发票详情
|
|
|
+ */
|
|
|
+ app.controller('SaleApBillDetailCtrl', ['$scope', '$filter', 'FaApBill', 'toaster', '$stateParams', 'BaseService', function($scope, $filter, FaApBill, toaster, $stateParams, BaseService){
|
|
|
+ BaseService.scrollBackToTop();
|
|
|
+ var loadData = function() {
|
|
|
+ FaApBill.get({id: $stateParams.id}, function(data){
|
|
|
+ $scope.bill = data;
|
|
|
+ console.log(data);
|
|
|
+ $scope.loading = false;
|
|
|
+ });
|
|
|
+ };
|
|
|
+ loadData(); // 初始获取单据数据
|
|
|
+
|
|
|
+ }]);
|
|
|
|
|
|
/**
|
|
|
* 应付对账单
|
|
|
@@ -13518,24 +13538,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
};
|
|
|
|
|
|
$scope.submit = function(tender) {
|
|
|
- var canSubmit = true;
|
|
|
- var hasPrice = false;
|
|
|
+ var canSubmit = false;
|
|
|
var hasDecide = false;
|
|
|
angular.forEach(tender.purchaseTenderProds, function(tenderProd) {
|
|
|
angular.forEach(tenderProd.saleTenderItems, function(saleTenderItem) {
|
|
|
- if (saleTenderItem.price) { // 只要存在报价的行,就需要对其中一个定标
|
|
|
- hasPrice = true;
|
|
|
+ if (saleTenderItem.price && 0 !== saleTenderItem.saleTender.auditStatus && typeof saleTenderItem.applyStatus !== 'undefined') { // 只要存在报价的行,就需要对其中一个定标
|
|
|
+ hasDecide = true;
|
|
|
}
|
|
|
});
|
|
|
- if (hasPrice) {
|
|
|
- angular.forEach(tenderProd.saleTenderItems, function(saleTenderItem) {
|
|
|
- if (saleTenderItem.applyStatus) { // 只要有一行定标,就可以投标
|
|
|
- hasDecide = true;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- if (!hasDecide) {
|
|
|
- canSubmit = false;
|
|
|
+ if (hasDecide) {
|
|
|
+ canSubmit = true;
|
|
|
}
|
|
|
});
|
|
|
if (!canSubmit) {
|