|
|
@@ -2651,7 +2651,9 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
}
|
|
|
}
|
|
|
$scope.onBrandChange = function (brand, index) {
|
|
|
- if ((/[^\x00-\xff]/g).test(brand)) {
|
|
|
+ if (brand && getRealLen(brand) > 50) {
|
|
|
+ $scope.replaceMaterialList[index].ptrBranden = cutOutString(brand, 50);
|
|
|
+ } else if ((/[^\x00-\xff]/g).test(brand)) {
|
|
|
var chineseIndex = -1;
|
|
|
for (var i = 0; i < brand.length; i++) {
|
|
|
if ((/[^\x00-\xff]/g).test(brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(brand.charAt(i))) {
|
|
|
@@ -2662,8 +2664,6 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
if (chineseIndex > -1) {
|
|
|
$scope.replaceMaterialList[index].ptrBranden = brand.substring(0, chineseIndex);
|
|
|
}
|
|
|
- } else if (brand && getRealLen(brand) > 50) {
|
|
|
- $scope.replaceMaterialList[index].ptrBranden = cutOutString(brand, 50);
|
|
|
} else {
|
|
|
if (!brand) {
|
|
|
$scope.setShowSimilarBrandList(false, index);
|