|
|
@@ -10053,8 +10053,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
}
|
|
|
console.log($scope.tender.purchaseTenderProds);
|
|
|
$scope.tender.tenderAttaches = $scope.attaches;
|
|
|
-
|
|
|
- $scope.tender.shipAddress = $scope.tender.shipAddress.address + $scope.tender.shipAddress.addressdet + ' ' + $scope.tender.shipAddress.receiver + ' ' + $scope.tender.shipAddress.usertel;
|
|
|
+ if ($scope.tender.shipAddress.address !== null && $scope.tender.shipAddress.addressdet !== null) {
|
|
|
+ $scope.tender.shipAddress = $scope.tender.shipAddress.address + $scope.tender.shipAddress.addressdet + ' ' + $scope.tender.shipAddress.receiver + ' ' + $scope.tender.shipAddress.usertel;
|
|
|
+ }
|
|
|
if (isPublish) { // 发布
|
|
|
toaster.pop('info', '提示', '正在发布,请稍候');
|
|
|
PurcTender.publish({tender: $scope.tender, enterpriseBaseInfo: $scope.tenderProd.enterpriseBaseInfo}, {}, function(data){
|
|
|
@@ -10082,7 +10083,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
|
|
|
// 删除(在录入状态)
|
|
|
$scope.deleteThis = function(id) {
|
|
|
- PurcTender.deleteOne({id: $stateParams.id}, function() {
|
|
|
+ PurcTender.deleteOne({}, id, function() {
|
|
|
toaster.pop('info', '提示', '删除成功');
|
|
|
window.location.hash = '#/purc/tender';
|
|
|
});
|
|
|
@@ -10589,7 +10590,9 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
var taxrateRegex = /^\+?[0-9][0-9]{0,1}$/;
|
|
|
var priceRegex = /^(0|[0-9][0-9]{0,9})(\.[0-9]{1,6})?$/;
|
|
|
if (!cycleRegex.test(tenderProd.currentItem.cycle) || !taxrateRegex.test(tenderProd.currentItem.taxrate) || !priceRegex.test(tenderProd.currentItem.price)) {
|
|
|
- toaster.pop('warning', '警告', '填写内容不合法,请重新填写');
|
|
|
+ if ((tenderProd.currentItem.cycle !== null && !cycleRegex.test(tenderProd.currentItem.cycle)) || (tenderProd.currentItem.taxrate !== null && !cycleRegex.test(tenderProd.currentItem.taxrate)) || (tenderProd.currentItem.price !== null && !cycleRegex.test(tenderProd.currentItem.price)) ) {
|
|
|
+ toaster.pop('warning', '警告', '填写内容不合法,请重新填写');
|
|
|
+ }
|
|
|
$scope.canSave = false;
|
|
|
}
|
|
|
});
|