fanxw 2 anni fa
parent
commit
538f894324

+ 65 - 0
src/main/resources/static/app/business/contractReceive/controller/contractReceiveCtrl.js

@@ -0,0 +1,65 @@
1
+"use strict";
2
+
3
+angular.module('app.business')
4
+    .controller("contractReceiveCtrl", function ($scope, $http, $state, $rootScope, contractReceiveService, warehouseService, $filter, $stateParams, APP_CONFIG) {
5
+        // 获取列表数据
6
+        $scope.pageInfo = {pageNum: 1, pageSize: 10};
7
+        $scope.search = {htbh: "", houseId: "", warehouseId: ""};
8
+
9
+        $scope.loadData = function () {
10
+        	contractReceiveService.getPageInfo($scope.pageInfo.pageNum, 
11
+        			$scope.pageInfo.pageSize, 
12
+        			$scope.search.htbh,
13
+        			$scope.search.houseId,
14
+        			$scope.search.warehouseId).then(function (data) {
15
+                $scope.pageInfo = data;
16
+            }, function (data) {
17
+                console.log(data);
18
+            });
19
+        }
20
+
21
+        $scope.loadData();
22
+        
23
+        $scope.getBasicData = function() {
24
+    		//按照单位获取单位下的仓房信息
25
+    		var orgId = $rootScope.orgInfo.orgId;
26
+    		warehouseService.getStorehouse(orgId, $scope.search.houseId, "0").then(function(data){
27
+    			$scope.warehouseList = data.wareList;  //下拉列表数据
28
+    			//$scope.warehouseObj = data.wares;	//查询数据列表货位信息转换
29
+    		},function (data) {
30
+    			console.log(data);
31
+    		});
32
+
33
+    	}
34
+
35
+        //查看
36
+        $scope.checkView = function (id) {
37
+            $state.go("app.business.grainReservesManage-contractReceiveList.edit", {btnType: "view", id: id});
38
+        }
39
+
40
+        // 翻页
41
+        $scope.goPage = function(pageNum) {
42
+            if ($scope.pageInfo.pageNum != pageNum && pageNum > 0) {
43
+                $scope.pageInfo.pageNum = pageNum;
44
+                $scope.loadData();
45
+            }
46
+        }
47
+
48
+    })
49
+    .controller("contractReceiveEditCtrl", function ($scope, $http, $state, $rootScope, $filter, contractReceiveService, $stateParams, APP_CONFIG) {
50
+
51
+    	// 初始化页面数据
52
+    	$scope.edit = function() {
53
+    		contractReceiveService.loadDataById($stateParams.id).then(function(data){
54
+    			$scope.contractReceive = data.data;
55
+    		},function(data){
56
+    			console.log(data);
57
+    		});
58
+    	}
59
+    	$scope.edit();
60
+
61
+        //返回
62
+   	    $scope.retList = function () {
63
+            $state.go("app.business.grainReservesManage-contractReceiveList");
64
+        }
65
+    });

+ 45 - 0
src/main/resources/static/app/business/contractReceive/service/contractReceiveService.js

@@ -0,0 +1,45 @@
1
+"use strict";
2
+
3
+angular.module('app.business').service("contractReceiveService", function($http, $q, APP_CONFIG,$rootScope) {
4
+    //盘点列表
5
+	this.getPageInfo = function(pageNum, pageSize, htbh, houseId, warehouseId){
6
+		var d = $q.defer();
7
+		$http({
8
+			method : 'GET',
9
+			url : APP_CONFIG.businessUrl + '/businessContractReceiveController/getList',
10
+			params : {
11
+				pageNum : pageNum,
12
+				pageSize : pageSize,
13
+				htbh: htbh,
14
+                houseId: houseId,
15
+                warehouseId: warehouseId,
16
+                orgId: $rootScope.userInfo.orgId
17
+			}
18
+		}).then(function successCallback(response) {
19
+			// 请求成功执行代码
20
+			d.resolve(response.data);
21
+		}, function errorCallback(response) {
22
+			// 请求失败执行代码
23
+			d.reject("error");
24
+		});
25
+		return d.promise;
26
+	}
27
+
28
+    //详情
29
+    this.loadDataById = function(id){
30
+        var d = $q.defer();
31
+        $http({
32
+            method: 'GET',
33
+            url: APP_CONFIG.businessUrl + '/businessContractReceiveController/findbyparmaryKey',
34
+            params: {
35
+                id : id
36
+            }
37
+        }).then(function successCallback(response) {
38
+            d.resolve(response.data);
39
+        }, function errorCallback(response) {
40
+            //console.log(response);
41
+        });
42
+        return d.promise;
43
+    }
44
+
45
+})

+ 155 - 0
src/main/resources/static/app/business/contractReceive/views/contractReceive-edit.html

@@ -0,0 +1,155 @@
1
+<!-- MAIN CONTENT -->
2
+<div id="content" style=" border-width:5px; margin-left:2%;position:relative;margin-right:2%;">
3
+    <!-- widget grid -->
4
+    <section id="widget-grid" widget-grid>
5
+        <!-- START ROW -->
6
+        <div class="row">
7
+            <!-- NEW COL START -->
8
+            <article class="col-sm-12 col-md-12 col-lg-12">
9
+                <!-- Widget ID (each widget will need unique ID)-->
10
+                <div jarvis-widget id="form-grid-widget"
11
+                    data-widget-colorbutton="false" data-widget-editbutton="false"
12
+                    data-widget-custombutton="false">
13
+                    <!-- widget div-->
14
+                    <div>
15
+                        <!-- widget content -->
16
+                        <div class="widget-body no-padding">
17
+                            <form id="contractReceive-form" class="smart-form ng-pristine ng-valid" data-validator-option="validateOptions" novalidate="novalidate" style=" border-width:5px; margin-left:2%;position:relative;margin-right:2%;">
18
+                                <header>
19
+									<a href-void class="btn btn-default btn-xs" ng-click="retList()">
20
+										<i class="fa fa-angle-left"></i>&nbsp;返回&nbsp;
21
+									</a>
22
+									&nbsp;<strong>接收合同详情</strong>
23
+								</header>
24
+                                <fieldset>
25
+                              	<div>
26
+                              		    <section class="col col-4">
27
+											<label class="label">合同编号:</label>
28
+											<label class="input">
29
+												<input type="text" ng-model="contractReceive.htbh" name="htbh" ng-readonly="true">
30
+											</label>
31
+										</section>
32
+										<section class="col col-4">
33
+											<label class="label">合同类型:</label>
34
+										    <label class="select">
35
+												<select name="htlx" ng-model="contractReceive.htlx" ng-disabled="true">
36
+													<option value="">--请选择--</option>
37
+													<option value="0">采购</option>
38
+													<option value="1">销售</option>
39
+												</select> <i></i>
40
+											</label>
41
+										</section>
42
+										<section class="col col-4">
43
+											<label class="label">合同总数量(吨):</label>
44
+											<label class="input">
45
+												<input type="text" ng-model="contractReceive.htzsl" name="htzsl" ng-readonly="true">
46
+											</label>
47
+										</section>
48
+                              	</div>
49
+                              	<div>
50
+									<section class="col col-4">
51
+										<label class="label">仓房名称:</label>
52
+										 <label class="input">
53
+											<input type="text" ng-model="storehouseObj[contractReceive.houseId].storehouseName" name="houseId" ng-readonly="true">
54
+										</label> 
55
+									</section>
56
+									<section class="col col-4">
57
+										<label class="label">货位名称:</label>
58
+										<label class="input">
59
+											<input type="text" ng-model="wares[contractReceive.warehouseId].warehouseName" name="warehouseId" ng-readonly="true">
60
+										</label> 
61
+									</section>
62
+                              		<section class="col col-4">
63
+										<label class="label">合同单价(元/吨):</label>
64
+										<label class="input">
65
+											<input type="text" ng-model="contractReceive.htdj" name="htdj" ng-readonly="true" />
66
+										</label>
67
+									</section>
68
+                              	</div>
69
+                              	<div>
70
+									<section class="col col-4">
71
+										<label class="label">合同总价(元):</label>
72
+										<label class="input">
73
+											<input type="text" ng-model="contractReceive.htzj" name="htzj" ng-readonly="true" />
74
+										</label>
75
+									</section>
76
+									<section class="col col-4">
77
+										<label class="label">粮油品种:</label>
78
+										<label class="input">
79
+											<input type="text" ng-model="dicData[contractReceive.lypz]" name="lypz" ng-readonly="true" />
80
+										</label>
81
+									</section>
82
+									<section class="col col-4">
83
+										<label class="label">明细品种:</label>
84
+										<label class="input">
85
+											<input type="text" ng-model="dicData[contractReceive.mxpz]" name="mxpz" ng-readonly="true" />
86
+										</label>
87
+									</section>
88
+								</div>
89
+                              	<div>
90
+                              		<section class="col col-4">
91
+										<label class="label">粮油等级:</label>
92
+										<label class="input">
93
+											<input type="text" ng-model="dicData[contractReceive.lydj]" name="lydj" ng-readonly="true" />
94
+										</label>
95
+									</section>
96
+									<section class="col col-4">
97
+										<label class="label">粮油性质:</label>
98
+										<label class="input">
99
+											<input type="text" ng-model="dicData[contractReceive.lyxz]" name="lyxz" ng-readonly="true" />
100
+										</label>
101
+									</section>
102
+									<section class="col col-4">
103
+										<label class="label">生产年份:</label>
104
+										<label class="input">
105
+											<input type="text" ng-model="dicData[contractReceive.scnf]" name="scnf" ng-readonly="true" />
106
+										</label>
107
+									</section>
108
+                              	</div>
109
+                              	<div>
110
+                              		<section class="col col-4">
111
+										<label class="label">收货年度:</label>
112
+										<label class="input">
113
+											<input type="text" ng-model="dicData[contractReceive.shnd]" name="shnd" ng-readonly="true" />
114
+										</label>
115
+									</section>
116
+									<section class="col col-4">
117
+										<label class="label">粮油产地:</label>
118
+										<label class="input">
119
+											<input type="text" ng-model="dicData[contractReceive.lycd]" name="lycd" ng-readonly="true" />
120
+										</label>
121
+								    </section> 					
122
+									<section class="col col-4">
123
+										<label class="label">客户名称:</label>
124
+										<label class="input">
125
+											<input type="text" ng-model="contractReceive.khmc" name="khmc" ng-readonly="true" />
126
+										</label>
127
+									</section>
128
+                              	</div>
129
+								<div>
130
+									<section class="col col-4">
131
+										<label class="label">数据接收时间:</label>
132
+										<label class="input">
133
+											<input type="text" ng-model="contractReceive.inputTime" name="inputTime" ng-readonly="true" />
134
+										</label>
135
+									</section>
136
+									<section class="col col-4">
137
+										<label class="label">最后修改时间:</label>
138
+										<label class="input">
139
+											<input type="text" ng-model="contractReceive.updateTime" name="updateTime" ng-readonly="true" />
140
+										</label>
141
+									</section>
142
+								</div>
143
+                                </fieldset>
144
+                                <div><!--class="form-actions"-->
145
+                                    <footer class="text-align-center">
146
+                                        <button type="button" class="btn btn-default" ng-click="retList()">返回</button>
147
+                                    </footer>
148
+                                </div>
149
+							</form>
150
+                        </div>
151
+                    </div>
152
+            </article>
153
+		</div>
154
+	</section>
155
+</div>

+ 99 - 0
src/main/resources/static/app/business/contractReceive/views/contractReceive-list.html

@@ -0,0 +1,99 @@
1
+<!-- MAIN CONTENT -->
2
+<div id="content">
3
+    <!-- widget grid -->
4
+    <section widget-grid id="widget-grid">
5
+        <div class="row">
6
+            <article class="col-sm-12">
7
+                <div jarvis-widget id="standard-datatable-widget" data-widget-color="darken" data-widget-editbutton="false">
8
+                    <header>
9
+                        <span class="widget-icon"> <i class="fa fa-table"></i> </span>
10
+                        <h2>接收合同 </h2>
11
+                    </header>
12
+                    <div>
13
+                        <div class="widget-body no-padding">
14
+                        <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline no-footer">
15
+							<div class="dt-toolbar">
16
+								<div class="col-xs-12 col-sm-10">
17
+									<div class="form-group">
18
+										<label> 仓房名称:&emsp;
19
+                                            <select ng-model="search.houseId" class="form-control input-sm"
20
+                                                    ng-options="store.storehouseId as store.storehouseName for store in store_tank_list"
21
+                                                    ng-change="getBasicData()">
22
+                                                <option value="">请选择</option>
23
+                                            </select>&emsp;
24
+                                        </label>
25
+                                        <label> 货位名称:&emsp;
26
+                                            <select ng-model="search.warehouseId" class="form-control input-sm"
27
+                                                    ng-options="ware.warehouseId as ware.warehouseName for ware in warehouseList">
28
+                                                <option value="">请选择</option>
29
+                                            </select>&emsp;
30
+                                        </label>
31
+                                        <label>合同编号:&emsp;
32
+                                            <input type="text" ng-model="search.htbh" class="form-control input-sm" placeholder="" />&emsp;
33
+                                        </label>
34
+										<a class="btn btn-default btn-sm" ng-click="loadData()">
35
+											<i class="fa fa-search"></i>&nbsp;查&nbsp;询
36
+									    </a>
37
+									</div>
38
+								</div>
39
+								<!-- <div class="col-xs-2 col-sm-1">
40
+									<a href-void class="btn btn-primary btn-sm" ng-click="moreDelete()"><i class="fa fa-trash-o"></i>&nbsp;批&nbsp;量&nbsp;结&nbsp;束</a>
41
+								</div> -->
42
+								<div class="col-sm-2 col-xs-1 hidden-xs">
43
+									<div class="dataTables_length">
44
+										<label>每页显示 <select ng-model="pageInfo.pageSize" ng-change="loadData()"
45
+															ng-options="num as num for num in [10,25,50,100]"
46
+															class="form-control input-sm"></select> 条
47
+										</label>
48
+									</div>
49
+								</div>
50
+							</div>
51
+
52
+
53
+						<table class="table table-striped table-bordered table-hover" width="100%">
54
+                        <thead>
55
+                        <tr>
56
+                            <th data-hide="phone">序号</th>
57
+							<th data-class="expand">合同编号</th>
58
+							<th data-class="expand">合同类型</th> 
59
+                            <th data-class="expand">仓房名称</th>
60
+                            <th data-class="expand">货位名称</th>
61
+							<th data-class="expand">合同数量(吨)</th> 
62
+                            <th data-class="expand">合同单价(元/吨)</th>
63
+                            <th data-class="expand">合同总价</th>
64
+                            <th data-class="expand">明细品种</th>
65
+                            <th data-class="expand">客户名称</th>
66
+                            <th data-class="expand">接收时间</th>
67
+                            <th data-class="expand"> 操作</th>
68
+                        </tr>
69
+                        </thead>
70
+                        <tbody>
71
+                        	<tr ng-repeat="contractReceive in pageInfo.list">
72
+								<th align="center">{{$index + 1 + (pageInfo.pageNum-1) * pageInfo.pageSize}}</th>
73
+								<td>{{contractReceive.htbh}}</td>
74
+								<td>{{contractReceive.htlx==0?"采购":"销售"}}</td>
75
+								<td>{{storehouseObj[contractReceive.houseId].storehouseName}}</td> 
76
+								<td>{{wares[contractReceive.warehouseId].warehouseName}}</td>
77
+								<td>{{contractReceive.htzsl}}</td>
78
+								<td>{{contractReceive.htdj}}</td>
79
+								<td>{{contractReceive.htzj}}</td>
80
+								<td>{{dicData[contractReceive.mxpz]}}</td>
81
+								<td>{{contractReceive.khmc}}</td>
82
+								<td>{{contractReceive.inputTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
83
+								<td>
84
+									<a href-void ng-click="checkView(contractReceive.id)"><i class="fa fa-info-circle"></i>查看</a>
85
+                        		</td>
86
+                        	</tr>
87
+                        </tbody>
88
+
89
+                        </table>
90
+							<div smart-include="app/layout/partials/page.tpl.html"></div>
91
+						</div>
92
+                    	</div>
93
+                    </div>
94
+                </div>
95
+            </article>
96
+        </div>
97
+    </section>
98
+</div>
99
+

+ 1 - 0
src/main/resources/static/app/business/customer/controller/customerSaveCtrl.js

@@ -185,6 +185,7 @@ angular.module('app.business').controller("customerSaveCtrl", function($scope, $
185 185
     			// 设置saveFlag为true,防止重复提交.
186 186
     			$scope.saveFlag = true;
187 187
     			$scope.orgId=$rootScope.userInfo.orgId;
188
+    			$scope.customer.sfwz = "0";//从前端保存的数据默认为完整数据
188 189
     			customerService.save($scope.customer,$scope.orgId).then(function(data) {
189 190
     				if(data.status == "success"){
190 191
     					alert("保存成功!");

+ 28 - 0
src/main/resources/static/app/business/module.js

@@ -3462,6 +3462,34 @@ angular.module('app.business')
3462 3462
             }
3463 3463
         })
3464 3464
         
3465
+        /***************************************接收合同 start*******************************************/
3466
+        .state('app.business.grainReservesManage-contractReceiveList', {
3467
+        	url: '/business/grainReservesManage-contractReceiveList',
3468
+        	data: {
3469
+        		title: '接收合同'
3470
+        	},
3471
+        	views: {
3472
+        		"content@app": {
3473
+        			controller: 'contractReceiveCtrl',
3474
+        			templateUrl: 'app/business/contractReceive/views/contractReceive-list.html'
3475
+        		}
3476
+        	}
3477
+        })
3478
+        .state('app.business.grainReservesManage-contractReceiveList.edit', {
3479
+        	url: '/business/grainReservesManage-contractReceiveList/edit/:btnType/:id',
3480
+        	data: {
3481
+        		title: '接收合同详情'
3482
+        	},
3483
+        	views: {
3484
+        		"content@app": {
3485
+        			controller: 'contractReceiveEditCtrl',
3486
+        			templateUrl: 'app/business/contractReceive/views/contractReceive-edit.html'
3487
+        		}
3488
+        	}
3489
+        })
3490
+        
3491
+        /***************************************接收合同 end*******************************************/
3492
+        
3465 3493
      //---------------------------------性质转变单审批--------------------------------
3466 3494
         .state('app.business.propertyTransitionSheet-audit', {
3467 3495
         	url: '/business/propertyTransitionSheet-audit',

+ 2 - 2
src/main/resources/static/app/layout/partials/navigation.tpl.html

@@ -139,8 +139,8 @@
139 139
                             <i class="fa fa-fw fa-folder-open"></i>储备粮管理
140 140
                         </a>
141 141
                         <ul>
142
-                            <li has-func="0" data-ui-sref-active="active">
143
-                                <a data-ui-sref="app.business.grainReservesManage-receiveNotice">接收合同</a>
142
+                            <li has-func="272" data-ui-sref-active="active">
143
+                                <a data-ui-sref="app.business.grainReservesManage-contractReceiveList">接收合同</a>
144 144
                             </li>
145 145
                             <li has-func="273" data-ui-sref-active="active">
146 146
                                 <a data-ui-sref="app.business.grainReservesManage-receiveNotice">接收通知单</a>