Browse Source

Merge branch 'erp_batchToGoods_20180117' of ssh://10.10.100.21/source/platform-b2c into erp_batchToGoods_20180117

yujia 8 years ago
parent
commit
2047f98537

+ 70 - 1
src/main/webapp/resources/css/erp/align.css

@@ -4,4 +4,73 @@
 }
 .wrap {
     width: 100%;
-}
+}
+
+/*---------------------btn样式 start---------------------*/
+/*示例(size+type):
+<span class="com-btn-level1 com-btn-submit"></span>
+*/
+/*btnSize*/
+.com-btn-level1 {
+    display: inline-block;
+    height: 25px;
+    width:64px;
+    text-align: center;
+    line-height: 23px;
+    font-size: 14px;
+    cursor: pointer;
+    vertical-align: middle;
+}
+.com-btn-level1[disabled] {
+    cursor: not-allowed;
+}
+.com-btn-level2 {
+    display: inline-block;
+    padding: 0 11px;
+    height: 25px;
+    line-height: 23px;
+    border-radius: 2px;
+    font-size: 12px;
+    cursor: pointer;
+    vertical-align: middle;
+}
+.com-btn-level2[disabled] {
+    cursor: not-allowed;
+}
+/*btnType*/
+.com-btn-submit {
+    color: #fff;
+    background: #5078cb;
+    border: 1px solid #5078cb;
+}
+.com-btn-cancel {
+    background: #c8c6c6;
+    color: #fff;
+    border: 1px solid #c8c6c6;
+}
+.com-btn-detail {
+    color: #fff;
+    background: #ff8522;
+    border: 1px solid #ff8522;
+}
+.com-btn-detail-border {
+    color: #ff8522;
+    background: #fff;
+    border: 1px solid #ff8522;
+}
+.com-btn-red {
+    background: #f15601;
+    color: #fff;
+    border: 1px solid #f15601;
+}
+.com-btn-green {
+    background: #33b401;
+    color: #fff;
+    border: 1px solid #33b401;
+}
+.com-btn-submit-border {
+    border: 1px solid #5078cb;
+    background: #fff;
+    color: #5078cb;
+}
+/*---------------------btn样式 end-----------------------*/

+ 15 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -16,6 +16,21 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
 		$scope.$$nonProduct.count = 10;
 
 		$scope.$$nonProduct.enterSaveButton = false;
+
+		$scope.salePrice = 0;
+
+		$scope.setSalePrice = function (price) {
+			$scope.salePrice = price;
+		}
+
+		$scope.onSalePriceChange = function (salePrice) {
+			if (salePrice < 0) {
+				$scope.salePrice = 0;
+			} else if (salePrice > 200) {
+				$scope.salePrice = 200;
+			}
+		}
+
 		/**
 		 * 最大
 		 * @type {number}

+ 100 - 1
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_erp.html

@@ -171,7 +171,8 @@
 	}
 	.search-check{
 		width: 100%;
-		height: 54px;
+		min-height: 54px;
+		height: auto;
 		background: #fff;
 		padding-top: 10px;
 		margin-bottom: 16px;
@@ -237,6 +238,65 @@
 	.search-check .check .check-active label{
 		margin-right: 0 !important;
 	}
+	.search-check .batch-operate {
+		clear: both;
+		background: #99FFFF;
+	}
+	.search-check .batch-operate .operate-head {
+		height: 40px;
+		line-height: 40px;
+		margin: 0 10px;
+		border-bottom: 1px solid;
+		padding: 0 20px;
+	}
+	.search-check .batch-operate .operate-head .check-active {
+		font-weight: normal;
+	}
+	.search-check .batch-operate .operate-content {
+		height: 70px;
+		line-height: 30px;
+	}
+	.search-check .batch-operate .operate-content > div {
+		display: inline-block;
+		float: left;
+	}
+	.search-check .batch-operate .operate-content > div:first-child {
+		margin-right: 50px;
+	}
+	.search-check .batch-operate .operate-content > div p {
+		font-weight: bold;
+	}
+	.search-check .batch-operate .operate-content > div p .batch-price-title {
+		margin-right: 91px;
+	}
+	.search-check .batch-operate .operate-content > div p .batch-progress {
+		width: 108px;
+		height: 5px;
+		background: #fff;
+		display: inline-block;
+		position: relative;
+	}
+	.search-check .batch-operate .operate-content > div p .batch-progress i {
+		width: 5px;
+		height: 10px;
+		background: #169BD5;
+		display: inline-block;
+		position: absolute;
+		top: -3px;
+	}
+	.search-check .batch-operate .operate-content > div p em {
+		margin: 0 5px;
+	}
+	.search-check .batch-operate .operate-content > div > div input {
+		padding: 0 5px;
+		height: 25px;
+	}
+	.search-check .batch-operate .operate-content .batch-sale input {
+		width: 42px;
+	}
+	.search-check .batch-operate .operate-content .batch-date input {
+		width: 56px;
+	}
 	.check-input input{
 		display: none;
 	}
@@ -1252,6 +1312,13 @@
 	#define-content .labelling em{
 		color: #f00;
 	}
+	#define-content td > span {
+		float: left;
+		margin-left: 20px;
+		font-size: 13px;
+		color: #008000;
+		line-height: 24px;
+	}
 	#define-content .labelling input{
 		padding-left: 10px;
 		width: 157px;
@@ -1531,6 +1598,36 @@
 						<a ng-click="exitBatch()">取消</a>
 					</span>
 				</div>
+				<div class="batch-operate">
+					<div class="operate-head">
+						<label class="check-active fl">
+							<input type="checkbox"  ng-click="chooseAll()" ng-checked="isChoosedAll" id="AllChoose"/>
+							<label for="AllChoose"></label>
+							<span>全选</span>
+						</label>
+						<div class="fr">
+							<span class="com-btn-level1 com-btn-submit">上架</span>
+							<span class="com-btn-level1 com-btn-submit">保存</span>
+							<span class="com-btn-level1 com-btn-red">删除</span>
+							<span class="com-btn-level1 com-btn-cancel">取消</span>
+						</div>
+					</div>
+					<div class="operate-content">
+						<div class="batch-sale">
+							<p><span class="batch-price-title">批量设置销售价:</span><em>0</em><span class="batch-progress"><i style="left: {{salePrice ? salePrice > 200 ? '100%' : salePrice / 2 + '%' : 0}}"></i></span><em>200</em></p>
+							<div><span>销售价 = 近一个月的平均销售价 X </span><input type="number" ng-model="salePrice" ng-change="onSalePriceChange()"> %
+								<span class="com-btn-level2 com-btn-submit" ng-click="setSalePrice(100)">100%</span>
+								<span class="com-btn-level2 com-btn-submit" ng-click="setSalePrice(120)">120%</span>
+								<span class="com-btn-level2 com-btn-submit" ng-click="setSalePrice(130)">130%</span>
+								<span class="com-btn-level2 com-btn-submit" ng-click="setSalePrice(150)">150%</span>
+							</div>
+						</div>
+						<div class="batch-date">
+							<p>批量设置交期:</p>
+							<div><span>交期(天)= </span><input type="number"> - <input type="number"></div>
+						</div>
+					</div>
+				</div>
 			</div>
 			<div class="wanted_list01">
 				<!--在售产品-->
@@ -1614,6 +1711,7 @@
 													<div class="labelling">
 														<!--<em>*</em>-->
 														自定义标签 : <input maxlength="20" type="text" ng-model="goods.editTag" ng-blur="blurTag(goods)" ng-change="changeTag(goods)" placeholder="请设置产品标签"></div>
+													<span>近一个月的销售平均价:10</span>
 												</td>
 											</tr>
 											<tr class="edit-content edits" >
@@ -1800,6 +1898,7 @@
 													<div class="labelling">
 														<!--<em>*</em>-->
 														自定义标签 : <input maxlength="20" type="text" ng-model="goods.editTag" ng-blur="blurTag(goods)" ng-change="changeTag(goods)" placeholder="请设置产品标签"></div>
+													<span>近一个月的销售平均价:10</span>
 												</td>
 											</tr>
 											<tr class="edit-content edits" ng-if="goods.edit">

+ 108 - 9
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_unstandard_erp.html

@@ -171,7 +171,8 @@
 	}
 	.search-check{
 		width: 100%;
-		height: 54px;
+		min-height: 54px;
+		height: auto;
 		background: #fff;
 		padding-top: 10px;
 		margin-bottom: 16px;
@@ -237,6 +238,65 @@
 	.search-check .check .check-active label{
 		margin-right: 0 !important;
 	}
+	.search-check .batch-operate {
+		clear: both;
+		background: #99FFFF;
+	}
+	.search-check .batch-operate .operate-head {
+		height: 40px;
+		line-height: 40px;
+		margin: 0 10px;
+		border-bottom: 1px solid;
+		padding: 0 20px;
+	}
+	.search-check .batch-operate .operate-head .check-active {
+		font-weight: normal;
+	}
+	.search-check .batch-operate .operate-content {
+		height: 70px;
+		line-height: 30px;
+	}
+	.search-check .batch-operate .operate-content > div {
+		display: inline-block;
+		float: left;
+	}
+	.search-check .batch-operate .operate-content > div:first-child {
+		margin-right: 50px;
+	}
+	.search-check .batch-operate .operate-content > div p {
+		font-weight: bold;
+	}
+	.search-check .batch-operate .operate-content > div p .batch-price-title {
+		margin-right: 91px;
+	}
+	.search-check .batch-operate .operate-content > div p .batch-progress {
+		width: 108px;
+		height: 5px;
+		background: #fff;
+		display: inline-block;
+		position: relative;
+	}
+	.search-check .batch-operate .operate-content > div p .batch-progress i {
+		width: 5px;
+		height: 10px;
+		background: #169BD5;
+		display: inline-block;
+		position: absolute;
+		top: -3px;
+	}
+	.search-check .batch-operate .operate-content > div p em {
+		margin: 0 5px;
+	}
+	.search-check .batch-operate .operate-content > div > div input {
+		padding: 0 5px;
+		height: 25px;
+	}
+	.search-check .batch-operate .operate-content .batch-sale input {
+		width: 42px;
+	}
+	.search-check .batch-operate .operate-content .batch-date input {
+		width: 56px;
+	}
 	.check-input input{
 		display: none;
 	}
@@ -1252,6 +1312,13 @@
 	#define-content .labelling em{
 		color: #f00;
 	}
+	#define-content td > span {
+		float: left;
+		margin-left: 20px;
+		font-size: 13px;
+		color: #008000;
+		line-height: 24px;
+	}
 	#define-content .labelling input{
 		padding-left: 10px;
 		width: 157px;
@@ -1518,18 +1585,48 @@
 					<a ng-click="download()">批量导出</a>
 				</div>
 				<div class="check fr">
-					<a ng-show="!isBatch && standard_tab == 'unstandard'" ng-click="matchAll()"><span ng-show="!isBatch && standard_tab == 'unstandard'">一键匹配</span></a>
-					<a ng-show="!isBatch" ng-click="enterBatch()"><span ng-show="!isBatch">批量操作</span></a>
-					<span class="check-btn" ng-show="isBatch">
-						<label class="check-active">
+					<a ng-click="matchAll()"><span>一键匹配</span></a>
+					<a ng-click="enterBatch()"><span>批量操作</span></a>
+					<!--<span class="check-btn" ng-show="isBatch">-->
+						<!--<label class="check-active">-->
+							<!--<input type="checkbox"  ng-click="chooseAll()" ng-checked="isChoosedAll" id="AllChoose"/>-->
+							<!--<label for="AllChoose"></label>-->
+							<!--<span>全选</span>-->
+						<!--</label>-->
+						<!--<a-->
+								<!--ng-click="deleteBatch()" name="delete-material">删除</a>-->
+						<!--<a ng-click="exitBatch()">取消</a>-->
+					<!--</span>-->
+				</div>
+				<div class="batch-operate">
+					<div class="operate-head">
+						<label class="check-active fl">
 							<input type="checkbox"  ng-click="chooseAll()" ng-checked="isChoosedAll" id="AllChoose"/>
 							<label for="AllChoose"></label>
 							<span>全选</span>
 						</label>
-						<a
-								ng-click="deleteBatch()" name="delete-material">删除</a>
-						<a ng-click="exitBatch()">取消</a>
-					</span>
+						<div class="fr">
+							<span class="com-btn-level1 com-btn-submit">上架</span>
+							<span class="com-btn-level1 com-btn-submit">保存</span>
+							<span class="com-btn-level1 com-btn-red">删除</span>
+							<span class="com-btn-level1 com-btn-cancel">取消</span>
+						</div>
+					</div>
+					<div class="operate-content">
+						<div class="batch-sale">
+							<p><span class="batch-price-title">批量设置销售价:</span><em>0</em><span class="batch-progress"><i style="left: {{salePrice ? salePrice > 200 ? '100%' : salePrice / 2 + '%' : 0}}"></i></span><em>200</em></p>
+							<div><span>销售价 = 近一个月的平均销售价 X </span><input type="number" ng-model="salePrice" ng-change="onSalePriceChange()"> %
+								<span class="com-btn-level2 com-btn-submit" ng-click="setSalePrice(100)">100%</span>
+								<span class="com-btn-level2 com-btn-submit" ng-click="setSalePrice(120)">120%</span>
+								<span class="com-btn-level2 com-btn-submit" ng-click="setSalePrice(130)">130%</span>
+								<span class="com-btn-level2 com-btn-submit" ng-click="setSalePrice(150)">150%</span>
+							</div>
+						</div>
+						<div class="batch-date">
+							<p>批量设置交期:</p>
+							<div><span>交期(天)= </span><input type="number"> - <input type="number"></div>
+						</div>
+					</div>
 				</div>
 			</div>
 			<div class="wanted_list01">
@@ -1614,6 +1711,7 @@
 													<div class="labelling">
 														<!--<em>*</em>-->
 														自定义标签 : <input maxlength="20" type="text" ng-model="goods.editTag" ng-blur="blurTag(goods)" ng-change="changeTag(goods)" placeholder="请设置产品标签"></div>
+													<span>近一个月的销售平均价:10</span>
 												</td>
 											</tr>
 											<tr class="edit-content edits" >
@@ -1800,6 +1898,7 @@
 													<div class="labelling">
 														<!--<em>*</em>-->
 														自定义标签 : <input maxlength="20" type="text" ng-model="goods.editTag" ng-blur="blurTag(goods)" ng-change="changeTag(goods)" placeholder="请设置产品标签"></div>
+													<span>近一个月的销售平均价:10</span>
 												</td>
 											</tr>
 											<tr class="edit-content edits" ng-if="goods.edit">