Browse Source

rel: 处理店铺审核内容

wangcz 6 years ago
parent
commit
02d6a19fb1

+ 4 - 0
src/main/webapp/resources/css/admin.css

@@ -1228,4 +1228,8 @@ body div.ng-table-pager a.page-a:hover{
 .com-check-radio input:checked + label{
 	background-position: -15px 0!important;
 }
+.com-check-radio input:disabled + label{
+	background-position: 0 0!important;
+	cursor:not-allowed;
+}
 /*---------------------标准控件-单选框end---------------------*/

+ 50 - 1
src/main/webapp/resources/js/admin/controllers/StoreQualificationCtrl.js

@@ -37,10 +37,54 @@ define([ 'app/app' ], function(app) {
 		$scope.saveUpdate = saveUpdate;
 		$scope.isPdf = isPdf;
 		$scope.createShowUrl = createShowUrl;
-
+        $scope.storeType = 'ORIGINAL_FACTORY';
+        $scope.editImg = false;
+        $scope.newImg = {
+            resourceUrl: '',
+			type: ''
+		};
+        $scope.resourceNodUrl = '';// 原来图片进行保存
 
 		activate();
 
+        /**
+         * 店铺类型切换
+         */
+		$scope.setFilters = function(key) {
+			if ($scope.storeType === 'DISTRIBUTION') {
+				return false;
+			}
+			$scope.storeType = key
+		}
+
+        /**
+         * 终审状态下打开编辑
+         */
+		$scope.editImgChick = function(flag) {
+			$scope.editImg = flag;
+            $scope.resourceNodUrl = $scope.qualifications[$scope.qType.businessLicense].resourceUrl;
+		}
+
+        /**
+         * 上传营业执照
+         */
+        $scope.onUploadLogo = function ($data, type) {
+            if (!$data || !$data.path) {
+                toaster.pop('error', '上传营业执照失败');
+                return ;
+            }
+            $scope.newImg.resourceUrl = $data.path;
+            $scope.qualifications[$scope.qType.businessLicense].resourceUrl = $data.path;
+            $scope.newImg.type = type;
+        };
+
+        $scope.editImgSave = function (type) {
+            $scope.editImg = false;
+        	if(!type) {
+                $scope.qualifications[$scope.qType.businessLicense].resourceUrl = $scope.resourceNodUrl;
+			}
+		}
+
 		//------------------------------------------------- Method
 
 		/**
@@ -139,6 +183,7 @@ define([ 'app/app' ], function(app) {
 				//初始化时备份一遍数据
 
                 apply.enType === 'HK' ? $scope.tab = 'HK' : $scope.tab = 'MAINLAND';
+                $scope.storeType = apply.type;
 				var qualifications = apply.qualifications || [];
 				$scope.brands = apply.brands || [];
 				$scope.brandsBackup = angular.copy($scope.brands);
@@ -355,7 +400,11 @@ define([ 'app/app' ], function(app) {
 			}
 
 			var apply = {};
+			var qualifications = [];
+            qualifications.push($scope.newImg)
 			apply.enType = $scope.tab;
+			apply.type = $scope.storeType;
+			apply.qualifications = qualifications;
 			apply.enQualification = $scope.enQualification;
 			apply.brands = $scope.brands || null;
 			apply.reason = $scope.reason;

+ 41 - 3
src/main/webapp/resources/view/admin/store_qualification_maintenance.html

@@ -66,6 +66,17 @@
 		top: 140px;
 		font-size: 12px;
 	}
+	.qualification-list01 .store-img .col-sm-4 .handle-btn{
+		position: relative;
+		top: -40px;
+		left: 10px;
+		font-size: 14px;
+	}
+	.qualification-list01 .store-img .col-sm-4 .handle-btn a{
+		text-decoration: none;
+		display:block;
+		line-height: 25px;
+	}
 	.qualification-list01 ul{
 		width: 100%;
 		height: 40px;
@@ -261,7 +272,7 @@
 		font-size: 14px;
 		color: #fff;
 		text-align: center;
-		line-height: 90px;
+		line-height: 170px;
 	}
 	.hover-show a i{
 		margin-right: 5px;
@@ -358,6 +369,26 @@
 	</div>
 	<div class="store-qualification-content">
 		<div class="qualification-list01">
+			<div class="row">
+				<div class="col-sm-2">店铺类型</div>
+				<div class="col-sm-10 radio-block">
+					<label class="com-check-radio" style="margin-right:20px;font-weight: normal;color:#666;">
+						<input type="radio" id="ORIGINAL_FACTORY" name="date" ng-click="setFilters('ORIGINAL_FACTORY')" ng-checked="storeType == 'ORIGINAL_FACTORY'" ng-disabled="storeType == 'DISTRIBUTION'">
+						<label for="ORIGINAL_FACTORY"></label>
+						原厂
+					</label>
+					<label class="com-check-radio" style="margin-right:20px;font-weight: normal;color:#666;">
+						<input type="radio" id="AGENCY" name="date" ng-click="setFilters('AGENCY')" ng-checked="storeType == 'AGENCY'" ng-disabled="storeType == 'DISTRIBUTION'">
+						<label for="AGENCY"></label>
+						代理
+					</label>
+					<label class="com-check-radio" style="margin-right:20px;font-weight: normal;color:#666;">
+						<input type="radio" id="DISTRIBUTION" name="date" ng-click="setFilters('DISTRIBUTION')" ng-checked="storeType == 'DISTRIBUTION'" ng-disabled="storeType == 'ORIGINAL_FACTORY' || storeType == 'AGENCY'">
+						<label for="DISTRIBUTION"></label>
+						经销
+					</label>
+				</div>
+			</div>
 			<div class="row">
 				<div class="col-sm-2">企业全称</div>
 				<div class="col-sm-10" ng-bind="application.storeName">深圳优软商城科技有限公司</div>
@@ -372,13 +403,20 @@
 					<div class="col-sm-4">
 						<div class="photo-img" ng-if="qualifications[qType.businessLicense]">
 							<div><img ng-src="{{createShowUrl(qualifications[qType.businessLicense].resourceUrl)}}"/></div>
-							<div class="hover-show">
-								<span class="delete" title="删除"></span>
+							<div class="hover-show" ng-show="!editImg">
+								<span title="删除"></span>
 								<a ng-href="{{qualifications[qType.businessLicense].resourceUrl}}" target="_blank"><i class="fa fa-search"></i>查看</a>
 							</div>
+							<div ng-show="editImg" image-upload data-src="static/img/example/upload-apply_2.png" on-success="onUploadLogo($data, 'BUSINESS_LICENSE')" non-preview="true" max-size="512000" error-size-msg="文件大小不超过500kb"
+								 style="width: 208px;height: 168px; top:0; left: 0; position: absolute;background: rgba(0,0,0,.5);"></div>
 						</div>
 						<div class="no-photo-img" ng-if="!qualifications[qType.businessLicense]">未上传图片!</div>
 						<span class="text">营业执照 <em>*</em></span>
+						<div class="handle-btn" ng-if="application.status === 'CHECK'">
+							<a ng-if="!editImg" ng-click="editImgChick(true)">修改</a>
+							<a ng-if="editImg" ng-click="editImgSave(false)">取消</a>
+							<a ng-if="editImg" ng-click="editImgSave(true)">保存</a>
+						</div>
 					</div>
 					<div class="col-sm-4">
 						<div class="photo-img" ng-if="qualifications[qType.taxPayer]">