Browse Source

物料编辑功能进行更新

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9952 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 years ago
parent
commit
e862ae8afa

+ 1 - 0
src/main/java/com/uas/platform/b2b/service/impl/BaseInfoServiceImpl.java

@@ -482,6 +482,7 @@ public class BaseInfoServiceImpl implements BaseInfoService {
 				prodInfo.setStandard(Constant.NO);
 			}
 			prodInfo.setEnUU(SystemSession.getUser().getEnterprise().getUu());
+			prodInfo.setSourceApp("B2B");
 			prodInfo = productDao.save(prodInfo);
 			map.put("id", prodInfo.getId());
 			map.put("success", "物料添加成功");

+ 7 - 7
src/main/webapp/resources/tpl/index/baseInfo/productDetail.html

@@ -87,7 +87,7 @@
                 		ng-change="getSimilarKinds(prodInfo.title)" name="title" ng-focus="onFocus('title')"
                 		typeahead="kind.kindName for kind in getSimilarKinds($viewValue)"
 						autocomplete="off" typeahead-on-select="onAssociateTitleClick($item, prodInfo)"
-						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus">
+						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus ||  prodInfo.sourceApp == 'ERP'">
                 </div>
             </div>
             <div class="pro-list-tab row">
@@ -97,7 +97,7 @@
                 		ng-change="getSimilarComponents(prodInfo.cmpCode)" name="cmpCode" ng-focus="onFocus('cmpCode')"
                 		typeahead="cmp.code for cmp in getSimilarComponents($viewValue)"
 						autocomplete="off" typeahead-on-select="onAssociateCmpClick($item, prodInfo)"
-						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus">
+						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus ||  prodInfo.sourceApp == 'ERP'">
                 </div>
                 <div class="col-md-2">导入品牌:</div>
                 <div class="col-md-4">
@@ -105,7 +105,7 @@
                 		ng-change="getSimilarBrands(prodInfo.brand)" name="brand" ng-focus="onFocus('brand')"
                 		typeahead="brand.brandName for brand in getSimilarBrands($viewValue)"
 						autocomplete="off" typeahead-on-select="onAssociateBrandClick($item, prodInfo)"
-						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus">
+						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus ||  prodInfo.sourceApp == 'ERP'">
                 </div>
             </div>
             <div class="pro-list-tab row">
@@ -138,8 +138,8 @@
                 <div class="col-md-2">状态:</div>
                 <div class="col-md-4">有效</div>
             </div>
-            <div class="com_title01 sty01" style="margin-bottom: 15px;" ng-if="prodInfo.isbusiness == 1"><span>标准信息</span></div>
-            <div class="pro-list-tab row" ng-if="prodInfo.isbusiness == 1">
+            <div class="com_title01 sty01" style="margin-bottom: 15px;" ng-if="prodInfo.isbusiness == 1 || prodInfo.sourceApp == 'ERP'"><span>标准信息</span></div>
+            <div class="pro-list-tab row" ng-if="prodInfo.isbusiness == 1 ||  prodInfo.sourceApp == 'ERP'">
                 <div class="col-md-2" style="padding-right: 0;">标准产品名称(类目):</div>
                 <div class="col-md-4"> 
                 	<input type="text"  ng-model="prodInfo.kind" style="cursor: pointer;" required="true"
@@ -223,8 +223,8 @@
                     </div>
                 </dd> -->
             </dl>
-            <div class="com_title01" ng-if="matchresults.length > 0 && prodInfo.isbusiness == 1"><span>匹配结果</span></div>
-            <div id="order-detail-list" ng-if="matchresults.length > 0 && prodInfo.isbusiness == 1">
+            <div class="com_title01" ng-if="matchresults.length > 0 && (prodInfo.isbusiness == 1 || prodInfo.sourceApp == 'ERP')"><span>匹配结果</span></div>
+            <div id="order-detail-list" ng-if="matchresults.length > 0 && prodInfo.isbusiness == 1 || prodInfo.sourceApp == 'ERP'">
                 <table class="block table table-default table-striped table-hover" ng-if="matchresults.length > 0">
                        <thead>
                             <tr class="header">

+ 7 - 7
src/main/webapp/resources/tpl/index/purc/productDetail.html

@@ -87,7 +87,7 @@
                 		ng-change="getSimilarKinds(prodInfo.title)" name="title" ng-focus="onFocus('title')"
                 		typeahead="kind.kindName for kind in getSimilarKinds($viewValue)"
 						autocomplete="off" typeahead-on-select="onAssociateTitleClick($item, prodInfo)"
-						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus">
+						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus ||  prodInfo.sourceApp == 'ERP'">
                 </div>
             </div>
             <div class="pro-list-tab row">
@@ -97,7 +97,7 @@
                 		ng-change="getSimilarComponents(prodInfo.cmpCode)" name="cmpCode" ng-focus="onFocus('cmpCode')"
                 		typeahead="cmp.code for cmp in getSimilarComponents($viewValue)"
 						autocomplete="off" typeahead-on-select="onAssociateCmpClick($item, prodInfo)"
-						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus">
+						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus ||  prodInfo.sourceApp == 'ERP'">
                 </div>
                 <div class="col-md-2">导入物料品牌:</div>
                 <div class="col-md-4">
@@ -105,7 +105,7 @@
                 		ng-change="getSimilarBrands(prodInfo.brand)" name="brand" ng-focus="onFocus('brand')"
                 		typeahead="brand.brandName for brand in getSimilarBrands($viewValue)"
 						autocomplete="off" typeahead-on-select="onAssociateBrandClick($item, prodInfo)"
-						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus">
+						spellcheck="false" ng-class="{'readonly-pointer': !prodInfo.$editing}"  ng-readonly="!editstatus ||  prodInfo.sourceApp == 'ERP'">
                 </div>
             </div>
             <div class="pro-list-tab row">
@@ -138,8 +138,8 @@
                 <div class="col-md-2">状态:</div>
                 <div class="col-md-4">有效</div>
             </div>
-            <div class="com_title01 sty01" style="margin-bottom: 15px;" ng-if="prodInfo.isbusiness == 1"><span>标准信息</span></div>
-            <div class="pro-list-tab row" ng-if="prodInfo.isbusiness == 1">
+            <div class="com_title01 sty01" style="margin-bottom: 15px;" ng-if="prodInfo.isbusiness == 1 ||  prodInfo.sourceApp == 'ERP'"><span>标准信息</span></div>
+            <div class="pro-list-tab row" ng-if="prodInfo.isbusiness == 1 ||  prodInfo.sourceApp == 'ERP'">
                 <div class="col-md-2" style="padding-right: 0;">标准产品名称(类目):</div>
                 <div class="col-md-4"> 
                 	<input type="text"  ng-model="prodInfo.kind" style="cursor: pointer;" required="true"
@@ -223,8 +223,8 @@
                     </div>
                 </dd> -->
             </dl>
-             <div class="com_title01" ng-if="matchresults.length > 0 && prodInfo.isbusiness == 1"><span>匹配结果</span></div>
-            <div id="order-detail-list" ng-if="matchresults.length > 0 && prodInfo.isbusiness == 1">
+             <div class="com_title01" ng-if="matchresults.length > 0 && (prodInfo.isbusiness == 1 ||  prodInfo.sourceApp == 'ERP')"><span>匹配结果</span></div>
+            <div id="order-detail-list" ng-if="matchresults.length > 0 && prodInfo.isbusiness == 1 || prodInfo.sourceApp == 'ERP'">
                 <table class="block table table-default table-striped table-hover" ng-if="matchresults.length > 0">
                        <thead>
                             <tr class="header">