Parcourir la source

非标产品编辑操作

yangc il y a 8 ans
Parent
commit
276de0abb6

+ 1 - 1
src/main/webapp/resources/js/vendor/app.js

@@ -507,7 +507,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 		})).state('vendor_material_unstandard_erp', angularAMD.route({
 			title : '暂不可上架产品toErp',
 			url : '/vendor_material_unstandard_erp?standardParam',
-			templateUrl : 'static/view/vendor/forstore/erp/vendor_material_erp.html',
+			templateUrl : 'static/view/vendor/forstore/erp/vendor_material_unstandard_erp.html',
 			controllerUrl : "app/controllers/forstore/vendor_materialCtrl",
 			controller : 'vendor_materialCtrl'
 		})).state('vendor_onSale', angularAMD.route({

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

@@ -481,7 +481,7 @@ define([ 'app/app' ], function(app) {
 				angular.forEach($scope.currenctMaterial, function (material, index) {
 					material.isChoosed = false;
 					//第一个自动展开
-					if (index == 0) {
+					if (index == 0 && $stateParams.standardParam && $stateParams.standardParam =='unstandard') {
 						material.selected = true;
 					}
 				});

+ 654 - 0
src/main/webapp/resources/view/vendor/forstore/erp/vendor_material_unstandard_erp.html

@@ -0,0 +1,654 @@
+<!--右侧主体部分-->
+<style>
+	.tab.active {
+		display: inline-block !important;
+	}
+	*{-webkit-box-sizing: border-box;  -moz-box-sizing: border-box;  box-sizing: border-box;}
+	div.wanted_list01 dt.paging-bar>span {
+		float: right;
+		width: 322px;
+		height: 40px;
+		font-weight: normal;
+	}
+	div.wanted_list01 dt.paging-bar>span button.paging-button {
+		padding: 0;
+		height: 40px;
+		line-height: 40px;
+		border: none;
+		background: #FFFFFF;
+	}
+	div.wanted_list01 dt.paging-bar>span button.paging-button:hover {
+		color: #0C3894;
+	}
+	div.wanted_list01 dt.paging-bar>span input.page-num {
+		width: 25px;
+		height: 25px;
+		line-height: 40px;
+		border: 1px #C7BEBE solid;
+		text-align: center;
+	}
+	label[disabled] {
+		cursor: not-allowed;
+	}
+	.com_tab ul li.down-goods span:hover {
+		cursor: pointer;
+		text-decoration: underline;
+	}
+	.materrial-list span.length01{
+		width: 10% !important;
+	}
+	.materrial-list span{
+		width: 20% !important;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+	ul.pagination.ng-table-pagination > li > a > span {
+		height: 17px;
+		line-height: 17px;
+	}
+
+	div.ng-table-pager  input.page-number {
+		vertical-align: inherit;
+		display: inline-block;
+		width: 40px;
+		height: 31px;
+		padding: 6px 6px;
+		font-size: 14px;
+		line-height: 1.42857143;
+		color: #9B9792;
+		text-align: center;
+		background-color: #F6F5F4;
+		background-image: none;
+		border: 1px solid #ccc;
+		border-top-left-radius: 4px;
+		border-bottom-left-radius: 4px;
+		box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
+		transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
+	}
+
+	div.ng-table-pager a.page-a {
+		color: #fff;
+		cursor: pointer;
+		background-color: #4574E8;
+		border-color: #4574E8;
+		padding: 6px 6px;
+		font-size: 14px;
+		border-top-right-radius: 4px;
+		border-bottom-right-radius: 4px;
+		text-decoration: none;
+		height: 31px;
+	}
+
+	div.ng-table-pager div.page-go-block {
+		float: right;
+		margin-left: 20px;
+		margin-top: 15px;
+		font-size: 0px;
+		height: 31px;
+		line-height: 31px;
+	}
+	/*公用table*/
+	.public-tab{
+		margin-bottom: 0;
+	}
+	.public-tab.table tr td, .public-tab.table tr th {
+		font-size: 14px;
+		vertical-align: middle !important;
+	}
+	.public-tab.table>tbody+tbody{
+		border-top: none;
+	}
+	.public-tab.table>thead>tr{
+		height: 40px !important;
+	}
+	.public-tab.table>thead>tr>th,.public-tab.table>tbody>tr>td{
+		border-bottom: #e8e8e8 1px solid;
+		text-align: center;
+	}
+	.public-tab.table>tbody>tr>td{
+		border-top: none;
+		border-bottom: #e8e8e8 1px solid;
+	}
+	.public-tab.table>tbody>tr>td a{
+		margin: 0 10px;
+	}
+	.public-tab.table>tbody>tr>td .remind-notice {
+		color: #999;
+	}
+	.grey{
+		color: #999;
+	}
+	.search-check{
+		width: 100%;
+		height: 54px;
+		background: #fff;
+		padding-top: 10px;
+		margin-bottom: 16px;
+	}
+	.search-check .search{
+		width: 550px;
+		margin-left: 150px;
+	}
+	.search-check .search .form-control{
+		width: 340px;
+		float: left;
+		height: 34px;
+		border-radius: 0;
+		box-shadow: none;
+		border-right: none;
+	}
+	.search-check .search button,.search-check .search a{
+		display: inline-block;
+		width: 94px;
+		height: 34px;
+		line-height: 34px;
+		text-align: center;
+		font-size: 14px;
+	}
+	.search-check .search button{
+		background: #d3e1fc;
+		border-radius: 0;
+		border: #e2dbdb 1px solid;
+		border-left: none;
+	}
+	.search-check .search a{
+		background: #5078cb;
+		color: #fff;
+		float: right;
+	}
+	.search-check .search button:hover,.search-check .search a:hover{
+		color: #fff;
+		background: #3f7ae3;
+	}
+	.search-check .check{
+		font-size: 14px;
+		line-height: 35px;
+	}
+	.search-check .check a, .search-check .check label span{
+		font-size: 13px;
+		margin-right: 20px;
+		color: #333;
+	}
+	.search-check .check a:hover{
+		color: #5078cb;
+	}
+	.search-check .check .check-active{
+		margin-right: 15px;
+	}
+	.search-check .check .check-active span{
+		font-weight: normal;
+		color: #333;
+	}
+	.search-check .check .check-active label{
+		margin-right: 0 !important;
+	}
+	.check-input input{
+		display: none;
+	}
+	.check-input label {
+		width: 15px;
+		height: 15px;
+		display: inline-block;
+		background: url(static/img/user/images/check.png) no-repeat;
+		position: relative;
+		padding-left: 0 !important;
+		overflow: hidden;
+		margin-bottom: 0 !important;
+		vertical-align: sub;
+		min-height: 15px !important;
+		left: 0 !important;
+	}
+	.check-input input[type="checkbox"]:checked + label{
+		background-position: -15px 0;
+	}
+	.record-line{
+		min-height: 30px;
+		font-size: 12px;
+		line-height: 35px;
+		/* margin-top: 5px; */
+		padding-right: 22px
+	}
+	.device .tab{
+		padding-bottom: 20px;
+	}
+	.wanted_list01 .pagination{
+		margin: 0;
+	}
+	.ng-table-pager{
+		padding-bottom: 20px;
+	}
+	.com-del-box{
+		position: fixed;
+		z-index: 2;
+		height: 152px;
+		opacity: 1;
+		background-color: white;
+		width: 310px;
+		-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+		box-shadow: 0 5px 15px rgba(0,0,0,.5);
+		margin: -155px 0 0 -75px;
+		top: 55%;
+		left: 50%;
+	}
+	.com-del-box .title{
+		height: 30px;
+		background-color: #5078cb;
+		text-align: right;
+		padding-right: 15px;
+		line-height: 30px;
+	}
+	.com-del-box .title a{
+		color: white;
+		font-size: 16px;
+	}
+	.com-del-box .content{
+		width: 100%;
+		text-align: center;
+		margin: 0 auto;
+	}
+	.com-del-box .content p{
+		line-height: 50px;
+		font-size: 14px;
+		padding-top: 10px;
+		padding-bottom: 10px;
+	}
+	.com-del-box .content p i{
+		color: #5078cb;
+		font-size: 16px;
+		margin-right: 10px;
+	}
+	.com-del-box .content div{
+		width: 100%;
+		text-align: center;
+		margin: 0 auto;
+	}
+	.com-del-box .content div a{
+		width: 55px;
+		height: 26px;
+		line-height: 26px;
+		display: inline-block;
+		text-align: center;
+		font-size: 14px;
+	}
+	.com-del-box .content div a:first-child{
+		background: #b4b5b9;
+		color: #333;
+		margin-right: 10px;
+	}
+	.com-del-box .content div a:last-child{
+		background: #5078cb;
+		color: #fff;
+	}
+	.com-del-box .content div a:hover{
+		background: #3f7ae3;
+		color: #fff;
+	}
+	.record-line .prompt{
+		text-align: left;
+		width: 495px;
+		float: left;
+		line-height: 16px;
+		padding-left: 25px;
+		padding-top: 10px;
+	}
+	.record-line .prompt a{
+		color: #5078cb;
+	}
+	/*   编辑*/
+	.edit-content td{
+		background: #daecfb;
+		padding-bottom: 20px !important;
+	}
+	.edit-content img{
+		width: 60px;
+		border: #dfdfdf 1px solid;
+		height: 60px;
+	}
+	.edit-content .form-control{
+		height: 24px;
+		padding: 0;
+		text-align: center;
+		margin-bottom: 5px;
+		line-height: 24px;
+		font-size: 12px;
+		border-radius: 3px;
+	}
+	.edit-content select.form-control{
+		padding-left: 28px;
+		line-height: 23px;
+	}
+	.edit-content p{
+		font-size: 14px;
+	}
+	.edit-content select{
+		-webkit-appearance: inherit;
+		appearance: inherit;
+	}
+	.edit-content select option{
+		text-align: center;
+	}
+	.edit-content div.content,.edit-content div.img{
+		float: left;
+		margin-right: 5px;
+	}
+	.edit-content .wid36{
+		width: 36px;
+	}
+	.edit-content .wid48{
+		width: 48px;
+	}
+	.edit-content .wid42{
+		width: 42px;
+	}
+	.edit-content .wid92{
+		width: 92px;
+	}
+	.edit-content div .input-list p span{
+		float: left;
+		line-height: 24px;
+		color: #999;
+	}
+	.edit-content div .input-list p span input:first-child{
+		margin-left: 5px;
+	}
+	.edit-content .title{
+		height: 40px;
+		line-height: 40px;
+	}
+	.edit-content .reduce{
+		color: #faa002 !important;
+		margin: 0 !important;
+	}
+	.edit-content .add{
+		color: #2ea001 !important;
+		margin: 0 !important;
+	}
+	.edit-content button{
+		width: 62px;
+		height: 24px;
+		border: none;
+		color: #fff;
+		float: left;
+	}
+	.edit-content button.off{
+		background: #f15601;
+		margin-bottom: 5px;
+	}
+	.edit-content button.ok{
+		background: #33b401;
+	}
+	.edit-content button:hover{
+		background: #5078cb;
+	}
+	.edit-content .img .previewImage {
+		background: #fff;
+	}
+	.edit-content .img >span {
+		font-size: 12px;
+		color: #999;
+	}
+	.edit-content .content .material-form-line {
+		margin-bottom: 10px;
+	}
+	.edit-content .content .material-form-line >span {
+		font-size: 12px;
+		color: #008000;
+		font-weight: bold;
+		display: inline-block;
+		width: 104px;
+		text-align: right;
+	}
+	.edit-content .content .material-form-line >input {
+		display: inline-block;
+		width: 145px;
+		border-radius: 0;
+		text-align: left;
+		padding: 0 5px;
+	}
+	.edit-content .content .material-form-line>label input {
+		display: none;
+	}
+	.edit-content .content .material-form-line>label p {
+		background-color: rgba(22, 155, 213, 1);
+		width: 144px;
+		height: 25px;
+		line-height: 25px;
+		color: #fff;
+		font-size: 12px;
+		border-radius: 5px;
+	}
+	.wanted_list01 .tab table tr.active{
+		height: 35px;
+	}
+	.wanted_list01 .tab table tr.active td{
+		background: #c2dff7;
+	}
+	div.user_right input::-webkit-outer-spin-button,
+	div.user_right input::-webkit-inner-spin-button{
+		-webkit-appearance: none !important;
+		margin: 0;
+	}
+	div.user_right input[type="number"]{
+		-moz-appearance:textfield;
+	}
+	.public-tab td>div.ellipsis-div {
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis;
+	}
+	.restrict-color {
+		color: #c7c7c7;
+	}
+	a:focus {
+		text-decoration: none;
+	}
+	.col-xs-4 .f16{
+		font-size: 14px;
+	}
+	.pro_management .table tr td div span.switch{
+		width:39px;
+		height: 14px;
+		display: inline-block;
+	}
+	.pro_management .table tr td div span.switch button{
+		border: none;
+		position: relative;
+		top: 2px;
+		left: 5px;
+		width: 39px;
+		height: 14px;
+		background: url(static/img/icon/check-off.png) no-repeat center;
+	}
+	.pro_management .table tr td div span.switch button.active{
+		background: url("static/img/icon/check-ok.png") no-repeat center;
+	}
+	.com_tab ul li.active a {
+		color: #1687ff;
+	}
+	.
+</style>
+<div class="user_right fr">
+	<!--货品管理-->
+	<div class="pro_management device">
+		<div class="com_tab">
+			<ul class="fl" style="width: 100%">
+				<li ng-class="{'active': tab == 'material'}"><a ui-sref="vendor_material_erp({standardParam:'standard'})">可上架产品</a></li>
+				<li ng-class="{'active': tab == 'unstandard_material'}"><a ui-sref="vendor_material_unstandard_erp({standardParam:'unstandard'})">暂不可上架产品</a></li>
+				<li ng-class="{'active': tab == 'onSale'}"><a ui-sref="vendor_onSale_erp">已上架</a></li>
+				<li ng-class="{'active': tab == 'undercarriage'}"><a ui-sref="vendor_undercarriage_erp">上下架历史</a></li>
+			</ul>
+		</div>
+		<div class="search-check">
+			<div class="search fl">
+				<input type="text" class="form-control" ng-model="param.keyword" ng-search="onSearch()" placeholder="产品编号/品牌/产品型号"/>
+				<button ng-click="onSearch()">搜索</button>
+				<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>
+				<label class="check-active">
+				<input type="checkbox"  ng-click="chooseAll()" ng-checked="isChoosedAll" id="AllChoose"/>
+				<label for="AllChoose"></label>
+				<span>全选</span>
+				</label>
+				<a>提交申请</a>
+				<a>忽略选中</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()">删除</a>-->
+                    <!--<a ng-click="exitBatch()">取消</a>-->
+                <!--</span>-->
+			</div>
+		</div>
+		<div class="wanted_list01">
+			<!--在售产品-->
+			<div class="tab">
+				<table class="public-tab table">
+					<thead>
+					<tr>
+						<th width="80">序号</th>
+						<th width="180">产品编号</th>
+						<th width="200">产品名称(类目)</th>
+						<th width="150">品牌</th>
+						<th width="100">单位</th>
+						<th>产品型号</th>
+						<th width="150">操作</th>
+					</tr>
+					</thead>
+					<tbody>
+					<tr style="height: 14px;">
+						<td colspan="7" class="hei16"></td>
+					</tr>
+					</tbody>
+					<tbody ng-repeat="material in currenctMaterial">
+					<tr ng-class="{ 'active': material.selected }">
+						<td class="check-input">
+							<span ng-show="isBatch"><input type="checkbox" ng-checked="material.isChoosed"  ng-click="chooseOne(material)"  id="{{$index+1}}"/><label for="{{$index+1}}"></label><br/></span>
+							<span ng-show="!isBatch" ng-bind="(param.currentPage - 1) * 10 + $index + 1"></span>
+						</td>
+						<td ng-bind="material.prodNum" title="{{material.prodNum}}"></td>
+						<td>
+							<span ng-if="material.kind" ng-bind="material.kind" title="{{material.kind}}"></span>
+							<span ng-if="!material.kind" ng-bind="material.kinden" title="{{material.kinden}}"></span>
+						</td>
+						<td>
+							<div class="ellipsis-div" ng-if="material.pbranden" ng-bind="material.pbranden" title="{{material.pbranden}}"></div>
+							<div class="ellipsis-div" ng-if="!material.pbranden" ng-bind="material.pbrand" title="{{material.pbrand}}"></div>
+						</td>
+						<td ng-bind="material.unit || 'PCS'" title="{{material.unit  || 'PCS'}}"></td>
+						<td>
+							<a ng-if="material.cmpUuId" ng-href="product/component/{{material.cmpUuId}}/" ng-bind="material.pcmpcode" title="{{material.pcmpcode}}" style="color: #333;"></a>
+							<span ng-if="!material.cmpUuId" ng-bind="material.pcmpcode" title="{{material.pcmpcode}}"></span>
+						</td>
+						<td>
+							<!--<a ng-show="!material.selected&&!isBatch && standard_tab == 'standard'" ng-click="showShelfArea(material)"><span ng-show="!isBatch">去上架</span></a>-->
+							<!--<a ng-show="!material.selected&&!isBatch && standard_tab == 'unstandard'" ng-click="match(material)"><span ng-show="!isBatch">匹配</span></a>-->
+							<!--<a ng-show="!material.selected&&!isBatch" ng-click="deleteMaterial(material)"><span ng-show="!isBatch">删除</span></a>-->
+							<!--<a ng-if="material.selected">取消</a>-->
+							<a ng-show="!material.selected&&!isBatch && standard_tab == 'standard'" ng-click="showShelfArea(material)"><span ng-show="!isBatch">编辑</span></a>
+							<a ng-show="!material.selected&&!isBatch && standard_tab == 'unstandard'" ng-click="match(material)"><span ng-show="!isBatch">保存</span></a>
+							<a ng-show="!material.selected&&!isBatch" ng-click="deleteMaterial(material)"><span ng-show="!isBatch">查看</span></a>
+							<a ng-if="material.selected">忽略</a>
+							<!--<span class="remind-notice">审核中</span>-->
+						</td>
+					</tr>
+					<!--编辑内容-->
+					<tr class="edit-content" ng-if="material.selected">
+						<td colspan="7">
+							<div class="img">
+								<div image-upload data-src="static/img/vendor/images/upload.png" on-success=""></div>
+								<span>支持jpg、png</span>
+							</div>
+							<div class="content">
+								<div class="material-form-line">
+									<span>*品牌英文名:</span>
+									<input type="text" class="form-control">
+								</div>
+								<div class="material-form-line">
+									<span>*品牌官网:</span>
+									<input type="text" class="form-control">
+								</div>
+							</div>
+							<div class="content" style="margin-left: 257px;">
+								<div class="material-form-line">
+									<span>*原厂标准型号:</span>
+									<input type="text" class="form-control">
+								</div>
+								<div class="material-form-line">
+									<span>*器件分类:</span>
+									<input type="text" class="form-control">
+								</div>
+								<div class="material-form-line">
+									<span>*规格书:</span>
+									<label>
+										<input type="file" class="form-control">
+										<p>上传规格书(pdf格式)</p>
+									</label>
+								</div>
+							</div>
+							<div class="content" style="width: 56px; float: right; margin-right: 10px;">
+								<p class="title">&nbsp;</p>
+								<div class="input-list">
+									<button class="ok" ng-click="closeShelArea(material)" style="margin-bottom: 5px">取消</button>
+									<!--<button class="ok" ng-click="publishGoods(material)" style="margin-bottom: 5px">保存</button>-->
+									<button class="ok" ng-click="publishGoods(material)">提交申请</button>
+								</div>
+							</div>
+						</td>
+					</tr>
+					</tbody>
+					<tbody ng-if="currenctMaterial.length == 0">
+					<tr style="height: 190px;">
+						<td colspan="7" style="border-bottom: none;">
+							<div class="col-xs-2"  style="margin-left: 34%; margin-top: 65px;">
+								<img src="static/img/all/empty-cart.png">
+							</div>
+							<div class="col-xs-4">
+								<p class="grey f16" style="line-height: 80px; text-align: left; margin-top: 70px;">暂无物料资料记录</p>
+							</div>
+						</td>
+					</tr>
+					</tbody>
+				</table>
+				<!--<div class="record-line text-right" ng-if="currenctMaterial.length != 0">-->
+					<!--<div class="prompt" ng-show="standard_tab == 'unstandard'">-->
+						<!--<strong class="text-inverse">*</strong>商城暂未收录的 品牌/器件,”原厂型号“将会显示为空且不可上架售卖,<br/>-->
+						<!--如需上架可先点击 【匹配】按钮,若匹配不成功,可前往<a ui-sref="vendor_brand_apply" target="_blank"> 品牌申请/</a><a ui-sref="vendor_component_apply" target="_blank">器件申请</a>,提出申请-->
+					<!--</div>-->
+					<!--<div ng-if="currenctMaterial.length != 0">显示 {{(param.currentPage - 1) * 10 + 1}}-&lt;!&ndash;<span ng-bind="materialAll.size"></span>&ndash;&gt;{{ param.currentPage * 10 }}, 共: <span ng-bind="materialAll.totalElements" cl style="color: #5078cb;"></span> 个</div>-->
+				<!--</div>-->
+				<div class="ng-cloak ng-table-pager" style="text-align: right;margin-right: 60px;" ng-if="materialAll.totalPages>1">
+					<ul class="pagination ng-table-pagination">
+						<li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
+							<a ng-switch-when="prev" ng-click="setPage(page.type, -1)" href="">&laquo;</a>
+							<a ng-switch-when="first" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="page" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="more" ng-click="setPage(page.type, -1)" href="">&#8230;</a>
+							<a ng-switch-when="last" ng-click="setPage(page.type, page.number)" href=""><span ng-bind="page.number"></span></a>
+							<a ng-switch-when="next" ng-click="setPage(page.type, -1)" href="">&raquo;</a>
+						</li>
+					</ul>
+					<div class="page-go-block">
+						<input class="page-number" type="text" ng-model="param.currentPage" ng-keydown="listenEnter()"/>
+						<a class="page-a" ng-click="setPage('page', param.currentPage)" href="">GO</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+<div class="com-del-box" ng-if="deleteDiv">
+	<div class="title">
+		<a ng-click="cancleDelete()"><i class="fa fa-close fa-lg"></i></a>
+	</div>
+	<div class="content">
+		<p><i class="fa fa-exclamation-circle"></i>是否删除选中产品</p>
+		<div><a ng-click="cancleDelete()">取消</a><a ng-click="confirmDelete()">确认</a></div>
+	</div>
+</div>