Jelajahi Sumber

fix: 谈心谈话调整

zhangying 1 bulan lalu
induk
melakukan
70533ba9d5

+ 70 - 1
src/main/resources/static/app/main/partylife/txth/edit.html

@@ -43,7 +43,7 @@
                                 </td>
                                 <th>会议参加人数<span style="color:red;">*</span></th>
                                 <td ng-class="{ 'has-error' : this.editForm.usercount.$invalid &&  this.editForm.$submitted}">
-                                    <input type="number" class="form-control" name="usercount"
+                                    <input type="number" class="form-control" name="usercount" ng-disabled="true"
                                            ng-model="dataModel.usercount" min="0" ng-required="true"/>
                                 </td>
                             </tr>
@@ -56,6 +56,75 @@
                             </tr>
                         </table>
                     </div>
+
+                    <div class="dj-formtable">
+                        <div class="table-responsive list-table-panel">
+                            <div class="list-table-title">
+                                <div class="table-title">
+                                    被谈话人员列表({{dataModel.personnellist.length}}人)
+                                </div>
+                                <div class="table-tool">
+                                    <button type="button" class="btn btn-primary dropdown-toggle"
+                                            data-dataoptions="selectUserlist" title="新增"
+                                            ng-click="selectUser()"
+                                            bsselectdata-pro>
+                                        新增
+                                    </button>
+                                </div>
+                            </div>
+                            <div class="outoflow" style="max-height: 300px;">
+                                <table class="table table-bordered table-striped table-hover js-basic-example dataTable text-nowrap">
+                                    <thead>
+                                    <tr>
+                                        <th>序号</th>
+                                        <th>姓名</th>
+                                        <th>是否缺勤</th>
+                                        <th>缺勤原因</th>
+                                        <th>操作</th>
+                                    </tr>
+                                    </thead>
+                                    <tbody>
+                                    <tr ng-repeat="it in dataModel.personnellist">
+                                        <td scope="row">{{$index+1}}</td>
+                                        <td>{{it.xm}}</td>
+                                        <td>
+                                            <input type="checkbox" id="{{pageId}}_checkbox_{{$index+1}}"
+                                                   class="filled-in chk-col-red" ng-checked="it.isabsenteeism==1"
+                                                   ng-click="it.isabsenteeism==1?it.isabsenteeism=0:it.isabsenteeism=1"/>
+                                            <label class="checkbox_lable" style="height: 10px;"
+                                                   for="{{pageId}}_checkbox_{{$index+1}}">{{it.isabsenteeism == 1 ? "是" : "否"}}</label>
+                                        </td>
+                                        <td>
+                                            <textarea name="absenteeismcause" ng-model="it.absenteeismcause"
+                                                      class="form-control" rows="3"></textarea>
+                                        </td>
+                                        <td class="text-center">
+                                            <button class="btn td-btn bg-pink waves-effect"
+                                                    ng-click="deleteUser($index)" title="删除">
+                                                删除
+                                            </button>
+                                        </td>
+                                    </tr>
+                                    <tr ng-if="dataModel.personnellist.length<=0">
+                                        <td colspan="7" style="text-align:center">暂无数据</td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="dj-formtable">
+                        <table class="dj-table">
+                            <tr>
+                                <th style="width: 5%;">谈话人</th>
+                                <td colspan="5">
+                                    <input type="text" name="personnel" ng-model="dataModel.personnel"
+                                           autocomplete="off" autoclose="true" class="form-control"/>
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+
                     <bsfiles ng-model="reqFileModel"/>
                     <div class="form_foot">
                         <button type="button" class="btn btn-default" ng-click="$hide()">取消</button>

+ 68 - 0
src/main/resources/static/app/main/partylife/txth/edit.js

@@ -79,6 +79,74 @@ var pfMeetingTxth_editCtrl = function ($scope, $http, $alert, $loading,$partySel
         }
     };
 
+    //选择会议成员
+    $scope.selectUserlist = {
+        url: "../../api/partyUser/getPartyUserList",
+        title: '人员选择',
+        isMulti: true,
+        selectData: {xm: '姓名', szdzb: '所在组织架构'},
+        columns: {XM: '姓名', XBMC: '性别', JG: '籍贯', DZZMC: '所在组织架构'},
+        selectLabelKey: 'XM',
+        selectValuekey: 'RYJBXXBS',
+        selectedValueData: '',
+        selectedLabeData: '',
+        selectedJData: [],
+        selectParams: {
+            dzzdm: $scope.dataModel.partycode,
+            removeUsers: '',
+            //szdzbdm: $scope.dataModel.shyktype == 2 ? $scope.dataModel.partycode : '',
+            ryzt: '2,3' //预备党员,正式党员
+        }
+    };
+    $scope.$watch('selectUserlist.selectedValueData', function (newVal) {
+        if (newVal != '' && newVal != undefined) {
+            $http({
+                method: 'get',
+                url: '../../api/partyUser/getPartyUserList',
+                params: {
+                    userIds: newVal,
+                    pageindex: 1,
+                    pagesize: 10000
+                }
+            }).then(function (result) {
+                $loading.hide();
+                result.data.item.list.forEach(item => {
+                    item.SIGNINSTATUS = 2;
+                });
+                let data = [];
+                result.data.item.list.forEach(x=>{
+                    data.push({rybm: x.RYBM, ryjbxxbs: x.RYJBXXBS, xm: x.XM, isabsenteeism: 0, absenteeismcause: ''});
+                })
+                $scope.dataModel.personnellist = $scope.dataModel.personnellist.concat(data);
+
+                $scope.dataModel.usercount = $scope.dataModel.personnellist.length
+
+                $scope.selectUserlist.selectedValueData = "";
+                $scope.selectUserlist.selectedLabeData = "";
+            }, function (resp) {
+                $loading.hide();
+                $scope.showMsg('错误', '服务器错误');
+            });
+        }
+    });
+    $scope.$watch('dataModel.personnellist', function (newVal) {
+        if($scope.dataModel.personnellist){
+            $scope.setRemoveUser();
+        }
+    }, true);
+    $scope.setRemoveUser = function () {
+        $scope.selectUserlist.selectParams.removeUsers = "";
+        angular.forEach($scope.dataModel.personnellist, function (val, index) {
+            $scope.selectUserlist.selectParams.removeUsers += val.ryjbxxbs + ','
+        });
+    };
+    //人员操作
+    $scope.deleteUser = function (index) {
+        if (confirm("请确认是否需要移除参会人员!")) {
+            $scope.dataModel.personnellist.splice(index, 1);
+        }
+    };
+
     $scope.getData();
 
 };