Browse Source

1、修改超级后台初审,终审逻辑
2、修改单个产品导入 为多个产品导入

shenjunjie 7 năm trước cách đây
mục cha
commit
a298abc7e2

+ 34 - 12
src/main/webapp/resources/js/admin/controllers/StoreQualificationCtrl.js

@@ -358,18 +358,40 @@ define([ 'app/app' ], function(app) {
 			apply.brands = $scope.brands || null;
 			apply.reason = $scope.reason;
 
-			handlerApply(isPass, apply).then(function (data) {
-				if (data.success) {
-					toaster.pop('success', "审核完成");
-					$scope.updateState = false;
-					activate();
-				} else {
-					toaster.pop('error', data.message);
-				}
-			})['catch'](function (error) {
-				console.log(error);
-				toaster.pop('error', '审核操作失败');
-			});
+			/*
+			* 初审
+			* */
+			if ($scope.application.status === 'PREPARE') {
+                StoreInfo.storeCheck({uuid: $scope.application.uuid}, apply || null, function (data) {
+                    if (data.success) {
+                        toaster.pop('success', "审核完成");
+                        $scope.updateState = false;
+                        activate();
+                    } else {
+                        toaster.pop('error', data.message);
+                    }
+                }, function (error) {
+                    console.log(error);
+                    toaster.pop('error', '审核操作失败');
+                });
+            }
+            else {
+                /*
+                * 终审
+                * */
+                handlerApply(isPass, apply).then(function (data) {
+                    if (data.success) {
+                        toaster.pop('success', "审核完成");
+                        $scope.updateState = false;
+                        activate();
+                    } else {
+                        toaster.pop('error', data.message);
+                    }
+                })['catch'](function (error) {
+                    console.log(error);
+                    toaster.pop('error', '审核操作失败');
+                });
+            }
 		}
 
 		/**

+ 5 - 1
src/main/webapp/resources/js/common/query/storeInfo.js

@@ -203,7 +203,11 @@ define([ 'ngResource' ], function() {
 			isPcb: {
 				url: 'api/store-service/ispcb',
 				method: 'GET'
-			}
+			},
+            storeCheck: {
+                url: '/store-service/check',
+                method: 'put'
+            },
         });
     }]).factory('ConsignmentAgreementRecord', ['$resource', 'BaseService', function ($resource, BaseService) {
     	// 自营转寄售协议,同意操作记录

+ 8 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/single_entry.js

@@ -659,8 +659,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       Material.importOneMaterail({}, jsonObject, function(data) {
         if (data.code == 1) {
           toaster.pop('success', '保存成功');
-          initInfo()
-          initError()
+          $scope.showProductInfo = true
         } else {
           toaster.pop('error', '失败', data.message);
         }
@@ -679,6 +678,13 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       // });
     }
 
+    // 新增物料
+    $scope.initProduct = function() {
+        initInfo()
+        initError()
+        $scope.showProductInfo = false
+    }
+
     // document.addEventListener('click', function() {
     //   $scope.Regul.pcmpcode = $scope.Regul.CodeList&& $scope.Regul.CodeList.value && $scope.Regul.CodeList.value[0].code || name
     //   $scope.Regul.CodeList = []

+ 4 - 1
src/main/webapp/resources/view/admin/store_application_maintenance.html

@@ -281,9 +281,12 @@
 				</td>
 				<td>
 					<div ng-if="application.status === 'PREPARE'">
-						<a class="apply-bg btn" href="javascript:void(0)" ng-click="auditQualification(application)">资质审核</a><br/>
+						<a class="apply-bg btn" href="javascript:void(0)" ng-click="auditQualification(application)">初审</a>
 						<span style="color: #9d9d9d">已申请 {{application.time.day}}天{{application.time.hour}}时</span>
 					</div>
+					<div ng-if="application.status === 'CHECK'">
+						<a class="apply-bg btn" href="javascript:void(0)" ng-click="auditQualification(application)">终审</a><br/>
+					</div>
 					<div ng-if="application.status !== 'PREPARE'">
 						<a class="detail-bg btn" href="javascript:void(0)" ng-click="auditQualification(application)">查看详情</a>
 					</div>

+ 12 - 4
src/main/webapp/resources/view/admin/store_qualification_maintenance.html

@@ -753,13 +753,21 @@
         </div>
 	</div>
 
-	<div class="deal-btn">
-		<button type="button" class="pass btn btn-primary" ng-if="application.status === 'PREPARE' "  ng-click="audit(true)">通过</button>
-		<button type="button" class="no-pass btn btn-primary" ng-if="application.status === 'PREPARE' " ng-click="auditUnpass()">不通过</button>
+	<!-- 初审 -->
+	<div class="deal-btn" ng-if="application.status === 'PREPARE' ">
+		<button type="button" class="pass btn btn-primary" ng-click="audit(true)">提交</button>
+	</div>
+	<!-- /end 初审 -->
+
+	<!-- 终审 -->
+	<div class="deal-btn" ng-if="application.status !== 'PREPARE' ">
+		<button type="button" class="pass btn btn-primary" ng-if="application.status === 'CHECK' "  ng-click="audit(true)">通过</button>
+		<button type="button" class="no-pass btn btn-primary" ng-if="application.status === 'CHECK' " ng-click="auditUnpass()">不通过</button>
 		<button type="button" class="edit btn btn-primary" ng-if="application.status !== 'PREPARE' && canUpdate && !updateState"  ng-click="changeToUpdate(true)">修改</button>
 		<button type="button" class="edit btn btn-primary" ng-if="application.status !== 'PREPARE' && updateState"  ng-click="saveUpdate()">保存</button>
 		<button type="button" class="off btn btn-primary" ng-if="application.status !== 'PREPARE' && updateState" ng-click="changeToUpdate(false)">取消</button>
 	</div>
+	<!-- /end 终审 -->
 </div>
 
 <script type="text/javascript">
@@ -772,4 +780,4 @@
 	document.onmouseup=function(){
 		window.clearTimeout(oTime);
 	}
-</script>
+</script>

+ 95 - 38
src/main/webapp/resources/view/vendor/forstore/single_entry.html

@@ -33,6 +33,14 @@
     text-align: right;
     margin-right: 10px;
   }
+  .single_wrapper .textinput {
+    width: 330px;
+    line-height: 34px;
+    font-size: 14px;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    white-space: nowrap;
+  }
   .single_wrapper .input input, .single_wrapper .input select{
     width: 300px;
   }
@@ -179,7 +187,7 @@
             <span class="red">*</span>品牌:
           </div>
           <!---->
-          <div class="fl input" style="position: relative">
+          <div class="fl input" style="position: relative" ng-show="!showProductInfo">
             <input type="text"
                    ng-change="onBrandChange(Regul.pbranden)"
                    placeholder="请输入品牌名称"
@@ -192,12 +200,15 @@
               </li>
             </ul>
           </div>
+          <div class="fl textinput" ng-show="showProductInfo">
+            {{Regul.pbranden}}
+          </div>
         </div>
         <div class="clearfix w50 fl list">
           <div class="fl name">
             <span class="red">*</span>物料名称:
           </div>
-          <div class="fl input" style="position: relative">
+          <div class="fl input" style="position: relative" ng-show="!showProductInfo">
             <input type="text"
                    placeholder="请输入物料名称"
                    ng-model="Regul.kind"
@@ -206,12 +217,15 @@
                    ng-blur="RegulKindBlur()"
             />
           </div>
+          <div class="fl textinput" ng-show="showProductInfo">
+            {{Regul.kind}}
+          </div>
         </div>
         <div class="clearfix w50 fl list">
           <div class="fl name">
             <span class="red">*</span>型号:
           </div>
-          <div class="fl input" style="position: relative;">
+          <div class="fl input" style="position: relative;"  ng-show="!showProductInfo">
             <!--ng-blur="RegulonCodeBlur(Regul.pcmpcode)"-->
             <input type="text"
                    ng-change="onCodeChange(Regul.pcmpcode)"
@@ -226,35 +240,43 @@
               </li>
             </ul>
           </div>
+          <div class="fl textinput" ng-show="showProductInfo">
+            {{Regul.kind}}
+          </div>
         </div>
         <div class="clearfix w50 fl list">
           <div class="fl name">
             规格:
           </div>
-          <div class="fl input" style="position: relative;">
+          <div class="fl input" style="position: relative;"  ng-show="!showProductInfo">
             <input type="text"
                    placeholder="请输入规格参数"
                    ng-model="Regul.spec"
                    ng-class="objError.spec ? 'danger' : '' "
-
                    class="form-control inputText" maxlength="50"/>
           </div>
+          <div class="fl textinput" ng-show="showProductInfo">
+            {{Regul.spec}}
+          </div>
         </div>
         <div class="clearfix w50 fl list">
           <div class="fl name">包装方式:
           </div>
-          <div class="fl input">
+          <div class="fl input" ng-show="!showProductInfo">
             <!-- 可编辑状态 -->
             <select ng-model="Regul.packaging"  class="select-adder select-package form-control" title="包装">
               <option ng-repeat="item in packageArray" ng-click="showClickText(Regul, item)">{{item}}</option>
             </select>
           </div>
+          <div class="fl textinput" ng-show="showProductInfo">
+            {{Regul.packaging}}
+          </div>
         </div>
         <div class="clearfix w50 fl list">
           <div class="fl name">
             最小包装数(PCS):
           </div>
-          <div class="fl input">
+          <div class="fl input" ng-show="!showProductInfo">
             <!-- 可编辑状态 -->
             <input type="text"
                    oninput="if(value.length>6)value=value.slice(0,6)"
@@ -266,12 +288,15 @@
                    ng-class="objError.minPackQty ? 'danger' : '' "
             />
           </div>
+          <div class="fl textinput" ng-show="showProductInfo">
+            {{Regul.minPackQty}}
+          </div>
         </div>
         <div class="clearfix w50 fl list">
           <div class="fl name">
             <span class="red">*</span>库存数量(PCS):
           </div>
-          <div class="fl input">
+          <div class="fl input" ng-show="!showProductInfo">
             <!-- 可编辑状态 oninput="if(value.length>6)value=value.slice(0,6)" -->
             <input type="text"
                    placeholder="请输入库存数量"
@@ -280,12 +305,15 @@
                    class="form-control inputText" maxlength="9"
                    ng-class="objError.reserve ? 'danger' : '' "/>
           </div>
+          <div class="fl textinput" ng-show="showProductInfo">
+            {{Regul.reserve}}
+          </div>
         </div>
         <div class="clearfix w50 fl list">
           <div class="fl name">
             成本单价({{(!storeInfo.enType || storeInfo.enType === 'MAINLAND') ? '¥' : '$'}}):
           </div>
-          <div class="fl input">
+          <div class="fl input" ng-show="!showProductInfo">
             <!-- 可编辑状态 oninput="if(value.length>6)value=value.slice(0,6)" -->
             <input type="text"
                    placeholder="请输入成本单价"
@@ -296,6 +324,9 @@
                    ng-class="objError.OnePrice ? 'danger' : '' "
             />
           </div>
+          <div class="fl textinput" ng-show="showProductInfo">
+            {{Regul.OnePrice}}
+          </div>
         </div>
         <div class="clearfix w50 fl list">
           <div class="fl name">
@@ -304,12 +335,12 @@
           <div class="fl input">
             <div class="update-big-img clearfix">
               <div class="previewImage">
-                <input ng-show="!Regul.Ischange" type="file" image-upload class="uploadImage" accept=".pdf"  on-success="onUploadSuccess($data, $file)" max-size="20971520" errorSizeMsg="'文件大小不能超过20M'">
+                <input ng-show="!Regul.Ischange && !showProductInfo" type="file" image-upload class="uploadImage" accept=".pdf"  on-success="onUploadSuccess($data, $file)" max-size="20971520" errorSizeMsg="'文件大小不能超过20M'">
                 <img ng-src="{{Regul.Ischange ? 'static/img/vendor/images/pdf.png' : Regul.Regulpic}}" alt="商品图片" style="height: 78px;width: 78px;">
-                <div class="cover" ng-if="Regul.Regulpic != Regul.iniUrlImg"  style="background: rgba(0,0,0,0)">
+                <div class="cover" ng-show="(Regul.Regulpic != Regul.iniUrlImg) && !showProductInfo"  style="background: rgba(0,0,0,0)">
                   <i class="fa fa-trash" style="z-index: 98" ng-click="deleteRegulImg('Regulpic')"></i>
                 </div>
-                <a style="transition: 0s all" href="{{Regul.Regulpic}}" target="_blank" ng-if="Regul.Regulpic != Regul.iniUrlImg">
+                <a style="transition: 0s all" href="{{Regul.Regulpic}}" target="_blank" ng-show="Regul.Regulpic != Regul.iniUrlImg">
                   <div class="cover">
                     <div class="look" style="color: #fff;"><i class="fa fa-search"></i>查看</div>
                   </div>
@@ -332,9 +363,9 @@
           <div class="fl input">
             <div class="update-big-img clearboth">
               <div class="previewImage">
-                <input type="file" image-upload class="uploadImage" on-success="onUploadSuccessProduct($data, $file)" max-size="1048576" error-size-msg="文件大小不能超过1M">
+                <input type="file" ng-show="!showProductInfo" image-upload class="uploadImage" on-success="onUploadSuccessProduct($data, $file)" max-size="1048576" error-size-msg="文件大小不能超过1M">
                 <img ng-src="{{Regul.RegulImg}}" alt="商品图片" style="height: 78px;width: 78px;">
-                <div class="cover" style="background: rgba(0,0,0,0)" ng-if="Regul.RegulImg != Regul.iniUrlImg">
+                <div class="cover" style="background: rgba(0,0,0,0)" ng-show="Regul.RegulImg != Regul.iniUrlImg && !showProductInfo">
                   <i class="fa fa-trash" style="z-index: 98" ng-click="deleteRegulImg('RegulImg')"></i>
                 </div>
                 <div class="cover" style="z-index: 10;cursor:pointer" ng-show="Regul.RegulImg != Regul.iniUrlImg" ng-click="showImg(Regul.RegulImg, $event)">
@@ -356,22 +387,25 @@
           <div class="clearfix marginBottom14">
             <div class="fl name">最小起订量(PCS):
             </div>
-            <div class="fl input" style="position: relative">
-            <input type="text"
-                   placeholder="请输入最小起订量"
-                   maxlength="6"
-                   class="form-control inputText"
-                   oninput="if(value.length>6)value=value.slice(0,6)"
-                   ng-model="Regul.minBuyQty"
-                   ng-change="ProductupdateStartNumber(Regul.minBuyQty)"
-                   ng-blur="ProductblurMinBuyQty(Regul.minBuyQty)"
-                   ng-class="{'danger': objError.minBuyQty}"
-            />
-          </div>
+            <div class="fl input" style="position: relative" ng-show="!showProductInfo">
+              <input type="text"
+                     placeholder="请输入最小起订量"
+                     maxlength="6"
+                     class="form-control inputText"
+                     oninput="if(value.length>6)value=value.slice(0,6)"
+                     ng-model="Regul.minBuyQty"
+                     ng-change="ProductupdateStartNumber(Regul.minBuyQty)"
+                     ng-blur="ProductblurMinBuyQty(Regul.minBuyQty)"
+                     ng-class="{'danger': objError.minBuyQty}"
+              />
+            </div>
+            <div class="fl textinput" ng-show="showProductInfo">
+              {{Regul.minBuyQty}}
+            </div>
           </div>
           <div class="clearfix marginBottom14">
             <div class="fl name">交期(天):</div>
-            <div class="fl input">
+            <div class="fl input" ng-show="!showProductInfo">
               <input type="text"
                      placeholder="天数"
                      maxlength="3"
@@ -392,16 +426,22 @@
                                     ng-class="{'danger' : objError.maxDelivery}"
             />
             </div>
+            <div class="fl textinput" ng-show="showProductInfo">
+              {{Regul.minDelivery}} - {{Regul.maxDelivery}}
+            </div>
           </div>
           <div class="clearfix marginBottom14">
             <div class="fl name">可拆卖:</div>
-            <div class="fl">
+            <div class="fl" ng-show="!showProductInfo">
               <span class="switch"><button ng-class="{'active' : Regul.breakUp}" ng-click="productToggleIsBreadUp('breakUp', false)"></button></span>
             </div>
+            <div class="fl textinput" ng-show="showProductInfo">
+              {{Regul.breakUp ? '是': '否'}}
+            </div>
           </div>
           <div class="clearfix">
             <div class="fl name">销售方式:</div>
-            <div class="fl" style="line-height: 34px;">
+            <div class="fl" style="line-height: 34px;"  ng-show="!showProductInfo">
               <label class="com-check-radio" style="margin-left: 5px;font-size: 14px">
                 <input type="radio" id="autoMonth0" ng-click="productChangeSelfType(1, 'formMe')" name="date" ng-model="Regul.dateArea" value="formMe">
                 <label style="vertical-align: middle;top:0px !important;" for="autoMonth0"></label>
@@ -413,6 +453,9 @@
                 寄售
               </label>
             </div>
+            <div class="fl textinput" ng-show="showProductInfo">
+              {{Regul.dateArea === 'formMe' ? '自营': '寄售'}}
+            </div>
           </div>
         </div>
         <div class="w50 fl list">
@@ -425,15 +468,21 @@
                 <div style="clear:both"></div>
               </div>
               <div class="plusBtn" style="font-size: 14px;color: #333;background: #fff;border-top: 1px solid #dcdcdc;position:relative" ng-repeat="price in Regul.prices">
-                <span class="fl w50" style="width: 50%;border-right:1px solid #dcdcdc">
+                <span class="fl w50" style="width: 50%;border-right:1px solid #dcdcdc" ng-show="!showProductInfo">
                   <input text="text" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" maxlength="9" ng-disabled="$index === 0" ng-readonly="$index === 0" ng-model="price.start" ng-blur="productPriceInfoBlur($index, price.start)" />
                 </span>
-                <span class="fl w50" style="width: 50%">
-                  <input ng-if="storeInfo.enType !== 'HK'" type="text" autocomplete="off" validata-price ng-blur="changePrices(Regul.prices, price.rMBPrice, $index)" oninput="if(value.length>11)value=value.slice(0,11)" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" ng-model="price.rMBPrice" />
-                  <input ng-if="storeInfo.enType === 'HK'" type="text" autocomplete="off" validata-price ng-blur="changePrices(Regul.prices, price.uSDPrice, $index)" oninput="if(value.length>11)value=value.slice(0,11)" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" ng-model="price.uSDPrice" />
+                <span class="fl w50" ng-show="showProductInfo">
+                  {{price.start}}
+                </span>
+                <span class="fl w50" style="width: 50%" ng-show="!showProductInfo">
+                  <input ng-show="storeInfo.enType !== 'HK'" type="text" autocomplete="off" validata-price ng-blur="changePrices(Regul.prices, price.rMBPrice, $index)" oninput="if(value.length>11)value=value.slice(0,11)" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" ng-model="price.rMBPrice" />
+                  <input ng-show="storeInfo.enType === 'HK'" type="text" autocomplete="off" validata-price ng-blur="changePrices(Regul.prices, price.uSDPrice, $index)" oninput="if(value.length>11)value=value.slice(0,11)" style="width: 100%;outline: 0;border: 0;text-align: center;height: 30px" ng-model="price.uSDPrice" />
+                </span>
+                <span class="fl w50" ng-show="showProductInfo">
+                  {{price.rMBPrice || price.uSDPrice}}
                 </span>
                 <div style="clear:both"></div>
-                <div class="input-list ng-scope" style="height: 24px;line-height: 24px;position: absolute;right: -38px;top: 3px">
+                <div class="input-list ng-scope" style="height: 24px;line-height: 24px;position: absolute;right: -38px;top: 3px" ng-show="!showProductInfo">
                   <a class="reduce" ng-disabled="Regul.prices.length < 2" ng-click="productDeleteFragment(Regul.prices, $index)" disabled="disabled"><i class="fa fa-minus-circle restrict-color" ng-class="{ 'restrict-color':Regul.prices.length === 1 }"></i></a>
                   <a class="add" ng-click="productAddFragment(Regul.prices)" ng-disabled="Regul.prices.length >= 3"><i class="fa fa-plus-circle" ng-class="{ 'restrict-color': $index === 2 }"></i></a>
                 </div>
@@ -443,8 +492,10 @@
         </div>
       </div>
       <div class="editRegulControll">
-        <div ng-click="productSave()">确定</div>
-        <div ng-click="clearCheckBox()">取消</div>
+        <div ng-click="clearCheckBox()" ng-show="!showProductInfo">取消</div>
+        <div ng-click="productSave()"  ng-show="!showProductInfo">确定</div>
+
+        <div ng-click="initProduct()" class="addProduct" ng-show="showProductInfo">新增</div>
       </div>
     </div>
   </div>
@@ -485,10 +536,16 @@
   .editRegulControll div:hover {
     background: #4290f7
   }
-  .editRegulControll div:last-child:hover {
+  .editRegulControll div:first-child:hover {
     background: #6b6b6b
   }
-  .editRegulControll div:last-child {
+  .editRegulControll div:first-child {
     background: #aaaaaa;
   }
+  .editRegulControll div.addProduct {
+    background: #5078cb;
+  }
+  .editRegulControll div.addProduct:hover {
+    background: #4290f7
+  }
 </style>