|
|
@@ -202,21 +202,18 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
* @param name 型号名称
|
|
|
*/
|
|
|
$scope.RegulonCodeBlur = function(name) {
|
|
|
- if (name === '') {
|
|
|
- $scope.Regul.CodeList = []
|
|
|
- } else {
|
|
|
- $scope.Regul.pcmpcode = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].code || name
|
|
|
- $scope.Regul.CodeList = []
|
|
|
- }
|
|
|
+ setTimeout(function() {
|
|
|
+ if (name === '') {
|
|
|
+ $scope.Regul.CodeList = []
|
|
|
+ } else {
|
|
|
+ $scope.Regul.pcmpcode = $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].code || name
|
|
|
+ $scope.Regul.CodeList = []
|
|
|
+ }
|
|
|
+ }, 0)
|
|
|
}
|
|
|
$scope.setCode = function(code, index) {
|
|
|
- if (index === undefined) {
|
|
|
$scope.Regul.pcmpcode = code
|
|
|
$scope.Regul.CodeList = []
|
|
|
- } else {
|
|
|
- $scope.replaceMaterialList[index].ptrCmpcode = code;
|
|
|
- $scope.setShowSimilarCodeList(false, index);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
$scope.getSimilarCode = function(keyword, index) {
|
|
|
@@ -272,7 +269,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
}
|
|
|
|
|
|
$scope.setReserve = function(num) {
|
|
|
- if (num.indexOf('.') > -1) {
|
|
|
+ if (num && num.indexOf('.') > -1) {
|
|
|
toaster.pop('warning', '提示', '库存数量不能存在小数点')
|
|
|
$scope.Regul.reserve = 1
|
|
|
} else {
|